[Goodies-commits] r6648 - in xfmpc/trunk: . src

Mike Massonnet mmassonnet at xfce.org
Thu Feb 5 09:47:06 CET 2009


Author: mmassonnet
Date: 2009-02-05 08:47:06 +0000 (Thu, 05 Feb 2009)
New Revision: 6648

Modified:
   xfmpc/trunk/IDEAS
   xfmpc/trunk/src/extended-interface.c
   xfmpc/trunk/src/extended-interface.h
Log:
Small leak

* src/extended-interface.c, src/extended-interface.h:
  - Move xfmpc_extended_interface_context_menu_new() to the C source and made
  it a static function
  - (xfmpc_server_dialog_show): Free the strings host and passwd
  - (popup_context_menu): Don't destroy the menu to recreate it as it doesn't
  make sense because it doesn't have any dynamic items
* IDEAS:
  - A very small update


Modified: xfmpc/trunk/IDEAS
===================================================================
--- xfmpc/trunk/IDEAS	2009-02-05 01:10:30 UTC (rev 6647)
+++ xfmpc/trunk/IDEAS	2009-02-05 08:47:06 UTC (rev 6648)
@@ -1,15 +1,15 @@
 Next release
 
   - The 0.0.8 announcement
-  - On a search, have the ability to go to the directory of the song and such
-  - Menu item to replace the playlist with the selection in the database browser
+  - On a search or in the playlist, add a menu item to go to the directory of
+  the song and such
 
 Unpredictable future
 
-  - XfmpcGoodies, a plugin interface on the right side pane
+  - XfmpcGoodies, a plugin interface (GModule) on a right side pane
     ~ artwork
     ~ random album playlist
-  - Options
+  - Settings dialog
     ~ Hostname and Port
     ~ Font (size) for the tree views
 

Modified: xfmpc/trunk/src/extended-interface.c
===================================================================
--- xfmpc/trunk/src/extended-interface.c	2009-02-05 01:10:30 UTC (rev 6647)
+++ xfmpc/trunk/src/extended-interface.c	2009-02-05 08:47:06 UTC (rev 6648)
@@ -53,6 +53,9 @@
 static void             xfmpc_extended_interface_dispose    (GObject *object);
 static void             xfmpc_extended_interface_finalize   (GObject *object);
 
+static void             xfmpc_extended_interface_context_menu_new
+                                                            (XfmpcExtendedInterface *extended_interface,
+                                                             GtkWidget *attach_widget);
 static void             xfmpc_server_dialog_show            (XfmpcExtendedInterface *extended_interface);
 static void             cb_use_defaults_toggled             (GtkToggleButton *button,
                                                              GtkWidget *widget);
@@ -271,7 +274,7 @@
   gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (priv->notebook), child, TRUE, TRUE, GTK_PACK_START);
 }
 
-void
+static void
 xfmpc_extended_interface_context_menu_new (XfmpcExtendedInterface *extended_interface,
                                            GtkWidget *attach_widget)
 {
@@ -412,6 +415,8 @@
 
   gtk_widget_destroy (dialog);
   g_object_unref (preferences);
+  g_free (host);
+  g_free (passwd);
 }
 
 
@@ -473,9 +478,8 @@
 {
   XfmpcExtendedInterfacePrivate *priv = XFMPC_EXTENDED_INTERFACE (extended_interface)->priv;
 
-  if (GTK_IS_MENU (priv->context_menu))
-    gtk_menu_detach (GTK_MENU (priv->context_menu));
-  xfmpc_extended_interface_context_menu_new (extended_interface, priv->context_button);
+  if (!GTK_IS_MENU (priv->context_menu))
+    xfmpc_extended_interface_context_menu_new (extended_interface, priv->context_button);
 
   gtk_menu_popup (GTK_MENU (priv->context_menu),
                   NULL,

Modified: xfmpc/trunk/src/extended-interface.h
===================================================================
--- xfmpc/trunk/src/extended-interface.h	2009-02-05 01:10:30 UTC (rev 6647)
+++ xfmpc/trunk/src/extended-interface.h	2009-02-05 08:47:06 UTC (rev 6648)
@@ -42,9 +42,6 @@
 void                    xfmpc_extended_interface_append_child   (XfmpcExtendedInterface *extended_interface,
                                                                  GtkWidget *child,
                                                                  const gchar *title);
-void                    xfmpc_extended_interface_context_menu_new
-                                                                (XfmpcExtendedInterface *extended_interface,
-                                                                 GtkWidget *attach_widget);
 G_END_DECLS
 
 #endif




More information about the Goodies-commits mailing list