]> Dogcows Code - chaz/openbox/commitdiff
define vars in proper places and don't leak the entire list of settings
authorMikael Magnusson <mikachu@comhem.se>
Thu, 8 Jun 2006 10:34:15 +0000 (10:34 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 8 Jun 2006 10:34:15 +0000 (10:34 +0000)
openbox/config.c
openbox/config.h
openbox/per_app_settings.c
openbox/per_app_settings.h

index 7f51c0f00e72107b30da3222099ad2e9a6405531..78a8ed5416d9f5bf72d9e83f08edbf893c40b9c0 100644 (file)
@@ -80,7 +80,7 @@ gint config_resist_edge;
 
 gboolean config_resist_layers_below;
 
-GSList *per_app_settings;
+GSList *config_per_app_settings;
 
 /*
   <applications>
@@ -174,7 +174,7 @@ static void parse_per_app_settings(ObParseInst *i, xmlDocPtr doc,
                     setting->layer = 0;
             }
 
-            per_app_settings = g_slist_append(per_app_settings,
+            config_per_app_settings = g_slist_append(config_per_app_settings,
                                               (gpointer) setting);
         }
         
@@ -728,7 +728,7 @@ void config_startup(ObParseInst *i)
 
     parse_register(i, "menu", parse_menu, NULL);
 
-    per_app_settings = NULL;
+    config_per_app_settings = NULL;
 
     parse_register(i, "applications", parse_per_app_settings, NULL);
 }
@@ -748,4 +748,8 @@ void config_shutdown()
     for (it = config_menu_files; it; it = g_slist_next(it))
         g_free(it->data);
     g_slist_free(config_menu_files);
+
+    for (it = config_per_app_settings; it; it = g_slist_next(it))
+        g_free(it->data);
+    g_slist_free(config_per_app_settings);
 }
index 5abb7d82e1f95cce8434a2b280bb286f1cbb5a93..29f8d081afdd3e862a7685845657a18381e43f27 100644 (file)
@@ -23,7 +23,6 @@
 #include "misc.h"
 #include "stacking.h"
 #include "place.h"
-#include "per_app_settings.h"
 
 #include <glib.h>
 
@@ -129,6 +128,8 @@ extern guint    config_submenu_show_delay;
 extern gboolean config_menu_client_list_icons;
 /*! User-specified menu files */
 extern GSList *config_menu_files;
+/*! Per app settings */
+extern GSList *config_per_app_settings;
 
 void config_startup(struct _ObParseInst *i);
 void config_shutdown();
index 47b2fc0ec188666c99b792feda97cc7cb0b305a5..c1b728e249204bb89095c18ce0a8ebf7cc1b8e72 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "per_app_settings.h"
 #include "screen.h"
+#include "config.h"
 
 GSList *per_app_settings;
 
index b6b7d5147a8dab7d5cf2758a5cf2be89ea75e3ef..0b1bfca9201ac29d38d7bc63fed6f6b260875077 100644 (file)
@@ -40,8 +40,6 @@ struct _ObAppSetting
     guint layer;
 };
 
-extern GSList *per_app_settings;
-
 ObAppSetting *get_client_settings(ObClient *client);
 void place_window_from_settings(ObAppSetting *setting, ObClient *client, gint *x, gint *y);
 
This page took 0.029726 seconds and 4 git commands to generate.