Fix some window sizing bugs.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3555 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-01-30 01:07:07 +00:00
parent 7b76932785
commit aafa9b943d
5 changed files with 17 additions and 8 deletions

View File

@ -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));
}

View File

@ -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);

View File

@ -5069,7 +5069,7 @@ Daily (365)
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>

View File

@ -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;

View File

@ -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,6 +1031,7 @@ gnucash_sheet_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
allocation->width == sheet->window_width)
return;
if (allocation->width != sheet->window_width)
gnucash_sheet_styles_set_dimensions (sheet, allocation->width);
sheet->window_height = allocation->height;
@ -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