aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-03 15:22:30 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-05-05 15:13:30 +0800
commit49af530a5bfa17173e28a7b706c5e68117c2cd21 (patch)
tree330d6cf985c90d375951fbce95b107be63f81dff /src/empathy-main-window.c
parentceeeac4a2c95f89e4ed4042e9e0795786c94fb82 (diff)
downloadgsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.tar
gsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.tar.gz
gsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.tar.bz2
gsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.tar.lz
gsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.tar.xz
gsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.tar.zst
gsoc2013-empathy-49af530a5bfa17173e28a7b706c5e68117c2cd21.zip
Change menu string to "Top up My Account ($1.23)..."
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index e888808ab..4dc357fa7 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -823,7 +823,7 @@ main_window_balance_update_balance (GtkAction *action,
int amount = 0;
guint scale = G_MAXINT32;
const char *currency = "";
- char *str;
+ char *money, *str;
if (balance != NULL)
tp_value_array_unpack (balance, 3,
@@ -835,19 +835,25 @@ main_window_balance_update_balance (GtkAction *action,
scale == G_MAXINT32 &&
tp_str_empty (currency)) {
/* unknown balance */
- str = g_strdup_printf ("%s (--)",
- tp_account_get_display_name (account));
+ money = g_strdup ("--");
} else {
- char *money = empathy_format_currency (amount, scale, currency);
+ char *tmp = empathy_format_currency (amount, scale, currency);
- str = g_strdup_printf ("%s (%s %s)",
- tp_account_get_display_name (account),
- currency, money);
- g_free (money);
+ money = g_strdup_printf ("%s %s", currency, tmp);
+ g_free (tmp);
}
+ /* Translators: this string will be something like:
+ * Top up My Account ($1.23)..." */
+ str = g_strdup_printf (_("Top up %s (%s)..."),
+ tp_account_get_display_name (account),
+ money);
+
gtk_action_set_label (action, str);
g_free (str);
+
+ /* pass ownership of @money to object data */
+ g_object_set_data_full (G_OBJECT (action), "money", money, g_free);
}
static void