changeset 2676:096aa996e4fa

clean some more stuff at skins_cleanup()
author Tomasz Mon <desowin@gmail.com>
date Sun, 01 Jun 2008 16:28:51 +0200
parents 4beebb0e82f8
children 438597b1f669
files src/skins/plugin.c src/skins/ui_manager.c src/skins/ui_manager.h
diffstat 3 files changed, 33 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/skins/plugin.c	Sun Jun 01 15:57:12 2008 +0200
+++ b/src/skins/plugin.c	Sun Jun 01 16:28:51 2008 +0200
@@ -51,9 +51,9 @@
 static void skins_free_paths(void) {
     int i;
 
-    for (i = 0; i < BMP_PATH_COUNT; i++)  {
+    for (i = 0; i < SKINS_PATH_COUNT; i++)  {
         g_free(skins_paths[i]);
-        skins_paths[i] = 0;
+        skins_paths[i] = NULL;
     }
 }
 
@@ -107,6 +107,8 @@
         skins_cfg_free();
         gtk_widget_destroy(mainwin);
         gtk_widget_destroy(equalizerwin);
+        gtk_widget_destroy(playlistwin);
+        ui_manager_destroy();
         skin_destroy(aud_active_skin);
         aud_active_skin = NULL;
         mainwin = NULL;
--- a/src/skins/ui_manager.c	Sun Jun 01 15:57:12 2008 +0200
+++ b/src/skins/ui_manager.c	Sun Jun 01 16:28:51 2008 +0200
@@ -875,3 +875,31 @@
   }
   return -1; /* failure */
 }
+
+void
+ui_manager_destroy( void )
+{
+    g_object_unref((GObject*)toggleaction_group_others);
+    g_object_unref((GObject*)radioaction_group_anamode);
+    g_object_unref((GObject*)radioaction_group_anatype);
+    g_object_unref((GObject*)radioaction_group_scomode);
+    g_object_unref((GObject*)radioaction_group_vprmode);
+    g_object_unref((GObject*)radioaction_group_wshmode);
+    g_object_unref((GObject*)radioaction_group_refrate);
+    g_object_unref((GObject*)radioaction_group_anafoff);
+    g_object_unref((GObject*)radioaction_group_peafoff);
+    g_object_unref((GObject*)radioaction_group_vismode);
+    g_object_unref((GObject*)radioaction_group_viewtime);
+    g_object_unref((GObject*)action_group_playback);
+    g_object_unref((GObject*)action_group_playlist);
+    g_object_unref((GObject*)action_group_visualization);
+    g_object_unref((GObject*)action_group_view);
+    g_object_unref((GObject*)action_group_others);
+    g_object_unref((GObject*)action_group_playlist_add);
+    g_object_unref((GObject*)action_group_playlist_select);
+    g_object_unref((GObject*)action_group_playlist_delete);
+    g_object_unref((GObject*)action_group_playlist_sort);
+    g_object_unref((GObject*)action_group_equalizer);
+    g_object_unref((GObject*)ui_manager);
+}
+
--- a/src/skins/ui_manager.h	Sun Jun 01 15:57:12 2008 +0200
+++ b/src/skins/ui_manager.h	Sun Jun 01 16:28:51 2008 +0200
@@ -71,6 +71,7 @@
 GtkWidget * ui_manager_get_popup_menu ( GtkUIManager * , const gchar * );
 void ui_manager_popup_menu_show( GtkMenu * , gint , gint , guint , guint );
 #define popup_menu_show(x1,x2,x3,x4,x5) ui_manager_popup_menu_show(x1,x2,x3,x4,x5)
+void ui_manager_destroy( void );
 
 G_END_DECLS