diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-31 18:05:34 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-31 18:05:34 +0800 |
commit | a4606615f6dadb9b91ab9c501bca405ca6728421 (patch) | |
tree | 7349af421c52d644cdb3f47658f604fb81fe85fb | |
parent | e3289853ca71aa3d5251f82215aca7c141835dad (diff) | |
download | gsoc2013-evolution-a4606615f6dadb9b91ab9c501bca405ca6728421.tar.gz gsoc2013-evolution-a4606615f6dadb9b91ab9c501bca405ca6728421.tar.zst gsoc2013-evolution-a4606615f6dadb9b91ab9c501bca405ca6728421.zip |
renamed filter_label to rule_label, and removed the vfolder-editor and
2004-03-31 Not Zed <NotZed@Ximian.com>
* filter.glade: renamed filter_label to rule_label, and removed
the vfolder-editor and filter-editor windows.
* rule-editor.c (rule_editor_new): hide the source widget.
* vfolder-editor.c (vfolder_editor_new): hide the source widget.
* rule-editor.c (rule_editor_new): add a label argument.
* vfolder-editor.c (vfolder_editor_new): ditto below.
* filter-editor.c (filter_editor_new): dont add any label here.
* rule-editor.c (rule_editor_construct): Put the widget back in
the dialogue box here. Add an argument for the area label.
** Revert Rodney's last patch.
svn path=/trunk/; revision=25257
-rw-r--r-- | filter/ChangeLog | 20 | ||||
-rw-r--r-- | filter/filter-editor.c | 10 | ||||
-rw-r--r-- | filter/filter.glade | 624 | ||||
-rw-r--r-- | filter/rule-editor.c | 25 | ||||
-rw-r--r-- | filter/rule-editor.h | 13 | ||||
-rw-r--r-- | filter/score-editor.c | 7 | ||||
-rw-r--r-- | filter/vfolder-editor.c | 11 |
7 files changed, 51 insertions, 659 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index a46bea6fda..529ce0998e 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,23 @@ +2004-03-31 Not Zed <NotZed@Ximian.com> + + * filter.glade: renamed filter_label to rule_label, and removed + the vfolder-editor and filter-editor windows. + + * rule-editor.c (rule_editor_new): hide the source widget. + + * vfolder-editor.c (vfolder_editor_new): hide the source widget. + + * rule-editor.c (rule_editor_new): add a label argument. + + * vfolder-editor.c (vfolder_editor_new): ditto below. + + * filter-editor.c (filter_editor_new): dont add any label here. + + * rule-editor.c (rule_editor_construct): Put the widget back in + the dialogue box here. Add an argument for the area label. + + ** Revert Rodney's last patch. + 2004-03-30 Rodney Dawes <dobey@ximian.com> * filter-editor.c (filter_editor_new): Use the new "filter_editor" diff --git a/filter/filter-editor.c b/filter/filter-editor.c index f6cb323aec..884721f862 100644 --- a/filter/filter-editor.c +++ b/filter/filter-editor.c @@ -105,15 +105,9 @@ filter_editor_new (FilterContext *fc, const char **source_names) { FilterEditor *fe = (FilterEditor *) g_object_new (FILTER_TYPE_EDITOR, NULL); GladeXML *gui; - GtkWidget *w; - - gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "filter_editor", NULL); - - w = glade_xml_get_widget (gui, "filter_editor"); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (fe)->vbox), w, TRUE, TRUE, 0); + gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); filter_editor_construct (fe, fc, gui, source_names); - g_object_unref (gui); return fe; @@ -150,7 +144,7 @@ filter_editor_construct (FilterEditor *fe, FilterContext *fc, GladeXML *gui, con gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); gtk_widget_show (omenu); - rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0]); + rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0], _("_Filter Rules")); } static FilterRule * diff --git a/filter/filter.glade b/filter/filter.glade index c34addfdc8..7d9ee76d13 100644 --- a/filter/filter.glade +++ b/filter/filter.glade @@ -2,240 +2,7 @@ <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> - -<widget class="GtkDialog" id="vfolder-editor"> - <property name="visible">True</property> - <property name="title" translatable="yes">Edit VFolders</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">False</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">8</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area2"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancel_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="ok_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-5</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vfolder_editor"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="filter_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Virtual _Folders</b></property> - <property name="use_underline">True</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox8"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label12"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="Custom" id="rule_list"> - <property name="visible">True</property> - <property name="creation_function">rule_editor_treeview_new</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Fri, 13 Dec 2002 00:15:04 GMT</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVButtonBox" id="vbuttonbox2"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkButton" id="rule_add"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-add</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_edit"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Edit</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_delete"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-remove</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_up"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-go-up</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_down"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-go-down</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">3</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> +<requires lib="gnome"/> <widget class="GtkDialog" id="vfolder-source"> <property name="border_width">6</property> @@ -564,9 +331,9 @@ <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="filter_label"> + <widget class="GtkLabel" id="rule_label"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>_Search Rules</b></property> + <property name="label" translatable="yes"><b>_Filter Rules</b></property> <property name="use_underline">True</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -660,63 +427,9 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> + <property name="label" translatable="yes">_Edit</property> + <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - - <child> - <widget class="GtkHBox" id="hbox13"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="stock">gtk-properties</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label19"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Edit</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> </widget> </child> @@ -1215,331 +928,4 @@ a time relative to when filtering occurs.</property> </child> </widget> -<widget class="GtkDialog" id="filter-editor"> - <property name="visible">True</property> - <property name="title" translatable="yes">Filter Editor</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> - <property name="resizable">True</property> - <property name="destroy_with_parent">False</property> - <property name="has_separator">False</property> - - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox4"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area4"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> - - <child> - <widget class="GtkButton" id="cancelbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="okbutton1"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="response_id">-5</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="filter_editor"> - <property name="border_width">12</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkOptionMenu" id="filter_source"> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="menu1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="menuitem1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Incoming</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox11"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkLabel" id="filter_label"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>_Filter Rules</b></property> - <property name="use_underline">True</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox11"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> - - <child> - <widget class="GtkLabel" id="label18"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox12"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="Custom" id="rule_list"> - <property name="visible">True</property> - <property name="creation_function">rule_editor_treeview_new</property> - <property name="int1">0</property> - <property name="int2">0</property> - <property name="last_modification_time">Thu, 12 Dec 2002 23:50:05 GMT</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox12"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkVButtonBox" id="vbuttonbox5"> - <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property> - <property name="spacing">6</property> - - <child> - <widget class="GtkButton" id="rule_add"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-add</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_edit"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - - <child> - <widget class="GtkAlignment" id="alignment2"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - - <child> - <widget class="GtkHBox" id="hbox14"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-properties</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label20"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Edit</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_delete"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-remove</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_up"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-go-up</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="rule_down"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-go-down</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">3</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - </child> -</widget> - </glade-interface> diff --git a/filter/rule-editor.c b/filter/rule-editor.c index d74e3aa76e..a868e25d73 100644 --- a/filter/rule-editor.c +++ b/filter/rule-editor.c @@ -159,19 +159,14 @@ rule_editor_destroy (GtkObject *obj) * Return value: A new #RuleEditor object. **/ RuleEditor * -rule_editor_new (RuleContext *rc, const char *source) +rule_editor_new (RuleContext *rc, const char *source, const char *label) { 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); - - w = glade_xml_get_widget (gui, "rule_editor"); - gtk_box_pack_start ((GtkBox *) ((GtkDialog *)re)->vbox, w, TRUE, TRUE, 0); - - rule_editor_construct (re, rc, gui, source); - + rule_editor_construct (re, rc, gui, source, label); + gtk_widget_hide(glade_xml_get_widget (gui, "filter_source")); g_object_unref (gui); return re; @@ -719,20 +714,23 @@ rule_editor_treeview_new (char *widget_name, char *string1, char *string2, int i } void -rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source) +rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source, const char *label) { GtkWidget *w; int i; + char *tmp; re->context = context; g_object_ref (context); gtk_window_set_resizable ((GtkWindow *) re, TRUE); gtk_window_set_default_size ((GtkWindow *) re, 350, 400); - gtk_widget_realize ((GtkWidget *) re); gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *) re)->action_area, 12); - + + w = glade_xml_get_widget(gui, "rule_editor"); + gtk_box_pack_start((GtkBox *)((GtkDialog *)re)->vbox, w, TRUE, TRUE, 3); + for (i = 0; i < BUTTON_LAST; i++) { re->priv->buttons[i] = (GtkButton *) w = glade_xml_get_widget (gui, edit_buttons[i].name); g_signal_connect (w, "clicked", edit_buttons[i].func, re); @@ -745,7 +743,10 @@ 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"); + w = glade_xml_get_widget (gui, "rule_label"); + tmp = alloca(strlen(label)+8); + sprintf(tmp, "<b>%s</b>", label); + gtk_label_set_label((GtkLabel *)w, tmp); gtk_label_set_mnemonic_widget ((GtkLabel *) w, (GtkWidget *) re->list); g_signal_connect (re, "response", G_CALLBACK (editor_response), re); diff --git a/filter/rule-editor.h b/filter/rule-editor.h index d2e9797e46..be216edf73 100644 --- a/filter/rule-editor.h +++ b/filter/rule-editor.h @@ -89,15 +89,16 @@ struct _RuleEditorUndo { int newrank; }; -GtkType rule_editor_get_type (void); -RuleEditor *rule_editor_new (struct _RuleContext *, const char *source); -void rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source); +GtkType rule_editor_get_type(void); +RuleEditor *rule_editor_new(RuleContext *rc, const char *source, const char *label); + +void rule_editor_construct(RuleEditor *re, RuleContext *context, GladeXML *gui, const char *source, const char *label); /* methods */ -void rule_editor_set_source (RuleEditor *re, const char *source); +void rule_editor_set_source(RuleEditor *re, const char *source); /* calculates the sensitivity of the editor */ -void rule_editor_set_sensitive (RuleEditor *re); +void rule_editor_set_sensitive(RuleEditor *re); /* used internally to create a new rule appropriate for the editor */ -struct _FilterRule *rule_editor_create_rule (RuleEditor *re); +struct _FilterRule *rule_editor_create_rule(RuleEditor *re); #endif /* ! _RULE_EDITOR_H */ diff --git a/filter/score-editor.c b/filter/score-editor.c index 9a8c0a626c..e52edf7c02 100644 --- a/filter/score-editor.c +++ b/filter/score-editor.c @@ -105,14 +105,9 @@ score_editor_new (ScoreContext *sc) { ScoreEditor *se = (ScoreEditor *) g_object_new (SCORE_TYPE_EDITOR, NULL); GladeXML *gui; - GtkWidget *w; gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); - rule_editor_construct ((RuleEditor *) se, (RuleContext *) sc, gui, NULL); - - w = glade_xml_get_widget (gui, "rule_frame"); - gtk_frame_set_label ((GtkFrame *) w, _("Score Rules")); - + rule_editor_construct ((RuleEditor *) se, (RuleContext *) sc, gui, NULL, _("_Score Rules")); g_object_unref (gui); return se; diff --git a/filter/vfolder-editor.c b/filter/vfolder-editor.c index 4280d8cd2f..84ebbc0f94 100644 --- a/filter/vfolder-editor.c +++ b/filter/vfolder-editor.c @@ -103,15 +103,10 @@ vfolder_editor_new (VfolderContext *vc) { VfolderEditor *ve = (VfolderEditor *) g_object_new (VFOLDER_TYPE_EDITOR, NULL); GladeXML *gui; - GtkWidget *w; - 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); - + gui = glade_xml_new (FILTER_GLADEDIR "/filter.glade", "rule_editor", NULL); + rule_editor_construct ((RuleEditor *) ve, (RuleContext *) vc, gui, NULL, _("Virtual _Folders")); + gtk_widget_hide(glade_xml_get_widget (gui, "filter_source")); g_object_unref (gui); return ve; |