[evolution-patches] 41468, default folder type when creating exchange public folder
- From: Dan Winship <danw ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] 41468, default folder type when creating exchange public folder
- Date: 17 Apr 2003 14:48:17 -0400
This makes the folder creation code handle folders with types like
"mail/public". (It also removes some gtk 1.2 cruft).
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1240
diff -u -r1.1240 ChangeLog
--- ChangeLog 16 Apr 2003 14:49:22 -0000 1.1240
+++ ChangeLog 17 Apr 2003 16:01:00 -0000
@@ -1,3 +1,20 @@
+2003-04-17 Dan Winship <danw ximian com>
+
+ * e-shell-folder-creation-dialog.c (add_folder_types): If the
+ default_type is "foo/bar" and "foo" appears in the list but
+ "foo/bar" doesn't, use "foo" as the default type. [#41468] Also,
+ remove a workaround for a gtk 1.2 bug.
2003-04-16 Dan Winship <danw ximian com>
Index: e-shell-folder-creation-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-folder-creation-dialog.c,v
retrieving revision 1.47
diff -u -r1.47 e-shell-folder-creation-dialog.c
--- e-shell-folder-creation-dialog.c 25 Mar 2003 15:48:33 -0000 1.47
+++ e-shell-folder-creation-dialog.c 17 Apr 2003 16:01:01 -0000
@@ -400,21 +400,11 @@
GList *types_with_display_names;
GList *p;
int default_item;
- int i;
+ int i, len;
folder_type_option_menu = glade_xml_get_widget (gui, "folder_type_option_menu");
- /* KLUDGE. So, GtkOptionMenu is badly broken. It calculates its size
- in `gtk_option_menu_set_menu()' instead of using `size_request()' as
- any sane widget would do. So, in order to avoid the "narrow
- GtkOptionMenu" bug, we have to destroy the existing associated menu
- and create a new one. Life sucks. */
-
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (folder_type_option_menu));
- g_assert (menu != NULL);
- gtk_widget_destroy (menu);
-
- menu = gtk_menu_new ();
folder_type_registry = e_shell_get_folder_type_registry (shell);
g_assert (folder_type_registry != NULL);
@@ -455,8 +445,14 @@
g_object_set_data_full (G_OBJECT (menu_item), "folder_type", g_strdup (type->type), g_free);
- if (strcmp (type->type, default_type ? default_type : "mail") == 0)
+ if (strcmp (type->type, default_type) == 0)
default_item = i;
+ else if (default_item == 0) {
+ len = strlen (type->type);
+ if (strncmp (type->type, default_type, len) == 0 &&
+ default_type[len] == '/')
+ default_item = i;
+ }
i ++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]