diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-08-04 06:14:12 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-08-04 06:14:12 +0800 |
commit | 19d3e7ce38ccdcae9e53bd10b8b42374c37434ef (patch) | |
tree | f13f30afe5b43b4ff9c111e285846f0196d9fea2 | |
parent | bc4d011ab1d50e218b717e0daf53ae1b00d14332 (diff) | |
download | gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.tar gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.tar.gz gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.tar.bz2 gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.tar.lz gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.tar.xz gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.tar.zst gsoc2013-evolution-19d3e7ce38ccdcae9e53bd10b8b42374c37434ef.zip |
Made this change the query based on which letter is clicked.
2001-08-03 Christopher James Lahey <clahey@ximian.com>
* gui/widgets/e-addressbook-view.c (jump_to_letter): Made this
change the query based on which letter is clicked.
svn path=/trunk/; revision=11627
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 73 |
2 files changed, 76 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index e0dd622192..8717dca14a 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2001-08-03 Christopher James Lahey <clahey@ximian.com> + * gui/widgets/e-addressbook-view.c (jump_to_letter): Made this + change the query based on which letter is clicked. + +2001-08-03 Christopher James Lahey <clahey@ximian.com> + * gui/component/addressbook.c (addressbook_factory_new_control): Fixed warnings here. diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 05374e26fa..74935dc242 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -56,6 +56,7 @@ #include "e-card-merging.h" #include "e-contact-editor.h" +#include <ctype.h> static void e_addressbook_view_init (EAddressbookView *card); static void e_addressbook_view_class_init (EAddressbookViewClass *klass); @@ -352,8 +353,76 @@ typedef struct { static void jump_to_letter(GtkWidget *button, LetterClosure *closure) { - if (closure->view->widget && E_IS_MINICARD_VIEW_WIDGET(closure->view->widget)) - e_minicard_view_widget_jump_to_letter(E_MINICARD_VIEW_WIDGET(closure->view->widget), closure->letter); + char *query; + switch (closure->letter) { + case '1': + query = g_strdup ("(not (or " + "(beginswith \"file_as\" \"a\") " + "(beginswith \"file_as\" \"b\") " + "(beginswith \"file_as\" \"c\") " + "(beginswith \"file_as\" \"d\") " + "(beginswith \"file_as\" \"e\") " + "(beginswith \"file_as\" \"f\") " + "(beginswith \"file_as\" \"g\") " + "(beginswith \"file_as\" \"h\") " + "(beginswith \"file_as\" \"i\") " + "(beginswith \"file_as\" \"j\") " + "(beginswith \"file_as\" \"k\") " + "(beginswith \"file_as\" \"l\") " + "(beginswith \"file_as\" \"m\") " + "(beginswith \"file_as\" \"n\") " + "(beginswith \"file_as\" \"o\") " + "(beginswith \"file_as\" \"p\") " + "(beginswith \"file_as\" \"q\") " + "(beginswith \"file_as\" \"r\") " + "(beginswith \"file_as\" \"s\") " + "(beginswith \"file_as\" \"t\") " + "(beginswith \"file_as\" \"u\") " + "(beginswith \"file_as\" \"v\") " + "(beginswith \"file_as\" \"w\") " + "(beginswith \"file_as\" \"x\") " + "(beginswith \"file_as\" \"y\") " + "(beginswith \"file_as\" \"z\") " + + "(beginswith \"file_as\" \"A\") " + "(beginswith \"file_as\" \"B\") " + "(beginswith \"file_as\" \"C\") " + "(beginswith \"file_as\" \"D\") " + "(beginswith \"file_as\" \"E\") " + "(beginswith \"file_as\" \"F\") " + "(beginswith \"file_as\" \"G\") " + "(beginswith \"file_as\" \"H\") " + "(beginswith \"file_as\" \"I\") " + "(beginswith \"file_as\" \"J\") " + "(beginswith \"file_as\" \"K\") " + "(beginswith \"file_as\" \"L\") " + "(beginswith \"file_as\" \"M\") " + "(beginswith \"file_as\" \"N\") " + "(beginswith \"file_as\" \"O\") " + "(beginswith \"file_as\" \"P\") " + "(beginswith \"file_as\" \"Q\") " + "(beginswith \"file_as\" \"R\") " + "(beginswith \"file_as\" \"S\") " + "(beginswith \"file_as\" \"T\") " + "(beginswith \"file_as\" \"U\") " + "(beginswith \"file_as\" \"V\") " + "(beginswith \"file_as\" \"W\") " + "(beginswith \"file_as\" \"X\") " + "(beginswith \"file_as\" \"Y\") " + "(beginswith \"file_as\" \"Z\") " + "))"); + break; + default: + query = g_strdup_printf ("(or " + "(beginswith \"file_as\" \"%c\")" + "(beginswith \"file_as\" \"%c\")" + ")", closure->letter, toupper (closure->letter)); + break; + } + gtk_object_set (GTK_OBJECT (closure->view), + "query", query, + NULL); + g_free (query); } static void |