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/rule-editor.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'filter/rule-editor.c') 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, -- cgit v1.2.3