Index: xfce-mcs-manager/xfce-mcs-dialog.c =================================================================== RCS file: /var/cvs/xfce/xfce4/xfce-mcs-manager/xfce-mcs-manager/xfce-mcs-dialog.c,v retrieving revision 1.21 diff -u -r1.21 xfce-mcs-dialog.c --- xfce-mcs-manager/xfce-mcs-dialog.c 14 Jun 2004 18:44:27 -0000 1.21 +++ xfce-mcs-manager/xfce-mcs-dialog.c 17 Jun 2004 19:26:11 -0000 @@ -50,6 +50,17 @@ * area, so the dialog looks best using the same border width */ #define BORDER 6 +static gint dlg_height = 400; /* default */ + +/* keep track of the dialog's height for future reopens */ +static gboolean +dlg_configure_cb (GtkWidget *w, GdkEventConfigure *evt, gpointer user_data) +{ + if (evt->width > 0) + dlg_height = evt->width; + return FALSE; +} + /* * To improve the responsiveness of the UI */ @@ -156,14 +167,15 @@ g_slist_free (sorted_list); - gtk_widget_set_size_request(dlg, -1, 400); + gtk_widget_set_size_request (dlg, -1, dlg_height); g_signal_connect_swapped (dlg, "response", G_CALLBACK (close_dialog), dlg); g_signal_connect_swapped (dlg, "delete-event", G_CALLBACK (close_dialog), dlg); + g_signal_connect (G_OBJECT (dlg), "configure-event", + G_CALLBACK (dlg_configure_cb), NULL); xfce_gtk_window_center_on_monitor_with_pointer (GTK_WINDOW (dlg)); gtk_widget_show (dlg); } -