[almanah] Improve appearance of Definition Manager dialogue



commit 561cab28f9143aa9caf0439190a3315a46ab01db
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Dec 31 10:47:46 2009 +0000

    Improve appearance of Definition Manager dialogue
    
    It's no longer arranged as a table; instead, a heading and free-form text
    area are used. The focus control for definition error dialogues has also been
    fixed.

 data/almanah.ui           |   92 +++++++++++---------------------------------
 src/definitions/contact.c |    6 +-
 src/definitions/file.c    |    2 +-
 src/definitions/uri.c     |    2 +-
 4 files changed, 28 insertions(+), 74 deletions(-)
---
diff --git a/data/almanah.ui b/data/almanah.ui
index b6d9972..3f04b6c 100644
--- a/data/almanah.ui
+++ b/data/almanah.ui
@@ -776,84 +776,38 @@
 				</child>
 				<child>
 					<object class="GtkVBox" id="almanah_dmw_vbox">
+						<property name="spacing">6</property>
 						<child>
-							<object class="GtkTable" id="almanah_dmw_table">
-								<property name="n-rows">3</property>
-								<property name="n-columns">2</property>
-								<property name="column-spacing">6</property>
-								<property name="row-spacing">6</property>
-								<child>
-									<object class="GtkLabel" id="almanah_dmw_name_label_label">
-										<property name="label" translatable="yes">Type: </property>
-										<property name="xalign">1</property>
-										<accessibility>
-											<relation target="almanah_dmw_name_label" type="label-for"/>
-										</accessibility>
-										<!--<attributes>
-											<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
-										</attributes>-->
-									</object>
-									<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="x-options">GTK_FILL</property>
-										<property name="y-options">GTK_FILL</property>
-									</packing>
-								</child>
-								<child>
-									<object class="GtkLabel" id="almanah_dmw_name_label">
-										<property name="label" translatable="yes">Nothing selected</property>
-										<property name="xalign">0</property>
-										<accessibility>
-											<relation target="almanah_dmw_name_label_label" type="labelled-by"/>
-										</accessibility>
-									</object>
-									<packing>
-										<property name="left-attach">2</property>
-										<property name="right-attach">3</property>
-										<property name="top-attach">1</property>
-										<property name="bottom-attach">2</property>
-										<property name="y-options">GTK_FILL</property>
-									</packing>
-								</child>
-								<child>
-									<object class="GtkLabel" id="almanah_dmw_description_label_label">
-										<property name="label" translatable="yes">Description: </property>
-										<property name="xalign">1</property>
-										<property name="yalign">0</property>
-										<accessibility>
-											<relation target="almanah_dmw_description_label" type="label-for"/>
-										</accessibility>
-										<!--<attributes>
-											<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
-										</attributes>-->
+							<object class="GtkLabel" id="almanah_dmw_name_label">
+								<property name="label" translatable="yes">Nothing selected</property>
+								<property name="xalign">0</property>
+								<child internal-child="accessible">
+									<object class="AtkObject" id="a11y-almanah_dmw_name_label">
+										<property name="AtkObject::accessible-name" translatable="yes">Definition Type</property>
 									</object>
-									<packing>
-										<property name="left-attach">1</property>
-										<property name="right-attach">2</property>
-										<property name="top-attach">2</property>
-										<property name="bottom-attach">3</property>
-										<property name="x-options">GTK_FILL</property>
-										<property name="y-options">GTK_FILL</property>
-									</packing>
 								</child>
+								<attributes>
+									<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+								</attributes>
+							</object>
+							<packing>
+								<property name="expand">False</property>
+							</packing>
+						</child>
+						<child>
+							<object class="GtkAlignment" id="almanah_dmw_description_alignment">
+								<property name="left-padding">6</property>
 								<child>
 									<object class="GtkLabel" id="almanah_dmw_description_label">
 										<property name="wrap">True</property>
 										<property name="xalign">0</property>
 										<property name="yalign">0</property>
-										<accessibility>
-											<relation target="almanah_dmw_description_label_label" type="labelled-by"/>
-										</accessibility>
+										<child internal-child="accessible">
+											<object class="AtkObject" id="a11y-almanah_dmw_description_label">
+												<property name="AtkObject::accessible-name" translatable="yes">Definition Description</property>
+											</object>
+										</child>
 									</object>
-									<packing>
-										<property name="left-attach">2</property>
-										<property name="right-attach">3</property>
-										<property name="top-attach">2</property>
-										<property name="bottom-attach">3</property>
-									</packing>
 								</child>
 							</object>
 						</child>
diff --git a/src/definitions/contact.c b/src/definitions/contact.c
index 3e4da3d..a4731d6 100644
--- a/src/definitions/contact.c
+++ b/src/definitions/contact.c
@@ -98,7 +98,7 @@ contact_view (AlmanahDefinition *definition)
 	/* Get the UID of the source containing the contact from Evolution */
 	if ((book = e_book_new_default_addressbook (&error)) == NULL ||
 	    e_book_open (book, TRUE, &error) == FALSE) {
-		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (almanah->main_window),
+		GtkWidget *dialog = gtk_message_dialog_new (NULL,
 							    GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
 							    _("Error opening contact"));
 		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
@@ -131,7 +131,7 @@ contact_view (AlmanahDefinition *definition)
 
 	/* Run Evolution */
 	if (g_spawn_command_line_async (command_line, &error) == FALSE) {
-		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (almanah->main_window),
+		GtkWidget *dialog = gtk_message_dialog_new (NULL,
 							    GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
 							    _("Error opening Evolution"));
 		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
@@ -219,7 +219,7 @@ contact_get_blurb (AlmanahDefinition *definition)
 	if ((book = e_book_new_default_addressbook (&error)) == NULL ||
 	    e_book_open (book, TRUE, &error) == FALSE ||
 	    e_book_get_contact (book, almanah_definition_get_value (definition), &contact, &error) == FALSE) {
-		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (almanah->main_window),
+		GtkWidget *dialog = gtk_message_dialog_new (NULL,
 							    GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
 							    _("Error opening contact"));
 		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
diff --git a/src/definitions/file.c b/src/definitions/file.c
index 4e9aea0..7bd6d48 100644
--- a/src/definitions/file.c
+++ b/src/definitions/file.c
@@ -69,7 +69,7 @@ file_view (AlmanahDefinition *definition)
 	const gchar *value = almanah_definition_get_value (definition);
 
 	if (gtk_show_uri (gtk_widget_get_screen (almanah->main_window), value, GDK_CURRENT_TIME, &error) == FALSE) {
-		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (almanah->main_window),
+		GtkWidget *dialog = gtk_message_dialog_new (NULL,
 							    GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
 							    _("Error opening file"));
 		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);
diff --git a/src/definitions/uri.c b/src/definitions/uri.c
index 2e8c4d1..216c1f0 100644
--- a/src/definitions/uri.c
+++ b/src/definitions/uri.c
@@ -71,7 +71,7 @@ uri_view (AlmanahDefinition *definition)
 	const gchar *value = almanah_definition_get_value (definition);
 
 	if (gtk_show_uri (gtk_widget_get_screen (almanah->main_window), value, GDK_CURRENT_TIME, &error) == FALSE) {
-		GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (almanah->main_window),
+		GtkWidget *dialog = gtk_message_dialog_new (NULL,
 							    GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
 							    _("Error opening URI"));
 		gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]