[Evolution-hackers] Patch for 4821
- From: Hans Petter Jansson <hpj ximian com>
- To: evolution-hackers lists ximian com
- Cc: Jeffrey Stedfast <fejj ximian com>
- Subject: [Evolution-hackers] Patch for 4821
- Date: Mon, 24 Jan 2005 15:13:57 -0600
I need review of the filter part of this patch today, so it, or
something like it, can go in before freeze. It's not a perfect solution,
but it's the least intrusive I could do.
--
Hans Petter Jansson | <hpj novell com>
Evolution Developer | http://hp.cl.no/
? 4821.patch
? log.diff
? my-autogen.sh
? my-env.sh
? addressbook/70540.patch
? addressbook/util/deleted
? calendar/gui/new
? help/C/evolution-2.2-C.omf
? help/C/evolution-2.2.xml
? mail/default/zh_CN/Makefile
? mail/default/zh_CN/Makefile.in
? plugins/addressbook-file/Makefile
? plugins/addressbook-file/Makefile.in
? plugins/addressbook-file/org-gnome-addressbook-file.eplug
? plugins/default-source/Makefile
? plugins/default-source/Makefile.in
? plugins/default-source/org-gnome-default-source.eplug
? plugins/exchange-account-setup/Makefile
? plugins/exchange-account-setup/Makefile.in
? plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug
? plugins/groupwise-account-setup/Makefile
? plugins/groupwise-account-setup/Makefile.in
? plugins/groupwise-account-setup/org-gnome-gw-account-setup.eplug
? plugins/groupwise-send-options/Makefile
? plugins/groupwise-send-options/Makefile.in
? plugins/groupwise-send-options/org-gnome-compose-send-options.eplug
? plugins/groupwise-status-tracking/Makefile
? plugins/groupwise-status-tracking/Makefile.in
? plugins/groupwise-status-tracking/org-gnome-status-track.eplug
? plugins/new-mail-notify/Makefile
? plugins/new-mail-notify/Makefile.in
? plugins/send-options/Makefile
? plugins/send-options/Makefile.in
? plugins/send-options/org-gnome-send-options.eplug
? plugins/shared-folder/Makefile
? plugins/shared-folder/Makefile.in
? plugins/shared-folder/org-gnome-shared-folder.eplug
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.776
diff -u -p -r1.776 configure.in
--- configure.in 21 Jan 2005 19:16:32 -0000 1.776
+++ configure.in 24 Jan 2005 21:11:51 -0000
@@ -1061,7 +1061,7 @@ dnl *************************
dnl CFLAGS and LIBS and stuff
dnl *************************
-GNOME_COMPILE_WARNINGS(yes)
+dnl GNOME_COMPILE_WARNINGS(yes)
CFLAGS="$CFLAGS $WARN_CFLAGS"
case $CFLAGS in
*-Wall*)
Index: addressbook/gui/widgets/e-addressbook-view.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-addressbook-view.c,v
retrieving revision 1.158
diff -u -p -r1.158 e-addressbook-view.c
--- addressbook/gui/widgets/e-addressbook-view.c 22 Jan 2005 04:03:51 -0000 1.158
+++ addressbook/gui/widgets/e-addressbook-view.c 24 Jan 2005 21:11:52 -0000
@@ -464,6 +464,7 @@ eab_view_new (void)
rule_context_load (eav->search_context, SEARCH_RULE_DIR "/addresstypes.xml", "");
eav->search_rule = filter_rule_new ();
+ filter_rule_set_is_named (eav->search_rule, FALSE);
part = rule_context_next_part (eav->search_context, NULL);
if (part == NULL)
Index: filter/filter-rule.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-rule.c,v
retrieving revision 1.66
diff -u -p -r1.66 filter-rule.c
--- filter/filter-rule.c 6 Dec 2004 23:47:03 -0000 1.66
+++ filter/filter-rule.c 24 Jan 2005 21:11:52 -0000
@@ -165,6 +165,14 @@ filter_rule_clone (FilterRule *base)
}
void
+filter_rule_set_is_named (FilterRule *fr, gboolean is_named)
+{
+ g_assert (IS_FILTER_RULE (fr));
+
+ fr->is_named = is_named;
+}
+
+void
filter_rule_set_name (FilterRule *fr, const char *name)
{
g_assert (IS_FILTER_RULE (fr));
@@ -787,29 +795,31 @@ get_widget (FilterRule *fr, struct _Rule
rule parts need to be a vbox */
vbox = gtk_vbox_new (FALSE, 6);
- label = gtk_label_new_with_mnemonic (_("_Rule name:"));
- name = gtk_entry_new ();
- gtk_label_set_mnemonic_widget (label, name);
-
- if (!fr->name) {
- fr->name = g_strdup (_("Untitled"));
- gtk_entry_set_text (GTK_ENTRY (name), fr->name);
- /* FIXME: do we want the following code in the future? */
- /*gtk_editable_select_region (GTK_EDITABLE (name), 0, -1);*/
- } else {
- gtk_entry_set_text (GTK_ENTRY (name), fr->name);
- }
-
- /* evil kludgy hack because gtk sucks */
- g_signal_connect (name, "realize", G_CALLBACK (grab_focus), name);
+ if (fr->is_named) {
+ label = gtk_label_new_with_mnemonic (_("_Rule name:"));
+ name = gtk_entry_new ();
+ gtk_label_set_mnemonic_widget (label, name);
+
+ if (!fr->name) {
+ fr->name = g_strdup (_("Untitled"));
+ gtk_entry_set_text (GTK_ENTRY (name), fr->name);
+ /* FIXME: do we want the following code in the future? */
+ /*gtk_editable_select_region (GTK_EDITABLE (name), 0, -1);*/
+ } else {
+ gtk_entry_set_text (GTK_ENTRY (name), fr->name);
+ }
- 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);
- gtk_widget_show (label);
- gtk_widget_show (hbox);
+ /* evil kludgy hack because gtk sucks */
+ g_signal_connect (name, "realize", G_CALLBACK (grab_focus), name);
+
+ 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);
+ 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);
Index: filter/filter-rule.h
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-rule.h,v
retrieving revision 1.18
diff -u -p -r1.18 filter-rule.h
--- filter/filter-rule.h 12 May 2004 07:14:09 -0000 1.18
+++ filter/filter-rule.h 24 Jan 2005 21:11:52 -0000
@@ -62,6 +62,8 @@ enum _filter_threading_t {
struct _FilterRule {
GObject parent_object;
struct _FilterRulePrivate *priv;
+
+ gboolean is_named;
char *name;
char *source;
@@ -100,6 +102,8 @@ FilterRule *filter_rule_new (vo
FilterRule *filter_rule_clone (FilterRule *base);
/* methods */
+void filter_rule_set_is_named (FilterRule *fr, gboolean is_named);
+
void filter_rule_set_name (FilterRule *fr, const char *name);
void filter_rule_set_source (FilterRule *fr, const char *source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]