Updating branch refs/heads/master
         to 3e96e86ad21cdd19fd83c4d38626b702d4aeab02 (commit)
       from 0b1eef0c2e8caacdb3bbb24a6987fc10f3eb0598 (commit)

commit 3e96e86ad21cdd19fd83c4d38626b702d4aeab02
Author: Stefan Ott <[email protected]>
Date:   Thu May 19 05:42:27 2011 +0200

    The graphical signal-strength indicator can now be enabled at compile-time

 configure.in.in            |    8 ++++++++
 panel-plugin/xfce4-radio.c |   29 ++++++++++++++---------------
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 1c1eb61..a1466d2 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -39,6 +39,14 @@ XDT_I18N([@LINGUAS@])
 dnl Check for debugging support
 XDT_FEATURE_DEBUG()
 
+dnl Enable (currently broken) icon
+AC_ARG_ENABLE(antenna-icon,
+[  --enable-antenna-icon   Enable the signal-strength icon (experimental)],
+[
+       AC_DEFINE([ENABLE_ANTENNA_ICON],[1],
+               [Use the experimental signal-strength icon])
+])
+
 AC_OUTPUT([
 Makefile
 panel-plugin/Makefile
diff --git a/panel-plugin/xfce4-radio.c b/panel-plugin/xfce4-radio.c
index aad6f6e..b974f3c 100644
--- a/panel-plugin/xfce4-radio.c
+++ b/panel-plugin/xfce4-radio.c
@@ -777,7 +777,7 @@ radio_show_label_changed(GtkEditable* editable, void 
*pointer)
        update_label(data);
 }
 
-/*
+#ifdef ENABLE_ANTENNA_ICON
 static void
 radio_show_label_when_off_changed(GtkEditable* editable, void *pointer)
 {
@@ -786,7 +786,7 @@ radio_show_label_when_off_changed(GtkEditable* editable, 
void *pointer)
                (GTK_TOGGLE_BUTTON(editable));
        update_label(data);
 }
-*/
+#endif
 
 static void
 radio_resolve_presets_changed(GtkEditable* editable, void *pointer)
@@ -797,7 +797,7 @@ radio_resolve_presets_changed(GtkEditable* editable, void 
*pointer)
        update_label(data);
 }
 
-/*
+#ifdef ENABLE_ANTENNA_ICON
 static void
 radio_signal_type_changed(GtkEditable* editable, void *pointer)
 {
@@ -808,7 +808,7 @@ radio_signal_type_changed(GtkEditable* editable, void 
*pointer)
 
        DBG("show_signal_graphical = %d", data->show_signal_graphical);
 }
-*/
+#endif
 
 static void
 radio_auto_update_display_changed(GtkEditable* editable, void *pointer)
@@ -1005,14 +1005,14 @@ 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
-       */
+#endif
        GSList *auto_update_display_group = NULL;// auto update display:
        GtkWidget *auto_update_display_yes;     //  - show
        GtkWidget *auto_update_display_no;      //  - hide
@@ -1253,7 +1253,7 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, 
radio_gui *data)
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(preset_button),
                data->scroll == CHANGE_PRESET);
 
-       /*
+#ifdef ENABLE_ANTENNA_ICON
        // When off
        real_frame = gtk_frame_new(_("When radio is off"));
        frame = gtk_alignment_new(0, 0, 0.5, 0.5);
@@ -1288,7 +1288,7 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, 
radio_gui *data)
 
        gtk_container_add(GTK_CONTAINER(when_off), label_when_off);
        gtk_container_add(GTK_CONTAINER(when_off), graphics_when_off);
-       */
+#endif
 
        // When on
        real_frame = gtk_frame_new(_("When radio is running"));
@@ -1314,7 +1314,7 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, 
radio_gui *data)
        gtk_widget_show(show_signal);
        gtk_container_add(GTK_CONTAINER(strength), show_signal);
 
-       /*
+#ifdef ENABLE_ANTENNA_ICON
        // Show the signal strength as
        hbox = gtk_hbox_new(FALSE, 0);
        gtk_widget_show(hbox);
@@ -1332,7 +1332,7 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, 
radio_gui *data)
 
        gtk_container_add(GTK_CONTAINER(strength), signal_type_bar);
        gtk_container_add(GTK_CONTAINER(strength), signal_type_xpm);
-       */
+#endif
 
        // Show the label
        show_label = gtk_check_button_new_with_label
@@ -1348,13 +1348,12 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, 
radio_gui *data)
 
        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);
-
-       */
+#endif
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
                (show_label), data->show_label);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
@@ -1423,12 +1422,12 @@ radio_plugin_create_options(XfcePanelPlugin *plugin, 
radio_gui *data)
                        G_CALLBACK(radio_show_signal_changed), 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(label_when_off), "toggled",
                        G_CALLBACK(radio_show_label_when_off_changed), data);
        g_signal_connect(G_OBJECT(signal_type_bar), "toggled",
                        G_CALLBACK(radio_signal_type_changed), data);
-       */
+#endif
        g_signal_connect(G_OBJECT(resolve_presets), "toggled",
                        G_CALLBACK(radio_resolve_presets_changed), data);
        g_signal_connect(G_OBJECT(auto_update_display_yes), "toggled",
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to