prefs_filtering_action_select(): improve logic and uniformity of gui
authorPaul Mangan <paul@claws-mail.org>
Sun, 5 Jan 2003 17:19:02 +0000 (17:19 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 5 Jan 2003 17:19:02 +0000 (17:19 +0000)
ChangeLog.claws
configure.in
src/prefs_filtering.c

index 969d157..f29ad0e 100644 (file)
@@ -1,3 +1,12 @@
+2003-01-05 [paul]      0.8.8claws48
+
+       * src/prefs_common.c
+               small change to English
+               
+       * src/prefs_filtering.c
+               prefs_filtering_action_select(): improve logic and uniformity
+               of gui
+
 2003-01-05 [alfons]    0.8.8claws47
 
        fine tune solution to focus problems (bug #7)
index 1c83c23..39cdf02 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws47
+EXTRA_VERSION=claws48
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 504157e..fd051e5 100644 (file)
@@ -60,6 +60,7 @@ static struct Filtering {
        GtkWidget *cond_entry;
        GtkWidget *action_list;
        GtkWidget *action_combo;
+       GtkWidget *account_label;
        GtkWidget *account_list;
        GtkWidget *account_combo;
        GtkWidget *dest_entry;
@@ -591,6 +592,7 @@ static void prefs_filtering_create(void)
        filtering.cond_entry = cond_entry;
        filtering.action_list = action_list;
        filtering.action_combo = action_combo;
+       filtering.account_label = account_label;
        filtering.account_list = account_list;
        filtering.account_combo = account_combo;
        filtering.dest_entry = dest_entry;
@@ -1258,116 +1260,158 @@ static void prefs_filtering_action_select(GtkList *list,
 
        switch (value) {
        case ACTION_MOVE:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, TRUE);
                gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, TRUE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, TRUE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_COPY:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, TRUE);
                gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, TRUE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, TRUE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_DELETE:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, FALSE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, FALSE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_MARK:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, FALSE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, FALSE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_UNMARK:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, FALSE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, FALSE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_MARK_AS_READ:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, FALSE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, FALSE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_MARK_AS_UNREAD:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, FALSE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, FALSE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_FORWARD:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, TRUE);
                gtk_widget_set_sensitive(filtering.account_combo, TRUE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, TRUE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, TRUE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_FORWARD_AS_ATTACHMENT:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, TRUE);
                gtk_widget_set_sensitive(filtering.account_combo, TRUE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, TRUE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, TRUE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_REDIRECT:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, TRUE);
                gtk_widget_set_sensitive(filtering.account_combo, TRUE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, TRUE);
-               gtk_widget_hide(filtering.dest_btn);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
                gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, TRUE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_hide(filtering.exec_btn);
                gtk_widget_hide(filtering.color_optmenu);
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_EXECUTE:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_show(filtering.dest_entry);
                gtk_widget_set_sensitive(filtering.dest_entry, TRUE);
@@ -1380,6 +1424,8 @@ static void prefs_filtering_action_select(GtkList *list,
                gtk_widget_hide(filtering.color_label);
                break;
        case ACTION_COLOR:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
                gtk_widget_hide(filtering.dest_entry);
                gtk_widget_hide(filtering.dest_btn);
@@ -1391,10 +1437,15 @@ static void prefs_filtering_action_select(GtkList *list,
                gtk_widget_show(filtering.color_label);
                break;
        case ACTION_DELETE_ON_SERVER:
+               gtk_widget_show(filtering.account_label);
+               gtk_widget_set_sensitive(filtering.account_label, FALSE);
                gtk_widget_set_sensitive(filtering.account_combo, FALSE);
-               gtk_widget_hide(filtering.dest_entry);
-               gtk_widget_hide(filtering.dest_btn);
-               gtk_widget_hide(filtering.dest_label);
+               gtk_widget_show(filtering.dest_entry);
+               gtk_widget_set_sensitive(filtering.dest_entry, FALSE);
+               gtk_widget_show(filtering.dest_btn);
+               gtk_widget_set_sensitive(filtering.dest_btn, FALSE);
+               gtk_widget_show(filtering.dest_label);
+               gtk_widget_set_sensitive(filtering.dest_label, FALSE);
                gtk_widget_hide(filtering.exec_label);
                gtk_widget_show(filtering.exec_btn);
                gtk_widget_hide(filtering.exec_btn);