[Xfce4-commits] <xfce4-panel:devel> Some small code corrections.

Nick Schermer noreply at xfce.org
Fri Sep 25 20:02:07 CEST 2009


Updating branch refs/heads/devel
         to cc210e1ae7187b660c4576bfbf37545cce7ea633 (commit)
       from f0ba6b248866fafe0cfe8e7271d63200f702e054 (commit)

commit cc210e1ae7187b660c4576bfbf37545cce7ea633
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Sep 25 10:51:29 2009 +0200

    Some small code corrections.

 panel/panel-dbus-service.c    |    2 +-
 panel/panel-item-dialog.c     |   15 +++++++++------
 panel/panel-module-factory.c  |    2 +-
 panel/panel-plugin-external.c |    2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/panel/panel-dbus-service.c b/panel/panel-dbus-service.c
index 9d35209..2a0e09d 100644
--- a/panel/panel-dbus-service.c
+++ b/panel/panel-dbus-service.c
@@ -104,7 +104,7 @@ static guint dbus_service_signals[LAST_SIGNAL];
 
 
 
-G_DEFINE_TYPE (PanelDBusService, panel_dbus_service, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PanelDBusService, panel_dbus_service, G_TYPE_OBJECT)
 
 
 
diff --git a/panel/panel-item-dialog.c b/panel/panel-item-dialog.c
index f9a57c1..4960ba4 100644
--- a/panel/panel-item-dialog.c
+++ b/panel/panel-item-dialog.c
@@ -90,12 +90,12 @@ enum
 
 static const GtkTargetEntry drag_targets[] =
 {
-  { (gchar *) "xfce-panel/plugin-name", 0, 0 },
+  { "xfce-panel/plugin-name", 0, 0 },
 };
 
 
 
-G_DEFINE_TYPE (PanelItemDialog, panel_item_dialog, XFCE_TYPE_TITLED_DIALOG);
+G_DEFINE_TYPE (PanelItemDialog, panel_item_dialog, XFCE_TYPE_TITLED_DIALOG)
 
 
 
@@ -302,8 +302,11 @@ panel_item_dialog_response (GtkDialog *gtk_dialog,
     {
       module = panel_item_dialog_get_selected_module (dialog->treeview);
       if (G_LIKELY (module != NULL))
-        panel_application_add_new_item (dialog->application,
-            panel_module_get_name (module), NULL);
+        {
+          panel_application_add_new_item (dialog->application,
+              panel_module_get_name (module), NULL);
+          g_object_unref (G_OBJECT (module));
+        }
     }
   else
     {
@@ -446,7 +449,7 @@ panel_item_dialog_drag_begin (GtkWidget       *treeview,
 
   /* get the selected panel module */
   module = panel_item_dialog_get_selected_module (GTK_TREE_VIEW (treeview));
-  if (G_LIKELY (module))
+  if (G_LIKELY (module != NULL))
     {
       if (panel_module_is_usable (module))
         {
@@ -489,7 +492,7 @@ panel_item_dialog_drag_data_get (GtkWidget        *treeview,
 
   /* get the selected module */
   module = panel_item_dialog_get_selected_module (GTK_TREE_VIEW (treeview));
-  if (G_LIKELY (module))
+  if (G_LIKELY (module != NULL))
     {
       /* get the internal module name */
       internal_name = panel_module_get_name (module);
diff --git a/panel/panel-module-factory.c b/panel/panel-module-factory.c
index b91a2c3..88e498c 100644
--- a/panel/panel-module-factory.c
+++ b/panel/panel-module-factory.c
@@ -83,7 +83,7 @@ static gboolean force_all_external = FALSE;
 
 
 
-G_DEFINE_TYPE (PanelModuleFactory, panel_module_factory, G_TYPE_OBJECT);
+G_DEFINE_TYPE (PanelModuleFactory, panel_module_factory, G_TYPE_OBJECT)
 
 
 
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index a0b673a..cfd4cfb 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -116,7 +116,7 @@ QueuedData;
 
 
 G_DEFINE_TYPE_WITH_CODE (PanelPluginExternal, panel_plugin_external, GTK_TYPE_SOCKET,
-                         G_IMPLEMENT_INTERFACE (XFCE_TYPE_PANEL_PLUGIN_PROVIDER, panel_plugin_external_provider_init))
+  G_IMPLEMENT_INTERFACE (XFCE_TYPE_PANEL_PLUGIN_PROVIDER, panel_plugin_external_provider_init))
 
 
 



More information about the Xfce4-commits mailing list