[Xfce4-commits] <xfce4-radio-plugin:master> Did some cleanup in the plugin's prefs dialog
Stefan Ott
noreply at xfce.org
Fri May 20 05:46:06 CEST 2011
Updating branch refs/heads/master
to e737c2421fa482c0d1fd823753431594b24c7a2d (commit)
from f4e04a26ed2fdb9bbaf0a47528d926c4ab274d65 (commit)
commit e737c2421fa482c0d1fd823753431594b24c7a2d
Author: Stefan Ott <stefan at ott.net>
Date: Fri May 20 05:33:12 2011 +0200
Did some cleanup in the plugin's prefs dialog
panel-plugin/xfce4-radio.c | 61 +++++++++++++-------------------------------
po/xfce4-radio-plugin.pot | 52 +++++++++++++++++--------------------
2 files changed, 42 insertions(+), 71 deletions(-)
diff --git a/panel-plugin/xfce4-radio.c b/panel-plugin/xfce4-radio.c
index c7dd16b..453c116 100644
--- a/panel-plugin/xfce4-radio.c
+++ b/panel-plugin/xfce4-radio.c
@@ -800,12 +800,9 @@ static void
radio_signal_type_changed(GtkEditable* editable, void *pointer)
{
radio_gui* data = (radio_gui*) pointer;
- data->show_signal_graphical = !gtk_toggle_button_get_active
+ data->show_signal_graphical = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(editable));
-
- update_signal(data);
-
- DBG("show_signal_graphical = %d", data->show_signal_graphical);
+ update_label(data);
}
#endif
@@ -1005,12 +1002,7 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, radio_gui *data)
GtkWidget *show_signal; // show the signal when on
GtkWidget *show_label; // show the label when on
#ifdef ENABLE_ANTENNA_ICON
- GSList *signal_type_group = NULL; // show signal strength as:
- GtkWidget *signal_type_bar; // - progress bar
- GtkWidget *signal_type_xpm; // - graphical
- GSList *show_when_off = NULL; // what to show when off:
- GtkWidget *label_when_off; // - label
- GtkWidget *graphics_when_off; // - graphics
+ GtkWidget *graphical_signal_strength;
#endif
GSList *auto_update_display_group = NULL;// auto update display:
GtkWidget *auto_update_display_yes; // - show
@@ -1252,69 +1244,52 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, radio_gui *data)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(preset_button),
data->scroll == CHANGE_PRESET);
- // When on
- real_frame = gtk_frame_new(_("When radio is running"));
+ // UI options
+ real_frame = gtk_frame_new(_("User interface"));
frame = gtk_alignment_new(0, 0, 0.5, 0.5);
- GtkWidget *when_on = gtk_vbox_new(FALSE, 0);
- GtkWidget *strength = gtk_hbox_new(FALSE, 0);
+ GtkWidget *ui_options = gtk_vbox_new(FALSE, 0);
gtk_widget_show(frame);
- gtk_widget_show(when_on);
- gtk_widget_show(strength);
+ gtk_widget_show(ui_options);
gtk_widget_show(real_frame);
gtk_alignment_set_padding(GTK_ALIGNMENT(frame), 0, 2, 2, 2);
gtk_box_pack_start(GTK_BOX(properties), real_frame, FALSE, FALSE, 9);
gtk_container_add(GTK_CONTAINER(real_frame), frame);
- gtk_container_add(GTK_CONTAINER(frame), when_on);
- gtk_container_add(GTK_CONTAINER(when_on), strength);
+ gtk_container_add(GTK_CONTAINER(frame), ui_options);
// Show the signal strength
show_signal = gtk_check_button_new_with_label
(_("Show signal strength"));
gtk_widget_show(show_signal);
- gtk_container_add(GTK_CONTAINER(strength), show_signal);
+ gtk_container_add(GTK_CONTAINER(ui_options), show_signal);
#ifdef ENABLE_ANTENNA_ICON
- // Show the signal strength as
- hbox = gtk_hbox_new(FALSE, 0);
- gtk_widget_show(hbox);
- gtk_container_add(GTK_CONTAINER(strength), hbox);
-
- signal_type_bar = gtk_radio_button_new_with_label
- (signal_type_group, _("as a bar"));
- signal_type_group = gtk_radio_button_get_group
- (GTK_RADIO_BUTTON(signal_type_bar));
- signal_type_xpm = gtk_radio_button_new_with_label
- (signal_type_group, _("graphically"));
-
- gtk_widget_show(signal_type_bar);
- gtk_widget_show(signal_type_xpm);
-
- gtk_container_add(GTK_CONTAINER(strength), signal_type_bar);
- gtk_container_add(GTK_CONTAINER(strength), signal_type_xpm);
+ // Use graphics
+ graphical_signal_strength = gtk_check_button_new_with_label
+ (_("Use graphics instead of text labels and progress bars"));
+ gtk_widget_show(graphical_signal_strength);
+ gtk_container_add(GTK_CONTAINER(ui_options), graphical_signal_strength);
#endif
// Show the label
show_label = gtk_check_button_new_with_label
(_("Show the label"));
gtk_widget_show(show_label);
- gtk_container_add(GTK_CONTAINER(when_on), show_label);
+ gtk_container_add(GTK_CONTAINER(ui_options), show_label);
// Resolve presets
GtkWidget *resolve_presets = gtk_check_button_new_with_label
(_("Show preset names in label"));
gtk_widget_show(resolve_presets);
- gtk_container_add(GTK_CONTAINER(when_on), resolve_presets);
+ gtk_container_add(GTK_CONTAINER(ui_options), resolve_presets);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
(show_signal), data->show_signal);
#ifdef ENABLE_ANTENNA_ICON
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (signal_type_bar), !data->show_signal_graphical);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (signal_type_xpm), data->show_signal_graphical);
+ (graphical_signal_strength), data->show_signal_graphical);
#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
(show_label), data->show_label);
@@ -1385,7 +1360,7 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, radio_gui *data)
g_signal_connect(G_OBJECT(show_label), "toggled",
G_CALLBACK(radio_show_label_changed), data);
#ifdef ENABLE_ANTENNA_ICON
- g_signal_connect(G_OBJECT(signal_type_bar), "toggled",
+ g_signal_connect(G_OBJECT(graphical_signal_strength), "toggled",
G_CALLBACK(radio_signal_type_changed), data);
#endif
g_signal_connect(G_OBJECT(resolve_presets), "toggled",
diff --git a/po/xfce4-radio-plugin.pot b/po/xfce4-radio-plugin.pot
index 600d44d..cc639a8 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-20 03:35+0200\n"
+"POT-Creation-Date: 2011-05-20 05:32+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"
@@ -59,7 +59,7 @@ msgstr ""
msgid "Illegal frequency."
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:500 ../panel-plugin/xfce4-radio.c:1133
+#: ../panel-plugin/xfce4-radio.c:500 ../panel-plugin/xfce4-radio.c:1125
msgid "Presets"
msgstr ""
@@ -67,87 +67,83 @@ msgstr ""
msgid "Tune to frequency"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:869
+#: ../panel-plugin/xfce4-radio.c:866
msgid "unnamed"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1037
+#: ../panel-plugin/xfce4-radio.c:1029
msgid "Properties"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1132
+#: ../panel-plugin/xfce4-radio.c:1124
msgid "Options"
msgstr ""
#. Device
-#: ../panel-plugin/xfce4-radio.c:1151
+#: ../panel-plugin/xfce4-radio.c:1143
msgid "Device"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1167
+#: ../panel-plugin/xfce4-radio.c:1159
msgid "V4L device"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1184
+#: ../panel-plugin/xfce4-radio.c:1176
msgid "Synchronize state with the card"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1186
+#: ../panel-plugin/xfce4-radio.c:1178
msgid "yes"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1204
+#: ../panel-plugin/xfce4-radio.c:1196
msgid "no"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1221
+#: ../panel-plugin/xfce4-radio.c:1213
msgid "Mouse scrolling changes"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1232
+#: ../panel-plugin/xfce4-radio.c:1224
msgid "frequency"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1237
+#: ../panel-plugin/xfce4-radio.c:1229
msgid "preset"
msgstr ""
-#. When on
-#: ../panel-plugin/xfce4-radio.c:1256
-msgid "When radio is running"
+#. UI options
+#: ../panel-plugin/xfce4-radio.c:1248
+msgid "User interface"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1275
+#: ../panel-plugin/xfce4-radio.c:1264
msgid "Show signal strength"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1286
-msgid "as a bar"
+#: ../panel-plugin/xfce4-radio.c:1271
+msgid "Use graphics instead of text labels and progress bars"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1290
-msgid "graphically"
-msgstr ""
-
-#: ../panel-plugin/xfce4-radio.c:1301
+#: ../panel-plugin/xfce4-radio.c:1278
msgid "Show the label"
msgstr ""
-#: ../panel-plugin/xfce4-radio.c:1307
+#: ../panel-plugin/xfce4-radio.c:1284
msgid "Show preset names in label"
msgstr ""
#. Commands
-#: ../panel-plugin/xfce4-radio.c:1325
+#: ../panel-plugin/xfce4-radio.c:1300
msgid "Commands"
msgstr ""
#. Post-startup command
-#: ../panel-plugin/xfce4-radio.c:1342
+#: ../panel-plugin/xfce4-radio.c:1317
msgid "Run after startup"
msgstr ""
#. Post-shutdown command
-#: ../panel-plugin/xfce4-radio.c:1360
+#: ../panel-plugin/xfce4-radio.c:1335
msgid "Run after shutdown"
msgstr ""
More information about the Xfce4-commits
mailing list