[Xfce4-commits] r24073 - xfce4-panel/trunk/panel
Jasper Huijsmans
jasper at xfce.org
Sun Dec 10 12:42:29 CET 2006
Author: jasper
Date: 2006-12-10 11:42:29 +0000 (Sun, 10 Dec 2006)
New Revision: 24073
Modified:
xfce4-panel/trunk/panel/panel-config.c
xfce4-panel/trunk/panel/panel-dialogs.c
Log:
Fix mem leaks. Patch from Nick.
Modified: xfce4-panel/trunk/panel/panel-config.c
===================================================================
--- xfce4-panel/trunk/panel/panel-config.c 2006-12-10 11:22:28 UTC (rev 24072)
+++ xfce4-panel/trunk/panel/panel-config.c 2006-12-10 11:42:29 UTC (rev 24073)
@@ -97,12 +97,12 @@
GPtrArray *
panel_config_create_panels (void)
{
- gboolean use_user_config;
- char *file = NULL;
- GPtrArray *array = NULL;
- char *path = "xfce4" G_DIR_SEPARATOR_S
- "panel" G_DIR_SEPARATOR_S
- "panels.xml";
+ gboolean use_user_config;
+ char *file = NULL;
+ GPtrArray *array = NULL;
+ const char *path = "xfce4" G_DIR_SEPARATOR_S
+ "panel" G_DIR_SEPARATOR_S
+ "panels.xml";
use_user_config = xfce_allow_panel_customization ();
@@ -139,6 +139,8 @@
else
array = create_fallback_panel_array ();
+ g_free (file);
+
DBG ("Successfully configured %d panel(s).", array->len);
return array;
@@ -156,14 +158,16 @@
if (use_user_config)
{
int i;
- char *path = "xfce4" G_DIR_SEPARATOR_S
- "panel" G_DIR_SEPARATOR_S
- "panels.xml";
+ const char *path = "xfce4" G_DIR_SEPARATOR_S
+ "panel" G_DIR_SEPARATOR_S
+ "panels.xml";
file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, path, TRUE);
failed = !config_save_to_file (panels, file);
+ g_free (file);
+
for (i = 0; i < panels->len; ++i)
{
Panel *panel = g_ptr_array_index (panels, i);
Modified: xfce4-panel/trunk/panel/panel-dialogs.c
===================================================================
--- xfce4-panel/trunk/panel/panel-dialogs.c 2006-12-10 11:22:28 UTC (rev 24072)
+++ xfce4-panel/trunk/panel/panel-dialogs.c 2006-12-10 11:42:29 UTC (rev 24073)
@@ -1656,10 +1656,6 @@
G_CALLBACK (panel_dialog_response), pmd);
gtk_window_stick(GTK_WINDOW (pmd->dlg));
- /* Note sure why this is set to type UTILITY, but it's causing more bad than good.
- gtk_window_set_type_hint (GTK_WINDOW (pmd->dlg),
- GDK_WINDOW_TYPE_HINT_UTILITY);
- */
gdk_x11_window_set_user_time (GTK_WIDGET (pmd->dlg)->window,
gdk_x11_get_server_time (GTK_WIDGET (pmd->dlg)->window));
xfce_gtk_window_center_on_monitor_with_pointer (GTK_WINDOW (pmd->dlg));
More information about the Xfce4-commits
mailing list