[evolution-patches] seeking patch reviewing for bug 43846 and 19965



Hi, there,

I made a patch for bug 43846 and it can also solve the bug 19965. It's
simple. Can someone review my patch?

Many thanks.
Calvin
Index: shell/e-shell-folder-commands.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-folder-commands.c,v
retrieving revision 1.58.4.1
diff -u -r1.58.4.1 e-shell-folder-commands.c
--- shell/e-shell-folder-commands.c	9 Jul 2003 19:44:53 -0000	1.58.4.1
+++ shell/e-shell-folder-commands.c	20 Oct 2003 10:05:56 -0000
@@ -424,6 +424,35 @@
 }
 
 void
+remove_shortcuts_from_shortcut_bar (EShell *shell,
+				    const char *folder_path)
+{
+	EShortcuts *shortcuts;
+	EShortcutItem *item;
+	const GSList *group;
+	int group_num;
+	int loopGroup;
+	int shortcut_num;
+	int loopShortcut;
+
+	char *uri_of_shortcut;
+
+	uri_of_shortcut = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL);
+	shortcuts = e_shell_get_shortcuts (shell);
+	group_num = e_shortcuts_get_num_groups(shortcuts);
+	for ( loopGroup = 0; loopGroup < group_num; loopGroup ++ ){
+	group = e_shortcuts_get_shortcuts_in_group ( shortcuts, loopGroup);
+		shortcut_num = g_slist_length (group);
+		for ( loopShortcut = shortcut_num - 1; loopShortcut >= 0; loopShortcut -- ){
+			item = e_shortcuts_get_shortcut (shortcuts, loopGroup, loopShortcut);
+			if ( 0 == g_strcasecmp ( item->uri, uri_of_shortcut ) ){
+				e_shortcuts_remove_shortcut ( shortcuts, loopGroup, loopShortcut);
+			}
+		}
+	}
+}
+
+void
 e_shell_command_delete_folder (EShell *shell,
 			       EShellView *shell_view,
 			       const char *folder_path)
@@ -441,8 +470,10 @@
 	if (folder_path == NULL)
 		folder_path = e_shell_view_get_current_path (shell_view);
 
-	if (delete_dialog (shell_view, get_folder_name (shell, folder_path)) == GTK_RESPONSE_OK)
+	if (delete_dialog (shell_view, get_folder_name (shell, folder_path)) == GTK_RESPONSE_OK){
+		remove_shortcuts_from_shortcut_bar (shell, folder_path);
 		e_storage_set_async_remove_folder (storage_set, folder_path, delete_cb, shell_view);
+	}
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]