[Xfce4-commits] <midori:master> Reword userstyle/ script install message in infobar
Christian Dywan
noreply at xfce.org
Tue Nov 9 23:22:02 CET 2010
Updating branch refs/heads/master
to 2feb127e4b9d56cf64bff720d8a6141873c0cc21 (commit)
from d4644a67f1468dbb80f7a862e044299ddf614280 (commit)
commit 2feb127e4b9d56cf64bff720d8a6141873c0cc21
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Mon Nov 8 02:26:53 2010 +0100
Reword userstyle/ script install message in infobar
extensions/addons.c | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/extensions/addons.c b/extensions/addons.c
index fe0541f..5284653 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -214,19 +214,29 @@ addons_uri_install (MidoriBrowser* browser,
AddonsKind kind)
{
const gchar* kind_name;
- gchar* message, *button_text;
+ const gchar* message;
+ const gchar* button_text;
+
+ kind_name = kind == ADDONS_USER_SCRIPTS ? "user script" : "user style";
+ if (kind == ADDONS_USER_SCRIPTS)
+ {
+ /* i18n: An infobar shows up when viewing a script on userscripts.org */
+ message = _("This page appears to contain a user script. Do you wish to install it?");
+ button_text = _("_Install user script");
+ }
+ else if (kind == ADDONS_USER_STYLES)
+ {
+ /* i18n: An infobar shows up when viewing a style on userstyles.org */
+ message = _("This page appears to contain a user style. Do you wish to install it?");
+ button_text = _("_Install user style");
+ }
+ else
+ g_assert_not_reached ();
- kind_name = ADDONS_USER_SCRIPTS ? "user script" : "user style";
- message = g_strdup_printf (_("Currently viewed page appears to contain %s. Do you wish to install it?"),
- kind_name);
- button_text = g_strdup_printf (_("_Install %s"), kind_name);
midori_view_add_info_bar (view, GTK_MESSAGE_QUESTION, message,
G_CALLBACK (addons_install_response), view,
button_text, GTK_RESPONSE_ACCEPT,
- _("_Don't Install"), GTK_RESPONSE_CANCEL, NULL);
-
- g_free (message);
- g_free (button_text);
+ _("Don't install"), GTK_RESPONSE_CANCEL, NULL);
}
static void
More information about the Xfce4-commits
mailing list