diff --git a/src/gnome/dialog-account.c b/src/gnome/dialog-account.c
index bcf9280340..ac0a9d9d98 100644
--- a/src/gnome/dialog-account.c
+++ b/src/gnome/dialog-account.c
@@ -1112,11 +1112,6 @@ gnc_account_window_destroy_cb (GtkObject *object, gpointer data)
g_free (aw);
- gdk_window_get_geometry (GTK_WIDGET(object)->window, NULL, NULL,
- &last_width, &last_height, NULL);
-
- gnc_save_window_size ("account_win", last_width, last_height);
-
return FALSE;
}
@@ -1445,6 +1440,11 @@ close_handler (gpointer user_data)
{
AccountWindow *aw = user_data;
+ gdk_window_get_geometry (GTK_WIDGET(aw->dialog)->window, NULL, NULL,
+ &last_width, &last_height, NULL);
+
+ gnc_save_window_size ("account_win", last_width, last_height);
+
gnome_dialog_close (GNOME_DIALOG (aw->dialog));
}
diff --git a/src/gnome/glade-gnc-dialogs.c b/src/gnome/glade-gnc-dialogs.c
index 6351a70138..28e767aa91 100644
--- a/src/gnome/glade-gnc-dialogs.c
+++ b/src/gnome/glade-gnc-dialogs.c
@@ -3525,6 +3525,7 @@ create_Account_Dialog (void)
Account_Dialog = gnome_dialog_new (_("New Account"), NULL);
gtk_object_set_data (GTK_OBJECT (Account_Dialog), "Account_Dialog", Account_Dialog);
+ gtk_window_set_policy (GTK_WINDOW (Account_Dialog), TRUE, TRUE, FALSE);
dialog_vbox12 = GNOME_DIALOG (Account_Dialog)->vbox;
gtk_object_set_data (GTK_OBJECT (Account_Dialog), "dialog_vbox12", dialog_vbox12);
diff --git a/src/gnome/gnc-dialogs.glade b/src/gnome/gnc-dialogs.glade
index 76be2da2b8..dd5d6357b9 100644
--- a/src/gnome/gnc-dialogs.glade
+++ b/src/gnome/gnc-dialogs.glade
@@ -5069,7 +5069,7 @@ Daily (365)
GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
- False
+ True
True
False
False
diff --git a/src/gnome/window-register.c b/src/gnome/window-register.c
index cf2c8d125d..7371752e67 100644
--- a/src/gnome/window-register.c
+++ b/src/gnome/window-register.c
@@ -1986,7 +1986,7 @@ regWindowLedger (xaccLedgerDisplay *ledger)
}
/* Allow grow, allow shrink, auto-shrink */
- gtk_window_set_policy(GTK_WINDOW(register_window), TRUE, TRUE, TRUE);
+ gtk_window_set_policy (GTK_WINDOW(register_window), TRUE, TRUE, FALSE);
{
int *width;
diff --git a/src/register/gnome/gnucash-sheet.c b/src/register/gnome/gnucash-sheet.c
index eab4e16749..53b73e12eb 100644
--- a/src/register/gnome/gnucash-sheet.c
+++ b/src/register/gnome/gnucash-sheet.c
@@ -1021,6 +1021,7 @@ static void
gnucash_sheet_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
GnucashSheet *sheet = GNUCASH_SHEET(widget);
+ GtkWidget *window;
if (GTK_WIDGET_CLASS(sheet_parent_class)->size_allocate)
(*GTK_WIDGET_CLASS (sheet_parent_class)->size_allocate)
@@ -1030,7 +1031,8 @@ gnucash_sheet_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
allocation->width == sheet->window_width)
return;
- gnucash_sheet_styles_set_dimensions (sheet, allocation->width);
+ if (allocation->width != sheet->window_width)
+ gnucash_sheet_styles_set_dimensions (sheet, allocation->width);
sheet->window_height = allocation->height;
sheet->window_width = allocation->width;
@@ -1041,6 +1043,12 @@ gnucash_sheet_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
item_edit_configure (ITEM_EDIT(sheet->item_editor));
gnucash_sheet_update_adjustments (sheet);
+
+ /* HACK ALERT. this seems to be the only thing to get the
+ * freekin register window to stop freekin resizing itself
+ * all the freekin time. */
+ window = gtk_widget_get_toplevel (widget);
+ gtk_window_set_default_size (GTK_WINDOW(window), allocation->width, 0);
}
static gboolean