[gedit] Show new version number in update message
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Show new version number in update message
- Date: Sun, 8 Nov 2009 20:12:24 +0000 (UTC)
commit a72bbae65c8a2605c7336e3647e363350464a992
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sun Nov 8 21:11:54 2009 +0100
Show new version number in update message
plugins/checkupdate/gedit-check-update-plugin.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/plugins/checkupdate/gedit-check-update-plugin.c b/plugins/checkupdate/gedit-check-update-plugin.c
index 87a7042..e8669bb 100644
--- a/plugins/checkupdate/gedit-check-update-plugin.c
+++ b/plugins/checkupdate/gedit-check-update-plugin.c
@@ -218,9 +218,11 @@ on_response_cb (GtkWidget *infobar,
}
static GtkWidget *
-create_infobar (GeditWindow *window)
+create_infobar (GeditWindow *window,
+ const gchar *version)
{
GtkWidget *infobar;
+ gchar *message;
#if !GTK_CHECK_VERSION (2, 17, 1)
infobar = gedit_message_area_new ();
@@ -252,12 +254,15 @@ create_infobar (GeditWindow *window)
GTK_MESSAGE_INFO);
#endif
+ message = g_strdup_printf ("%s (%s)", _("There is a new version of gedit"), version);
set_message_area_text_and_icon (infobar,
"gtk-dialog-info",
- _("There is a new version of gedit"),
+ message,
_("You can download the new version of gedit"
" by pressing on the download button"));
+ g_free (message);
+
g_signal_connect (infobar, "response",
G_CALLBACK (on_response_cb),
window);
@@ -409,7 +414,7 @@ parse_page_file (SoupSession *session,
file_url,
g_free);
- infobar = create_infobar (window);
+ infobar = create_infobar (window, file_version);
pack_infobar (GTK_WIDGET (window), infobar);
gtk_widget_show (infobar);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]