[file-roller] define the message dialog and the request dialog in ui files



commit 286513e1b27eb57a81172914b10ab3b4367de73b
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jun 20 21:38:47 2012 +0200

    define the message dialog and the request dialog in ui files

 src/actions.c                 |    6 +-
 src/dlg-add-files.c           |    2 +-
 src/dlg-add-folder.c          |    2 +-
 src/dlg-extract.c             |    2 +-
 src/file-roller.gresource.xml |    2 +
 src/fr-window.c               |    2 +-
 src/gtk-utils.c               |  262 +++++++++++------------------------------
 src/gtk-utils.h               |   11 +--
 src/ui/Makefile.am            |    2 +
 src/ui/error-dialog.ui        |    1 -
 src/ui/message-dialog.ui      |   93 +++++++++++++++
 src/ui/progress-dialog.ui     |    2 -
 src/ui/request-dialog.ui      |  107 +++++++++++++++++
 13 files changed, 279 insertions(+), 215 deletions(-)
---
diff --git a/src/actions.c b/src/actions.c
index b407f4e..ab21347 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -279,7 +279,7 @@ new_file_response_cb (GtkWidget  *w,
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->dialog), "archive-create");
+		_gtk_show_help_dialog (GTK_WINDOW (data->dialog), "archive-create");
 		return;
 	}
 
@@ -434,7 +434,7 @@ save_file_response_cb (GtkWidget  *w,
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->dialog), "archive-convert");
+		_gtk_show_help_dialog (GTK_WINDOW (data->dialog), "archive-convert");
 		return;
 	}
 
@@ -842,7 +842,7 @@ activate_action_manual (GtkAction *action,
 {
 	FrWindow *window = data;
 
-	show_help_dialog (GTK_WINDOW (window) , NULL);
+	_gtk_show_help_dialog (GTK_WINDOW (window) , NULL);
 }
 
 
diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c
index 998617e..28d0a30 100644
--- a/src/dlg-add-files.c
+++ b/src/dlg-add-files.c
@@ -81,7 +81,7 @@ file_sel_response_cb (GtkWidget      *widget,
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->dialog), "archive-edit");
+		_gtk_show_help_dialog (GTK_WINDOW (data->dialog), "archive-edit");
 		g_free (current_folder);
 		return TRUE;
 	}
diff --git a/src/dlg-add-folder.c b/src/dlg-add-folder.c
index 8647f19..7a938b6 100644
--- a/src/dlg-add-folder.c
+++ b/src/dlg-add-folder.c
@@ -110,7 +110,7 @@ file_sel_response_cb (GtkWidget    *widget,
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->dialog), "archive-edit");
+		_gtk_show_help_dialog (GTK_WINDOW (data->dialog), "archive-edit");
 		return TRUE;
 	}
 
diff --git a/src/dlg-extract.c b/src/dlg-extract.c
index 6f83ec8..5648a67 100644
--- a/src/dlg-extract.c
+++ b/src/dlg-extract.c
@@ -260,7 +260,7 @@ file_sel_response_cb (GtkWidget    *widget,
 	}
 
 	if (response == GTK_RESPONSE_HELP) {
-		show_help_dialog (GTK_WINDOW (data->dialog), "archive-extract");
+		_gtk_show_help_dialog (GTK_WINDOW (data->dialog), "archive-extract");
 		return TRUE;
 	}
 
diff --git a/src/file-roller.gresource.xml b/src/file-roller.gresource.xml
index 9df229e..7301af7 100644
--- a/src/file-roller.gresource.xml
+++ b/src/file-roller.gresource.xml
@@ -8,10 +8,12 @@
     <file compressed="true">ui/delete.ui</file>
     <file compressed="true">ui/error-dialog.ui</file>
     <file compressed="true">ui/menus-toolbars.ui</file>
+    <file compressed="true">ui/message-dialog.ui</file>
     <file compressed="true">ui/new.ui</file>
     <file compressed="true">ui/password.ui</file>
     <file compressed="true">ui/progress-dialog.ui</file>
     <file compressed="true">ui/properties.ui</file>
+    <file compressed="true">ui/request-dialog.ui</file>
     <file compressed="true">ui/update.ui</file>
     <file compressed="true">../data/org.gnome.ArchiveManager1.xml</file>
   </gresource>
