summaryrefslogtreecommitdiff
path: root/panel-menu
diff options
context:
space:
mode:
authorKevin Vandersloot <kevinv@src.gnome.org>2002-04-14 19:29:10 +0000
committerKevin Vandersloot <kevinv@src.gnome.org>2002-04-14 19:29:10 +0000
commit82f9d93f7dd18c14d66bc0274fe77d9d079b7117 (patch)
treecc1843968015aaf24dbb2bcce0dab1c92e4795ec /panel-menu
parent4a3f9b501ff13c835a3245ae9d1c8d7ab0b77b6c (diff)
+2002-04-10 Senthilkumar Ramasamy <senthil.ramasamy@wipro.com>
+ * panel-menu-directory.c : capturing the result of + gnome_vfs_monitor_add() & checking that for success or failure, + thereby fixing the problem of crashing while removing directory + from panel-menu.
Diffstat (limited to 'panel-menu')
-rw-r--r--panel-menu/ChangeLog6
-rw-r--r--panel-menu/panel-menu-directory.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/panel-menu/ChangeLog b/panel-menu/ChangeLog
index 31da6db12..958cb162e 100644
--- a/panel-menu/ChangeLog
+++ b/panel-menu/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-10 Senthilkumar Ramasamy <senthil.ramasamy@wipro.com>
+ * panel-menu-directory.c : capturing the result of
+ gnome_vfs_monitor_add() & checking that for success or failure,
+ thereby fixing the problem of crashing while removing directory
+ from panel-menu.
+
2002-04-03 jacob berkman <jacob@ximian.com>
* panel-menu-pixbuf.h: kill declaration of init func
diff --git a/panel-menu/panel-menu-directory.c b/panel-menu/panel-menu-directory.c
index cd3866392..8c10131bd 100644
--- a/panel-menu/panel-menu-directory.c
+++ b/panel-menu/panel-menu-directory.c
@@ -216,17 +216,18 @@ panel_menu_directory_set_path (PanelMenuEntry *entry, gchar *path)
}
directory->path = panel_menu_common_build_full_path (path, "");;
regenerate_menus_cb (NULL, entry, NULL);
- gnome_vfs_monitor_add (&directory->monitor,
+ if (gnome_vfs_monitor_add (&directory->monitor,
directory->path,
GNOME_VFS_MONITOR_DIRECTORY,
directory_changed_cb,
- entry);
- if (directory->monitor)
+ entry) == GNOME_VFS_OK)
g_print ("monitor successfully installed for %s\n",
directory->path);
- else
+ else {
+ directory->monitor = NULL;
g_print ("monitor installation failed for directory %s\n",
directory->path);
+ }
if (old_path) {
g_free (directory->path);
directory->path = NULL;