2007-03-29 [colin] 2.8.1cvs66
authorColin Leroy <colin@colino.net>
Thu, 29 Mar 2007 17:52:09 +0000 (17:52 +0000)
committerColin Leroy <colin@colino.net>
Thu, 29 Mar 2007 17:52:09 +0000 (17:52 +0000)
* src/compose.c
* src/compose.h
Maemo: dynamically switch headers/text position
* src/prefs_common.c
Maemo: hide compose's ruler by default
* src/common/socket.c
* src/common/socket.h
Fix build warning

ChangeLog
PATCHSETS
configure.ac
src/common/socket.c
src/common/socket.h
src/compose.c
src/compose.h
src/prefs_common.c

index d419801..e479e08 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-03-29 [colin]     2.8.1cvs66
+
+       * src/compose.c
+       * src/compose.h
+               Maemo: dynamically switch headers/text position
+       * src/prefs_common.c
+               Maemo: hide compose's ruler by default
+       * src/common/socket.c
+       * src/common/socket.h
+               Fix build warning
+
 2007-03-29 [colin]     2.8.1cvs65
 
        * src/common/socket.c
 2007-03-29 [colin]     2.8.1cvs65
 
        * src/common/socket.c
index c21cbdb..0f43ce5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.53.2.24 -r 1.53.2.25 po/POTFILES.in;  ) > 2.8.1cvs63.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/prefs_logging.c;  ) > 2.8.1cvs64.patchset
 ( cvs diff -u -r 1.13.2.28 -r 1.13.2.29 src/common/socket.c;  cvs diff -u -r 1.13.2.12 -r 1.13.2.13 src/common/socket.h;  ) > 2.8.1cvs65.patchset
 ( cvs diff -u -r 1.53.2.24 -r 1.53.2.25 po/POTFILES.in;  ) > 2.8.1cvs63.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/prefs_logging.c;  ) > 2.8.1cvs64.patchset
 ( cvs diff -u -r 1.13.2.28 -r 1.13.2.29 src/common/socket.c;  cvs diff -u -r 1.13.2.12 -r 1.13.2.13 src/common/socket.h;  ) > 2.8.1cvs65.patchset
+( cvs diff -u -r 1.382.2.367 -r 1.382.2.368 src/compose.c;  cvs diff -u -r 1.50.2.33 -r 1.50.2.34 src/compose.h;  cvs diff -u -r 1.204.2.126 -r 1.204.2.127 src/prefs_common.c;  cvs diff -u -r 1.13.2.29 -r 1.13.2.30 src/common/socket.c;  cvs diff -u -r 1.13.2.13 -r 1.13.2.14 src/common/socket.h;  ) > 2.8.1cvs66.patchset
index 43bc46a..6b4a1c8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=65
+EXTRA_VERSION=66
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5695817..6d8c700 100644 (file)
@@ -21,7 +21,7 @@
 #  include "config.h"
 #endif
 
 #  include "config.h"
 #endif
 
-#ifdef _XOPEN_SOURCE
+#if (defined (_XOPEN_SOURCE) && !defined (_BSD_SOURCE))
 #define _BSD_SOURCE
 #endif
 
 #define _BSD_SOURCE
 #endif
 
index 07d51dd..3727ce0 100644 (file)
@@ -24,7 +24,7 @@
 #  include "config.h"
 #endif
 
 #  include "config.h"
 #endif
 
-#ifdef _XOPEN_SOURCE
+#if (defined (_XOPEN_SOURCE) && !defined (_BSD_SOURCE))
 #define _BSD_SOURCE
 #endif
 
 #define _BSD_SOURCE
 #endif
 
index aad178a..baa3315 100644 (file)
@@ -6361,12 +6361,9 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode,
                gtk_widget_set_size_request(edit_vbox, -1, mode == COMPOSE_NEW ? 300 : 280);
        else
                gtk_widget_set_size_request(edit_vbox, -1, mode == COMPOSE_NEW ? 250 : 230);
                gtk_widget_set_size_request(edit_vbox, -1, mode == COMPOSE_NEW ? 300 : 280);
        else
                gtk_widget_set_size_request(edit_vbox, -1, mode == COMPOSE_NEW ? 250 : 230);
-       gtk_paned_add1(GTK_PANED(paned), edit_vbox);
-       gtk_paned_add2(GTK_PANED(paned), notebook);
-#else
+#endif
        gtk_paned_add1(GTK_PANED(paned), notebook);
        gtk_paned_add2(GTK_PANED(paned), edit_vbox);
        gtk_paned_add1(GTK_PANED(paned), notebook);
        gtk_paned_add2(GTK_PANED(paned), edit_vbox);
-#endif
        gtk_widget_show_all(paned);
 
 
        gtk_widget_show_all(paned);
 
 
