sync with 0.9.4cvs6
authorPaul Mangan <paul@claws-mail.org>
Sat, 9 Aug 2003 06:26:27 +0000 (06:26 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sat, 9 Aug 2003 06:26:27 +0000 (06:26 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/mainwindow.c
src/mainwindow.h
src/messageview.c
src/prefs_common.c
src/prefs_common.h

index 30e71c4..e288a91 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2003-08-07
+
+       * src/mainwindow.c
+         src/prefs_common.[ch]: remember the size and position of
+         separated views.
+         main_window_set_widgets(): fixed a bug that the hidden items on
+         the header view were shown when changing the view type.
+         Instead of setting the window size, set the each view's size.
+
+2003-08-01
+
+       * src/compose.c: compose_select_account(): don't append signature
+         on redirect mode.
+         compose_insert_sig(): don't insert "\n\n" if signature string
+         doesn't exist. Always insert signature at the end of message.
+
+2003-08-01
+
+       * improved sylpheed.spec.in (thanks to Andre Oliveira da Costa).
+
 2003-07-31
 
        * minor code cleanups for the folder system.
index 38801c9..424f356 100644 (file)
@@ -1,3 +1,11 @@
+2003-08-09 [paul]      0.9.4claws12
+
+       * sync with 0.9.4cvs6
+               see ChangeLog 2003-08-07
+               
+       * AUTHORS
+               add Leandro and Luke to claws-branch section
+
 2003-08-09 [christoph] 0.9.4claws11
 
        * src/gtk/Makefile.am
index 814630f..8afedfb 100644 (file)
@@ -1,3 +1,22 @@
+2003-08-07
+
+       * src/mainwindow.c
+         src/prefs_common.[ch]: Ê¬Î¥¤µ¤ì¤¿¥Ó¥å¡¼¤Î¥µ¥¤¥º¤È°ÌÃÖ¤òµ­²±¡£
+         main_window_set_widgets(): ¥Ó¥å¡¼¥¿¥¤¥×¤òÊѹ¹¤·¤¿»þ¤Ë¥Ø¥Ã¥À¥Ó¥å¡¼
+         ¤Î±£¤·¹àÌܤ¬É½¼¨¤µ¤ì¤Æ¤¤¤¿¥Ð¥°¤ò½¤Àµ¡£
+         ¥¦¥£¥ó¥É¥¦¤Î¥µ¥¤¥º¤ò»ØÄꤹ¤ëÂå¤ï¤ê¤Ë³Æ¥Ó¥å¡¼¤Î¥µ¥¤¥º¤ò»ØÄê¡£
+
+2003-08-01
+
+       * src/compose.c: compose_select_account(): ¥ê¥À¥¤¥ì¥¯¥È¥â¡¼¥É¤Ç
+         ½ð̾¤òÄɲ䷤ʤ¤¤è¤¦¤Ë¤·¤¿¡£
+         compose_insert_sig(): ½ð̾ʸ»úÎó¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤Ï "\n\n" ¤ò
+         ÁÞÆþ¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£¾ï¤Ë¥á¥Ã¥»¡¼¥¸¤Î½ª¤ï¤ê¤Ë½ð̾¤òÁÞÆþ¡£
+
+2003-08-01
+
+       * sylpheed.spec.in ¤ò²þÎÉ(Andre Oliveira da Costa ¤µ¤ó thanks)¡£
+
 2003-07-31
 
        * ¥Õ¥©¥ë¥À¥·¥¹¥Æ¥à¤Î¥³¡¼¥É¤ò¾¯¤·À°Íý¡£
index e080061..bd3bada 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=11
+EXTRA_VERSION=12
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index a6993ec..aa34c14 100644 (file)
@@ -123,6 +123,10 @@ static gint message_window_close_cb        (GtkWidget      *widget,
                                         GdkEventAny    *event,
                                         gpointer        data);
 
+static void main_window_size_allocate_cb(GtkWidget     *widget,
+                                        GtkAllocation  *allocation,
+                                        gpointer        data);
+
 static void new_folder_cb       (MainWindow    *mainwin,
                                  guint          action,
                                  GtkWidget     *widget);
@@ -927,6 +931,10 @@ MainWindow *main_window_create(SeparateType type)
 
        main_window_set_widgets(mainwin, type);
 
+       gtk_signal_connect(GTK_OBJECT(window), "size_allocate",
+                          GTK_SIGNAL_FUNC(main_window_size_allocate_cb),
+                          mainwin);
+
        /* set menu items */
        menuitem = gtk_item_factory_get_item
                (ifactory, "/View/Code set/Auto detect");
@@ -992,11 +1000,6 @@ MainWindow *main_window_create(SeparateType type)
 
        
        /* show main window */
-       gtk_widget_set_uposition(mainwin->window,
-                                prefs_common.mainwin_x,
-                                prefs_common.mainwin_y);
-       gtk_widget_set_usize(window, prefs_common.mainwin_width,
-                            prefs_common.mainwin_height);
        gtk_widget_show(mainwin->window);
 
        /* initialize views */
@@ -1197,6 +1200,30 @@ static void main_window_show_cur_account(MainWindow *mainwin)
        g_free(ac_name);
 }
 
+GtkWidget *main_window_get_folder_window(MainWindow *mainwin)
+{
+       switch (mainwin->type) {
+       case SEPARATE_FOLDER:
+               return mainwin->win.sep_folder.folderwin;
+       case SEPARATE_BOTH:
+               return mainwin->win.sep_both.folderwin;
+       default:
+               return NULL;
+       }
+}
+
+GtkWidget *main_window_get_message_window(MainWindow *mainwin)
+{
+       switch (mainwin->type) {
+       case SEPARATE_MESSAGE:
+               return mainwin->win.sep_message.messagewin;
+       case SEPARATE_BOTH:
+               return mainwin->win.sep_both.messagewin;
+       default:
+               return NULL;
+       }
+}
+
 void main_window_separation_change(MainWindow *mainwin, SeparateType type)
 {
        GtkWidget *folder_wid  = GTK_WIDGET_PTR(mainwin->folderview);
@@ -1310,30 +1337,33 @@ void main_window_get_size(MainWindow *mainwin)
 
        allocation = &(GTK_WIDGET_PTR(mainwin->summaryview)->allocation);
 
-       prefs_common.summaryview_width  = allocation->width;
+       prefs_common.summaryview_width = allocation->width;
 
        if ((mainwin->type == SEPARATE_NONE ||
             mainwin->type == SEPARATE_FOLDER) &&
            messageview_is_visible(mainwin->messageview))
                prefs_common.summaryview_height = allocation->height;
 
-       prefs_common.mainview_width     = allocation->width;
+       prefs_common.mainview_width = allocation->width;
 
        allocation = &mainwin->window->allocation;
-
        prefs_common.mainview_height = allocation->height;
        prefs_common.mainwin_width   = allocation->width;
        prefs_common.mainwin_height  = allocation->height;
 
        allocation = &(GTK_WIDGET_PTR(mainwin->folderview)->allocation);
-
        prefs_common.folderview_width  = allocation->width;
        prefs_common.folderview_height = allocation->height;
+
+       allocation = &(GTK_WIDGET_PTR(mainwin->messageview)->allocation);
+       prefs_common.msgview_width = allocation->width;
+       prefs_common.msgview_height = allocation->height;
 }
 
 void main_window_get_position(MainWindow *mainwin)
 {
        gint x, y;
+       GtkWidget *window;
 
        gtkut_widget_get_uposition(mainwin->window, &x, &y);
 
@@ -1343,6 +1373,19 @@ void main_window_get_position(MainWindow *mainwin)
        prefs_common.mainwin_y = y;
 
        debug_print("window position: x = %d, y = %d\n", x, y);
+
+       window = main_window_get_folder_window(mainwin);
+       if (window) {
+               gtkut_widget_get_uposition(window, &x, &y);
+               prefs_common.folderwin_x = x;
+               prefs_common.folderwin_y = y;
+       }
+       window = main_window_get_message_window(mainwin);
+       if (window) {
+               gtkut_widget_get_uposition(window, &x, &y);
+               prefs_common.main_msgwin_x = x;
+               prefs_common.main_msgwin_y = y;
+       }
 }
 
 void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
@@ -1751,8 +1794,8 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                                       "folder_view", "Sylpheed");
                gtk_window_set_policy(GTK_WINDOW(folderwin),
                                      TRUE, TRUE, FALSE);
