summaryrefslogtreecommitdiff
path: root/mate-panel/libmate-panel-applet-private
diff options
context:
space:
mode:
Diffstat (limited to 'mate-panel/libmate-panel-applet-private')
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-container.c21
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-container.h2
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c4
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.h1
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c16
-rw-r--r--mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.h1
6 files changed, 20 insertions, 25 deletions
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-container.c b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
index 9a4945a0..bd2269e9 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-container.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-container.c
@@ -2,6 +2,7 @@
* panel-applet-container.c: a container for applets.
*
* Copyright (C) 2010 Carlos Garcia Campos <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -160,25 +161,15 @@ mate_panel_applet_container_dispose (GObject *object)
container->priv->pending_ops = NULL;
}
- if (container->priv->bus_name) {
- g_free (container->priv->bus_name);
- container->priv->bus_name = NULL;
- }
-
- if (container->priv->iid) {
- g_free (container->priv->iid);
- container->priv->iid = NULL;
- }
+ g_clear_pointer (&container->priv->bus_name, g_free);
+ g_clear_pointer (&container->priv->iid, g_free);
if (container->priv->name_watcher_id > 0) {
g_bus_unwatch_name (container->priv->name_watcher_id);
container->priv->name_watcher_id = 0;
}
- if (container->priv->applet_proxy) {
- g_object_unref (container->priv->applet_proxy);
- container->priv->applet_proxy = NULL;
- }
+ g_clear_object (&container->priv->applet_proxy);
G_OBJECT_CLASS (mate_panel_applet_container_parent_class)->dispose (object);
}
@@ -247,7 +238,7 @@ mate_panel_applet_container_class_init (MatePanelAppletContainerClass *klass)
static const AppletPropertyInfo *
mate_panel_applet_container_child_property_get_info (const gchar *property_name)
{
- gint i;
+ gsize i;
g_assert (property_name != NULL);
@@ -764,7 +755,7 @@ mate_panel_applet_container_child_get_finish (MatePanelAppletContainer *containe
{
g_return_val_if_fail (g_task_is_valid (result, container), NULL);
g_warn_if_fail (g_task_get_source_tag (G_TASK (result)) == mate_panel_applet_container_child_get);
-
+
return g_variant_ref (g_task_propagate_pointer (G_TASK (result), error));
}
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-container.h b/mate-panel/libmate-panel-applet-private/panel-applet-container.h
index 63f5f078..7bd967b7 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-container.h
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-container.h
@@ -2,6 +2,7 @@
* panel-applet-container.h: a container for applets.
*
* Copyright (C) 2010 Carlos Garcia Campos <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -73,7 +74,6 @@ GType mate_panel_applet_container_get_type (void) G_GNUC_CON
GQuark mate_panel_applet_container_error_quark (void) G_GNUC_CONST;
GtkWidget *mate_panel_applet_container_new (void);
-
void mate_panel_applet_container_add (MatePanelAppletContainer *container,
GdkScreen *screen,
const gchar *iid,
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c
index c20e5cb2..99346221 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c
@@ -5,6 +5,7 @@
* Copyright (C) 2001 - 2003 Sun Microsystems, Inc.
* Copyright (C) 2010 Carlos Garcia Campos <[email protected]>
* Copyright (C) 2010 Vincent Untz <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -69,7 +70,7 @@ get_mate_panel_applet_orient (PanelOrientation orientation)
return 2;
default:
g_assert_not_reached ();
- break;
+ return 0;
}
}
@@ -91,7 +92,6 @@ mate_panel_applet_frame_dbus_update_flags (MatePanelAppletFrame *frame,
_mate_panel_applet_frame_update_flags (frame, major, minor, has_handle);
}
-
static void
mate_panel_applet_frame_dbus_get_flags_cb (MatePanelAppletContainer *container,
GAsyncResult *res,
diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.h b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.h
index 73da38f2..65dd4a21 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.h
+++ b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.h
@@ -3,6 +3,7 @@
*
* Copyright (C) 2001 - 2003 Sun Microsystems, Inc.
* Copyright (C) 2010 Vincent Untz <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
diff --git a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c
index 5873a4e9..b65fe4a7 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c
+++ b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 2010 Carlos Garcia Campos <[email protected]>
* Copyright (C) 2010 Vincent Untz <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -158,10 +159,9 @@ mate_panel_applets_manager_get_applet_factory_info_from_file (const gchar *filen
{
MatePanelAppletFactoryInfo *info;
GKeyFile *applet_file;
- const char *lib_prefix;
gchar **groups;
gsize n_groups;
- gint i;
+ gsize i;
GError *error = NULL;
applet_file = g_key_file_new ();
@@ -188,6 +188,8 @@ mate_panel_applets_manager_get_applet_factory_info_from_file (const gchar *filen
info->in_process = g_key_file_get_boolean (applet_file, MATE_PANEL_APPLET_FACTORY_GROUP,
"InProcess", NULL);
if (info->in_process) {
+ const char *lib_prefix;
+
info->location = g_key_file_get_string (applet_file, MATE_PANEL_APPLET_FACTORY_GROUP,
"Location", NULL);
if (!info->location) {
@@ -334,15 +336,15 @@ applets_directory_changed (GFileMonitor *monitor,
static void
mate_panel_applets_manager_dbus_load_applet_infos (MatePanelAppletsManagerDBus *manager)
{
- GSList *dirs, *d;
- GDir *dir;
- const gchar *dirent;
- GError *error = NULL;
+ GSList *dirs;
dirs = mate_panel_applets_manager_get_applets_dirs ();
- for (d = dirs; d; d = g_slist_next (d)) {
+ for (GSList *d = dirs; d; d = g_slist_next (d)) {
+ GDir *dir;
+ const gchar *dirent;
GFileMonitor *monitor;
GFile *dir_file;
+ GError *error = NULL;
gchar *path = (gchar *) d->data;
dir = g_dir_open (path, 0, &error);
diff --git a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.h b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.h
index 85ab5c53..9fb63d52 100644
--- a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.h
+++ b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.h
@@ -3,6 +3,7 @@
*
* Copyright (C) 2010 Carlos Garcia Campos <[email protected]>
* Copyright (C) 2010 Vincent Untz <[email protected]>
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as