[Xfce4-commits] [panel-plugins/xfce4-systemload-plugin] 04/16: Use GtkOrientable instead of *_set_orientation
noreply at xfce.org
noreply at xfce.org
Fri Apr 29 16:07:21 CEST 2016
This is an automated email from the git hooks/post-receive script.
landry pushed a commit to branch master
in repository panel-plugins/xfce4-systemload-plugin.
commit d625745d6fa481430402c3ea75b2fc1159ff3011
Author: Landry Breuil <landry at xfce.org>
Date: Fri Apr 29 11:12:14 2016 +0200
Use GtkOrientable instead of *_set_orientation
---
panel-plugin/systemload.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index 607145f..2df191f 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -230,22 +230,14 @@ monitor_update_orientation (XfcePanelPlugin *plugin,
t_global_monitor *global)
{
gint count;
- xfce_hvbox_set_orientation(XFCE_HVBOX(global->box), panel_orientation);
+ gtk_orientable_set_orientation(GTK_ORIENTABLE(global->box), panel_orientation);
for(count = 0; count < 3; count++)
{
- xfce_hvbox_set_orientation(XFCE_HVBOX(global->monitor[count]->box), panel_orientation);
-#ifdef HAS_PANEL_49
+ gtk_orientable_set_orientation(GTK_ORIENTABLE(global->monitor[count]->box), panel_orientation);
gtk_label_set_angle(GTK_LABEL(global->monitor[count]->label),
(orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : -90);
-#endif
- if (panel_orientation == GTK_ORIENTATION_HORIZONTAL)
- {
- gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(global->monitor[count]->status), GTK_PROGRESS_BOTTOM_TO_TOP);
- }
- else
- {
- gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(global->monitor[count]->status), GTK_PROGRESS_LEFT_TO_RIGHT);
- }
+ gtk_progress_bar_set_inverted (GTK_PROGRESS_BAR(global->monitor[count]->status), (panel_orientation == GTK_ORIENTATION_HORIZONTAL));
+ gtk_orientable_set_orientation (GTK_ORIENTABLE(global->monitor[count]->status), !panel_orientation);
}
gtk_label_set_angle(GTK_LABEL(global->uptime->label),
(orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : -90);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list