diff --git a/src/fr-window.c b/src/fr-window.c
index e4bce48..6312469 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -2221,7 +2221,7 @@ open_folder (GtkWindow  *parent,
 	if (folder == NULL)
 		return;
 
-	if (! show_uri (gtk_window_get_screen (parent), folder, GDK_CURRENT_TIME, &error)) {
+	if (! gtk_show_uri (gtk_window_get_screen (parent), folder, GDK_CURRENT_TIME, &error)) {
 		GtkWidget *d;
 		char      *utf8_name;
 		char      *message;
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index db256d4..b7cf262 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -45,44 +45,45 @@ _gtk_tree_selection_count_selected (GtkTreeSelection *selection)
 
 	if (selection == NULL)
 		return 0;
+
 	gtk_tree_selection_selected_foreach (selection, count_selected, &n);
 	return n;
 }
 
 
-GtkWidget*
-_gtk_message_dialog_new (GtkWindow        *parent,
-			 GtkDialogFlags    flags,
-			 const char       *stock_id,
-			 const char       *message,
-			 const char       *secondary_message,
-			 const gchar      *first_button_text,
+GtkWidget *
+_gtk_message_dialog_new (GtkWindow      *parent,
+			 GtkDialogFlags  flags,
+			 const char     *stock_id,
+			 const char     *message,
+			 const char     *secondary_message,
+			 const gchar    *first_button_text,
 			 ...)
 {
-	GtkWidget    *dialog;
-	GtkWidget    *label;
-	GtkWidget    *image;
-	GtkWidget    *hbox;
-	GtkWidget    *content_area;
-	va_list       args;
-	const gchar  *text;
-	int           response_id;
-	char         *markup_text;
-
-	g_return_val_if_fail ((message != NULL) || (secondary_message != NULL), NULL);
-
-	if (stock_id == NULL)
-		stock_id = GTK_STOCK_DIALOG_INFO;
+	GtkBuilder  *builder;
+	GtkWidget   *dialog;
+	GtkWidget   *label;
+	va_list      args;
+	const gchar *text;
+	int          response_id;
+	char        *markup_text;
+
+	builder = _gtk_builder_new_from_resource ("message-dialog.ui");
+	dialog = _gtk_builder_get_widget (builder, "message_dialog");
+	gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
+	gtk_window_set_modal (GTK_WINDOW (dialog), (flags & GTK_DIALOG_MODAL));
+	gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), (flags & GTK_DIALOG_DESTROY_WITH_PARENT));
+	g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, builder);
 
-	dialog = gtk_dialog_new_with_buttons ("", parent, flags, NULL, NULL);
-	content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+	/* set the icon */
 
-	/* Add label and image */
+	gtk_image_set_from_stock (GTK_IMAGE (_gtk_builder_get_widget (builder, "icon_image")),
+				  stock_id,
+				  GTK_ICON_SIZE_DIALOG);
 
-	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
-	gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
+	/* set the message */
 
-	label = gtk_label_new ("");
+	label = _gtk_builder_get_widget (builder, "message_label");
 
 	if (message != NULL) {
 		char *escaped_message;
@@ -105,25 +106,7 @@ _gtk_message_dialog_new (GtkWindow        *parent,
 	gtk_label_set_markup (GTK_LABEL (label), markup_text);
 	g_free (markup_text);
 
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-
-	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 24);
-	gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
-
-	gtk_box_pack_start (GTK_BOX (hbox), image,
-			    FALSE, FALSE, 0);
-
-	gtk_box_pack_start (GTK_BOX (hbox), label,
-			    TRUE, TRUE, 0);
-
-	gtk_box_pack_start (GTK_BOX (content_area),
-			    hbox,
-			    FALSE, FALSE, 0);
-
-	gtk_widget_show_all (hbox);
-
-	/* Add buttons */
+	/* add the buttons */
 
 	if (first_button_text == NULL)
 		return dialog;
@@ -161,7 +144,8 @@ create_button (const char *stock_id,
 	if (gtk_stock_lookup (text, &stock_item)) {
 		label_text = stock_item.label;
 		text_is_stock = TRUE;
-	} else {
+	}
+	else {
 		label_text = text;
 		text_is_stock = FALSE;
 	}
@@ -182,79 +166,45 @@ create_button (const char *stock_id,
 
 
 char *
-_gtk_request_dialog_run (GtkWindow        *parent,
-			 GtkDialogFlags    flags,
-			 const char       *title,
-			 const char       *message,
-			 const char       *default_value,
-			 int               max_length,
-			 const gchar      *no_button_text,
-			 const gchar      *yes_button_text)
+_gtk_request_dialog_run (GtkWindow      *parent,
+			 GtkDialogFlags  flags,
+			 const char     *title,
+			 const char     *message,
+			 const char     *default_value,
+			 int             max_length,
+			 const gchar    *no_button_text,
+			 const gchar    *yes_button_text)
 {
-	GtkWidget    *dialog;
-	GtkWidget    *label;
-	GtkWidget    *image;
-	GtkWidget    *hbox;
-	GtkWidget    *vbox;
-	GtkWidget    *entry;
-	GtkWidget    *button;
-	GtkWidget    *content_area;
-	char         *stock_id;
-	char         *result;
-
-	stock_id = GTK_STOCK_DIALOG_QUESTION;
-
-	dialog = gtk_dialog_new_with_buttons (title, parent, flags, NULL, NULL);
-	content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
-
-	/* Add label and image */
+	GtkBuilder *builder;
+	GtkWidget  *dialog;
+	GtkWidget  *label;
+	GtkWidget  *entry;
+	char       *result;
 
-	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
-	gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
-	gtk_widget_set_valign (image, GTK_ALIGN_START);
+	builder = _gtk_builder_new_from_resource ("request-dialog.ui");
+	dialog = _gtk_builder_get_widget (builder, "request_dialog");
+	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+	gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
+	gtk_window_set_modal (GTK_WINDOW (dialog), (flags & GTK_DIALOG_MODAL));
+	gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), (flags & GTK_DIALOG_DESTROY_WITH_PARENT));
+	gtk_window_set_title (GTK_WINDOW (dialog), title);
+	g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, builder);
 
-	label = gtk_label_new_with_mnemonic (message);
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label), FALSE);
-	gtk_widget_set_halign (label, GTK_ALIGN_START);
-	gtk_widget_set_valign (label, GTK_ALIGN_START);
+	label = _gtk_builder_get_widget (builder, "message_label");
+	gtk_label_set_text_with_mnemonic (GTK_LABEL (label), message);
 
