2007-04-23 [colin] 2.9.1cvs17
authorColin Leroy <colin@colino.net>
Mon, 23 Apr 2007 17:01:16 +0000 (17:01 +0000)
committerColin Leroy <colin@colino.net>
Mon, 23 Apr 2007 17:01:16 +0000 (17:01 +0000)
* src/Makefile.am
* src/stock_pixmap.c
* src/stock_pixmap.h
* src/summaryview.c
* src/summaryview.h
* src/gtk/gtksctree.c
* src/gtk/gtksctree.h
* src/pixmaps/selection.xpm
Fix bug 1193, 'Need a way to multi-select
items'. Add a toggle button to the summaryview
to switch between normal and multiple selection
(Maemo)

ChangeLog
PATCHSETS
configure.ac
src/Makefile.am
src/gtk/gtksctree.c
src/gtk/gtksctree.h
src/pixmaps/selection.xpm [new file with mode: 0644]
src/stock_pixmap.c
src/stock_pixmap.h
src/summaryview.c
src/summaryview.h

index a58b6d4f68954c78029afc64857e714536b6a740..135b167700f5d933f52752c8c530cd2511cf44d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2007-04-23 [colin]     2.9.1cvs17
+
+       * src/Makefile.am
+       * src/stock_pixmap.c
+       * src/stock_pixmap.h
+       * src/summaryview.c
+       * src/summaryview.h
+       * src/gtk/gtksctree.c
+       * src/gtk/gtksctree.h
+       * src/pixmaps/selection.xpm
+               Fix bug 1193, 'Need a way to multi-select
+               items'. Add a toggle button to the summaryview
+               to switch between normal and multiple selection
+               (Maemo)
+
+2007-04-23 [colin]     2.9.1cvs16
+
+       * src/Makefile.am
+       * src/stock_pixmap.c
+       * src/stock_pixmap.h
+       * src/summaryview.c
+       * src/summaryview.h
+       * src/gtk/gtksctree.c
+       * src/gtk/gtksctree.h
+       * src/pixmaps/selection.xpm
+               Fix bug 1193, 'Need a way to multi-
+               select items'
+               Add a toggle button in the summaryview
+               to enable normal or multiple selection.
+               (Maemo)
+
 2007-04-23 [colin]     2.9.1cvs15
 
        * src/compose.c
index f154955634d20f071d0b722174d6173ee1d090b7..a0dade482eabd3e5c5d69bc1a47d4c1689745b80 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.68 -r 1.1.2.69 src/gtk/quicksearch.c;  ) > 2.9.1cvs13.patchset
 ( cvs diff -u -r 1.1.2.69 -r 1.1.2.70 src/gtk/quicksearch.c;  ) > 2.9.1cvs14.patchset
 ( cvs diff -u -r 1.382.2.372 -r 1.382.2.373 src/compose.c;  ) > 2.9.1cvs15.patchset
+( cvs diff -u -r 1.155.2.61 -r 1.155.2.62 src/Makefile.am;  cvs diff -u -r 1.25.2.36 -r 1.25.2.37 src/stock_pixmap.c;  cvs diff -u -r 1.18.2.25 -r 1.18.2.26 src/stock_pixmap.h;  cvs diff -u -r 1.395.2.298 -r 1.395.2.299 src/summaryview.c;  cvs diff -u -r 1.68.2.36 -r 1.68.2.37 src/summaryview.h;  cvs diff -u -r 1.1.4.38 -r 1.1.4.39 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/gtk/gtksctree.h;  diff -u /dev/null src/pixmaps/selection.xpm;  ) > 2.9.1cvs16.patchset
+( cvs diff -u -r 1.155.2.61 -r 1.155.2.62 src/Makefile.am;  cvs diff -u -r 1.25.2.36 -r 1.25.2.37 src/stock_pixmap.c;  cvs diff -u -r 1.18.2.25 -r 1.18.2.26 src/stock_pixmap.h;  cvs diff -u -r 1.395.2.298 -r 1.395.2.299 src/summaryview.c;  cvs diff -u -r 1.68.2.36 -r 1.68.2.37 src/summaryview.h;  cvs diff -u -r 1.1.4.38 -r 1.1.4.39 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/gtk/gtksctree.h;  diff -u /dev/null src/pixmaps/selection.xpm;  ) > 2.9.1cvs17.patchset
index ba82f5437001f9ab77e9e3740f491618ed5976bf..6b666cb90390e4d6ff1d12ca4218399eee00b292 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=15
+EXTRA_VERSION=17
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9760e738f742d08e29df05011d6974c3668a858b..1d48e9b7dd623ff2bae2e468283eda53e6d5ff57 100644 (file)
@@ -320,7 +320,7 @@ EXTRA_DIST = \
        pixmaps/dir_close.xpm \
        pixmaps/dir_close_hrm.xpm \
        pixmaps/dir_noselect.xpm \
