[Gnucash-changes] r12011 - gnucash/trunk - Finish conversion to a
GtkDialog. Redo dialog as a table instead of
David Hampton
hampton at cvs.gnucash.org
Mon Nov 21 20:36:21 EST 2005
Author: hampton
Date: 2005-11-21 20:36:20 -0500 (Mon, 21 Nov 2005)
New Revision: 12011
Trac: http://svn.gnucash.org/trac/changeset/12011
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/gnome/dialog-userpass.c
gnucash/trunk/src/gnome/glade/userpass.glade
Log:
Finish conversion to a GtkDialog. Redo dialog as a table instead of
boxes in boxes.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2005-11-22 00:27:20 UTC (rev 12010)
+++ gnucash/trunk/ChangeLog 2005-11-22 01:36:20 UTC (rev 12011)
@@ -1,3 +1,9 @@
+2005-11-21 David Hampton <hampton at employees.org>
+
+ * src/gnome/glade/userpass.glade:
+ * src/gnome/dialog-userpass.c: Finish conversion to a
+ GtkDialog. Redo dialog as a table instead of boxes in boxes.
+
2005-11-21 Derek Atkins <derek at ihtfp.com>
* src/gnome-utils/Makefile.am: exit if "svn info" fails.
Modified: gnucash/trunk/src/gnome/dialog-userpass.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-userpass.c 2005-11-22 00:27:20 UTC (rev 12010)
+++ gnucash/trunk/src/gnome/dialog-userpass.c 2005-11-22 01:36:20 UTC (rev 12011)
@@ -52,37 +52,37 @@
dialog = glade_xml_get_widget (xml, "Username Password Dialog");
if (parent)
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
heading_label = glade_xml_get_widget (xml, "heading_label");
username_entry = glade_xml_get_widget (xml, "username_entry");
password_entry = glade_xml_get_widget (xml, "password_entry");
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
-
if (heading)
gtk_label_set_text (GTK_LABEL (heading_label), heading);
if (initial_username)
gtk_entry_set_text (GTK_ENTRY (username_entry), initial_username);
+ gtk_editable_select_region (GTK_EDITABLE (username_entry), 0, -1);
if (initial_password)
gtk_entry_set_text (GTK_ENTRY (password_entry), initial_password);
- gtk_widget_grab_focus (username_entry);
+ result = gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_widget_hide(dialog);
- result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- if (result == 0)
+ if (result == GTK_RESPONSE_OK)
{
*username = gtk_editable_get_chars (GTK_EDITABLE (username_entry), 0, -1);
*password = gtk_editable_get_chars (GTK_EDITABLE (password_entry), 0, -1);
+ gtk_widget_destroy(dialog);
return TRUE;
}
*username = NULL;
*password = NULL;
+ gtk_widget_destroy(dialog);
return FALSE;
}
Modified: gnucash/trunk/src/gnome/glade/userpass.glade
===================================================================
--- gnucash/trunk/src/gnome/glade/userpass.glade 2005-11-22 00:27:20 UTC (rev 12010)
+++ gnucash/trunk/src/gnome/glade/userpass.glade 2005-11-22 01:36:20 UTC (rev 12011)
@@ -39,7 +39,7 @@
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <property name="response_id">0</property>
+ <property name="response_id">-6</property>
</widget>
</child>
@@ -47,12 +47,13 @@
<widget class="GtkButton" id="okbutton">
<property name="visible">True</property>
<property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <property name="response_id">0</property>
+ <property name="response_id">-5</property>
</widget>
</child>
</widget>
@@ -86,125 +87,106 @@
</child>
<child>
- <widget class="GtkFrame" id="frame47">
+ <widget class="GtkTable" id="table1">
+ <property name="border_width">6</property>
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <widget class="GtkHBox" id="hbox95">
- <property name="border_width">10</property>
+ <widget class="GtkLabel" id="label847713">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
+ <property name="label" translatable="yes">_Username:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">username_entry</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkVBox" id="vbox105">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
- <property name="spacing">5</property>
+ <child>
+ <widget class="GtkLabel" id="label847714">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Password:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">password_entry</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="label847713">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Username:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkEntry" id="username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="label847714">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Password:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox106">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
- <property name="spacing">5</property>
-
- <child>
- <widget class="GtkEntry" id="username_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="password_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">False</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkEntry" id="password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">False</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char">*</property>
+ <property name="activates_default">True</property>
</widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
</child>
</widget>
<packing>
More information about the gnucash-changes
mailing list