[Xfce4-commits] [panel-plugins/xfce4-battery-plugin] 10/15: Drop using GtkAligment and set halign/valign
noreply at xfce.org
noreply at xfce.org
Sun May 29 08:36:55 CEST 2016
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-battery-plugin.
commit 029140234103c51e5f7cf940889653f2de3507c9
Author: Andre Miranda <andre42m at gmail.com>
Date: Sat May 28 14:37:44 2016 -0300
Drop using GtkAligment and set halign/valign
---
panel-plugin/battery.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index e06e881..34a7094 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -698,7 +698,11 @@ static void setup_battmon(t_battmon *battmon)
/* create the label hvbox with an orientation opposite to the panel */
battmon->timechargebox = gtk_box_new(!xfce_panel_plugin_get_orientation(battmon->plugin), 0);
- battmon->timechargealignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+ /* Should be removed(was a GtkAligment)? */
+ battmon->timechargealignment = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_widget_set_halign(GTK_WIDGET(battmon->timechargealignment), GTK_ALIGN_CENTER);
+ gtk_widget_set_valign(GTK_WIDGET(battmon->timechargealignment), GTK_ALIGN_CENTER);
+
gtk_container_add (GTK_CONTAINER(battmon->timechargealignment), battmon->timechargebox);
gtk_box_pack_start(GTK_BOX(battmon->ebox), battmon->timechargealignment, FALSE, FALSE, 2);
@@ -712,7 +716,11 @@ static void setup_battmon(t_battmon *battmon)
/* create the label hvbox with an orientation opposite to the panel */
battmon->actempbox = gtk_box_new(!xfce_panel_plugin_get_orientation(battmon->plugin), 0);
- battmon->actempalignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
+ /* Should be removed(was a GtkAligment)? */
+ battmon->actempalignment = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_widget_set_halign(GTK_WIDGET(battmon->actempalignment), GTK_ALIGN_CENTER);
+ gtk_widget_set_valign(GTK_WIDGET(battmon->actempalignment), GTK_ALIGN_CENTER);
+
gtk_container_add (GTK_CONTAINER(battmon->actempalignment), battmon->actempbox);
gtk_box_pack_start(GTK_BOX(battmon->ebox), battmon->actempalignment, FALSE, FALSE, 2);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list