-               gtk_widget_set_usize(folderwin, -1,
-                                    prefs_common.mainview_height);
+               gtk_widget_set_uposition(folderwin, prefs_common.folderwin_x,
+                                        prefs_common.folderwin_y);
                gtk_container_set_border_width(GTK_CONTAINER(folderwin),
                                               BORDER_WIDTH);
                gtk_signal_connect(GTK_OBJECT(folderwin), "delete_event",
@@ -1767,11 +1810,8 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                                       "message_view", "Sylpheed");
                gtk_window_set_policy(GTK_WINDOW(messagewin),
                                      TRUE, TRUE, FALSE);
-               gtk_widget_set_usize
-                       (messagewin, prefs_common.mainview_width,
-                        prefs_common.mainview_height
-                        - prefs_common.summaryview_height
-                        + DEFAULT_HEADERVIEW_HEIGHT);
+               gtk_widget_set_uposition(messagewin, prefs_common.main_msgwin_x,
+                                        prefs_common.main_msgwin_y);
                gtk_container_set_border_width(GTK_CONTAINER(messagewin),
                                               BORDER_WIDTH);
                gtk_signal_connect(GTK_OBJECT(messagewin), "delete_event",
@@ -1779,6 +1819,16 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                                   mainwin);
        }
 
+       gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->folderview),
+                            prefs_common.folderview_width,
+                            prefs_common.folderview_height);
+       gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->summaryview),
+                            prefs_common.summaryview_width,
+                            prefs_common.summaryview_height);
+       gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->messageview),
+                            prefs_common.msgview_width,
+                            prefs_common.msgview_height);
+
        switch (type) {
        case SEPARATE_NONE:
                hpaned = gtk_hpaned_new();
@@ -1797,19 +1847,9 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                                       GTK_WIDGET_PTR(mainwin->summaryview));
                        gtk_widget_ref(vpaned);
                }