-	entry = gtk_entry_new ();
-	gtk_entry_set_width_chars (GTK_ENTRY (entry), 50);
-	gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+	entry = _gtk_builder_get_widget (builder, "value_entry");
 	gtk_entry_set_max_length (GTK_ENTRY (entry), max_length);
 	gtk_entry_set_text (GTK_ENTRY (entry), default_value);
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-
-	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
-	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
-
-	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-	gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
-	gtk_box_set_spacing (GTK_BOX (content_area), 14); /* 14 + 2 * 5 = 24 */
-	gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
-	gtk_box_set_spacing (GTK_BOX (vbox), 6);
-
-	gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
-	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
-
-	gtk_widget_show_all (hbox);
 
 	/* Add buttons */
 
-	button = create_button (GTK_STOCK_CANCEL, no_button_text);
 	gtk_dialog_add_action_widget (GTK_DIALOG (dialog),
-				      button,
+				      create_button (GTK_STOCK_CANCEL, no_button_text),
 				      GTK_RESPONSE_CANCEL);
-
-	button = create_button (GTK_STOCK_OK, yes_button_text);
 	gtk_dialog_add_action_widget (GTK_DIALOG (dialog),
-				      button,
+				      create_button (GTK_STOCK_OK, yes_button_text),
 				      GTK_RESPONSE_YES);
-
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
 
 	/* Run dialog */
@@ -272,72 +222,6 @@ _gtk_request_dialog_run (GtkWindow        *parent,
 }
 
 
