0.9.4claws27
authorChristoph Hohmann <reboot@gmx.ch>
Sat, 16 Aug 2003 16:28:01 +0000 (16:28 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sat, 16 Aug 2003 16:28:01 +0000 (16:28 +0000)
* src/mainwindow.c
        remember and restore window sizes and position when the main
        window is hidden or shown

(closes Bug 274 Window size in 0.9.4claws18 not remembered when
 minimised/reopened using trayicon)

ChangeLog.claws
configure.ac
src/mainwindow.c

index 3bfe6f0..eba3869 100644 (file)
@@ -1,3 +1,12 @@
+2003-08-16 [christoph] 0.9.4claws27
+
+       * src/mainwindow.c
+               remember and restore window sizes and position when the main
+               window is hidden or shown
+
+       (closes Bug 274 Window size in 0.9.4claws18 not remembered when
+        minimised/reopened using trayicon)
+
 2003-08-16 [paul]      0.9.4claws26
 
        * src/crash.c
index 37fa10a..f5b67e6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=26
+EXTRA_VERSION=27
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index aa34c14..c94161a 100644 (file)
@@ -1735,40 +1735,53 @@ void main_window_show(MainWindow *mainwin)
        gtk_widget_show(mainwin->window);
        gtk_widget_show(mainwin->vbox_body);
 
-       switch (mainwin->type) {
-       case SEPARATE_FOLDER:
-               gtk_widget_show(mainwin->win.sep_folder.folderwin);
-               break;
-       case SEPARATE_MESSAGE:
-               gtk_widget_show(mainwin->win.sep_message.messagewin);
-               break;
-       case SEPARATE_BOTH:
-               gtk_widget_show(mainwin->win.sep_both.folderwin);
-               gtk_widget_show(mainwin->win.sep_both.messagewin);
-               break;
-       default:
-               break;
+        gtk_widget_set_uposition(mainwin->window,
+                                 prefs_common.mainwin_x,
+                                 prefs_common.mainwin_y);
+
+       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);
+
+       if (mainwin->type & SEPARATE_FOLDER) {
+               GtkWidget *folderwin;
+
+               folderwin = main_window_get_folder_window(mainwin);
+               gtk_widget_show(folderwin);
+               gtk_widget_set_uposition(folderwin, prefs_common.folderwin_x,
+                                         prefs_common.folderwin_y);
+       }
+
+       if (mainwin->type & SEPARATE_MESSAGE) {
+               GtkWidget *messagewin;
+
+               messagewin = main_window_get_message_window(mainwin);
+               gtk_widget_show(messagewin);
+               gtk_widget_set_uposition(messagewin, prefs_common.main_msgwin_x,
+                                         prefs_common.main_msgwin_y);
        }
 }
 
 void main_window_hide(MainWindow *mainwin)
 {
+       main_window_get_size(mainwin);
+       main_window_get_position(mainwin);
+
        gtk_widget_hide(mainwin->window);
        gtk_widget_hide(mainwin->vbox_body);
 
-       switch (mainwin->type) {
-       case SEPARATE_FOLDER:
+       if (mainwin->type & SEPARATE_FOLDER) {
                gtk_widget_hide(mainwin->win.sep_folder.folderwin);
-               break;
-       case SEPARATE_MESSAGE:
+       }
+
+       if (mainwin->type & SEPARATE_MESSAGE) {
                gtk_widget_hide(mainwin->win.sep_message.messagewin);
-               break;
-       case SEPARATE_BOTH:
-               gtk_widget_hide(mainwin->win.sep_both.folderwin);
-               gtk_widget_hide(mainwin->win.sep_both.messagewin);
-               break;
-       default:
-               break;
        }
 }