-               gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->summaryview),
-                                    prefs_common.summaryview_width,
-                                    prefs_common.summaryview_height);
                gtk_paned_add2(GTK_PANED(vpaned),
                               GTK_WIDGET_PTR(mainwin->messageview));
-               gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->messageview),
-                                    prefs_common.mainview_width, -1);
-               gtk_widget_set_usize(mainwin->window,
-                                    prefs_common.folderview_width +
-                                    prefs_common.mainview_width,
-                                    prefs_common.mainwin_height);
-               gtk_widget_show_all(vpaned);
-
+               gtk_widget_show(vpaned);
 
                mainwin->win.sep_none.hpaned = hpaned;
                mainwin->win.sep_none.vpaned = vpaned;
@@ -1833,15 +1873,7 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                }
                gtk_paned_add2(GTK_PANED(vpaned),
                               GTK_WIDGET_PTR(mainwin->messageview));
-               gtk_widget_show_all(vpaned);
-               gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->summaryview),
-                                    prefs_common.summaryview_width,
-                                    prefs_common.summaryview_height);
-               gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->messageview),
-                                    prefs_common.mainview_width, -1);
-               gtk_widget_set_usize(mainwin->window,
-                                    prefs_common.mainview_width,
-                                    prefs_common.mainview_height);
+               gtk_widget_show(vpaned);
 
                gtk_container_add(GTK_CONTAINER(folderwin),
                                  GTK_WIDGET_PTR(mainwin->folderview));
@@ -1864,14 +1896,7 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                               GTK_WIDGET_PTR(mainwin->folderview));
                gtk_paned_add2(GTK_PANED(hpaned),
                               GTK_WIDGET_PTR(mainwin->summaryview));
-               gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->summaryview),
-                                    prefs_common.summaryview_width,
-                                    prefs_common.summaryview_height);
-               gtk_widget_set_usize(mainwin->window,
-                                    prefs_common.folderview_width +
-                                    prefs_common.mainview_width,
-                                    prefs_common.mainwin_height);
-               gtk_widget_show_all(hpaned);
+               gtk_widget_show(hpaned);
 
                messageview_add_toolbar(mainwin->messageview, messagewin);
                msgview_ifactory = gtk_item_factory_from_widget(mainwin->messageview->menubar);
@@ -1880,19 +1905,12 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                mainwin->win.sep_message.messagewin = messagewin;
                mainwin->win.sep_message.hpaned     = hpaned;
 
-               gtk_widget_show_all(messagewin);
-               
+               gtk_widget_show(messagewin);
                break;
        case SEPARATE_BOTH:
                gtk_box_pack_start(GTK_BOX(vbox_body),
                                   GTK_WIDGET_PTR(mainwin->summaryview),
                                   TRUE, TRUE, 0);
-               gtk_widget_set_usize(GTK_WIDGET_PTR(mainwin->summaryview),
-                                    prefs_common.summaryview_width,
-                                    prefs_common.summaryview_height);
-               gtk_widget_set_usize(mainwin->window,
-                                    prefs_common.mainview_width,
-                                    prefs_common.mainwin_height);
                gtk_container_add(GTK_CONTAINER(folderwin),
                                  GTK_WIDGET_PTR(mainwin->folderview));
                gtk_container_add(GTK_CONTAINER(messagewin),
@@ -1901,12 +1919,17 @@ static void main_window_set_widgets(MainWindow *mainwin, SeparateType type)
                mainwin->win.sep_both.folderwin = folderwin;
                mainwin->win.sep_both.messagewin = messagewin;
 
-               gtk_widget_show_all(folderwin);
-               gtk_widget_show_all(messagewin);
-
+               gtk_widget_show(folderwin);
+               gtk_widget_show(messagewin);
                break;
        }
 
