diff options
author | Jacob Berkman <jacob@helixcode.com> | 2000-06-10 05:48:29 +0800 |
---|---|---|
committer | Jacob Berkman <jberkman@src.gnome.org> | 2000-06-10 05:48:29 +0800 |
commit | cd84bd758091a39792e13c46804b496ce34fd940 (patch) | |
tree | 7f39e53bc4e69589db9532120fd69b7681687c78 | |
parent | 08cb892beab3ede04759a23e04b72e558de21cfb (diff) | |
download | gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.tar gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.tar.gz gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.tar.bz2 gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.tar.lz gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.tar.xz gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.tar.zst gsoc2013-evolution-cd84bd758091a39792e13c46804b496ce34fd940.zip |
use stock pixmap buttons
2000-06-09 Jacob Berkman <jacob@helixcode.com>
* filter-editor.c (add_or_edit): use stock pixmap buttons
* filter-druid.c (build_druid): remove the border on the notebook,
put the html widget in a scroll frame, and add some padding
svn path=/trunk/; revision=3495
-rw-r--r-- | filter/ChangeLog | 7 | ||||
-rw-r--r-- | filter/filter-druid.c | 57 | ||||
-rw-r--r-- | filter/filter-editor.c | 33 |
3 files changed, 71 insertions, 26 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index e39b5c03d1..da0d2570c3 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,10 @@ +2000-06-09 Jacob Berkman <jacob@helixcode.com> + + * filter-editor.c (add_or_edit): use stock pixmap buttons + + * filter-druid.c (build_druid): remove the border on the notebook, + put the html widget in a scroll frame, and add some padding + 2000-06-06 Dan Winship <danw@helixcode.com> * filter-driver.c (open_folder): Update for folder diff --git a/filter/filter-druid.c b/filter/filter-druid.c index 4a4595c5fb..75c948bfdd 100644 --- a/filter/filter-druid.c +++ b/filter/filter-druid.c @@ -27,6 +27,8 @@ #include <gnome-xml/tree.h> #include <gnome-xml/parser.h> +#include "widgets/misc/e-scroll-frame.h" + #include "filter-arg-types.h" #include "filter-xml.h" #include "filter-format.h" @@ -604,7 +606,8 @@ filter_druid_set_rules(FilterDruid *f, GList *options, GList *rules, struct filt static void build_druid(FilterDruid *d) { - GtkWidget *vbox, *frame, *scrolled_window, *list, *html, *hbox, *label, *vbox1; + GtkWidget *vbox, *frame, *scrolled_window, *list, *html, *hbox, *label; + GtkWidget *frame1, *table; struct _FilterDruidPrivate *p = _PRIVATE(d); #if 0 @@ -618,7 +621,8 @@ build_druid(FilterDruid *d) p->notebook = d; gtk_notebook_set_show_tabs(GTK_NOTEBOOK(p->notebook), FALSE); - + gtk_notebook_set_show_border(GTK_NOTEBOOK(p->notebook), FALSE); + /* page0, initial setup page */ vbox = gtk_vbox_new(FALSE, 3); frame = gtk_frame_new("Filters"); @@ -627,6 +631,7 @@ build_druid(FilterDruid *d) list = gtk_list_new(); scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_widget_set_usize(scrolled_window, 400, 150); + gtk_container_set_border_width(GTK_CONTAINER(scrolled_window), GNOME_PAD_SMALL); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), list); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, @@ -639,13 +644,17 @@ build_druid(FilterDruid *d) gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); frame = gtk_frame_new("Filter Description (click on values to edit)"); - html = gtk_html_new(); - scrolled_window = gtk_scrolled_window_new (NULL, NULL); + html = gtk_html_new(); + scrolled_window = e_scroll_frame_new (NULL, NULL); gtk_widget_set_usize(scrolled_window, 400, 150); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(scrolled_window), html); + gtk_container_set_border_width(GTK_CONTAINER(scrolled_window), GNOME_PAD_SMALL); + e_scroll_frame_set_policy (E_SCROLL_FRAME (scrolled_window), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (scrolled_window), + GTK_SHADOW_IN); + /*gtk_container_add(GTK_CONTAINER(frame1), html);*/ + gtk_container_add(GTK_CONTAINER(scrolled_window), html);//frame1); gtk_container_add(GTK_CONTAINER(frame), scrolled_window); gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); @@ -666,32 +675,38 @@ build_druid(FilterDruid *d) vbox = gtk_vbox_new(FALSE, 3); frame = gtk_frame_new("Rule options"); - vbox1 = gtk_vbox_new(FALSE, 3); + gtk_box_pack_start((GtkBox *)vbox, frame, FALSE, FALSE, 0); + + table = gtk_table_new (2, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL); + gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL); + gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD_SMALL); + + gtk_container_add(GTK_CONTAINER(frame), table); - hbox = gtk_hbox_new(FALSE, 3); label = gtk_label_new("Name of rule"); p->name1 = gtk_entry_new(); - gtk_box_pack_start((GtkBox *)hbox, label, FALSE, FALSE, 0); - gtk_box_pack_start((GtkBox *)hbox, p->name1, TRUE, TRUE, 0); - gtk_box_pack_start((GtkBox *)vbox1, hbox, TRUE, FALSE, 0); - - gtk_container_add(GTK_CONTAINER(frame), vbox1); + gtk_signal_connect(GTK_OBJECT(p->name1), "changed", option_name_changed, d); p->activate1 = gtk_check_button_new_with_label("Activate rule?"); - gtk_box_pack_start((GtkBox *)vbox1, p->activate1, TRUE, FALSE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->activate1), TRUE); - gtk_signal_connect(GTK_OBJECT(p->name1), "changed", option_name_changed, d); - - gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, 0, 0, 0, 0); + gtk_table_attach (GTK_TABLE (table), p->name1, 1, 2, 0, 1, + GTK_FILL | GTK_EXPAND, 0, 0, 0); + gtk_table_attach (GTK_TABLE (table), p->activate1, 0, 2, 1, 2, + GTK_FILL | GTK_EXPAND, 0, 0, 0); /* another copy of the filter thingy */ frame = gtk_frame_new("Filter Description (click on values to edit)"); html = gtk_html_new(); p->html1 = (GtkHTML *)html; - scrolled_window = gtk_scrolled_window_new (NULL, NULL); + scrolled_window = e_scroll_frame_new (NULL, NULL); + gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), GNOME_PAD_SMALL); + e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (scrolled_window), + GTK_SHADOW_IN); gtk_widget_set_usize(scrolled_window, 400, 150); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), + e_scroll_frame_set_policy (E_SCROLL_FRAME (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(scrolled_window), html); diff --git a/filter/filter-editor.c b/filter/filter-editor.c index ec6320b649..1f88cc7542 100644 --- a/filter/filter-editor.c +++ b/filter/filter-editor.c @@ -192,9 +192,31 @@ add_or_edit(FilterEditor *e, struct filter_option *option) return; } - dialogue = gnome_dialog_new(option?"Edit Filter":"Create filter", "Prev", "Next", "Finish", "Cancel", 0); - + dialogue = gnome_dialog_new (option + ? _("Edit Filter") + : _("Create filter"), + NULL); p->druid_dialogue = dialogue; + { + const char *pixmaps[] = { + GNOME_STOCK_BUTTON_PREV, + GNOME_STOCK_BUTTON_NEXT, + GNOME_STOCK_BUTTON_APPLY, + GNOME_STOCK_BUTTON_CANCEL, + NULL + }; + const char *names[] = { + N_("Back"), + N_("Next"), + N_("Finish"), + N_("Cancel"), + NULL + }; + if (option) + names[2] = N_("Apply"); + gnome_dialog_append_buttons_with_pixmaps(GNOME_DIALOG (dialogue), + names, pixmaps); + } gnome_dialog_set_close(dialogue, FALSE); gnome_dialog_set_sensitive(dialogue, 0, FALSE); @@ -208,9 +230,10 @@ add_or_edit(FilterEditor *e, struct filter_option *option) p->druid_druid = druid; - filter_druid_set_default_html(p->druid_druid, "<h2>Create Filtering Rule</h2>" - "<p>Select one of the base rules above, then continue " - "forwards to customise it.</p>"); + filter_druid_set_default_html(p->druid_druid, + _("<h2>Create Filtering Rule</h2>" + "<p>Select one of the base rules above, then continue " + "forwards to customise it.</p>")); filter_druid_set_rules(druid, e->systemoptions, e->rules, option); gtk_box_pack_start(dialogue->vbox, druid, TRUE, TRUE, 0); |