[Xfce4-commits] <xfce4-radio-plugin:master> Made the tooltip slighly less pointless

Stefan Ott noreply at xfce.org
Thu May 19 23:06:03 CEST 2011


Updating branch refs/heads/master
         to bf0871cf7ee3ab9e65588e588acf4c82556270ae (commit)
       from 5a2c8b8c285d2a395f4bea790f7bba0cdef636e1 (commit)

commit bf0871cf7ee3ab9e65588e588acf4c82556270ae
Author: Stefan Ott <stefan at ott.net>
Date:   Thu May 19 23:02:59 2011 +0200

    Made the tooltip slighly less pointless

 panel-plugin/xfce4-radio.c |   17 +++++-----
 po/xfce4-radio-plugin.pot  |   72 +++++++++++++++++++++++++------------------
 2 files changed, 51 insertions(+), 38 deletions(-)

diff --git a/panel-plugin/xfce4-radio.c b/panel-plugin/xfce4-radio.c
index 2ef04a3..91059b0 100644
--- a/panel-plugin/xfce4-radio.c
+++ b/panel-plugin/xfce4-radio.c
@@ -178,6 +178,7 @@ update_tooltip(radio_gui* data)
 	GtkWidget* ebox = data->ebox;
 	GtkTreeIter iter;
 	gchar *name;
+	gchar *tooltip;
 
 	DBG("Updating tooltip");
 
@@ -185,15 +186,18 @@ update_tooltip(radio_gui* data)
 	if (find_preset_by_freq(presets, data->freq, &iter))
 	{
 		gtk_tree_model_get(presets, &iter, 0, &name, -1);
+		tooltip = g_strdup_printf(_("Tuned to station %s"), name);
 	}
 	else
 	{
-		name = g_strdup_printf("%5.1f", (float) data->freq / 100);
+		name = g_strdup_printf("%.1f", (float) data->freq / 100);
+		tooltip = g_strdup_printf(_("Tuned to %s MHz"), name);
 	}
 
-	gtk_tooltips_set_tip(data->tooltips, ebox, name, NULL);
+	gtk_tooltips_set_tip(data->tooltips, ebox, tooltip, NULL);
 
 	g_free(name);
+	g_free(tooltip);
 }
 
 static void
@@ -228,22 +232,19 @@ update_label_radio_on(radio_gui *data)
 static void
 update_label_radio_off(radio_gui *data)
 {
-	gchar *label;
-	label = g_strdup(_("- off -"));
 	if (data->show_label_when_off)
 	{
 		gtk_widget_hide(data->signal_image);
 		gtk_widget_show(data->label);
+		gtk_label_set_label(GTK_LABEL(data->label), _("- off -"));
 	}
 	else
 	{
 		gtk_widget_hide(data->label);
 		update_signal_image(data, 0);
 	}
-	gtk_label_set_label(GTK_LABEL(data->label), label);
-	gtk_tooltips_set_tip(data->tooltips, data->ebox, label, NULL);
-
-	g_free(label);
+	gtk_tooltips_set_tip(data->tooltips, data->ebox, _("Radio is off"),
+									NULL);
 }
 
 static void
diff --git a/po/xfce4-radio-plugin.pot b/po/xfce4-radio-plugin.pot
index 41b9e20..b549fce 100644
--- a/po/xfce4-radio-plugin.pot
+++ b/po/xfce4-radio-plugin.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-05-19 05:44+0200\n"
+"POT-Creation-Date: 2011-05-19 23:02+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -25,124 +25,136 @@ msgstr ""
 msgid "V4l radio plugin"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:230
+#: ../panel-plugin/xfce4-radio.c:189
+msgid "Tuned to station %s"
+msgstr ""
+
+#: ../panel-plugin/xfce4-radio.c:194
+msgid "Tuned to %s MHz"
+msgstr ""
+
+#: ../panel-plugin/xfce4-radio.c:239
 msgid "- off -"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:316
