[Xfce4-commits] [panel-plugins/xfce4-diskperf-plugin] 03/16: Stop using GtkAlignment, no need

noreply at xfce.org noreply at xfce.org
Thu Apr 28 18:10:03 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-diskperf-plugin.

commit ab85b975ab074885937e9c1879b11448bca4931c
Author: Landry Breuil <landry at xfce.org>
Date:   Thu Apr 28 17:57:56 2016 +0200

    Stop using GtkAlignment, no need
---
 panel-plugin/config_gui.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/config_gui.c b/panel-plugin/config_gui.c
index f8f8bc4..ec38c33 100644
--- a/panel-plugin/config_gui.c
+++ b/panel-plugin/config_gui.c
@@ -60,8 +60,7 @@ int CreateConfigGUI (GtkWidget * vbox1, struct gui_t *p_poGUI)
     GtkWidget      *label1;
     GtkWidget      *wTF_Device;
     GtkWidget      *eventbox1;
-    GtkWidget      *alignment1;
-    GtkObject      *wSc_Period_adj;
+    GtkAdjustment  *wSc_Period_adj;
     GtkWidget      *wSc_Period;
     GtkWidget      *label2;
     GtkWidget      *wTB_Title;
@@ -115,19 +114,17 @@ int CreateConfigGUI (GtkWidget * vbox1, struct gui_t *p_poGUI)
 
     eventbox1 = gtk_event_box_new ();
     gtk_widget_show (eventbox1);
-    gtk_table_attach (GTK_TABLE (table1), eventbox1, 1, 2, 2, 3,
-		      (GtkAttachOptions) (GTK_FILL),
-		      (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-    alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
-    gtk_widget_show (alignment1);
-    gtk_container_add (GTK_CONTAINER (eventbox1), alignment1);
+    gtk_grid_attach (GTK_GRID (table1), eventbox1, 1, 2, 1, 1);
+    gtk_widget_set_valign(GTK_WIDGET(eventbox1), GTK_ALIGN_CENTER);
+    gtk_widget_set_halign(GTK_WIDGET(eventbox1), GTK_ALIGN_CENTER);
+    gtk_widget_set_vexpand(GTK_WIDGET(eventbox1), TRUE);
+    gtk_widget_set_hexpand(GTK_WIDGET(eventbox1), TRUE);
 
     wSc_Period_adj = gtk_adjustment_new (0.5, 0.25, 4, 0.05, 1, 0);
     wSc_Period =
 	gtk_spin_button_new (GTK_ADJUSTMENT (wSc_Period_adj), 1, 3);
     gtk_widget_show (wSc_Period);
-    gtk_container_add (GTK_CONTAINER (alignment1), wSc_Period);
+    gtk_container_add (GTK_CONTAINER (eventbox1), wSc_Period);
     gtk_widget_set_tooltip_text (wSc_Period, _("Data collection period"));
     gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wSc_Period), TRUE);
 

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


More information about the Xfce4-commits mailing list