[evolution-patches] Shell bug 47875



Hello,

On Mon, 2003-09-08 at 23:33, Calvin Liu wrote:
> Would you please take a look at patch for bug 47875.
> Bug: http://bugzilla.ximian.com/show_bug.cgi?id=47875
> Patch: http://bugzilla.ximian.com/showattachment.cgi?attach_id=5284
> 
> It's important for us but no response for a long time.

Sorry, my bad.  I missed this one.  (It would help to have the name of
the component in the Subject line...)

The patch looks almost right, although the meaning of -1 for the
group_num in e_shortcuts_add_default_shortcuts() is supposed to be "the
last group", not "the first group"...  Your change will make
e_shortcuts_add_default_group() add a group at the end, but put the
shortcuts in the first group.

Now, I think it's a bit stupid to have a special meaning for -1 in that
case, so I'd rather just remove the -1 special case altogether and fix
e_shortcuts_add_default_group() (which is the only function using -1 as
a group_num value), as in the attached patch.

If you approve this one, I will commit it tomorrow before making the
1.4.5 tarball.

Thanks for catching this bug, and sorry again for missing your patch!

-- Ettore
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1286.2.6
diff -u -p -r1.1286.2.6 ChangeLog
--- ChangeLog	30 Jul 2003 13:57:14 -0000	1.1286.2.6
+++ ChangeLog	11 Sep 2003 18:22:51 -0000
@@ -1,3 +1,12 @@
+2003-09-11  Ettore Perazzoli  <ettore ximian com>
+
+	[#47875, thanks to Calvin Liu for figuring this out.]
+
+	* e-shortcuts.c (e_shortcuts_add_default_shortcuts): Use the
+	group_num arg, so it gets added to the proper group.
+	(e_shortcuts_add_default_group): Pass the actual group number to
+	e_shortcuts_add_default_shortcuts().
+
 2003-07-17  Dan Winship  <danw ximian com>
 
 	* e-shell-user-creatable-items-handler.c (free_menu_items): free
Index: e-shortcuts.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shortcuts.c,v
retrieving revision 1.70
diff -u -p -r1.70 e-shortcuts.c
--- e-shortcuts.c	18 Feb 2003 20:52:38 -0000	1.70
+++ e-shortcuts.c	11 Sep 2003 18:22:51 -0000
@@ -1079,12 +1079,12 @@ void
 e_shortcuts_add_default_shortcuts (EShortcuts *shortcuts,
 				   int group_num)
 {
-	e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, _("Summary"), 0, "summary", NULL);
+	e_shortcuts_add_shortcut (shortcuts, group_num, -1, E_SUMMARY_URI, _("Summary"), 0, "summary", NULL);
 
-	e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:mail", _("Inbox"), 0, "mail", "inbox");
-	e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:calendar", _("Calendar"), 0, "calendar", NULL);
-	e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:tasks", _("Tasks"), 0, "tasks", NULL);
-	e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:contacts", _("Contacts"), 0, "contacts", NULL);
+	e_shortcuts_add_shortcut (shortcuts, group_num, -1, "default:mail", _("Inbox"), 0, "mail", "inbox");
+	e_shortcuts_add_shortcut (shortcuts, group_num, -1, "default:calendar", _("Calendar"), 0, "calendar", NULL);
+	e_shortcuts_add_shortcut (shortcuts, group_num, -1, "default:tasks", _("Tasks"), 0, "tasks", NULL);
+	e_shortcuts_add_shortcut (shortcuts, group_num, -1, "default:contacts", _("Contacts"), 0, "contacts", NULL);
 }
 
 void
@@ -1095,7 +1095,7 @@ e_shortcuts_add_default_group (EShortcut
 
 	e_shortcuts_add_group (shortcuts, -1, _("Shortcuts"));
 
-	e_shortcuts_add_default_shortcuts (shortcuts, -1);
+	e_shortcuts_add_default_shortcuts (shortcuts, e_shortcuts_get_num_groups (shortcuts) - 1);
 }
 
 void


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