[libgda] Clean some usage of gtk_misc_set_alignment()



commit a7057e2b230ca81daddc2b6eec544136a6d449f8
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Feb 22 21:41:14 2015 +0100

    Clean some usage of gtk_misc_set_alignment()

 libgda-ui/demos/combo.c              |    8 ++++----
 libgda-ui/demos/ddl_queries.c        |   10 +++++-----
 libgda-ui/demos/form_model_change.c  |    4 ++--
 libgda-ui/demos/grid_model_change.c  |    4 ++--
 libgda-ui/demos/linked_grid_form.c   |    6 +++---
 libgda-ui/demos/linked_model_param.c |    4 ++--
 6 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/libgda-ui/demos/combo.c b/libgda-ui/demos/combo.c
index 511b33d..d84ce5c 100644
--- a/libgda-ui/demos/combo.c
+++ b/libgda-ui/demos/combo.c
@@ -120,7 +120,7 @@ do_combo (GtkWidget *do_widget)
 
                label = gtk_label_new ("");
                gtk_label_set_markup (GTK_LABEL (label), "<b>Options:</b>");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
                option = gtk_check_button_new_with_label ("Add NULL entry");
@@ -139,7 +139,7 @@ do_combo (GtkWidget *do_widget)
                GtkWidget *form;
                label = gtk_label_new ("");
                gtk_label_set_markup (GTK_LABEL (label), "<b>Current selection is:</b>");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
                sel = gdaui_data_selector_get_data_set (GDAUI_DATA_SELECTOR (combo));
@@ -153,7 +153,7 @@ do_combo (GtkWidget *do_widget)
                GtkWidget *hbox, *entry, *button;
                label = gtk_label_new ("");
                gtk_label_set_markup (GTK_LABEL (label), "<b>Selection forcing:</b>");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
                hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -180,7 +180,7 @@ do_combo (GtkWidget *do_widget)
                gint i, ncols;
                label = gtk_label_new ("");
                gtk_label_set_markup (GTK_LABEL (label), "<b>Show columns:</b>");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
                ncols = gda_data_model_get_n_columns (model);
                for (i = 0; i < ncols; i++) {
diff --git a/libgda-ui/demos/ddl_queries.c b/libgda-ui/demos/ddl_queries.c
index 4b29377..ebbf533 100644
--- a/libgda-ui/demos/ddl_queries.c
+++ b/libgda-ui/demos/ddl_queries.c
@@ -79,12 +79,12 @@ do_ddl_queries (GtkWidget *do_widget)
                
                label = gtk_label_new ("<b>Tested provider and operation:</b>");
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 2, 1);
                
                /* provider selection */
                label = gtk_label_new ("Tested provider:");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
 
                wid = gdaui_provider_selector_new ();
@@ -97,7 +97,7 @@ do_ddl_queries (GtkWidget *do_widget)
 
                /* operation selection */
                label = gtk_label_new ("Tested operation:");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
                
                wid = gdaui_combo_new ();
@@ -108,7 +108,7 @@ do_ddl_queries (GtkWidget *do_widget)
 
                /* container for GdauiServerOperation */
                label = gtk_label_new ("<b>GdauiServerOperation widget:</b>");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
                gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 2, 1);
 
@@ -411,7 +411,7 @@ show_named_parameters (G_GNUC_UNUSED GtkButton *button, DemoData *data)
                                           "Close", GTK_RESPONSE_REJECT, NULL);
 
        label = gtk_label_new ("<b>Named parameters:</b>\n");
-       gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+       gtk_widget_set_halign (label, GTK_ALIGN_START);
        gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
        gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
                            label, FALSE, FALSE, 0);
diff --git a/libgda-ui/demos/form_model_change.c b/libgda-ui/demos/form_model_change.c
index 9c90a5b..44ffd52 100644
--- a/libgda-ui/demos/form_model_change.c
+++ b/libgda-ui/demos/form_model_change.c
@@ -71,7 +71,7 @@ do_form_model_change (GtkWidget *do_widget)
                
                /* allow choosing which data model to display */
                label = gtk_label_new ("");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                 gtk_label_set_markup (GTK_LABEL (label), "<b>Choose which data model to display:</b>");
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
@@ -95,7 +95,7 @@ do_form_model_change (GtkWidget *do_widget)
 
                /* Create the form widget */
                label = gtk_label_new ("");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                 gtk_label_set_markup (GTK_LABEL (label), "<b>GdauiForm:</b>");
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
diff --git a/libgda-ui/demos/grid_model_change.c b/libgda-ui/demos/grid_model_change.c
index cbd12dd..cd44a92 100644
--- a/libgda-ui/demos/grid_model_change.c
+++ b/libgda-ui/demos/grid_model_change.c
@@ -71,7 +71,7 @@ do_grid_model_change (GtkWidget *do_widget)
                
                /* allow choosing which data model to display */
                label = gtk_label_new ("");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                 gtk_label_set_markup (GTK_LABEL (label), "<b>Choose which data model to display:</b>");
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
@@ -95,7 +95,7 @@ do_grid_model_change (GtkWidget *do_widget)
 
                /* Create the grid widget */
                label = gtk_label_new ("");
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                 gtk_label_set_markup (GTK_LABEL (label), "<b>GdauiRawGrid in a scrolled window:</b>");
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
diff --git a/libgda-ui/demos/linked_grid_form.c b/libgda-ui/demos/linked_grid_form.c
index 9341d9d..ed67a34 100644
--- a/libgda-ui/demos/linked_grid_form.c
+++ b/libgda-ui/demos/linked_grid_form.c
@@ -114,7 +114,7 @@ do_linked_grid_form (GtkWidget *do_widget)
                /* create grid widget */
                label = gtk_label_new ("<b>GdauiGrid:</b>");
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
                gtk_widget_show (label);
 
@@ -131,7 +131,7 @@ do_linked_grid_form (GtkWidget *do_widget)
                /* create form widget which uses the same data model as the grid */
                label = gtk_label_new ("<b>GdauiForm:</b>");
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
                gtk_widget_show (label);
 
@@ -153,7 +153,7 @@ do_linked_grid_form (GtkWidget *do_widget)
                label = gtk_label_new ("<b>Selected rows synchronization option:</b>\n"
                                       "<small>Effective only at the next selected row change</small>");
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
                gtk_widget_show (label);
                
diff --git a/libgda-ui/demos/linked_model_param.c b/libgda-ui/demos/linked_model_param.c
index 9855352..b6687de 100644
--- a/libgda-ui/demos/linked_model_param.c
+++ b/libgda-ui/demos/linked_model_param.c
@@ -85,7 +85,7 @@ do_linked_model_param (GtkWidget *do_widget)
                /* create a basic form to set the values in params */
                label = gtk_label_new ("<b>GdauiBasicForm to choose a sales person:</b>");
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
                gtk_widget_show (label);
 
@@ -96,7 +96,7 @@ do_linked_model_param (GtkWidget *do_widget)
                /* create grid widget */
                label = gtk_label_new ("<b>GdauiGrid for the customers:</b>");
                gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
-               gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+               gtk_widget_set_halign (label, GTK_ALIGN_START);
                gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
                gtk_widget_show (label);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]