[Xfce4-commits] [panel-plugins/xfce4-cpufreq-plugin] 12/20: Replace gtk_widget_size_request by gtk_widget_get_preferred_size

noreply at xfce.org noreply at xfce.org
Sat May 6 21:01:13 CEST 2017


This is an automated email from the git hooks/post-receive script.

andre pushed a commit to branch master
in repository panel-plugins/xfce4-cpufreq-plugin.

commit 3c58795a36ab427a61c9270232b4b26eb7b19b36
Author: Andre Miranda <andre42m at gmail.com>
Date:   Fri Nov 4 22:47:52 2016 -0300

    Replace gtk_widget_size_request by gtk_widget_get_preferred_size
---
 panel-plugin/xfce4-cpufreq-plugin.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/xfce4-cpufreq-plugin.c b/panel-plugin/xfce4-cpufreq-plugin.c
index 6e606e6..708791d 100644
--- a/panel-plugin/xfce4-cpufreq-plugin.c
+++ b/panel-plugin/xfce4-cpufreq-plugin.c
@@ -125,7 +125,7 @@ cpufreq_update_label (CpuInfo *cpu)
 			gtk_widget_hide (cpuFreq->label);
 		return TRUE;
 	}
-	
+
 	both = cpu->cur_governor != NULL &&
 		cpuFreq->options->show_label_freq &&
 		cpuFreq->options->show_label_governor;
@@ -150,7 +150,7 @@ cpufreq_update_label (CpuInfo *cpu)
 
 		/* Set label width to max width if smaller to avoid panel
 		   resizing/jumping (see bug #10385). */
-		gtk_widget_size_request (cpuFreq->label, &label_size);
+		gtk_widget_get_preferred_size (cpuFreq->label, NULL, &label_size);
 		if (cpuFreq->panel_mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL)
 			if (label_size.height < cpuFreq->label_max_width)
 				gtk_widget_set_size_request (GTK_WIDGET (cpuFreq->label),
@@ -211,12 +211,12 @@ cpufreq_widgets_layout (void)
 
 	/* check if the label fits below the icon, else put them side by side */
 	if (GTK_IS_WIDGET(cpuFreq->label) && ! hide_label) {
-		gtk_widget_size_request (cpuFreq->label, &label_size);
+		gtk_widget_get_preferred_size (cpuFreq->label, NULL, &label_size);
 		lw = label_size.width;
 		lh = label_size.height;
 	}
 	if (GTK_IS_WIDGET(cpuFreq->icon)) {
-		gtk_widget_size_request (cpuFreq->icon, &icon_size);
+		gtk_widget_get_preferred_size (cpuFreq->icon, NULL, &icon_size);
 		iw = icon_size.width;
 		ih = icon_size.height;
 	}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list