Updating branch refs/heads/master to bb6ffb59ab5f1549920652a02066b6ab034a11c4 (commit) from a2fbdb641398181241688f6181236987a8a508bd (commit)
commit bb6ffb59ab5f1549920652a02066b6ab034a11c4 Author: Harald Judt <h.j...@gmx.at> Date: Sun Aug 11 00:41:43 2013 +0200 Get rid of the frame. Drop the frame code. I found the frame useless and ugly. The user can add separators or spaces to keep the plugin distinct from other objects on the panel, so there is no need for it. panel-plugin/xfce4-cpufreq-configure.c | 13 +------------ panel-plugin/xfce4-cpufreq-configure.h | 1 - panel-plugin/xfce4-cpufreq-plugin.c | 10 +--------- panel-plugin/xfce4-cpufreq-plugin.h | 3 +-- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/panel-plugin/xfce4-cpufreq-configure.c b/panel-plugin/xfce4-cpufreq-configure.c index 7d68d85..67cbe25 100644 --- a/panel-plugin/xfce4-cpufreq-configure.c +++ b/panel-plugin/xfce4-cpufreq-configure.c @@ -35,13 +35,7 @@ static void check_button_changed (GtkWidget *button, CpuFreqPluginConfigure *configure) { - if (button == configure->display_frame) - { - cpuFreq->options->show_frame = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); - gtk_frame_set_shadow_type (GTK_FRAME (cpuFreq->frame),cpuFreq->options->show_frame ? GTK_SHADOW_IN : GTK_SHADOW_NONE); - return; - } - else if (button == configure->display_icon) + if (button == configure->display_icon) { cpuFreq->options->show_icon = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); @@ -202,11 +196,6 @@ cpufreq_configure (XfcePanelPlugin *plugin) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), cpuFreq->options->keep_compact); g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (check_button_changed), configure); - button = configure->display_frame = gtk_check_button_new_with_mnemonic (_("Show frame")); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), cpuFreq->options->show_frame); - g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (check_button_changed), configure); - button = configure->display_icon = gtk_check_button_new_with_mnemonic (_("Show CPU icon")); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), cpuFreq->options->show_icon); diff --git a/panel-plugin/xfce4-cpufreq-configure.h b/panel-plugin/xfce4-cpufreq-configure.h index 417f2eb..c086be4 100644 --- a/panel-plugin/xfce4-cpufreq-configure.h +++ b/panel-plugin/xfce4-cpufreq-configure.h @@ -27,7 +27,6 @@ typedef struct GtkWidget *display_freq; GtkWidget *display_governor; GtkWidget *display_cpu; - GtkWidget *display_frame; GtkWidget *monitor_timeout; GtkWidget *combo_cpu; GtkWidget *spinner_timeout; diff --git a/panel-plugin/xfce4-cpufreq-plugin.c b/panel-plugin/xfce4-cpufreq-plugin.c index 4c4f293..97b4ee1 100644 --- a/panel-plugin/xfce4-cpufreq-plugin.c +++ b/panel-plugin/xfce4-cpufreq-plugin.c @@ -266,18 +266,12 @@ cpufreq_widgets (void) cpuFreq->ebox = gtk_event_box_new (); gtk_event_box_set_visible_window (GTK_EVENT_BOX (cpuFreq->ebox), FALSE); - xfce_panel_plugin_add_action_widget (cpuFreq->plugin, cpuFreq->ebox); gtk_container_add (GTK_CONTAINER (cpuFreq->plugin), cpuFreq->ebox); - cpuFreq->frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (cpuFreq->frame),cpuFreq->options->show_frame ? GTK_SHADOW_IN : GTK_SHADOW_NONE); - gtk_container_add (GTK_CONTAINER (cpuFreq->ebox), cpuFreq->frame); - gtk_widget_show (cpuFreq->frame); - cpuFreq->box = gtk_hbox_new (FALSE, SPACING); gtk_container_set_border_width (GTK_CONTAINER (cpuFreq->box), BORDER); - gtk_container_add (GTK_CONTAINER (cpuFreq->frame), cpuFreq->box); + gtk_container_add (GTK_CONTAINER (cpuFreq->ebox), cpuFreq->box); cpufreq_update_icon (cpuFreq); @@ -319,7 +313,6 @@ cpufreq_read_config (void) if (cpuFreq->options->timeout > TIMEOUT_MAX || cpuFreq->options->timeout < TIMEOUT_MIN) cpuFreq->options->timeout = TIMEOUT_MIN; cpuFreq->options->show_cpu = xfce_rc_read_int_entry (rc, "show_cpu", 0); - cpuFreq->options->show_frame = xfce_rc_read_bool_entry (rc, "show_frame", TRUE); cpuFreq->options->show_icon = xfce_rc_read_bool_entry (rc, "show_icon", TRUE); cpuFreq->options->show_label_freq = xfce_rc_read_bool_entry (rc, "show_label_freq", TRUE); cpuFreq->options->show_label_governor = xfce_rc_read_bool_entry (rc, "show_label_governor", TRUE); @@ -345,7 +338,6 @@ cpufreq_write_config (XfcePanelPlugin *plugin) xfce_rc_write_int_entry (rc, "timeout", cpuFreq->options->timeout); xfce_rc_write_int_entry (rc, "show_cpu", cpuFreq->options->show_cpu); - xfce_rc_write_bool_entry (rc, "show_frame", cpuFreq->options->show_frame); xfce_rc_write_bool_entry (rc, "show_icon", cpuFreq->options->show_icon); xfce_rc_write_bool_entry (rc, "show_label_freq", cpuFreq->options->show_label_freq); xfce_rc_write_bool_entry (rc, "show_label_governor", cpuFreq->options->show_label_governor); diff --git a/panel-plugin/xfce4-cpufreq-plugin.h b/panel-plugin/xfce4-cpufreq-plugin.h index 2674095..bbc5a3e 100644 --- a/panel-plugin/xfce4-cpufreq-plugin.h +++ b/panel-plugin/xfce4-cpufreq-plugin.h @@ -40,7 +40,6 @@ typedef struct { guint timeout; /* time between refreash */ guint show_cpu; /* cpu number in panel */ - gboolean show_frame; gboolean show_icon; gboolean show_label_governor; gboolean show_label_freq; @@ -57,7 +56,7 @@ typedef struct GPtrArray *cpus; /* Widgets */ - GtkWidget *ebox, *frame, *box, *icon, *label; + GtkWidget *ebox, *box, *icon, *label; gint icon_size; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits