2006-12-28 [wwp] 2.6.1cvs82
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 28 Dec 2006 09:53:20 +0000 (09:53 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 28 Dec 2006 09:53:20 +0000 (09:53 +0000)
* src/prefs_common.c
* src/prefs_common.h
* src/addressbook.c
* src/addressitem.h
Save addressbook mainwindow's horizontal and vertical splitter position.

ChangeLog
PATCHSETS
configure.ac
src/addressbook.c
src/addressitem.h
src/prefs_common.c
src/prefs_common.h

index 55169fe88e791d144f85a7362ff2122fdb5aa6ec..8068a4098dd306b616747c9e6b57a721be19eb2a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-12-28 [wwp]       2.6.1cvs82
+
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/addressbook.c
+       * src/addressitem.h
+               Save addressbook mainwindow's horizontal and vertical splitter position.
+
 2006-12-27 [wwp]       2.6.1cvs81
 
        * src/gtk/gtkaspell.c
index f6969230f58283992e7513bc4006e2ede6df4df0..aba35be95e68fd62b9550406c317743fed5e7c06 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/imap_gtk.c;  cvs diff -u -r 1.2.2.23 -r 1.2.2.24 src/mh_gtk.c;  ) > 2.6.1cvs79.patchset
 ( cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/folder_item_prefs.c;  ) > 2.6.1cvs80.patchset
 ( cvs diff -u -r 1.9.2.47 -r 1.9.2.48 src/gtk/gtkaspell.c;  cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/gtk/gtkaspell.h;  cvs diff -u -r 1.382.2.346 -r 1.382.2.347 src/compose.c;  ) > 2.6.1cvs81.patchset
+( cvs diff -u -r 1.204.2.115 -r 1.204.2.116 src/prefs_common.c;  cvs diff -u -r 1.103.2.72 -r 1.103.2.73 src/prefs_common.h;  cvs diff -u -r 1.60.2.72 -r 1.60.2.73 src/addressbook.c;  cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/addressitem.h;  ) > 2.6.1cvs82.patchset
index 3f729c69ec5bd2087546bb0089b1219089607ece..62fa3468d91ae384b96f1d0976f521ee11c8e34c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=81
+EXTRA_VERSION=82
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9b8c705431b92e964b794603cd0df8577b7f5936..b65bff4dd9566d48ada1434da3663e97cd48893b 100644 (file)
@@ -825,6 +825,15 @@ static void addressbook_address_list_focus_evt_out(GtkWidget *widget, GdkEventFo
        address_list_has_focus = FALSE;
 }
 
+/* save hpane and vpane's handle position when it moves */
+static void addressbook_pane_notify_position(GObject *gobject,
+                                                                                       GParamSpec      *arg1,
+                                            gpointer    user_data)
+{
+       prefs_common.addressbook_hpaned_pos = gtk_paned_get_position(GTK_PANED(addrbook.hpaned));
+       prefs_common.addressbook_vpaned_pos = gtk_paned_get_position(GTK_PANED(addrbook.vpaned));
+}
+
 /*
 * Create the address book widgets. The address book contains two CTree widgets: the
 * address index tree on the left and the address list on the right.
@@ -1171,6 +1180,8 @@ static void addressbook_create(void)
                                       NULL);
 
        addrbook.window  = window;
+       addrbook.hpaned  = hpaned;
+       addrbook.vpaned  = vpaned;
        addrbook.menubar = menubar;
        addrbook.ctree   = ctree;
        addrbook.ctree_swin
@@ -1210,6 +1221,15 @@ static void addressbook_create(void)
        gtk_widget_set_size_request(window, prefs_common.addressbookwin_width,
                                    prefs_common.addressbookwin_height);
 
+       if (!prefs_common.addressbook_use_editaddress_dialog) {
+               gtk_paned_set_position(GTK_PANED(vpaned), prefs_common.addressbook_vpaned_pos);
+               g_signal_connect(G_OBJECT(vpaned), "notify::position",
+                               G_CALLBACK(addressbook_pane_notify_position), NULL);
+       }       
+       gtk_paned_set_position(GTK_PANED(hpaned), prefs_common.addressbook_hpaned_pos);
+       g_signal_connect(G_OBJECT(hpaned), "notify::position",
+                       G_CALLBACK(addressbook_pane_notify_position), NULL);
+
        gtk_widget_show_all(window);
 }
 
index 3284f4e582af95e4fc8938441b72e2ebe84484a4..d2faac79092f3deb1e11a9bf522d9c8fbdd236ec 100644 (file)
@@ -60,6 +60,8 @@ typedef struct _AddressBook_win       AddressBook_win;
 struct _AddressBook_win
 {
        GtkWidget *window;
+       GtkWidget *hpaned;
+       GtkWidget *vpaned;
        GtkWidget *menubar;
        GtkWidget *ctree;
        GtkWidget *ctree_swin;
index 1e1408ac9dc928dcfc63c495d63f2e8699c8f1a9..4144e96f41003a553da4999ee993cf4abd86250b 100644 (file)
@@ -644,6 +644,10 @@ static PrefParam param[] = {
        /* Addressbook */
        {"addressbook_use_editaddress_dialog", "TRUE", &prefs_common.addressbook_use_editaddress_dialog,
         P_BOOL, NULL, NULL, NULL},
+       {"addressbook_hpaned_pos", "-1", &prefs_common.addressbook_hpaned_pos,
+        P_INT, NULL, NULL, NULL},
+       {"addressbook_vpaned_pos", "-1", &prefs_common.addressbook_vpaned_pos,
+        P_INT, NULL, NULL, NULL},
 
        /* Other */
        {"uri_open_command", DEFAULT_BROWSER_CMD,
index 7931ab4f2600045f205d1962582b91a766a5ce64..b69087bf4b682f66debdfd500c67195fb90e4002 100644 (file)
@@ -310,6 +310,8 @@ struct _PrefsCommon
 
        /* Addressbook */
        gboolean addressbook_use_editaddress_dialog;
+       gint addressbook_hpaned_pos;
+       gint addressbook_vpaned_pos;
 
        /* Interface */
        gboolean sep_folder;