@@ -6409,6 +6406,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode,
 
        compose->paned = paned;
 
 
        compose->paned = paned;
 
+       compose->notebook      = notebook;
        compose->edit_vbox     = edit_vbox;
        compose->ruler_hbox    = ruler_hbox;
        compose->ruler         = ruler;
        compose->edit_vbox     = edit_vbox;
        compose->ruler_hbox    = ruler_hbox;
        compose->ruler         = ruler;
@@ -8937,6 +8935,44 @@ static void compose_grab_focus_cb(GtkWidget *widget, Compose *compose)
 
        if (GTK_IS_EDITABLE(widget) || GTK_IS_TEXT_VIEW(widget))
                compose->focused_editable = widget;
 
        if (GTK_IS_EDITABLE(widget) || GTK_IS_TEXT_VIEW(widget))
                compose->focused_editable = widget;
+       
+#ifdef MAEMO
+       if (GTK_IS_TEXT_VIEW(widget) 
+           && gtk_paned_get_child1(GTK_PANED(compose->paned)) != compose->edit_vbox) {
+               gtk_widget_ref(compose->notebook);
+               gtk_widget_ref(compose->edit_vbox);
+               gtk_container_remove(GTK_CONTAINER(compose->paned), compose->notebook);
+               gtk_container_remove(GTK_CONTAINER(compose->paned), compose->edit_vbox);
+               gtk_paned_add1(GTK_PANED(compose->paned), compose->edit_vbox);
+               gtk_paned_add2(GTK_PANED(compose->paned), compose->notebook);
+               gtk_widget_unref(compose->notebook);
+               gtk_widget_unref(compose->edit_vbox);
+               g_signal_handlers_block_by_func(G_OBJECT(widget),
+                                       G_CALLBACK(compose_grab_focus_cb),
+                                       compose);
+               gtk_widget_grab_focus(widget);
+               g_signal_handlers_unblock_by_func(G_OBJECT(widget),
+                                       G_CALLBACK(compose_grab_focus_cb),
+                                       compose);
+       } else if (!GTK_IS_TEXT_VIEW(widget) 
+                  && gtk_paned_get_child1(GTK_PANED(compose->paned)) != compose->notebook) {
+               gtk_widget_ref(compose->notebook);
+               gtk_widget_ref(compose->edit_vbox);
+               gtk_container_remove(GTK_CONTAINER(compose->paned), compose->notebook);
+               gtk_container_remove(GTK_CONTAINER(compose->paned), compose->edit_vbox);
+               gtk_paned_add1(GTK_PANED(compose->paned), compose->notebook);
+               gtk_paned_add2(GTK_PANED(compose->paned), compose->edit_vbox);
+               gtk_widget_unref(compose->notebook);
+               gtk_widget_unref(compose->edit_vbox);
+               g_signal_handlers_block_by_func(G_OBJECT(widget),
+                                       G_CALLBACK(compose_grab_focus_cb),
+                                       compose);
+               gtk_widget_grab_focus(widget);
+               g_signal_handlers_unblock_by_func(G_OBJECT(widget),
+                                       G_CALLBACK(compose_grab_focus_cb),
+                                       compose);
+       }
+#endif
 }
 
 static void compose_changed_cb(GtkTextBuffer *textbuf, Compose *compose)
 }
 
 static void compose_changed_cb(GtkTextBuffer *textbuf, Compose *compose)
index f5702c4..8989e7c 100644 (file)
@@ -111,6 +111,9 @@ struct _Compose
        GtkWidget *savemsg_checkbtn;
        GtkWidget *savemsg_entry;
 
        GtkWidget *savemsg_checkbtn;
        GtkWidget *savemsg_entry;
 
+       /* Headers notebook */
+       GtkWidget *notebook;
+
        /* Textedit */
        GtkWidget *edit_vbox;
        GtkWidget *ruler_hbox;
        /* Textedit */
        GtkWidget *edit_vbox;
        GtkWidget *ruler_hbox;
index 45c760d..0d8062a 100644 (file)
@@ -262,8 +262,13 @@ static PrefParam param[] = {
        {"default_reply_list", "TRUE", &prefs_common.default_reply_list, P_BOOL,
         NULL, NULL, NULL},
 
        {"default_reply_list", "TRUE", &prefs_common.default_reply_list, P_BOOL,
         NULL, NULL, NULL},
 
+#ifndef MAEMO
        {"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
         NULL, NULL, NULL},
        {"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
         NULL, NULL, NULL},
+#else
+       {"show_ruler", "FALSE", &prefs_common.show_ruler, P_BOOL,
+        NULL, NULL, NULL},
+#endif
 
        /* Quote */
        {"reply_quote_mark", "> ", &prefs_common.quotemark, P_STRING,
 
        /* Quote */
        {"reply_quote_mark", "> ", &prefs_common.quotemark, P_STRING,