[Xfce4-commits] [panel-plugins/xfce4-genmon-plugin] 01/02: Fix bar direction

noreply at xfce.org noreply at xfce.org
Mon Feb 27 03:58:38 CET 2017


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

ToZ pushed a commit to branch master
in repository panel-plugins/xfce4-genmon-plugin.

commit a41e75b468abb9ae80a1d4207af7e37338e59144
Author: ToZ <tony.paulic at gmail.com>
Date:   Sun Feb 26 21:58:03 2017 -0500

    Fix bar direction
---
 panel-plugin/main.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 003b0cf..7a79a2e 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -410,10 +410,15 @@ static genmon_t *genmon_create_control (XfcePanelPlugin *plugin)
     poMonitor->wBar = gtk_progress_bar_new();
     gtk_box_pack_start (GTK_BOX (poMonitor->wBox),
         GTK_WIDGET (poMonitor->wBar), FALSE, FALSE, 0);
-    if (orientation == GTK_ORIENTATION_HORIZONTAL)
+    if (orientation == GTK_ORIENTATION_HORIZONTAL) {
         gtk_orientable_set_orientation(GTK_ORIENTABLE(poMonitor->wBar), GTK_ORIENTATION_VERTICAL);
-    else
+        gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(poMonitor->wBar), TRUE);
+    }
+    else {
         gtk_orientable_set_orientation(GTK_ORIENTABLE(poMonitor->wBar), GTK_ORIENTATION_HORIZONTAL);
+        gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(poMonitor->wBar), FALSE);
+    }
+
 
     /* make widget padding consistent */
     #if GTK_CHECK_VERSION (3, 16, 0)
@@ -868,10 +873,14 @@ static void genmon_set_orientation (XfcePanelPlugin *plugin,
     gtk_orientable_set_orientation(GTK_ORIENTABLE(poMonitor->wBox), p_iOrientation);
     gtk_orientable_set_orientation(GTK_ORIENTABLE(poMonitor->wImgBox), p_iOrientation);
 
-    if (p_iOrientation == GTK_ORIENTATION_HORIZONTAL)
+    if (p_iOrientation == GTK_ORIENTATION_HORIZONTAL) {
         gtk_orientable_set_orientation(GTK_ORIENTABLE(poMonitor->wBar), GTK_ORIENTATION_VERTICAL);
-    else
+        gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(poMonitor->wBar), TRUE);
+    }
+    else {
         gtk_orientable_set_orientation(GTK_ORIENTABLE(poMonitor->wBar), GTK_ORIENTATION_HORIZONTAL);
+        gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(poMonitor->wBar), FALSE);
+    }
 
     SetMonitorFont (poPlugin);
 

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


More information about the Xfce4-commits mailing list