[Pkg-xfce-commits] r6032 - in goodies/trunk/xfce4-fsguard-plugin/debian: . patches

Lionel Le Folgoc mrpouit-guest at alioth.debian.org
Wed Sep 14 09:30:26 UTC 2011


Author: mrpouit-guest
Date: 2011-09-14 21:30:25 +0000 (Wed, 14 Sep 2011)
New Revision: 6032

Modified:
   goodies/trunk/xfce4-fsguard-plugin/debian/changelog
   goodies/trunk/xfce4-fsguard-plugin/debian/patches/01_fix-resource-file-loading.patch
Log:
debian/patches/01_fix-resource-file-loading.patch: updated, fix segfault
when no config exists, and correctly initialize settings with default
values.

Modified: goodies/trunk/xfce4-fsguard-plugin/debian/changelog
===================================================================
--- goodies/trunk/xfce4-fsguard-plugin/debian/changelog	2011-09-14 05:42:27 UTC (rev 6031)
+++ goodies/trunk/xfce4-fsguard-plugin/debian/changelog	2011-09-14 21:30:25 UTC (rev 6032)
@@ -1,3 +1,11 @@
+xfce4-fsguard-plugin (1.0.0-3) UNRELEASED; urgency=low
+
+  * debian/patches/01_fix-resource-file-loading.patch: updated, fix segfault
+    when no config exists, and correctly initialize settings with default
+    values.
+
+ -- Lionel Le Folgoc <mrpouit at gmail.com>  Wed, 14 Sep 2011 23:24:25 +0200
+
 xfce4-fsguard-plugin (1.0.0-2) unstable; urgency=low
 
   * debian/patches:

Modified: goodies/trunk/xfce4-fsguard-plugin/debian/patches/01_fix-resource-file-loading.patch
===================================================================
--- goodies/trunk/xfce4-fsguard-plugin/debian/patches/01_fix-resource-file-loading.patch	2011-09-14 05:42:27 UTC (rev 6031)
+++ goodies/trunk/xfce4-fsguard-plugin/debian/patches/01_fix-resource-file-loading.patch	2011-09-14 21:30:25 UTC (rev 6032)
@@ -1,13 +1,34 @@
-diff --git a/panel-plugin/fsguard.c b/panel-plugin/fsguard.c
-index b4b7dbe..46af700 100644
---- a/panel-plugin/fsguard.c
-+++ b/panel-plugin/fsguard.c
-@@ -325,7 +325,7 @@ fsguard_read_config (FsGuard *fsguard)
+--- xfce4-fsguard-plugin-1.0.0.orig/panel-plugin/fsguard.c
++++ xfce4-fsguard-plugin-1.0.0/panel-plugin/fsguard.c
+@@ -325,15 +325,28 @@ fsguard_read_config (FsGuard *fsguard)
      char               *file;
      XfceRc             *rc;
  
 -    file = xfce_panel_plugin_save_location (fsguard->plugin, TRUE);
++    /* prepare default values */
++    fsguard->seen               = FALSE;
++    fsguard->name               = g_strdup ("");
++    fsguard->show_name          = FALSE;
++    fsguard->path               = g_strdup ("/");
++    fsguard->show_size          = TRUE;
++    fsguard->show_progress_bar  = TRUE;
++    fsguard->hide_button        = FALSE;
++    fsguard->limit_warning      = 8;
++    fsguard->limit_urgent       = 2;
++
 +    file = xfce_panel_plugin_lookup_rc_file(fsguard->plugin);
++    g_return_if_fail (file);
      DBG ("Lookup rc file `%s'", file);
-     rc = xfce_rc_simple_open (file, FALSE);
+-    rc = xfce_rc_simple_open (file, FALSE);
++    rc = xfce_rc_simple_open (file, TRUE);
      g_free (file);
+     g_return_if_fail (rc);
+ 
+-    fsguard->seen               = FALSE;
++    g_free (fsguard->name);
+     fsguard->name               = g_strdup (xfce_rc_read_entry (rc, "label", ""));
+     fsguard->show_name          = xfce_rc_read_bool_entry (rc, "label_visible", FALSE);
++    g_free (fsguard->path);
+     fsguard->path               = g_strdup (xfce_rc_read_entry (rc, "mnt", "/"));
+     fsguard->show_size          = xfce_rc_read_bool_entry (rc, "lab_size_visible", TRUE);
+     fsguard->show_progress_bar  = xfce_rc_read_bool_entry (rc, "progress_bar_visible", TRUE);




More information about the Pkg-xfce-commits mailing list