From 4080a5356c3543a554d689df467d6d72393e58c6 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Mon, 15 Mar 2004 20:37:48 +0000 Subject: Hide the separators on these dialogs Re-pack the rule_editor widget in 2004-04-15 Rodney Dawes * filter-datespec.c (validate): (button_clicked): Hide the separators on these dialogs * filter-editor.c (filter_editor_new): Re-pack the rule_editor widget in here, and get rid of the GtkFrame-related code * filter-file.c (validate): Hide the separators on these dialogs * filter-filter.c (get_widget): Get rid of the GtkFrame, and relayout the widgets to be HIG-compliant * filter-folder.c (validate): Hide the separator on this dialog * filter-input.c (validate): Hide the separator on this dialog * filter-part.c (main): Hide the separator on this dialog * filter-rule.c (validate): Hide the separator on this dialog (get_widget): Get rid of the GtkFrame, and relayout the widgets to be HIG-compliant * filter.glade: Make the widget layouts here be HIG-compliant * rule-context.c (new_rule_response): (rule_context_add_rule_gui): Hide the separators on these dialogs * rule-editor.c (rule_editor_new): Get rid of the GtkFrame-related code (add_editor_response): Hide the dialog separator here (rule_add): Hide the dialog separator here (edit_editor_response): Hide the dialog separator here (rule_edit): Hide the dialog separator here (rule_editor_construct): Remove the rule_editor repacking code Set the dialog vbox's border width to 12 Set the mnemonic for the filter label here Hide the dialog separator on the filter editor dialog * vfolder-editor.c (vfolder_editor_new): Re-pack the appropriate editor widget in here Get rid of the GtkFrame-related code * vfolder-rule.c (validate): Hide the dialog separators here svn path=/trunk/; revision=25083 --- filter/ChangeLog | 32 ++ filter/filter-datespec.c | 2 + filter/filter-editor.c | 7 +- filter/filter-file.c | 2 + filter/filter-filter.c | 28 +- filter/filter-folder.c | 3 +- filter/filter-input.c | 1 + filter/filter-part.c | 1 + filter/filter-rule.c | 43 ++- filter/filter.glade | 985 ++++++++++++++++++++++++++--------------------- filter/rule-context.c | 2 + filter/rule-editor.c | 23 +- filter/vfolder-editor.c | 11 +- filter/vfolder-rule.c | 2 + 14 files changed, 666 insertions(+), 476 deletions(-) diff --git a/filter/ChangeLog b/filter/ChangeLog index 592045ef37..b12299bc8f 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,35 @@ +2004-04-15 Rodney Dawes + + * filter-datespec.c (validate): + (button_clicked): Hide the separators on these dialogs + * filter-editor.c (filter_editor_new): Re-pack the rule_editor widget + in here, and get rid of the GtkFrame-related code + * filter-file.c (validate): Hide the separators on these dialogs + * filter-filter.c (get_widget): Get rid of the GtkFrame, and relayout + the widgets to be HIG-compliant + * filter-folder.c (validate): Hide the separator on this dialog + * filter-input.c (validate): Hide the separator on this dialog + * filter-part.c (main): Hide the separator on this dialog + * filter-rule.c (validate): Hide the separator on this dialog + (get_widget): Get rid of the GtkFrame, and relayout the widgets to be + HIG-compliant + * filter.glade: Make the widget layouts here be HIG-compliant + * rule-context.c (new_rule_response): + (rule_context_add_rule_gui): Hide the separators on these dialogs + * rule-editor.c (rule_editor_new): Get rid of the GtkFrame-related code + (add_editor_response): Hide the dialog separator here + (rule_add): Hide the dialog separator here + (edit_editor_response): Hide the dialog separator here + (rule_edit): Hide the dialog separator here + (rule_editor_construct): Remove the rule_editor repacking code + Set the dialog vbox's border width to 12 + Set the mnemonic for the filter label here + Hide the dialog separator on the filter editor dialog + * vfolder-editor.c (vfolder_editor_new): Re-pack the appropriate + editor widget in here + Get rid of the GtkFrame-related code + * vfolder-rule.c (validate): Hide the dialog separators here + 2004-02-20 Jeffrey Stedfast * rule-editor.c (rule_delete): After setting the new selected diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c index 9b15c1dbdb..2c8ddb4a90 100644 --- a/filter/filter-datespec.c +++ b/filter/filter-datespec.c @@ -175,6 +175,7 @@ validate (FilterElement *fe) GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("You must choose a date.")); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); } @@ -408,6 +409,7 @@ button_clicked (GtkButton *button, FilterDatespec *fds) GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_dialog_set_has_separator (dialog, FALSE); p->notebook_type = glade_xml_get_widget (gui, "notebook_type"); p->option_type = glade_xml_get_widget (gui, "option_type"); diff --git a/filter/filter-editor.c b/filter/filter-editor.c index f6dc5700ec..58d33a8a4d 100644 --- a/filter/filter-editor.c +++ b/filter/filter-editor.c @@ -108,11 +108,12 @@ filter_editor_new (FilterContext *fc, const char **source_names) GtkWidget *w; gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); + + w = glade_xml_get_widget (gui, "rule_editor"); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (fe)->vbox), w, TRUE, TRUE, 0); + filter_editor_construct (fe, fc, gui, source_names); - w = glade_xml_get_widget (gui, "rule_frame"); - gtk_frame_set_label (GTK_FRAME (w), _("Filter Rules")); - g_object_unref (gui); return fe; diff --git a/filter/filter-file.c b/filter/filter-file.c index 41c6b69c58..2a79fdc172 100644 --- a/filter/filter-file.c +++ b/filter/filter-file.c @@ -165,6 +165,7 @@ validate (FilterElement *fe) GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("You must specify a file name.")); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); @@ -184,6 +185,7 @@ validate (FilterElement *fe) _("File '%s' does not exist or is not a regular file."), file->path); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); diff --git a/filter/filter-filter.c b/filter/filter-filter.c index 6719cb9ad4..0aa5920b98 100644 --- a/filter/filter-filter.c +++ b/filter/filter-filter.c @@ -475,7 +475,7 @@ more_parts (GtkWidget *button, struct _rule_data *data) static GtkWidget * get_widget (FilterRule *fr, RuleContext *rc) { - GtkWidget *widget, *hbox, *add, *frame; + GtkWidget *widget, *hbox, *add, *label; GtkWidget *parts, *inframe, *w; GtkWidget *scrolledwindow; GtkObject *hadj, *vadj; @@ -488,10 +488,22 @@ get_widget (FilterRule *fr, RuleContext *rc) widget = FILTER_RULE_CLASS (parent_class)->get_widget (fr, rc); /* and now for the action area */ - frame = gtk_frame_new (_("Then")); - inframe = gtk_vbox_new (FALSE, 3); - gtk_container_add (GTK_CONTAINER (frame), inframe); - gtk_container_set_border_width (GTK_CONTAINER (inframe), 6); + label = gtk_label_new (_("Then")); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); + gtk_box_pack_start (GTK_BOX (widget), label, FALSE, FALSE, 0); + gtk_widget_show (label); + + hbox = gtk_hbox_new (FALSE, 12); + gtk_box_pack_start (GTK_BOX (widget), hbox, FALSE, FALSE, 0); + gtk_widget_show (hbox); + + label = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + + inframe = gtk_vbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (hbox), inframe, TRUE, TRUE, 0); rows = g_list_length (ff->actions); parts = gtk_table_new (rows, 2, FALSE); @@ -526,13 +538,11 @@ get_widget (FilterRule *fr, RuleContext *rc) gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), parts); - gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 3); + gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 0); /*gtk_box_pack_start (GTK_BOX (inframe), parts, FALSE, FALSE, 3);*/ - gtk_widget_show_all (frame); - - gtk_box_pack_start (GTK_BOX (widget), frame, TRUE, TRUE, 3); + gtk_widget_show_all (widget); return widget; } diff --git a/filter/filter-folder.c b/filter/filter-folder.c index c19584484d..a2489e030b 100644 --- a/filter/filter-folder.c +++ b/filter/filter-folder.c @@ -151,7 +151,8 @@ validate (FilterElement *fe) dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("You must specify a folder.")); - + + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); diff --git a/filter/filter-input.c b/filter/filter-input.c index ac2c59f610..ff5afe5337 100644 --- a/filter/filter-input.c +++ b/filter/filter-input.c @@ -193,6 +193,7 @@ validate (FilterElement *fe) _("Error in regular expression '%s':\n%s"), pattern, regmsg); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); g_free (regmsg); diff --git a/filter/filter-part.c b/filter/filter-part.c index 5f8a53304a..f82d354dee 100644 --- a/filter/filter-part.c +++ b/filter/filter-part.c @@ -528,6 +528,7 @@ int main(int argc, char **argv) dialog = gtk_dialog_new (); gtk_dialog_add_buttons ((GtkDialog *) dialog, GTK_BUTTONS_OK, NULL); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_window_set_title ((GtkWindow *) dialog, _("Test")); gtk_window_set_policy ((GtkWindow *) dialog, FALSE, TRUE, FALSE); gtk_box_pack_start ((GtkBox *) dialog->vbox, w, TRUE, TRUE, 0); diff --git a/filter/filter-rule.c b/filter/filter-rule.c index 87e6433167..fdf59a5c6f 100644 --- a/filter/filter-rule.c +++ b/filter/filter-rule.c @@ -218,6 +218,7 @@ validate (FilterRule *fr) GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("You must name this filter.")); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); @@ -735,7 +736,7 @@ static GtkWidget * get_widget (FilterRule *fr, struct _RuleContext *f) { GtkWidget *hbox, *vbox, *parts, *inframe; - GtkWidget *add, *frame, *label, *name, *w; + GtkWidget *add, *label, *name, *w; GtkWidget *omenu, *menu, *item; GtkWidget *scrolledwindow; GtkObject *hadj, *vadj; @@ -746,9 +747,9 @@ get_widget (FilterRule *fr, struct _RuleContext *f) /* this stuff should probably be a table, but the rule parts need to be a vbox */ - vbox = gtk_vbox_new (FALSE, 3); - - label = gtk_label_new (_("Rule name: ")); + vbox = gtk_vbox_new (FALSE, 6); + + label = gtk_label_new (_("Rule name:")); name = gtk_entry_new (); if (!fr->name) { @@ -763,16 +764,34 @@ get_widget (FilterRule *fr, struct _RuleContext *f) /* evil kludgy hack because gtk sucks */ g_signal_connect (name, "realize", G_CALLBACK (grab_focus), name); - hbox = gtk_hbox_new (FALSE, 3); + hbox = gtk_hbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), name, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); g_signal_connect (name, "changed", G_CALLBACK (name_changed), fr); - - frame = gtk_frame_new (_("If")); - inframe = gtk_vbox_new (FALSE, 3); - gtk_container_add (GTK_CONTAINER (frame), inframe); - gtk_container_set_border_width (GTK_CONTAINER (inframe), 6); + gtk_widget_show (label); + gtk_widget_show (hbox); + + hbox = gtk_hbox_new (FALSE, 12); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show (hbox); + + label = gtk_label_new (_("If")); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); + gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + + hbox = gtk_hbox_new (FALSE, 12); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show (hbox); + + label = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + + inframe = gtk_vbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX (hbox), inframe, TRUE, TRUE, 0); /* this is the parts table, it should probably be inside a scrolling list */ rows = g_list_length (fr->parts); @@ -836,10 +855,6 @@ get_widget (FilterRule *fr, struct _RuleContext *f) gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 3); - /*gtk_box_pack_start (GTK_BOX (inframe), parts, FALSE, FALSE, 3); */ - - gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); - gtk_widget_show_all (vbox); return vbox; diff --git a/filter/filter.glade b/filter/filter.glade index ac61b72c4d..03585a5f7d 100644 --- a/filter/filter.glade +++ b/filter/filter.glade @@ -4,7 +4,6 @@ - 6 True Edit Filters GTK_WINDOW_TOPLEVEL @@ -12,13 +11,13 @@ False True False - True + False True False - 6 + 0 @@ -58,144 +57,188 @@ - + + 12 True - True - 0 + False + 6 - - + + True + True + 0 - - + + True - Incoming - True - - - - - True - Outgoing - True + + + True + Incoming + True + + + + + + True + Outgoing + True + + + + 0 + False + False + - - - 0 - False - False - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN + + + True + <b>Filter Rules</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + - - 6 + True False - 6 + 12 - + True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - rule_editor_treeview_new - 0 - 0 - Thu, 12 Dec 2002 23:41:46 GMT - - + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 0 - True - True + False + False - + True False - 0 + 6 - + True - GTK_BUTTONBOX_DEFAULT_STYLE - 6 + rule_editor_treeview_new + 0 + 0 + Thu, 12 Dec 2002 23:41:46 GMT + + + 0 + True + True + + - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - - + + + True + False + 0 - + True - True - True - _Edit - True - GTK_RELIEF_NORMAL - - + GTK_BUTTONBOX_DEFAULT_STYLE + 6 - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - - + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + + - - - True - True - True - gtk-go-up - True - GTK_RELIEF_NORMAL - - + + + True + True + True + _Edit + True + GTK_RELIEF_NORMAL + + - - - True - True - True - gtk-go-down - True - GTK_RELIEF_NORMAL + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-go-up + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-go-down + True + GTK_RELIEF_NORMAL + + + + 0 + False + False + @@ -207,34 +250,20 @@ 0 - False - False + True + True - - - - - True - Filter Rules - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - label_item + 0 + True + True - 0 + 3 True True @@ -244,7 +273,6 @@ - 6 True Edit VFolders GTK_WINDOW_TOPLEVEL @@ -252,7 +280,7 @@ False True False - True + False @@ -298,148 +326,178 @@ - + + 12 True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN + False + 6 + + + + True + <b>Virtual _Folders</b> + True + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + - - 6 + True False - 6 + 12 - + True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - rule_editor_treeview_new - 0 - 0 - Fri, 13 Dec 2002 00:15:04 GMT - - + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 0 - True - True + False + False - + True False - 0 + 6 - + True - GTK_BUTTONBOX_DEFAULT_STYLE - 6 - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - - - - - - True - True - True - _Edit - True - GTK_RELIEF_NORMAL - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - - - - - - True - True - True - gtk-go-up - True - GTK_RELIEF_NORMAL - - - - - - True - True - True - gtk-go-down - True - GTK_RELIEF_NORMAL - - + rule_editor_treeview_new + 0 + 0 + Fri, 13 Dec 2002 00:15:04 GMT 0 - False - False + True + True - - - 0 - False - False - - - - - - - True - Virtual Folders - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 + + + True + False + 0 + + + + True + GTK_BUTTONBOX_DEFAULT_STYLE + 6 + + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + _Edit + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-go-up + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-go-down + True + GTK_RELIEF_NORMAL + + + + + 0 + False + False + + + + + 0 + False + False + + + + + 0 + True + True + + - label_item + 0 + True + True - 0 + 3 True True @@ -457,13 +515,13 @@ False True False - True + False True False - 8 + 6 @@ -515,62 +573,51 @@ - + True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN + False + 6 - - 6 + + True + <b>vFolder Sources</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + True False - 6 + 0 - + True - True - 0 - - - - True - - - - True - specific folders only - True - - - - - - True - with all local folders - True - - - - - - True - with all active remote folders - True - - - - - - True - with all local and active remote folders - True - - - - + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 0 @@ -580,68 +627,123 @@ - + + 6 True False 6 - + True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT + True + 0 + + + + True - + True - vfolder_editor_sourcelist_new - 0 - 0 - Fri, 13 Dec 2002 00:22:39 GMT + specific folders only + True + + + + True + with all local folders + True + + + + + + True + with all active remote folders + True + + + + + + True + with all local and active remote folders + True + + + + 0 - True - True + False + False - + True False - 1 + 6 - + True - GTK_BUTTONBOX_DEFAULT_STYLE - 6 + vfolder_editor_sourcelist_new + 0 + 0 + Fri, 13 Dec 2002 00:22:39 GMT + + + 0 + True + True + + - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - - + + + True + False + 1 - + True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL + GTK_BUTTONBOX_DEFAULT_STYLE + 6 + + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + + + + 0 + False + False + @@ -653,8 +755,8 @@ 0 - False - False + True + True @@ -665,29 +767,15 @@ - - - - - True - vFolder Sources - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - label_item + 0 + True + True - 0 + 3 True True @@ -697,7 +785,6 @@ - 6 True window1 GTK_WINDOW_TOPLEVEL @@ -708,6 +795,7 @@ + 12 True False 6 @@ -739,109 +827,152 @@ - + True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN + False + 6 + + + + True + <b>_Filter Rules</b> + True + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + - - 6 + True False - 6 + 12 - + True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - rule_editor_treeview_new - 0 - 0 - Thu, 12 Dec 2002 23:50:05 GMT - - + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 0 - True - True + False + False - + True False - 0 + 6 - + True - GTK_BUTTONBOX_DEFAULT_STYLE + rule_editor_treeview_new + 0 + 0 + Thu, 12 Dec 2002 23:50:05 GMT + + + 0 + True + True + + + + + + True + False 6 - + True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - - + GTK_BUTTONBOX_DEFAULT_STYLE + 6 - - - True - True - True - _Edit - True - GTK_RELIEF_NORMAL - - + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + + - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - - + + + True + True + True + _Edit + True + GTK_RELIEF_NORMAL + + - - - True - True - True - gtk-go-up - True - GTK_RELIEF_NORMAL - - + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + + - - - True - True - True - gtk-go-down - True - GTK_RELIEF_NORMAL + + + True + True + True + gtk-go-up + True + GTK_RELIEF_NORMAL + + + + + + True + True + True + gtk-go-down + True + GTK_RELIEF_NORMAL + + + + 0 + False + False + @@ -853,34 +984,20 @@ 0 - False - False + True + True - - - - - True - Filter Rules - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - label_item + 0 + True + True - 0 + 3 True True diff --git a/filter/rule-context.c b/filter/rule-context.c index 791dc6ea20..07a3775e3e 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -682,6 +682,7 @@ new_rule_response(GtkWidget *dialog, int button, RuleContext *context) _("Rule name '%s' is not unique, choose another."), rule->name); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); @@ -717,6 +718,7 @@ rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const char *title, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_dialog_set_has_separator (dialog, FALSE); gtk_window_set_title((GtkWindow *) dialog, title); gtk_window_set_default_size((GtkWindow *) dialog, 600, 400); diff --git a/filter/rule-editor.c b/filter/rule-editor.c index 320e9851e1..f1a4606d98 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -163,14 +163,10 @@ rule_editor_new (RuleContext *rc, const char *source) { RuleEditor *re = (RuleEditor *) g_object_new (RULE_TYPE_EDITOR, NULL); GladeXML *gui; - GtkWidget *w; gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); rule_editor_construct (re, rc, gui, source); - w = glade_xml_get_widget (gui, "rule_frame"); - gtk_frame_set_label ((GtkFrame *) w, _("Rules")); - g_object_unref (gui); return re; @@ -243,6 +239,7 @@ add_editor_response (GtkWidget *dialog, int button, RuleEditor *re) _("Rule name '%s' is not unique, choose another."), re->edit->name); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); @@ -289,6 +286,7 @@ rule_add (GtkWidget *widget, RuleEditor *re) GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_dialog_set_has_separator ((GtkDialog *) re->dialog, FALSE); gtk_window_set_title ((GtkWindow *) re->dialog, _("Add Rule")); gtk_window_set_default_size (GTK_WINDOW (re->dialog), 650, 400); @@ -328,6 +326,7 @@ edit_editor_response (GtkWidget *dialog, int button, RuleEditor *re) _("Rule name '%s' is not unique, choose another."), re->edit->name); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); @@ -371,6 +370,7 @@ rule_edit (GtkWidget *widget, RuleEditor *re) GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + gtk_dialog_set_has_separator ((GtkDialog *) re->dialog, FALSE); gtk_window_set_title ((GtkWindow *) re->dialog, _("Edit Rule")); gtk_window_set_default_size (GTK_WINDOW (re->dialog), 650, 400); @@ -724,10 +724,9 @@ rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, cons gtk_window_set_resizable ((GtkWindow *) re, TRUE); gtk_window_set_default_size ((GtkWindow *) re, 350, 400); - gtk_container_set_border_width ((GtkContainer *) re, 6); - - w = glade_xml_get_widget (gui, "rule_editor"); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re)->vbox), w, TRUE, TRUE, 3); + + gtk_widget_realize ((GtkWidget *) re); + gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *) re)->action_area, 12); for (i = 0; i < BUTTON_LAST; i++) { re->priv->buttons[i] = (GtkButton *) w = glade_xml_get_widget (gui, edit_buttons[i].name); @@ -740,10 +739,14 @@ rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, cons g_signal_connect (re->list, "cursor-changed", G_CALLBACK (cursor_changed), re); g_signal_connect (re->list, "row-activated", G_CALLBACK (double_click), re); - + + w = glade_xml_get_widget (gui, "filter_label"); + gtk_label_set_mnemonic_widget ((GtkLabel *) w, (GtkWidget *) re->list); + g_signal_connect (re, "response", G_CALLBACK (editor_response), re); rule_editor_set_source (re, source); - + + gtk_dialog_set_has_separator ((GtkDialog *) re, FALSE); gtk_dialog_add_buttons ((GtkDialog *) re, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, diff --git a/filter/vfolder-editor.c b/filter/vfolder-editor.c index 87776c010d..4280d8cd2f 100644 --- a/filter/vfolder-editor.c +++ b/filter/vfolder-editor.c @@ -105,12 +105,13 @@ vfolder_editor_new (VfolderContext *vc) GladeXML *gui; GtkWidget *w; - gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); + gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "vfolder_editor", NULL); + + w = glade_xml_get_widget (gui, "vfolder_editor"); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (ve)->vbox), w, TRUE, TRUE, 0); + rule_editor_construct ((RuleEditor *) ve, (RuleContext *) vc, gui, NULL); - - w = glade_xml_get_widget (gui, "rule_frame"); - gtk_frame_set_label ((GtkFrame *) w, _("Virtual Folders")); - + g_object_unref (gui); return ve; diff --git a/filter/vfolder-rule.c b/filter/vfolder-rule.c index b8acb3b94e..c71b9558de 100644 --- a/filter/vfolder-rule.c +++ b/filter/vfolder-rule.c @@ -214,6 +214,7 @@ validate (FilterRule *fr) GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("You must name this vfolder.")); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); @@ -228,6 +229,7 @@ validate (FilterRule *fr) GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("You need to to specify at least one folder as a source.")); + gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE); gtk_dialog_run ((GtkDialog *) dialog); gtk_widget_destroy (dialog); -- cgit v1.2.3