+       gtk_widget_set_uposition(mainwin->window,
+                                prefs_common.mainwin_x,
+                                prefs_common.mainwin_y);
+
+       gtk_widget_queue_resize(vbox_body);
+       gtk_widget_queue_resize(mainwin->window);
        /* CLAWS: previous "gtk_widget_show_all" makes noticeview
         * and mimeview icon list/ctree lose track of their visibility states */
        if (!noticeview_is_visible(mainwin->messageview->noticeview)) 
@@ -2047,6 +2070,15 @@ static gint message_window_close_cb(GtkWidget *widget, GdkEventAny *event,
        return TRUE;
 }
 
+static void main_window_size_allocate_cb(GtkWidget *widget,
+                                        GtkAllocation *allocation,
+                                        gpointer data)
+{
+       MainWindow *mainwin = (MainWindow *)data;
+
+       main_window_get_size(mainwin);
+}
+
 static void add_mailbox_cb(MainWindow *mainwin, guint action,
                           GtkWidget *widget)
 {
index 90a9775..3993218 100644 (file)
@@ -146,6 +146,10 @@ void main_window_reflect_prefs_all_real            (gboolean pixmap_theme_changed);
 void main_window_reflect_prefs_all     (void);
 void main_window_set_summary_column    (void);
 void main_window_set_account_menu      (GList          *account_list);
+
+GtkWidget *main_window_get_folder_window       (MainWindow     *mainwin);
+GtkWidget *main_window_get_message_window      (MainWindow     *mainwin);
+
 void main_window_separation_change     (MainWindow     *mainwin,
                                         SeparateType    type);
 
index ef3ac3c..28cf6cc 100644 (file)
@@ -313,6 +313,7 @@ MessageView *messageview_create(MainWindow *mainwin)
                           FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET_PTR(textview),
                           TRUE, TRUE, 0);
+       gtk_widget_show(vbox);
 
        /* to remove without destroyed */
        gtk_widget_ref(GTK_WIDGET_PTR(textview));
index efed6bf..94ab0e6 100644 (file)
@@ -575,10 +575,15 @@ static PrefParam param[] = {
         &prefs_common.summary_col_size[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
 
        /* Widget size */
+       {"folderwin_x", "16", &prefs_common.folderwin_x, P_INT,
+        NULL, NULL, NULL},
+       {"folderwin_y", "16", &prefs_common.folderwin_y, P_INT,
+        NULL, NULL, NULL},
        {"folderview_width", "179", &prefs_common.folderview_width, P_INT,
         NULL, NULL, NULL},
        {"folderview_height", "600", &prefs_common.folderview_height, P_INT,
         NULL, NULL, NULL},
+
        {"folder_col_folder", "150", &prefs_common.folder_col_folder, P_INT,
         NULL, NULL, NULL},
        {"folder_col_new", "32", &prefs_common.folder_col_new, P_INT,
@@ -593,6 +598,15 @@ static PrefParam param[] = {
        {"summaryview_height", "173", &prefs_common.summaryview_height, P_INT,
         NULL, NULL, NULL},
 
+       {"main_messagewin_x", "256", &prefs_common.main_msgwin_x, P_INT,
+        NULL, NULL, NULL},
+       {"main_messagewin_y", "210", &prefs_common.main_msgwin_y, P_INT,
+        NULL, NULL, NULL},
+       {"messageview_width", "600", &prefs_common.msgview_width, P_INT,
+        NULL, NULL, NULL},
+       {"messageview_height", "540", &prefs_common.msgview_height, P_INT,
+        NULL, NULL, NULL},
+
        {"mainview_x", "64", &prefs_common.mainview_x, P_INT,
         NULL, NULL, NULL},
        {"mainview_y", "64", &prefs_common.mainview_y, P_INT,
index b046e6f..24756c1 100644 (file)
@@ -168,10 +168,11 @@ struct _PrefsCommon
        gint summary_col_size[N_SUMMARY_COLS];
 
        /* Widget size */
-       gint folderview_x;
-       gint folderview_y;
+       gint folderwin_x;
+       gint folderwin_y;
        gint folderview_width;
        gint folderview_height;
+
        gint folder_col_folder;
        gint folder_col_new;
        gint folder_col_unread;
@@ -180,6 +181,11 @@ struct _PrefsCommon
        gint summaryview_width;
        gint summaryview_height;
 
+       gint main_msgwin_x;
+       gint main_msgwin_y;
+       gint msgview_width;
+       gint msgview_height;
+
        gint mainview_x;
        gint mainview_y;
        gint mainview_width;