-    pixmaps/dir_open_hrm.xpm \
+       pixmaps/dir_open_hrm.xpm \
        pixmaps/dir_open.xpm \
        pixmaps/down_arrow.xpm \
        pixmaps/drafts_close.xpm \
@@ -413,6 +413,7 @@ EXTRA_DIST = \
        pixmaps/quicksearch.xpm \
        pixmaps/replied.xpm \
        pixmaps/search.xpm \
+       pixmaps/selection.xpm \
        pixmaps/spam.xpm \
        pixmaps/spam_btn.xpm \
        pixmaps/claws-mail_icon.xpm \
index 2278f567da2926e7f9b2cc76bc776165f243ace3..7ffa3719728f4f527e48ba5ef160295d1084e1b5 100644 (file)
@@ -1468,6 +1468,9 @@ select_row (GtkSCTree *sctree, gint row, gint col, guint state, GtkCTreeNode *_n
                   (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_SINGLE) &&
                   (GTK_CLIST(sctree)->selection_mode != GTK_SELECTION_BROWSE);
 
+       if (!range && !additive && sctree->force_additive_sel)
+               additive = TRUE;
+
        GTK_CLIST(sctree)->focus_row = row;
 
        if (!additive) {
index 74c47c8458375b30d1de7c0e03069e47188d7647..9d28b667024b721f4a84534f1d0d291082b972c8 100644 (file)
@@ -40,6 +40,7 @@ struct _GtkSCTree {
        gboolean show_stripes;
        GtkTooltips *tips;
        gboolean always_expand_recursively;
+       gboolean force_additive_sel;
 };
 
 struct _GtkSCTreeClass {
diff --git a/src/pixmaps/selection.xpm b/src/pixmaps/selection.xpm
new file mode 100644 (file)
index 0000000..e24106f
--- /dev/null
@@ -0,0 +1,67 @@
+/* XPM */
+static char * selection_xpm[] = {
+"12 12 52 1",
+"      c #1C1C1C",
+".     c #535353",
+"+     c #525252",
+"@     c #4E4E4E",
+"#     c #171717",
+"$     c #DFDFDF",
+"%     c #D3D3D3",
+"&     c #D2D2D2",
+"*     c #C3C3C3",
+"=     c #363636",
+"-     c #515151",
+";     c #C6C6C6",
+">     c #B1B1B1",
+",     c #AFAFAF",
+"'     c #9F9F9F",
+")     c #2A2A2A",
+"!     c #D8D8D8",
+"~     c #CACACA",
+"{     c #C9C9C9",
+"]     c #BDBDBD",
+"^     c #373737",
+"/     c #888FEA",
+"(     c #515CE4",
+"_     c #6970CB",
+":     c #333333",
+"<     c #4F4F4F",
+"[     c #A3A5C3",
+"}     c #7F83B0",
+"|     c #7E81AF",
+"1     c #7D7F9D",
+"2     c #292929",
+"3     c #CED0EE",
+"4     c #BABDEB",
+"5     c #B9BBDA",
+"6     c #3E3E3E",
+"7     c #8990EB",
+"8     c #525DE5",
+"9     c #6D74CF",
+"0     c #4D4D4D",
+"a     c #BBBBBB",
+"b     c #AAAAAA",
+"c     c #2E2E2E",
+"d     c #E9E9E9",
+"e     c #E2E2E2",
+"f     c #CDCDCD",
+"g     c #D9D9D9",
+"h     c #CBCBCB",
+"i     c #1A1A1A",
+"j     c #3F3F3F",
+"k     c #383838",
+"l     c #353535",
+"m     c #101010",
+" .++++++++@#",
+".$%&&%%%%%*=",
+"-;>,,,,,,,')",
+"+!~{{{{{{{]^",
+"+/((((((((_:",
+"<[}|||||||12",
+".34444444456",
+".7888888889=",
+"0{aaaaaaaabc",
+".deeeeeeeef^",
+"+ghhhhhhhha:",
+"ijkkkkkkkklm"};
index 92e001bd1cbd77f1b65d9165f8cddd3f89ca6ae0..4cb034d50df7681059d8fc9bdfbad64a98e6f6a4 100644 (file)
 #include "pixmaps/copied.xpm"
 #include "pixmaps/active.xpm"
 #include "pixmaps/inactive.xpm"
+#include "pixmaps/selection.xpm"
 #include "pixmaps/empty.xpm"
 
 typedef struct _StockPixmapData        StockPixmapData;
@@ -342,6 +343,7 @@ static StockPixmapData pixmaps[] =
        {copied_xpm                             , NULL, NULL, "copied", NULL},
        {active_xpm                             , NULL, NULL, "active", NULL},
        {inactive_xpm                           , NULL, NULL, "inactive", NULL},
+       {selection_xpm                          , NULL, NULL, "selection", NULL},
         {empty_xpm                              , NULL, NULL, "empty" , NULL}
 };
 
index 651a4e081aa4e79b7cb0d494e6640b84a9e7c698..a0046340ee1cd59e2ae26c2f4e28beae26be47b3 100644 (file)
@@ -166,6 +166,7 @@ typedef enum
        STOCK_PIXMAP_COPIED,
        STOCK_PIXMAP_ACTIVE,
        STOCK_PIXMAP_INACTIVE,
+       STOCK_PIXMAP_SELECTION,
        STOCK_PIXMAP_EMPTY,              /* last entry */
        N_STOCK_PIXMAPS
 } StockPixmap;
index 1b6ee5d1d27361f179971f4bd276aa1541c05852..f5bd6e8517fc129e8840fbff81ea5fb5fe7559cb 100644 (file)
@@ -256,6 +256,9 @@ static GtkWidget *summary_ctree_create      (SummaryView    *summaryview);
 static gint summary_toggle_pressed     (GtkWidget              *eventbox,
                                         GdkEventButton         *event,
                                         SummaryView            *summaryview);
+static void summary_toggle_multiple_pressed
+                                       (GtkWidget              *widget,
+                                        SummaryView            *summaryview);
 static gint summary_folder_eventbox_pressed    
                                        (GtkWidget              *eventbox,
                                         GdkEventButton         *event,
@@ -564,6 +567,9 @@ SummaryView *summary_create(void)
        GtkWidget *statlabel_msgs;
        GtkWidget *hbox_spc;
        GtkWidget *toggle_eventbox;
+#ifdef MAEMO
+       GtkWidget *multiple_sel_togbtn;
+#endif
        GtkWidget *toggle_arrow;
        GtkWidget *popupmenu;
        GtkWidget *toggle_search;
@@ -620,14 +626,27 @@ SummaryView *summary_create(void)
        /* toggle view button */
        toggle_eventbox = gtk_event_box_new();
        gtk_widget_show(toggle_eventbox);
+       
        gtk_box_pack_end(GTK_BOX(hbox), toggle_eventbox, FALSE, FALSE, 4);
+
        toggle_arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_OUT);
        gtk_widget_show(toggle_arrow);
        gtk_container_add(GTK_CONTAINER(toggle_eventbox), toggle_arrow);
        g_signal_connect(G_OBJECT(toggle_eventbox), "button_press_event",
                         G_CALLBACK(summary_toggle_pressed),
                         summaryview);
-       
+
+#ifdef MAEMO
+       multiple_sel_togbtn = gtk_toggle_button_new();
+       gtk_widget_show(multiple_sel_togbtn);
+       gtk_box_pack_end(GTK_BOX(hbox), multiple_sel_togbtn, FALSE, FALSE, 4);
+       gtk_tooltips_set_tip(GTK_TOOLTIPS(summaryview->tips),
+                            multiple_sel_togbtn,
+                            _("Toggle multiple selection"), NULL);
+       g_signal_connect(G_OBJECT(multiple_sel_togbtn), "toggled",
+                        G_CALLBACK(summary_toggle_multiple_pressed),
+                        summaryview);
+#endif
        
        statlabel_msgs = gtk_label_new("");
        gtk_widget_show(statlabel_msgs);
@@ -694,6 +713,9 @@ SummaryView *summary_create(void)
        summaryview->statlabel_msgs = statlabel_msgs;
        summaryview->toggle_eventbox = toggle_eventbox;
        summaryview->toggle_arrow = toggle_arrow;
+#ifdef MAEMO
+       summaryview->multiple_sel_togbtn = multiple_sel_togbtn;
+#endif
        summaryview->toggle_search = toggle_search;
        summaryview->popupmenu = popupmenu;
        summaryview->popupfactory = popupfactory;
@@ -810,6 +832,7 @@ static void summary_set_fonts(SummaryView *summaryview)
        gtk_widget_modify_font(summaryview->statlabel_folder, font_desc);
        gtk_widget_modify_font(summaryview->statlabel_select, font_desc);
        gtk_widget_modify_font(summaryview->statlabel_msgs, font_desc);
+       /* ici */
        pango_font_description_free(font_desc);
 }
 
