[PATCH]: Remove old menu items - keep bonobo menus up to date.
- From: David Watson <dwatson cs ucr edu>
- To: <nautilus-list gnome org>
- Subject: [PATCH]: Remove old menu items - keep bonobo menus up to date.
- Date: Mon, 1 Jul 2002 11:56:32 -0700 (PDT)
The attached patch fixes a memory leak and cleans up the background
scripts menu when scripts are removed from the scripts directory
(otherwise they presist until the user exists).
I have also filed bug 87022 for a related problem with components.
--
The theory of groups is a branch of Mathematics in which one does
something to something and then compares the result with the result
obtained from doing the same thing to something else, or something else to
the same thing.
J. R. Newman
? help/nautilus-user-manual/C/nautilus-user-manual-C.omf.out
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5398
diff -u -p -r1.5398 ChangeLog
--- ChangeLog 29 Jun 2002 03:58:33 -0000 1.5398
+++ ChangeLog 1 Jul 2002 15:37:59 -0000
@@ -1,3 +1,11 @@
+2002-07-01 David Emory Watson <dwatson cs ucr edu>
+
+ * src/file-manager/fm-directory-view.c:
+ (update_scripts_menu): Remove all old script menus before rebuilding...
+
+ * src/file-manager/fm-list-view.c:
+ (button_press_callback): Fix memory leak.
+
2002-06-29 Gregory Merchan <merchan phys lsu edu>
* src/nautilus-desktop-window.c:
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.541
diff -u -p -r1.541 fm-directory-view.c
--- src/file-manager/fm-directory-view.c 25 Jun 2002 19:32:12 -0000 1.541
+++ src/file-manager/fm-directory-view.c 1 Jul 2002 15:38:38 -0000
@@ -3931,6 +3931,8 @@ update_scripts_menu (FMDirectoryView *vi
(view->details->ui, FM_DIRECTORY_VIEW_MENU_PATH_SCRIPTS_PLACEHOLDER);
nautilus_bonobo_remove_menu_items_and_commands
(view->details->ui, FM_DIRECTORY_VIEW_POPUP_PATH_SCRIPTS_PLACEHOLDER);
+ nautilus_bonobo_remove_menu_items_and_commands
+ (view->details->ui, FM_DIRECTORY_VIEW_POPUP_PATH_BACKGROUND_SCRIPTS_PLACEHOLDER);
/* As we walk through the directories, remove any that no longer belong. */
any_scripts = FALSE;
Index: src/file-manager/fm-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v
retrieving revision 1.176
diff -u -p -r1.176 fm-list-view.c
--- src/file-manager/fm-list-view.c 12 Jun 2002 16:34:57 -0000 1.176
+++ src/file-manager/fm-list-view.c 1 Jul 2002 15:38:43 -0000
@@ -158,6 +158,7 @@ button_press_callback (GtkWidget *widget
{
GtkTreeView *tree_view;
GtkTreePath *path;
+ gboolean result;
tree_view = GTK_TREE_VIEW (widget);
@@ -165,6 +166,8 @@ button_press_callback (GtkWidget *widget
return FALSE;
}
+ result = FALSE;
+
if (gtk_tree_view_get_path_at_pos (tree_view, event->x, event->y,
&path, NULL, NULL, NULL)) {
if (event->button == 3
@@ -173,7 +176,7 @@ button_press_callback (GtkWidget *widget
are selected it will unselect all but one row; but we
want the right click menu to apply to everything that's
currently selected. */
- return TRUE;
+ result = TRUE;
}
gtk_tree_path_free (path);
@@ -183,7 +186,7 @@ button_press_callback (GtkWidget *widget
gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (tree_view));
}
- return FALSE;
+ return result;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]