[gedit] Use a more explicit control for the reload info bar
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Use a more explicit control for the reload info bar
- Date: Mon, 15 Jul 2013 16:09:18 +0000 (UTC)
commit cc3fffd140a40761549044b13bb22d8a2c161244
Author: William Jon McCann <william jon mccann gmail com>
Date: Mon Jul 15 10:32:58 2013 -0400
Use a more explicit control for the reload info bar
gedit/gedit-io-error-info-bar.c | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index 681f1a0..2e7583c 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -1122,7 +1122,6 @@ gedit_externally_modified_info_bar_new (GFile *location,
gchar *uri_for_display;
gchar *temp_uri_for_display;
gchar *primary_text;
- const gchar *secondary_text;
GtkWidget *info_bar;
g_return_val_if_fail (G_IS_FILE (location), NULL);
@@ -1148,17 +1147,28 @@ gedit_externally_modified_info_bar_new (GFile *location,
uri_for_display);
g_free (uri_for_display);
+ info_bar = gtk_info_bar_new ();
+
if (document_modified)
- secondary_text = _("Do you want to drop your changes and reload the file?");
+ {
+ GtkWidget *box;
+ GtkWidget *button;
+ button = gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
+ _("Drop Changes and _Reload"),
+ GTK_RESPONSE_OK);
+ box = gtk_info_bar_get_action_area (GTK_INFO_BAR (info_bar));
+ gtk_button_box_set_child_non_homogeneous (GTK_BUTTON_BOX (box),
+ button,
+ TRUE);
+ }
else
- secondary_text = _("Do you want to reload the file?");
-
- info_bar = gtk_info_bar_new ();
+ {
+ gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
+ _("_Reload"),
+ GTK_RESPONSE_OK);
+ }
gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
- _("_Reload"),
- GTK_RESPONSE_OK);
- gtk_info_bar_add_button (GTK_INFO_BAR (info_bar),
_("_Cancel"),
GTK_RESPONSE_CANCEL);
gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
@@ -1166,7 +1176,7 @@ gedit_externally_modified_info_bar_new (GFile *location,
set_info_bar_text (info_bar,
primary_text,
- secondary_text);
+ NULL);
g_free (primary_text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]