2009-06-29 [colin] 3.7.1cvs81
authorColin Leroy <colin@colino.net>
Mon, 29 Jun 2009 20:05:13 +0000 (20:05 +0000)
committerColin Leroy <colin@colino.net>
Mon, 29 Jun 2009 20:05:13 +0000 (20:05 +0000)
* src/addressbook.c
Fix warnings
* src/editgroup.c
Fix crash (out-of-bounds tree column)
* src/gtk/gtkcmctree.c
* src/gtk/gtksctree.c
Prevent using an out-of-bounds tree column

ChangeLog
PATCHSETS
configure.ac
src/addressbook.c
src/editgroup.c
src/gtk/gtkcmctree.c
src/gtk/gtksctree.c

index 9f4dfc1..0e49e9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-29 [colin]     3.7.1cvs81
+
+       * src/addressbook.c
+               Fix warnings
+       * src/editgroup.c
+               Fix crash (out-of-bounds tree column)
+       * src/gtk/gtkcmctree.c
+       * src/gtk/gtksctree.c
+               Prevent using an out-of-bounds tree column
+
 2009-06-29 [colin]     3.7.1cvs80
 
        * src/ldapupdate.c
index be266e5..0be259a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.411 -r 1.395.2.412 src/summaryview.c;  ) > 3.7.1cvs78.patchset
 ( cvs diff -u -r 1.395.2.412 -r 1.395.2.413 src/summaryview.c;  ) > 3.7.1cvs79.patchset
 ( cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/ldapupdate.c;  cvs diff -u -r 1.12.2.20 -r 1.12.2.21 src/ldif.c;  ) > 3.7.1cvs80.patchset
+( cvs diff -u -r 1.60.2.133 -r 1.60.2.134 src/addressbook.c;  cvs diff -u -r 1.11.2.22 -r 1.11.2.23 src/editgroup.c;  cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/gtk/gtkcmctree.c;  cvs diff -u -r 1.1.4.56 -r 1.1.4.57 src/gtk/gtksctree.c;  ) > 3.7.1cvs81.patchset
index 317b8a6..5fed405 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=80
+EXTRA_VERSION=81
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 3f91c60..da84a41 100644 (file)
@@ -4788,17 +4788,28 @@ static void addrbookctl_build_icons( GtkWidget *window ) {
        AddressTypeControlItem *atci;
 
        /* Build icons */
-       g_object_unref(interfacexpm);
-       g_object_unref(folderxpm);
-       g_object_unref(folderopenxpm);
-       g_object_unref(groupxpm);
-       g_object_unref(vcardxpm);
-       g_object_unref(bookxpm);
-       g_object_unref(addressxpm);
-       g_object_unref(jpilotxpm);
-       g_object_unref(categoryxpm);
-       g_object_unref(ldapxpm);
-       g_object_unref(addrsearchxpm);
+       if (interfacexpm)
+               g_object_unref(interfacexpm);
+       if (folderxpm)
+               g_object_unref(folderxpm);
+       if (folderopenxpm)
+               g_object_unref(folderopenxpm);
+       if (groupxpm)
+               g_object_unref(groupxpm);
+       if (vcardxpm)
+               g_object_unref(vcardxpm);
+       if (bookxpm)
+               g_object_unref(bookxpm);
+       if (addressxpm)
+               g_object_unref(addressxpm);
+       if (jpilotxpm)
+               g_object_unref(jpilotxpm);
+       if (categoryxpm)
+               g_object_unref(categoryxpm);
+       if (ldapxpm)
+               g_object_unref(ldapxpm);
+       if (addrsearchxpm)
+               g_object_unref(addrsearchxpm);
        stock_pixbuf_gdk(window, STOCK_PIXMAP_INTERFACE, &interfacexpm );
        stock_pixbuf_gdk(window, STOCK_PIXMAP_DIR_CLOSE, &folderxpm);
        stock_pixbuf_gdk(window, STOCK_PIXMAP_DIR_OPEN, &folderopenxpm);
index d28d59d..378c835 100644 (file)
@@ -350,7 +350,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
                                       GTK_POLICY_AUTOMATIC,
                                       GTK_POLICY_AUTOMATIC);
 
-       clist_group = gtk_sctree_new_with_titles( GROUP_N_COLS, GROUP_N_COLS, titles );
+       clist_group = gtk_sctree_new_with_titles( GROUP_N_COLS, 0, titles );
        gtk_container_add( GTK_CONTAINER(clist_swin), clist_group );
        if (prefs_common.enable_dotted_lines) {
                gtk_cmctree_set_line_style(GTK_CMCTREE(clist_group), GTK_CMCTREE_LINES_DOTTED);
@@ -389,8 +389,17 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
                                       GTK_POLICY_AUTOMATIC,
                                       GTK_POLICY_AUTOMATIC);
 
-       clist_avail = gtk_sctree_new_with_titles( GROUP_N_COLS, GROUP_N_COLS, titles );
+       clist_avail = gtk_sctree_new_with_titles( GROUP_N_COLS, 0, titles );
        gtk_container_add( GTK_CONTAINER(clist_swin), clist_avail );
+       if (prefs_common.enable_dotted_lines) {
+               gtk_cmctree_set_line_style(GTK_CMCTREE(clist_avail), GTK_CMCTREE_LINES_DOTTED);
+               gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_avail),
+                                    GTK_CMCTREE_EXPANDER_SQUARE);
+       } else {
+               gtk_cmctree_set_line_style(GTK_CMCTREE(clist_avail), GTK_CMCTREE_LINES_NONE);
+               gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_avail),
+                                    GTK_CMCTREE_EXPANDER_TRIANGLE);
+       }
        gtk_cmclist_set_selection_mode( GTK_CMCLIST(clist_avail), GTK_SELECTION_EXTENDED );
        gtk_cmclist_set_column_width( GTK_CMCLIST(clist_avail), GROUP_COL_NAME, GROUP_COL_WIDTH_NAME );
        gtk_cmclist_set_column_width( GTK_CMCLIST(clist_avail), GROUP_COL_EMAIL, GROUP_COL_WIDTH_EMAIL );
index 3f2632f..e55be05 100644 (file)
@@ -3271,7 +3271,6 @@ row_new (GtkCMCTree *ctree)
       ctree_row->row.cell[i].horizontal = 0;
       ctree_row->row.cell[i].style = NULL;
     }
-
   GTK_CMCELL_PIXTEXT (ctree_row->row.cell[ctree->tree_column])->text = NULL;
 
   ctree_row->row.fg_set     = FALSE;
index 211812e..22107f7 100644 (file)
@@ -2091,7 +2091,13 @@ GtkWidget *gtk_sctree_new_with_titles (gint columns, gint tree_column,
                                                                                                             
        cm_return_val_if_fail (columns > 0, NULL);
        cm_return_val_if_fail (tree_column >= 0, NULL);
-                                                                                                            
+       
+       if (tree_column >= columns) {
+               g_warning("Wrong tree column");
+               tree_column = 0;
+               print_backtrace();
+       }
+       
        widget = gtk_widget_new (TYPE_GTK_SCTREE,
                                 "n_columns", columns,
                                 "tree_column", tree_column,