-GtkWidget*
-_gtk_yesno_dialog_new (GtkWindow        *parent,
-		       GtkDialogFlags    flags,
-		       const char       *message,
-		       const char       *no_button_text,
-		       const char       *yes_button_text)
-{
-	GtkWidget    *d;
-	GtkWidget    *label;
-	GtkWidget    *image;
-	GtkWidget    *hbox;
-	GtkWidget    *button;
-	GtkWidget    *content_area;
-	char         *stock_id = GTK_STOCK_DIALOG_WARNING;
-
-	d = gtk_dialog_new_with_buttons ("", parent, flags, NULL, NULL);
-	gtk_window_set_resizable (GTK_WINDOW (d), FALSE);
-
-	content_area = gtk_dialog_get_content_area (GTK_DIALOG (d));
-
-	/* Add label and image */
-
-	image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG);
-	gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-
-	label = gtk_label_new (message);
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-	gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-
-	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 24);
-	gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
-
-	gtk_box_pack_start (GTK_BOX (hbox), image,
-			    FALSE, FALSE, 0);
-
-	gtk_box_pack_start (GTK_BOX (hbox), label,
-			    TRUE, TRUE, 0);
-
-	gtk_box_pack_start (GTK_BOX (content_area),
-			    hbox,
-			    FALSE, FALSE, 0);
-
-	gtk_widget_show_all (hbox);
-
-	/* Add buttons */
-
-	button = create_button (GTK_STOCK_CANCEL, no_button_text);
-	gtk_dialog_add_action_widget (GTK_DIALOG (d),
-				      button,
-				      GTK_RESPONSE_CANCEL);
-
-	/**/
-
-	button = create_button (GTK_STOCK_OK, yes_button_text);
-	gtk_dialog_add_action_widget (GTK_DIALOG (d),
-				      button,
-				      GTK_RESPONSE_YES);
-
-	/**/
-
-	gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
-
-	return d;
-}
-
-
 GtkWidget *
 _gtk_error_dialog_new (GtkWindow      *parent,
 		       GtkDialogFlags  flags,
@@ -423,9 +307,9 @@ _gtk_error_dialog_new (GtkWindow      *parent,
 
 
 void
-_gtk_error_dialog_run (GtkWindow        *parent,
-		       const gchar      *main_message,
-		       const gchar      *format,
+_gtk_error_dialog_run (GtkWindow  *parent,
+		       const char *main_message,
+		       const char *format,
 		       ...)
 {
 	GtkWidget *d;
@@ -497,7 +381,8 @@ _gtk_label_set_locale_text (GtkLabel   *label,
 	if (utf8_text != NULL) {
 		gtk_label_set_text (label, utf8_text);
 		g_free (utf8_text);
-	} else
+	}
+	else
 		gtk_label_set_text (label, "");
 }
 
@@ -528,7 +413,8 @@ _gtk_entry_set_filename_text (GtkEntry   *entry,
 	if (utf8_text != NULL) {
 		gtk_entry_set_text (entry, utf8_text);
 		g_free (utf8_text);
-	} else
+	}
+	else
 		gtk_entry_set_text (entry, "");
 }
 
@@ -658,29 +544,15 @@ _g_mime_type_get_icon (const char   *mime_type,
 }
 
 
-gboolean
-show_uri (GdkScreen   *screen,
-	  const char  *uri,
-	  guint32      timestamp,
-	  GError     **error)
-{
-	gboolean result;
-
-	result = gtk_show_uri (screen, uri, timestamp, error);
-
-	return result;
-}
-
-
 void
-show_help_dialog (GtkWindow  *parent,
-		  const char *section)
+_gtk_show_help_dialog (GtkWindow  *parent,
+		       const char *section)
 {
 	char   *uri;
 	GError *error = NULL;
 
 	uri = g_strconcat ("help:file-roller", section ? "?" : NULL, section, NULL);
-	if (! show_uri (gtk_window_get_screen (parent), uri, GDK_CURRENT_TIME, &error)) {
+	if (! gtk_show_uri (gtk_window_get_screen (parent), uri, GDK_CURRENT_TIME, &error)) {
   		GtkWidget *dialog;
 
 		dialog = _gtk_message_dialog_new (parent,
diff --git a/src/gtk-utils.h b/src/gtk-utils.h
index 3d9d44d..c815689 100644
--- a/src/gtk-utils.h
+++ b/src/gtk-utils.h
@@ -42,11 +42,6 @@ gchar *       _gtk_request_dialog_run              (GtkWindow        *parent,
 						    int               max_length,
 						    const char       *no_button_text,
 						    const char       *yes_button_text);
-GtkWidget *   _gtk_yesno_dialog_new                (GtkWindow        *parent,
-						    GtkDialogFlags    flags,
-						    const char       *message,
-						    const char       *no_button_text,
-						    const char       *yes_button_text);
 GtkWidget *   _gtk_error_dialog_new                (GtkWindow        *parent,
 						    GtkDialogFlags    flags,
 						    GList            *row_output,
@@ -75,11 +70,7 @@ GdkPixbuf *   _g_icon_get_pixbuf                   (GIcon            *icon,
 GdkPixbuf *   _g_mime_type_get_icon                (const char       *mime_type,
 						    int               icon_size,
 						    GtkIconTheme     *icon_theme);
-gboolean      show_uri                             (GdkScreen        *screen,
-						    const char       *uri,
-						    guint32           timestamp,
-						    GError          **error);
-void          show_help_dialog                     (GtkWindow        *parent,
+void          _gtk_show_help_dialog                (GtkWindow        *parent,
 						    const char       *section);
 GtkBuilder *  _gtk_builder_new_from_file           (const char       *filename);
 GtkBuilder *  _gtk_builder_new_from_resource       (const char       *resource_path);
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index c393c1e..f68ab36 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -6,10 +6,12 @@ EXTRA_DIST = 			\
 	delete.ui		\
 	error-dialog.ui		\
 	menus-toolbars.ui	\
+	message-dialog.ui	\
 	new.ui			\
 	password.ui		\
 	progress-dialog.ui	\
 	properties.ui		\
+	request-dialog.ui	\
 	update.ui
 
 -include $(top_srcdir)/git.mk
diff --git a/src/ui/error-dialog.ui b/src/ui/error-dialog.ui
index c2c8774..ecf99e0 100644
--- a/src/ui/error-dialog.ui
+++ b/src/ui/error-dialog.ui
@@ -48,7 +48,6 @@
             <child>
               <object class="GtkImage" id="icon_image">
                 <property name="width_request">64</property>
-                <property name="height_request">64</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="yalign">0</property>
diff --git a/src/ui/message-dialog.ui b/src/ui/message-dialog.ui
new file mode 100644
index 0000000..ba5d208
--- /dev/null
+++ b/src/ui/message-dialog.ui
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="message_dialog">
+    <property name="width_request">500</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox4">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area4">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox28">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkImage" id="icon_image">
+                <property name="width_request">64</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="yalign">0</property>
+                <property name="stock">gtk-info</property>
+                <property name="pixel_size">48</property>
+                <property name="icon-size">6</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkLabel" id="message_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="use_underline">True</property>
+                    <property name="selectable">True</property>
+                    <property name="ellipsize">end</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/ui/progress-dialog.ui b/src/ui/progress-dialog.ui
index 08f8e4c..e9869f9 100644
--- a/src/ui/progress-dialog.ui
+++ b/src/ui/progress-dialog.ui
@@ -37,8 +37,6 @@
             <property name="spacing">12</property>
             <child>
               <object class="GtkImage" id="icon_image">
-                <property name="width_request">64</property>
-                <property name="height_request">64</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="yalign">0</property>
diff --git a/src/ui/request-dialog.ui b/src/ui/request-dialog.ui
new file mode 100644
index 0000000..ce42340
--- /dev/null
+++ b/src/ui/request-dialog.ui
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="request_dialog">
+    <property name="width_request">500</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox3">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area3">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox28">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="border_width">5</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkImage" id="icon_image">
+                <property name="width_request">64</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="yalign">0</property>
+                <property name="stock">gtk-dialog-question</property>
+                <property name="pixel_size">48</property>
+                <property name="icon-size">6</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">4</property>
+                <child>
+                  <object class="GtkLabel" id="message_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">value_entry</property>
+                    <property name="ellipsize">end</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="value_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">â</property>
+                    <property name="activates_default">True</property>
+                    <property name="width_chars">50</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>



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