+#: ../panel-plugin/xfce4-radio.c:246
+msgid "Radio is off"
+msgstr ""
+
+#: ../panel-plugin/xfce4-radio.c:319
 msgid "Error opening radio device"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:407
+#: ../panel-plugin/xfce4-radio.c:410
 msgid "Tune radio"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:413
+#: ../panel-plugin/xfce4-radio.c:416
 msgid "Frequency [MHz]:"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:437
+#: ../panel-plugin/xfce4-radio.c:440
 msgid "Illegal frequency."
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:495 ../panel-plugin/xfce4-radio.c:1134
+#: ../panel-plugin/xfce4-radio.c:498 ../panel-plugin/xfce4-radio.c:1137
 msgid "Presets"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:527
+#: ../panel-plugin/xfce4-radio.c:530
 msgid "Tune to frequency"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:870
+#: ../panel-plugin/xfce4-radio.c:873
 msgid "unnamed"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1038
+#: ../panel-plugin/xfce4-radio.c:1041
 msgid "Properties"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1133
+#: ../panel-plugin/xfce4-radio.c:1136
 msgid "Options"
 msgstr ""
 
 #. Device
-#: ../panel-plugin/xfce4-radio.c:1152
+#: ../panel-plugin/xfce4-radio.c:1155
 msgid "Device"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1168
+#: ../panel-plugin/xfce4-radio.c:1171
 msgid "V4L device"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1185
+#: ../panel-plugin/xfce4-radio.c:1188
 msgid "Synchronize state with the card"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1187
+#: ../panel-plugin/xfce4-radio.c:1190
 msgid "yes"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1205
+#: ../panel-plugin/xfce4-radio.c:1208
 msgid "no"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1222
+#: ../panel-plugin/xfce4-radio.c:1225
 msgid "Mouse scrolling changes"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1233
+#: ../panel-plugin/xfce4-radio.c:1236
 msgid "frequency"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1238
+#: ../panel-plugin/xfce4-radio.c:1241
 msgid "preset"
 msgstr ""
 
 #. When off
-#: ../panel-plugin/xfce4-radio.c:1258
+#: ../panel-plugin/xfce4-radio.c:1261
 msgid "When radio is off"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1273 ../panel-plugin/xfce4-radio.c:1339
+#: ../panel-plugin/xfce4-radio.c:1276 ../panel-plugin/xfce4-radio.c:1342
 msgid "Show the label"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1279
+#: ../panel-plugin/xfce4-radio.c:1282
 msgid "Show graphics"
 msgstr ""
 
 #. When on
-#: ../panel-plugin/xfce4-radio.c:1294
+#: ../panel-plugin/xfce4-radio.c:1297
 msgid "When radio is running"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1313
+#: ../panel-plugin/xfce4-radio.c:1316
 msgid "Show signal strength"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1324
+#: ../panel-plugin/xfce4-radio.c:1327
 msgid "as a bar"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1328
+#: ../panel-plugin/xfce4-radio.c:1331
 msgid "graphically"
 msgstr ""
 
-#: ../panel-plugin/xfce4-radio.c:1345
+#: ../panel-plugin/xfce4-radio.c:1348
 msgid "Show preset names in label"
 msgstr ""
 
 #. Commands
-#: ../panel-plugin/xfce4-radio.c:1363
+#: ../panel-plugin/xfce4-radio.c:1366
 msgid "Commands"
 msgstr ""
 
 #. Post-startup command
-#: ../panel-plugin/xfce4-radio.c:1380
+#: ../panel-plugin/xfce4-radio.c:1383
 msgid "Run after startup"
 msgstr ""
 
 #. Post-shutdown command
-#: ../panel-plugin/xfce4-radio.c:1398
+#: ../panel-plugin/xfce4-radio.c:1401
 msgid "Run after shutdown"
 msgstr ""



More information about the Xfce4-commits mailing list