sylpheedclaws/sylpheed-claws/src folder.c,1.213.2.98,1.213.2.99 prefs_folder_item.c,1.52.2.21,1.52.2.22
[email protected] Tue, 13 Jun 2006 09:00:04 +0000 (UTC)
Newsgroups
gmane.mail.sylpheed.claws.cvs
Message-ID
<[email protected] >
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src
In directory sunsite.dk:/tmp/cvs-serv12211/src
Modified Files:
Tag: gtk2
folder.c prefs_folder_item.c
Log Message:
2006-06-13 [wwp] 2.3.0cvs7
* src/folder.c
* src/prefs_folder_item.c
allow changing folder type even when folder is not a top-level one,
thanks to Colin.
Index: folder.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/folder.c,v
retrieving revision 1.213.2.98
retrieving revision 1.213.2.99
diff -u -d -r1.213.2.98 -r1.213.2.99
--- folder.c 2006/06/12 17:08:13 1.213.2.98
+++ folder.c 2006/06/13 08:59:20 1.213.2.99
@@ -209,11 +209,6 @@
Folder *folder = NULL;
FolderUpdateData hookdata;
- if ((parent = folder_item_parent(item)) != NULL
- && folder_item_parent(parent) != NULL) {
- g_warning("can't change subfolder's type");
- return;
- }
folder = item->folder;
/* unset previous root of newtype */
switch(newtype) {
Index: prefs_folder_item.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/prefs_folder_item.c,v
retrieving revision 1.52.2.21
retrieving revision 1.52.2.22
diff -u -d -r1.52.2.21 -r1.52.2.22
--- prefs_folder_item.c 2006/06/12 17:08:16 1.52.2.21
+++ prefs_folder_item.c 2006/06/13 08:59:21 1.52.2.22
@@ -152,7 +152,6 @@
GtkWidget *dummy_chkbtn;
GtkWidget *menuitem;
SpecialFolderItemType type;
- gboolean type_apply_to_sub = TRUE;
GtkWidget *checkbtn_simplify_subject;
GtkWidget *entry_simplify_subject;
@@ -191,17 +190,17 @@
folder_type = gtk_option_menu_new ();
gtk_widget_show (folder_type);
- parent = item;
type = F_NORMAL;
- while (parent && (type = parent->stype) == F_NORMAL) {
- parent = folder_item_parent(parent);
- }
-
- if (type == F_INBOX && (parent = folder_item_parent(item)) != NULL
- && folder_item_parent(parent) != NULL) {
- type = F_NORMAL;
- type_apply_to_sub = FALSE;
- }
+ if (item->stype == F_INBOX)
+ type = F_INBOX;
+ else if (folder_has_parent_of_type(item, F_OUTBOX))
+ type = F_OUTBOX;
+ else if (folder_has_parent_of_type(item, F_DRAFT))
+ type = F_DRAFT;
+ else if (folder_has_parent_of_type(item, F_QUEUE))
+ type = F_QUEUE;
+ else if (folder_has_parent_of_type(item, F_TRASH))
+ type = F_TRASH;
folder_type_menu = gtk_menu_new ();
@@ -216,16 +215,14 @@
gtk_option_menu_set_history(GTK_OPTION_MENU(folder_type), type);
dummy_chkbtn = gtk_check_button_new();
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dummy_chkbtn), type_apply_to_sub);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dummy_chkbtn), type != F_INBOX);
gtk_widget_set_sensitive(dummy_chkbtn, FALSE);
- if (((parent = folder_item_parent(item)) != NULL
- && folder_item_parent(parent) == NULL)
- && item->stype == F_NORMAL) {
+ if (type == item->stype && type == F_NORMAL)
gtk_widget_set_sensitive(folder_type, TRUE);
- } else {
+ else
gtk_widget_set_sensitive(folder_type, FALSE);
- }
+
label = gtk_label_new(_("Folder type:"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_table_attach(GTK_TABLE(table), label, 0, 1,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]