From e500dae5b40fe8eafd5d7d7b9d474cbf6f01bb83 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 30 Apr 2006 01:27:24 +0000 Subject: [PATCH] Eliminate some gtk warning messages. Stop the contents of the Bill Terms dialog from shifting around when the first/last term is created/destroyed. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13884 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 8 + .../business-gnome/dialog-billterms.c | 10 +- .../business-gnome/glade/billterms.glade | 260 +++++++++++++++++- 3 files changed, 271 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4c915fe75..408453dc58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-04-29 David Hampton + + * src/business/business-gnome/dialog-billterms.c: + * src/business/business-gnome/glade/billterms.glade: Eliminate + some gtk warning messages. Stop the contents of the Bill Terms + dialog from shifting around when the first/last term is + created/destroyed. + 2006-04-30 Andreas Köhler * configure.in: diff --git a/src/business/business-gnome/dialog-billterms.c b/src/business/business-gnome/dialog-billterms.c index 772c417f01..a2879eb7d0 100644 --- a/src/business/business-gnome/dialog-billterms.c +++ b/src/business/business-gnome/dialog-billterms.c @@ -396,9 +396,10 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term, GncBillTerm *created_term = NULL; NewBillTerm *nbt; GladeXML *xml; - GtkWidget *box, *widget; + GtkWidget *box; gint response; gboolean done; + const gchar *dialog_name; if (!btw) return NULL; @@ -407,8 +408,9 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term, nbt->this_term = term; /* Open and read the XML */ - xml = gnc_glade_xml_new ("billterms.glade", "New Term Dialog"); - nbt->dialog = glade_xml_get_widget (xml, "New Term Dialog"); + dialog_name = term ? "Edit Term Dialog" : "New Term Dialog"; + xml = gnc_glade_xml_new ("billterms.glade", dialog_name); + nbt->dialog = glade_xml_get_widget (xml, dialog_name); nbt->name_entry = glade_xml_get_widget (xml, "name_entry"); nbt->desc_entry = glade_xml_get_widget (xml, "desc_entry"); if (name) @@ -446,8 +448,6 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term, /* Show what we should */ gtk_widget_show_all (nbt->dialog); if (term) { - widget = glade_xml_get_widget (xml, "term_frame"); - gtk_widget_hide_all (widget); gtk_widget_grab_focus (nbt->desc_entry); } else gtk_widget_grab_focus (nbt->name_entry); diff --git a/src/business/business-gnome/glade/billterms.glade b/src/business/business-gnome/glade/billterms.glade index 9b063f336b..f22418e7f4 100644 --- a/src/business/business-gnome/glade/billterms.glade +++ b/src/business/business-gnome/glade/billterms.glade @@ -198,7 +198,7 @@ 0 - True + False True @@ -344,7 +344,7 @@ True - (type) + (type) False False GTK_JUSTIFY_CENTER @@ -809,6 +809,262 @@ + + True + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + True + False + 8 + + + + True + GTK_BUTTONBOX_END + + + + True + Cancel your changes + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + Commit this Billing Term + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + 4 + 2 + False + 0 + 0 + + + + True + <b>Term Definition</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 2 + 0 + 1 + fill + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + De_scription: + True + False + GTK_JUSTIFY_RIGHT + False + False + 0 + 0.5 + 0 + 0 + desc_entry + + + + + 0 + 1 + 1 + 2 + fill + fill + + + + + + True + The description of the Billing Term, printed on invoices + True + True + True + True + 0 + + True + * + True + + + 1 + 2 + 1 + 2 + + + + + + + True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 + + + + True + _Type: + True + False + GTK_JUSTIFY_RIGHT + False + False + 0 + 0.5 + 0 + 0 + type_menu + + + + + 0 + 1 + 2 + 3 + fill + fill + + + + + + True + Choose the type of Billing Term + True + 0 + + + + True + + + + True + Type Menu + True + + + + + + + 1 + 2 + 2 + 3 + fill + + + + + + + True + False + 0 + + + + + + + 1 + 2 + 3 + 4 + fill + + + + + 0 + True + True + + + + + + True