@@ -880,6 +903,13 @@ void summary_init(SummaryView *summaryview)
        gtk_container_add (GTK_CONTAINER(summaryview->toggle_search), pixmap);
        gtk_widget_show(pixmap);
        summaryview->quick_search_pixmap = pixmap;
+       
+#ifdef MAEMO
+       pixmap = stock_pixmap_widget(summaryview->hbox, STOCK_PIXMAP_SELECTION);
+       gtk_container_add(GTK_CONTAINER(summaryview->multiple_sel_togbtn), pixmap);
+       gtk_widget_show(pixmap);
+       summaryview->multiple_sel_image = pixmap;
+#endif
 
        /* Init summaryview prefs */
        summaryview->sort_key = SORT_BY_NONE;
@@ -5375,6 +5405,13 @@ static gint summary_toggle_pressed(GtkWidget *eventbox, GdkEventButton *event,
        return TRUE;
 }
 
+static void summary_toggle_multiple_pressed(GtkWidget *widget,
+                                  SummaryView *summaryview)
+{
+       GTK_SCTREE(summaryview->ctree)->force_additive_sel = 
+               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+}
+
 static gboolean summary_button_pressed(GtkWidget *ctree, GdkEventButton *event,
                                       SummaryView *summaryview)
 {
@@ -6342,6 +6379,15 @@ void summary_reflect_prefs_pixmap_theme(SummaryView *summaryview)
        gtk_widget_show(pixmap);
        summaryview->quick_search_pixmap = pixmap;
 
+#ifdef MAEMO
+       pixmap = stock_pixmap_widget(summaryview->hbox, STOCK_PIXMAP_SELECTION);
+       gtk_container_remove (GTK_CONTAINER(summaryview->multiple_sel_togbtn), 
+                             summaryview->multiple_sel_image);
+       gtk_container_add(GTK_CONTAINER(summaryview->multiple_sel_togbtn), pixmap);
+       gtk_widget_show(pixmap);
+       summaryview->multiple_sel_togbtn = pixmap;
+#endif
+
        folderview_unselect(summaryview->folderview);
        folderview_select(summaryview->folderview, summaryview->folder_item);
        summary_set_column_titles(summaryview);
index 2b1f0be93f6b8e1d81deb93d160622cfc60402f9..d403123fdb68278d75eba6ef079551c78b681e00 100644 (file)
@@ -101,6 +101,10 @@ struct _SummaryView
        GtkWidget *statlabel_msgs;
        GtkWidget *toggle_eventbox;
        GtkWidget *toggle_arrow;
+#ifdef MAEMO
+       GtkWidget *multiple_sel_togbtn;
+       GtkWidget *multiple_sel_image;
+#endif
        GtkWidget *toggle_search;
        GtkWidget *quick_search_pixmap;
        GtkWidget *popupmenu;