diff options
author | Jiro Matsuzawa <jmatsuzawa@gnome.org> | 2013-01-07 23:25:59 +0900 |
---|---|---|
committer | Jiro Matsuzawa <jmatsuzawa@gnome.org> | 2013-01-07 23:25:59 +0900 |
commit | 219788bf9a90b65fe149c168a8f5e411510706a0 (patch) | |
tree | 0fe798aacf764feac6831f6281e617b7b20eaf8a | |
parent | f4ca332679e7413e569e310c2026c2cdfb970911 (diff) | |
download | gupnp-tools-219788bf9a90b65fe149c168a8f5e411510706a0.tar.gz |
network-light: mark messages as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=690635
-rw-r--r-- | data/gupnp-network-light.ui | 20 | ||||
-rw-r--r-- | src/network-light/gui.c | 18 |
2 files changed, 15 insertions, 23 deletions
diff --git a/data/gupnp-network-light.ui b/data/gupnp-network-light.ui index b1ca72d..b8067a9 100644 --- a/data/gupnp-network-light.ui +++ b/data/gupnp-network-light.ui @@ -49,8 +49,18 @@ Inspired by Intel Tools for UPnP.</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="use_action_appearance">False</property> - <property name="label" translatable="yes">On</property> - <property name="use_underline">True</property> + <child> + <object class="GtkLabel" id="light-status-menuitem-label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes" context="network-light">_On</property> + <property name="use_underline">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> <signal name="activate" handler="on_light_status_menuitem_activate" swapped="no"/> </object> </child> @@ -65,7 +75,7 @@ Inspired by Intel Tools for UPnP.</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="use_action_appearance">False</property> - <property name="label" translatable="yes">increase luminance by 20%</property> + <property name="label" translatable="yes">_Increase luminance by 20%</property> <property name="use_underline">True</property> <signal name="activate" handler="on_increase_luminance_menuitem_activate" swapped="no"/> </object> @@ -75,7 +85,7 @@ Inspired by Intel Tools for UPnP.</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="use_action_appearance">False</property> - <property name="label" translatable="yes">decrease luminance by 20%</property> + <property name="label" translatable="yes">_Decrease luminance by 20%</property> <property name="use_underline">True</property> <signal name="activate" handler="on_decrease_luminance_menuitem_activate" swapped="no"/> </object> @@ -91,7 +101,7 @@ Inspired by Intel Tools for UPnP.</property> <property name="visible">True</property> <property name="can_focus">False</property> <property name="use_action_appearance">False</property> - <property name="label" translatable="yes">about</property> + <property name="label" translatable="yes">_About</property> <property name="use_underline">True</property> <signal name="activate" handler="on_about_menuitem_activate" swapped="no"/> </object> diff --git a/src/network-light/gui.c b/src/network-light/gui.c index 898200d..edc87f9 100644 --- a/src/network-light/gui.c +++ b/src/network-light/gui.c @@ -108,23 +108,6 @@ on_decrease_luminance_menuitem_activate (GtkMenuItem *menuitem, } static void -setup_popup () -{ - GtkWidget *status_menuitem; - GtkWidget *label; - - status_menuitem = GTK_WIDGET (gtk_builder_get_object ( - builder, - "light-status-menuitem")); - g_assert (status_menuitem != NULL); - - label = gtk_bin_get_child (GTK_BIN (status_menuitem)); - g_assert (label != NULL); - - gtk_label_set_markup (GTK_LABEL (label), "<b>On</b>"); -} - -static void prepare_popup () { GtkWidget *status_menuitem; @@ -246,7 +229,6 @@ init_ui (gint *argc, gtk_builder_connect_signals (builder, NULL); - setup_popup (); update_image (); gtk_widget_show_all (main_window); |