[libgda] Get rid of some deprecated functions
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Get rid of some deprecated functions
- Date: Sun, 22 Mar 2015 18:13:46 +0000 (UTC)
commit 29183c81bd98f08f51d7bc16aee90a5bf21e486a
Author: Vivien Malerba <malerba gnome-db org>
Date: Wed Mar 18 18:14:18 2015 +0100
Get rid of some deprecated functions
control-center/dsn-properties-dialog.c | 6 ++--
control-center/gdaui-bar.c | 6 ++--
control-center/gdaui-dsn-assistant.c | 10 +++---
control-center/gdaui-dsn-editor.c | 14 +++----
control-center/gdaui-login-dialog.c | 6 ++--
libgda-ui/data-entries/common-bin.c | 6 ++--
libgda-ui/data-entries/gdaui-entry-bin.c | 2 +-
libgda-ui/data-entries/plugins/gdaui-entry-pict.c | 4 +-
libgda-ui/gdaui-basic-form.c | 12 +++---
libgda-ui/gdaui-raw-grid.c | 16 ++++----
libgda-ui/gdaui-server-operation.c | 14 ++++----
testing/gdaui-test-data-entries.c | 28 ++++++++--------
testing/gdaui-test-widget-entry.c | 36 ++++++++++----------
tools/browser/auth-dialog.c | 6 ++--
tools/browser/browser-connections-list.c | 8 ++--
tools/browser/browser-window.c | 4 +-
tools/browser/canvas/browser-canvas-print.c | 14 ++++----
tools/browser/connection-binding-properties.c | 10 +++---
tools/browser/data-manager/data-console.c | 8 ++--
.../browser/data-manager/data-favorite-selector.c | 8 ++--
tools/browser/data-manager/data-widget.c | 8 ++--
tools/browser/data-manager/ui-spec-editor.c | 6 ++--
tools/browser/data-manager/xml-spec-editor.c | 6 ++--
tools/browser/fk-declare.c | 15 +++-----
tools/browser/gdaui-data-import.c | 20 +++++-----
tools/browser/gdaui-entry-import.c | 6 +--
tools/browser/ldap-browser/filter-editor.c | 15 +++-----
tools/browser/ldap-browser/ldap-classes-page.c | 9 ++---
tools/browser/ldap-browser/ldap-entries-page.c | 9 ++---
.../browser/ldap-browser/ldap-favorite-selector.c | 11 ++----
tools/browser/ldap-browser/ldap-search-page.c | 9 ++---
tools/browser/ldap-browser/vtable-dialog.c | 8 ++--
tools/browser/login-dialog.c | 4 +-
tools/browser/query-exec/query-console-page.c | 12 +++---
tools/browser/query-exec/query-favorite-selector.c | 14 +++-----
tools/browser/query-exec/query-result.c | 10 +++---
tools/browser/schema-browser/table-preferences.c | 16 ++++----
tools/browser/ui-formgrid.c | 4 +-
tools/browser/ui-support.c | 11 +++---
39 files changed, 192 insertions(+), 219 deletions(-)
---
diff --git a/control-center/dsn-properties-dialog.c b/control-center/dsn-properties-dialog.c
index 90ddb9d..92b3987 100644
--- a/control-center/dsn-properties-dialog.c
+++ b/control-center/dsn-properties-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -152,8 +152,8 @@ dsn_properties_dialog (GtkWindow *parent, const gchar *dsn)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
- g_free (str);
+ g_free (str);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
GtkWidget *dcontents;
dcontents = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
diff --git a/control-center/gdaui-bar.c b/control-center/gdaui-bar.c
index 8a440be..1b5ec61 100644
--- a/control-center/gdaui-bar.c
+++ b/control-center/gdaui-bar.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -144,14 +144,14 @@ gdaui_bar_init (GdauiBar *bar)
bar->priv->show_icon = FALSE;
bar->priv->icon = gtk_image_new ();
- gtk_misc_set_alignment (GTK_MISC (bar->priv->icon), 1., 0.5);
+ gtk_widget_set_halign (bar->priv->icon, GTK_ALIGN_END);
gtk_widget_hide (bar->priv->icon);
gtk_box_pack_end (GTK_BOX (bar->priv->content_area), bar->priv->icon,
FALSE, TRUE, 0);
bar->priv->label = gtk_label_new ("");
gtk_label_set_selectable (GTK_LABEL (bar->priv->label), FALSE);
- gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0., 0.5);
+ gtk_widget_set_halign (bar->priv->label, GTK_ALIGN_START);
gtk_box_pack_end (GTK_BOX (bar->priv->content_area), bar->priv->label,
TRUE, TRUE, 0);
gtk_label_set_line_wrap (GTK_LABEL (bar->priv->label), TRUE);
diff --git a/control-center/gdaui-dsn-assistant.c b/control-center/gdaui-dsn-assistant.c
index 984c572..b2c8e06 100644
--- a/control-center/gdaui-dsn-assistant.c
+++ b/control-center/gdaui-dsn-assistant.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -470,7 +470,7 @@ gdaui_dsn_assistant_init (GdauiDsnAssistant *assistant,
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
assistant->priv->general_name = gtk_entry_new ();
@@ -482,7 +482,7 @@ gdaui_dsn_assistant_init (GdauiDsnAssistant *assistant,
if (gda_config_can_modify_system_config ()) {
label = gtk_label_new (_("System wide data source:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
assistant->priv->general_is_system = gtk_check_button_new ();
@@ -495,14 +495,14 @@ gdaui_dsn_assistant_init (GdauiDsnAssistant *assistant,
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
assistant->priv->general_provider = gdaui_provider_selector_new ();
gtk_grid_attach (GTK_GRID (grid), assistant->priv->general_provider, 1, 3, 1, 1);
label = gtk_label_new (_("Description:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1);
assistant->priv->general_description = gtk_entry_new ();
diff --git a/control-center/gdaui-dsn-editor.c b/control-center/gdaui-dsn-editor.c
index 5118881..2b2bcae 100644
--- a/control-center/gdaui-dsn-editor.c
+++ b/control-center/gdaui-dsn-editor.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -129,9 +129,8 @@ gdaui_dsn_editor_init (GdauiDsnEditor *config, G_GNUC_UNUSED GdauiDsnEditorClass
str = g_strdup_printf ("%s <span foreground='red' weight='bold'>*</span>", _("Data source _name:"));
label = gtk_label_new ("");
gtk_label_set_markup_with_mnemonic (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0, -1.);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_size_group_add_widget (labels_size_group, label);
gtk_widget_show (label);
@@ -149,7 +148,7 @@ gdaui_dsn_editor_init (GdauiDsnEditor *config, G_GNUC_UNUSED GdauiDsnEditorClass
gtk_grid_attach (GTK_GRID (grid), config->priv->wname, 1, 0, 1, 1);
label = gtk_label_new_with_mnemonic (_("_System wide data source:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, -1.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_size_group_add_widget (labels_size_group, label);
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
@@ -161,10 +160,9 @@ gdaui_dsn_editor_init (GdauiDsnEditor *config, G_GNUC_UNUSED GdauiDsnEditorClass
str = g_strdup_printf ("%s <span foreground='red' weight='bold'>*</span>", _("_Provider:"));
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0, -1.);
gtk_label_set_markup_with_mnemonic (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_size_group_add_widget (labels_size_group, label);
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
@@ -176,7 +174,7 @@ gdaui_dsn_editor_init (GdauiDsnEditor *config, G_GNUC_UNUSED GdauiDsnEditorClass
gtk_grid_attach (GTK_GRID (grid), config->priv->wprovider, 1, 2, 1, 1);
label = gtk_label_new_with_mnemonic (_("_Description:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, -1.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_size_group_add_widget (labels_size_group, label);
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
@@ -193,7 +191,7 @@ gdaui_dsn_editor_init (GdauiDsnEditor *config, G_GNUC_UNUSED GdauiDsnEditorClass
gtk_label_set_markup (GTK_LABEL (config->priv->warning),
_("<span foreground='red'>The database provider used by this data source is not
available,\n"
"editing the data source's attributes is disabled</span>"));
- gtk_misc_set_alignment (GTK_MISC (config->priv->warning), 0.5, -1);
+ gtk_widget_set_halign (config->priv->warning, GTK_ALIGN_START);
gtk_label_set_justify (GTK_LABEL (config->priv->warning), GTK_JUSTIFY_CENTER);
gtk_label_set_line_wrap (GTK_LABEL (config->priv->warning), TRUE);
gtk_grid_attach (GTK_GRID (grid), config->priv->warning, 0, 8, 2, 1);
diff --git a/control-center/gdaui-login-dialog.c b/control-center/gdaui-login-dialog.c
index 7c7db1b..7e220d1 100644
--- a/control-center/gdaui-login-dialog.c
+++ b/control-center/gdaui-login-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -116,7 +116,7 @@ gdaui_login_dialog_init (GdauiLoginDialog *dialog, G_GNUC_UNUSED GdauiLoginDialo
gtk_box_pack_start (GTK_BOX (dcontents), hbox, TRUE, TRUE, 0);
image = gtk_image_new_from_icon_name ("dialog-password", GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
+ gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 5);
@@ -138,7 +138,7 @@ gdaui_login_dialog_init (GdauiLoginDialog *dialog, G_GNUC_UNUSED GdauiLoginDialo
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_selectable (GTK_LABEL (label), FALSE);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
diff --git a/libgda-ui/data-entries/common-bin.c b/libgda-ui/data-entries/common-bin.c
index 27fa713..19657b8 100644
--- a/libgda-ui/data-entries/common-bin.c
+++ b/libgda-ui/data-entries/common-bin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -196,7 +196,7 @@ common_bin_create_menu (BinMenu *binmenu, PopupContainerPositionFunc pos_func, G
str = g_strdup_printf ("<b>%s:</b>", _("Properties"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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); /* HIG */
@@ -207,7 +207,7 @@ common_bin_create_menu (BinMenu *binmenu, PopupContainerPositionFunc pos_func, G
gtk_widget_show (label);
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
binmenu->props_label = label;
diff --git a/libgda-ui/data-entries/gdaui-entry-bin.c b/libgda-ui/data-entries/gdaui-entry-bin.c
index a19270d..1a50b94 100644
--- a/libgda-ui/data-entries/gdaui-entry-bin.c
+++ b/libgda-ui/data-entries/gdaui-entry-bin.c
@@ -244,7 +244,7 @@ create_entry (GdauiEntryWrapper *mgwrap)
dbin->priv->button_image = g_object_ref (G_OBJECT (img));
arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
- gtk_misc_set_alignment (GTK_MISC (arrow), 1.0, -1);
+ gtk_widget_set_halign (arrow, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, TRUE, 0);
gtk_widget_show_all (hbox);
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
b/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
index c03df91..e88e44b 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -241,7 +241,7 @@ create_entry (GdauiEntryWrapper *mgwrap)
/* image */
wid = gtk_image_new ();
- gtk_misc_set_alignment (GTK_MISC (wid), 0., .5);
+ gtk_widget_set_valign (wid, GTK_ALIGN_CENTER);
gtk_container_add (GTK_CONTAINER (mgpict->priv->sw), wid);
gtk_widget_show (wid);
mgpict->priv->pict = wid;
diff --git a/libgda-ui/gdaui-basic-form.c b/libgda-ui/gdaui-basic-form.c
index 150ef6d..ac1efb2 100644
--- a/libgda-ui/gdaui-basic-form.c
+++ b/libgda-ui/gdaui-basic-form.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2010 - 2011 Murray Cumming <murrayc murrayc com>
*
@@ -1003,7 +1003,7 @@ create_entry_widget (SingleEntry *sentry)
g_free (str);
g_object_ref_sink (sentry->label);
sentry->label_title = title;
- gtk_misc_set_alignment (GTK_MISC (sentry->label), 0., 0.);
+ gtk_widget_set_halign (sentry->label, GTK_ALIGN_START);
gtk_widget_show (sentry->label);
g_object_get (G_OBJECT (param), "description", &title, NULL);
@@ -1049,7 +1049,7 @@ create_entry_widget (SingleEntry *sentry)
g_free (str);
g_object_ref_sink (sentry->label);
sentry->label_title = title;
- gtk_misc_set_alignment (GTK_MISC (sentry->label), 0., 0.);
+ gtk_widget_set_halign (sentry->label, GTK_ALIGN_START);
gtk_widget_show (sentry->label);
ss = gda_set_group_get_source (gdaui_set_group_get_group (group));
title = g_object_get_data (G_OBJECT (gda_set_source_get_data_model (ss)), "descr");
@@ -1350,7 +1350,7 @@ load_xml_layout_column (GdauiBasicForm *form, xmlNodePtr box_node)
}
sentry->label = gtk_label_new ((gchar*) label);
g_object_ref_sink (sentry->label);
- gtk_misc_set_alignment (GTK_MISC (sentry->label), 0., 0.);
+ gtk_widget_set_halign (sentry->label, GTK_ALIGN_START);
xmlFree (label);
}
@@ -1413,7 +1413,7 @@ load_xml_layout_section (GdauiBasicForm *form, xmlNodePtr section_node)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
GtkWidget *vbox;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -2164,7 +2164,7 @@ gdaui_basic_form_new_in_dialog (GdaSet *data_set, GtkWindow *parent,
gchar *str;
label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
str = g_markup_printf_escaped ("<b>%s:</b>", header);
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index c88066b..f3dbb46 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -1794,7 +1794,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
_("The data will be exported to the selected file."));
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
g_free (str);
@@ -1804,7 +1804,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
str = g_strdup_printf ("<b>%s:</b>", _("File name"));
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
g_free (str);
gtk_box_pack_start (GTK_BOX (dbox), label, FALSE, TRUE, 2);
@@ -1825,7 +1825,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
str = g_strdup_printf ("<b>%s:</b>", _("Details"));
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
g_free (str);
gtk_box_pack_start (GTK_BOX (dbox), label, FALSE, TRUE, 2);
@@ -1844,7 +1844,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
/* file type */
label = gtk_label_new (_("File type:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid1), label, 0, 0, 1, 1);
gtk_widget_show (label);
@@ -1863,7 +1863,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
/* data scope */
label = gtk_label_new (_("Data to save:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid1), label, 0, 1, 1, 1);
gtk_widget_show (label);
@@ -1893,7 +1893,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
gtk_container_add (GTK_CONTAINER (exp), grid2);
label = gtk_label_new (_("Empty string when NULL?"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid2), label, 0, 0, 1, 1);
gtk_widget_set_tooltip_text (label, _("Export NULL values as an empty \"\" string"));
@@ -1903,7 +1903,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
gtk_widget_set_tooltip_text (check, _("Export NULL values as an empty \"\" string"));
label = gtk_label_new (_("Invalid data as NULL?"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid2), label, 2, 0, 1, 1);
gtk_widget_set_tooltip_text (label, _("Don't export invalid data,\nbut export a NULL value instead"));
@@ -1913,7 +1913,7 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
gtk_widget_set_tooltip_text (check, _("Don't export invalid data,\nbut export a NULL value instead"));
label = gtk_label_new (_("Field names on first row?"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid2), label, 0, 1, 1, 1);
gtk_widget_set_tooltip_text (label, _("Add a row at beginning with columns names"));
diff --git a/libgda-ui/gdaui-server-operation.c b/libgda-ui/gdaui-server-operation.c
index fb42743..63d5c39 100644
--- a/libgda-ui/gdaui-server-operation.c
+++ b/libgda-ui/gdaui-server-operation.c
@@ -498,7 +498,7 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
label_entry = gtk_label_new (str);
}
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label_entry), 0., 0.);
+ gtk_widget_set_halign (label_entry, GTK_ALIGN_START);
gtk_widget_show (label_entry);
str = (gchar *) g_object_get_data (G_OBJECT (model), "descr");
@@ -590,7 +590,7 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
if (size < max) {
/* last row is for new entries */
wid = gtk_label_new (_("Add"));
- gtk_misc_set_alignment (GTK_MISC (wid), .0, -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), wid, 0, size, 1, 1);
gtk_widget_show (wid);
@@ -737,7 +737,7 @@ gdaui_server_operation_fill (GdauiServerOperation *form)
GtkWidget *lab;
label = gtk_label_new ("");
gtk_widget_show (label);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_markup (GTK_LABEL (label), section_str);
g_free (section_str);
@@ -763,7 +763,7 @@ gdaui_server_operation_fill (GdauiServerOperation *form)
gchar *str;
label = gtk_label_new ("");
gtk_widget_show (label);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
str = g_strdup_printf ("<b>%s:</b>", _("Options"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
@@ -1087,7 +1087,7 @@ gdaui_server_operation_new_in_dialog (GdaServerOperation *op, GtkWindow *parent,
GtkWidget *label;
label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_markup (GTK_LABEL (label), header);
gtk_box_pack_start (GTK_BOX (dcontents), label, FALSE, FALSE, 5);
@@ -1131,7 +1131,7 @@ create_table_fields_array_create_widget (GdauiServerOperation *form, const gchar
label = gtk_label_new (_("<b>Field properties:</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 (box), label, FALSE, FALSE, 0);
form_props = gdaui_raw_form_new (GDA_DATA_MODEL (info_node->model));
@@ -1150,7 +1150,7 @@ create_table_fields_array_create_widget (GdauiServerOperation *form, const gchar
label = gtk_label_new (_("<b>Fields:</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 (box), label, FALSE, FALSE, 0);
sw = gtk_scrolled_window_new (NULL, NULL);
diff --git a/testing/gdaui-test-data-entries.c b/testing/gdaui-test-data-entries.c
index 5663a36..f4210f8 100644
--- a/testing/gdaui-test-data-entries.c
+++ b/testing/gdaui-test-data-entries.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -196,7 +196,7 @@ main (int argc, char **argv)
"This test displays GdauiDataEntry widgets and helpers to test "
"them in pages of a notebook. Each page presents the default "
"data entry for the corresponding data type.");
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 5);
gtk_widget_show (label);
@@ -220,7 +220,7 @@ main (int argc, char **argv)
"This test displays GdauiDataEntry widgets and helpers to test "
"them in pages of a notebook. Each page tests a plugin for a given "
"data type");
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 5);
gtk_widget_show (label);
@@ -410,27 +410,27 @@ build_test_for_plugin_struct (GdauiPlugin *plugin)
txt = "Plugin ";
str = g_strdup_printf ("<b>%sName:</b>", txt);
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
gtk_widget_show (label);
label = gtk_label_new (plugin->plugin_name);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
gtk_widget_show (label);
str = g_strdup_printf ("<b>%sDescription:</b>", txt);
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
gtk_widget_show (label);
label = gtk_label_new (plugin->plugin_descr);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
gtk_widget_show (label);
@@ -438,7 +438,7 @@ build_test_for_plugin_struct (GdauiPlugin *plugin)
string = g_string_new ("");
g_string_append_printf (string, "<b>%sOptions:</b>", txt);
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_markup (GTK_LABEL (label), string->str);
g_string_free (string, TRUE);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
@@ -472,7 +472,7 @@ build_test_for_plugin_struct (GdauiPlugin *plugin)
}
else {
label = gtk_label_new ("None");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 2, 1, 1);
gtk_widget_show (label);
}
@@ -696,7 +696,7 @@ build_basic_test_for_gtype (GdaDataHandler *dh, GType type, const gchar *plugin_
g_string_append_printf (string, "<b>Data handler description:</b> %s\n",
"No GdaDataHandler available for this type");
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_markup (GTK_LABEL (label), string->str);
g_string_free (string, TRUE);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 2, 1);
@@ -711,23 +711,23 @@ build_basic_test_for_gtype (GdaDataHandler *dh, GType type, const gchar *plugin_
/* Other widgets */
label = gtk_label_new ("Current flags: ");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
gtk_widget_show (label);
label = gtk_label_new ("--");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 2, 2, 1);
g_object_set_data (G_OBJECT (wid), "flags", label);
gtk_widget_show (label);
label = gtk_label_new ("Current value: ");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
gtk_widget_show (label);
label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 3, 1, 1);
g_object_set_data (G_OBJECT (wid), "value", label);
g_signal_connect (G_OBJECT (wid), "contents-modified",
diff --git a/testing/gdaui-test-widget-entry.c b/testing/gdaui-test-widget-entry.c
index ea36040..85e70ad 100644
--- a/testing/gdaui-test-widget-entry.c
+++ b/testing/gdaui-test-widget-entry.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -98,7 +98,7 @@ make_label (gint index, const gchar *text)
gchar *tmp;
tmp = g_strdup_printf ("#%d: %s", index, text ? text : "");
label = gtk_label_new (tmp);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
return label;
}
@@ -146,7 +146,7 @@ main (int argc, char* argv[])
/* #0 */
tmp = g_strdup_printf ("#%d", index);
label = gtk_label_new (tmp);
- 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);
entry = gdaui_entry_new (NULL, NULL);
@@ -158,7 +158,7 @@ main (int argc, char* argv[])
/* #1 */
tmp = g_strdup_printf ("#%d", index);
label = gtk_label_new (tmp);
- 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);
entry = gdaui_entry_new ("€ ", NULL);
@@ -171,7 +171,7 @@ main (int argc, char* argv[])
/* #2 */
tmp = g_strdup_printf ("#%d", index);
label = gtk_label_new (tmp);
- 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);
entry = gdaui_entry_new (NULL, " Ê");
@@ -184,7 +184,7 @@ main (int argc, char* argv[])
/* #3 */
tmp = g_strdup_printf ("#%d", index);
label = gtk_label_new (tmp);
- 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);
entry = gdaui_entry_new ("€€ ", " êê");
@@ -210,7 +210,7 @@ main (int argc, char* argv[])
/* #4 */
tmp = g_strdup_printf ("#%d", index);
label = gtk_label_new (tmp);
- 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);
entry = gdaui_formatted_entry_new ("TIME=00:00:00", NULL);
@@ -223,7 +223,7 @@ main (int argc, char* argv[])
/* #5 */
tmp = g_strdup_printf ("#%d", index);
label = gtk_label_new (tmp);
- 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);
entry = gdaui_formatted_entry_new ("TIME=00€00:00",
@@ -250,7 +250,7 @@ main (int argc, char* argv[])
/* #6 */
tmp = g_strdup_printf ("#%d: %s", index, "G_TYPE_CHAR");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_CHAR);
@@ -263,7 +263,7 @@ main (int argc, char* argv[])
/* #7 */
tmp = g_strdup_printf ("#%d: %s", index, "G_TYPE_UINT, thousand sep=','");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_UINT);
@@ -277,7 +277,7 @@ main (int argc, char* argv[])
/* #8 */
tmp = g_strdup_printf ("#%d: %s", index, "G_TYPE_FLOAT, n_decimals=2");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_FLOAT);
@@ -291,7 +291,7 @@ main (int argc, char* argv[])
/* #9 */
tmp = g_strdup_printf ("#%d: %s", index, "G_TYPE_DOUBLE");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_DOUBLE);
@@ -304,7 +304,7 @@ main (int argc, char* argv[])
/* #10 */
tmp = g_strdup_printf ("#%d: %s", index, "G_TYPE_FLOAT, thousand sep=' ', n_decimals=2");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_FLOAT);
@@ -333,7 +333,7 @@ main (int argc, char* argv[])
/* #11 */
tmp = g_strdup_printf ("#%d: %s", index, "2 decimals with EURO");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_FLOAT);
@@ -347,7 +347,7 @@ main (int argc, char* argv[])
/* #12 */
tmp = g_strdup_printf ("#%d: %s", index, "3 decimals between markers");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_numeric_entry_new (G_TYPE_FLOAT);
@@ -361,7 +361,7 @@ main (int argc, char* argv[])
/* #13 */
tmp = g_strdup_printf ("#%d: %s", index, "**.* between markers");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_formatted_entry_new ("**.*", NULL);
@@ -375,7 +375,7 @@ main (int argc, char* argv[])
/* #14 */
tmp = g_strdup_printf ("#%d: %s", index, "900//@@@//^^^/##** between markers");
label = gtk_label_new (tmp);
- 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);
entry = gdaui_formatted_entry_new ("900//@@@//^^^/##**", NULL);
@@ -391,7 +391,7 @@ main (int argc, char* argv[])
/* properties */
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), "<b>Common properties:</b>");
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (top_vbox), label, FALSE, FALSE, 10);
grid = gtk_grid_new ();
gtk_box_pack_start (GTK_BOX (top_vbox), grid, TRUE, TRUE, 0);
diff --git a/tools/browser/auth-dialog.c b/tools/browser/auth-dialog.c
index 1093d5b..3344f6f 100644
--- a/tools/browser/auth-dialog.c
+++ b/tools/browser/auth-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -213,7 +213,7 @@ auth_dialog_init (AuthDialog *dialog)
_("Connection opening"));
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 12);
dialog->priv->spinner = gtk_spinner_new ();
@@ -486,8 +486,8 @@ auth_dialog_add_cnc_string (AuthDialog *dialog, const gchar *cnc_string, GError
_("enter authentication information"));
g_free (tmp);
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
g_free (str);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (dcontents), label, FALSE, FALSE, 0);
gtk_widget_show (label);
diff --git a/tools/browser/browser-connections-list.c b/tools/browser/browser-connections-list.c
index 39f1ed0..dea81d2 100644
--- a/tools/browser/browser-connections-list.c
+++ b/tools/browser/browser-connections-list.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -345,7 +345,7 @@ browser_connections_list_show (TConnection *current)
"The connection properties are read-only.");
gtk_label_set_markup (GTK_LABEL (wid), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), wid, TRUE, FALSE, 6);
/* left column */
@@ -353,7 +353,7 @@ browser_connections_list_show (TConnection *current)
str = g_strdup_printf ("<b>%s:</b>", _("Connections"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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);
sw = gtk_scrolled_window_new (NULL, NULL);
@@ -369,7 +369,7 @@ browser_connections_list_show (TConnection *current)
str = g_strdup_printf ("<b>%s:</b>", _("Connection's properties"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
/* buttons at the bottom*/
diff --git a/tools/browser/browser-window.c b/tools/browser/browser-window.c
index 79685ac..bb5cccb 100644
--- a/tools/browser/browser-window.c
+++ b/tools/browser/browser-window.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -1534,7 +1534,7 @@ browser_window_show_notice (BrowserWindow *bwin, GtkMessageType type, const gcha
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), text);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (ibar));
if (cb) {
GtkWidget *box;
diff --git a/tools/browser/canvas/browser-canvas-print.c b/tools/browser/canvas/browser-canvas-print.c
index 610feae..529c66e 100644
--- a/tools/browser/canvas/browser-canvas-print.c
+++ b/tools/browser/canvas/browser-canvas-print.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -242,7 +242,7 @@ print_create_custom_widget_cb (G_GNUC_UNUSED GtkPrintOperation *operation, Print
/* zoom control */
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), _("<b>Zoom</b>"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 10);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); /* HIG */
@@ -254,7 +254,7 @@ print_create_custom_widget_cb (G_GNUC_UNUSED GtkPrintOperation *operation, Print
gtk_box_pack_start (GTK_BOX (hbox), grid, TRUE, TRUE, 0);
label = gtk_label_new (_("Number of pages used:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
entry = gtk_spin_button_new_with_range (1., 100., 1.);
@@ -265,7 +265,7 @@ print_create_custom_widget_cb (G_GNUC_UNUSED GtkPrintOperation *operation, Print
G_CALLBACK (print_h_npages_value_changed_cb), cdata);
label = gtk_label_new (_("horizontally"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 2, 0, 1, 1);
entry = gtk_spin_button_new_with_range (1., 100., 1.);
@@ -276,11 +276,11 @@ print_create_custom_widget_cb (G_GNUC_UNUSED GtkPrintOperation *operation, Print
G_CALLBACK (print_v_npages_value_changed_cb), cdata);
label = gtk_label_new (_("vertically"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 2, 1, 1, 1);
label = gtk_label_new (_("Zoom factor:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
entry = gtk_spin_button_new_with_range (.1, 10., .05);
@@ -293,7 +293,7 @@ print_create_custom_widget_cb (G_GNUC_UNUSED GtkPrintOperation *operation, Print
/* misc options */
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), _("<b>Page numbers</b>"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 10);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); /* HIG */
diff --git a/tools/browser/connection-binding-properties.c b/tools/browser/connection-binding-properties.c
index 6f7fd58..acccec5 100644
--- a/tools/browser/connection-binding-properties.c
+++ b/tools/browser/connection-binding-properties.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -228,9 +228,9 @@ create_layout (ConnectionBindingProperties *cprop)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
g_free (str);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_box_pack_start (GTK_BOX (dcontents), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); /* HIG */
@@ -428,8 +428,8 @@ create_part_for_model (ConnectionBindingProperties *cprop, TVirtualConnectionPar
label = gtk_label_new ("");
str = g_markup_printf_escaped ("<b>%s</b>", _("Bind a data set as a table:"));
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
g_free (str);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_tooltip_text (label, _("Import a data set and make it appear as a table"));
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
button = ui_make_small_button (FALSE, FALSE, NULL, "list-remove",
@@ -535,8 +535,8 @@ create_part_for_cnc (ConnectionBindingProperties *cprop, TVirtualConnectionPart
label = gtk_label_new ("");
str = g_markup_printf_escaped ("<b>%s</b>", _("Bind all tables of a connection using a schema
prefix:"));
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
g_free (str);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_tooltip_text (label, _("Each table in the selected connection will appear "
"as a table in the virtual connection using the specified "
"schema as a prefix"));
diff --git a/tools/browser/data-manager/data-console.c b/tools/browser/data-manager/data-console.c
index 6e8cb80..7414d9f 100644
--- a/tools/browser/data-manager/data-console.c
+++ b/tools/browser/data-manager/data-console.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 David King <davidk openismus com>
- * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This program is free software; you can redistribute it and/or
@@ -329,7 +329,7 @@ data_console_new (TConnection *tcnc)
str = g_strdup_printf ("<b>%s</b>", _("Variables' values:"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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);
sw = gtk_scrolled_window_new (NULL, NULL);
@@ -345,7 +345,7 @@ data_console_new (TConnection *tcnc)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), VARIABLES_HELP);
- gtk_misc_set_alignment (GTK_MISC (label), -1, 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (dconsole->priv->params_form_box), label);
dconsole->priv->params_form = label;
@@ -434,7 +434,7 @@ data_console_new (TConnection *tcnc)
str = g_strdup_printf ("<b>%s</b>", _("BBB:"));
gtk_label_set_markup (GTK_LABEL (wid), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (dconsole->priv->data_box), wid, TRUE, TRUE, 0);
dconsole->priv->data = wid;
diff --git a/tools/browser/data-manager/data-favorite-selector.c
b/tools/browser/data-manager/data-favorite-selector.c
index 2e68ea3..8455d52 100644
--- a/tools/browser/data-manager/data-favorite-selector.c
+++ b/tools/browser/data-manager/data-favorite-selector.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -291,7 +291,7 @@ properties_activated_cb (GtkMenuItem *mitem, DataFavoriteSelector *tsel)
str = g_strdup_printf ("<b>%s:</b>", _("Favorite's properties"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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); /* HIG */
@@ -306,14 +306,14 @@ properties_activated_cb (GtkMenuItem *mitem, DataFavoriteSelector *tsel)
str = g_strdup_printf ("<b>%s:</b>", _("Name"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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, 1, 1);
label = gtk_label_new ("");
str = g_strdup_printf ("<b>%s:</b>", _("Specifications"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
entry = gtk_entry_new ();
diff --git a/tools/browser/data-manager/data-widget.c b/tools/browser/data-manager/data-widget.c
index 2e7e2ea..a88c43f 100644
--- a/tools/browser/data-manager/data-widget.c
+++ b/tools/browser/data-manager/data-widget.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 David King <davidk openismus com>
- * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This program is free software; you can redistribute it and/or
@@ -112,7 +112,7 @@ data_widget_init (DataWidget *dwid, G_GNUC_UNUSED DataWidgetClass *klass)
info = gtk_info_bar_new ();
gtk_notebook_append_page (GTK_NOTEBOOK (dwid->priv->top_nb), info, NULL);
dwid->priv->info_label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (dwid->priv->info_label), 0., -1);
+ gtk_widget_set_halign (dwid->priv->info_label, GTK_ALIGN_START);
gtk_label_set_ellipsize (GTK_LABEL (dwid->priv->info_label), PANGO_ELLIPSIZE_END);
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (info))),
dwid->priv->info_label);
@@ -230,7 +230,7 @@ create_or_reuse_part (DataWidget *dwid, DataSource *source, gboolean *out_reused
}
else
gtk_label_set_markup (GTK_LABEL (label), "<b><small> </small></b>");
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_size_request (label, 150, -1);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (header), label, TRUE, TRUE, 0);
@@ -609,7 +609,7 @@ data_part_show_error (DataPart *part, GError *error)
error && error->message ? error->message : _("no detail"));
if (! part->error_widget) {
part->error_widget = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (part->error_widget), 0., 0.);
+ gtk_widget_set_halign (part->error_widget, GTK_ALIGN_START);
part->error_widget_page = gtk_notebook_append_page (part->nb, part->error_widget,
NULL);
gtk_widget_show (part->error_widget);
diff --git a/tools/browser/data-manager/ui-spec-editor.c b/tools/browser/data-manager/ui-spec-editor.c
index c23c59c..50ca506 100644
--- a/tools/browser/data-manager/ui-spec-editor.c
+++ b/tools/browser/data-manager/ui-spec-editor.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 David King <davidk openismus com>
- * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This program is free software; you can redistribute it and/or
@@ -245,7 +245,7 @@ ui_spec_editor_init (UiSpecEditor *sped, G_GNUC_UNUSED UiSpecEditorClass *klass)
str = g_strdup_printf ("<b>%s</b>", _("Data sources:"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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);
/* data sources model & view */
@@ -303,7 +303,7 @@ ui_spec_editor_init (UiSpecEditor *sped, G_GNUC_UNUSED UiSpecEditorClass *klass)
str = g_strdup_printf ("<b>%s</b>", _("Selected data source's properties:"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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);
GtkWidget *pe;
diff --git a/tools/browser/data-manager/xml-spec-editor.c b/tools/browser/data-manager/xml-spec-editor.c
index 5badffd..98014bb 100644
--- a/tools/browser/data-manager/xml-spec-editor.c
+++ b/tools/browser/data-manager/xml-spec-editor.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 David King <davidk openismus com>
- * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This program is free software; you can redistribute it and/or
@@ -223,7 +223,7 @@ signal_editor_changed (XmlSpecEditor *sped)
sped->priv->info = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (sped), sped->priv->info, FALSE, FALSE, 0);
sped->priv->info_label = gtk_label_new ("");
- gtk_misc_set_alignment (GTK_MISC (sped->priv->info_label), 0., -1);
+ gtk_widget_set_halign (sped->priv->info_label, GTK_ALIGN_START);
gtk_label_set_ellipsize (GTK_LABEL (sped->priv->info_label), PANGO_ELLIPSIZE_END);
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR
(sped->priv->info))),
sped->priv->info_label);
@@ -318,7 +318,7 @@ xml_spec_editor_new (DataSourceManager *mgr)
str = g_strdup_printf ("<b>%s</b>", _("SQL code to execute:"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (sped), label, FALSE, FALSE, 0);
sw = gtk_scrolled_window_new (NULL, NULL);
diff --git a/tools/browser/fk-declare.c b/tools/browser/fk-declare.c
index 6209b7b..6972920 100644
--- a/tools/browser/fk-declare.c
+++ b/tools/browser/fk-declare.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -190,7 +190,7 @@ create_internal_layout (FkDeclare *decl)
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (dcontents), label, FALSE, FALSE, 0);
gtk_widget_show_all (label);
@@ -201,10 +201,8 @@ create_internal_layout (FkDeclare *decl)
gtk_grid_set_row_spacing (GTK_GRID (grid), 5);
/* FK name */
- gfloat yalign;
label = gtk_label_new (_("Foreign key name:"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &yalign);
- gtk_misc_set_alignment (GTK_MISC (label), 0., yalign);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
entry = gtk_entry_new ();
decl->priv->fk_name = entry;
@@ -214,8 +212,7 @@ create_internal_layout (FkDeclare *decl)
/* table to reference */
label = gtk_label_new (_("Referenced table:"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &yalign);
- gtk_misc_set_alignment (GTK_MISC (label), 0., yalign);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
GtkTreeModel *model;
@@ -252,14 +249,14 @@ create_internal_layout (FkDeclare *decl)
markup = g_strdup_printf ("<b>%s:</b>", _("Columns"));
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
- 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);
label = gtk_label_new ("");
markup = g_strdup_printf ("<b>%s:</b>", _("Referenced column"));
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 2, 1, 1);
/* columns */
diff --git a/tools/browser/gdaui-data-import.c b/tools/browser/gdaui-data-import.c
index 6ae161e..217794c 100644
--- a/tools/browser/gdaui-data-import.c
+++ b/tools/browser/gdaui-data-import.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -121,8 +121,8 @@ gdaui_data_import_init (GdauiDataImport * import)
str = g_strdup_printf ("<b>%s:</b>", _("Import specifications"));
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
- g_free (str);
+ g_free (str);
+ 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); /* HIG */
@@ -138,7 +138,7 @@ gdaui_data_import_init (GdauiDataImport * import)
/* file to import from */
label = gtk_label_new (_("File to import from:"));
- 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, 1, 1);
entry = gtk_file_chooser_button_new (_("File to import data from"), GTK_FILE_CHOOSER_ACTION_OPEN);
@@ -163,7 +163,7 @@ gdaui_data_import_init (GdauiDataImport * import)
/* Encoding */
label = gtk_label_new (_("Encoding:"));
- 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);
gchar *fname = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "import_encodings.xml", NULL);
@@ -190,7 +190,7 @@ gdaui_data_import_init (GdauiDataImport * import)
/* first line as title */
label = gtk_label_new (_("First line as title:"));
- 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);
entry = gtk_check_button_new ();
@@ -202,7 +202,7 @@ gdaui_data_import_init (GdauiDataImport * import)
/* separator */
label = gtk_label_new (_("Separator:"));
- 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, 3, 1, 1);
entry = gtk_radio_button_new_with_label (NULL, _("Comma"));
@@ -269,8 +269,8 @@ gdaui_data_import_init (GdauiDataImport * import)
str = g_strdup_printf ("<b>%s:</b>", _("Import preview"));
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
- g_free (str);
+ g_free (str);
+ 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); /* HIG */
@@ -283,7 +283,7 @@ gdaui_data_import_init (GdauiDataImport * import)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), _("No data."));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
import->priv->no_data_label = label;
diff --git a/tools/browser/gdaui-entry-import.c b/tools/browser/gdaui-entry-import.c
index 0fcf442..01e1bc1 100644
--- a/tools/browser/gdaui-entry-import.c
+++ b/tools/browser/gdaui-entry-import.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -235,7 +235,6 @@ create_entry (GdauiEntryWrapper *mgwrap)
{
GdauiEntryImport *mgtxt;
GtkWidget *hbox;
- gfloat ya;
g_return_val_if_fail (mgwrap && GDAUI_IS_ENTRY_IMPORT (mgwrap), NULL);
mgtxt = GDAUI_ENTRY_IMPORT (mgwrap);
@@ -244,8 +243,7 @@ create_entry (GdauiEntryWrapper *mgwrap)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
mgtxt->priv->label = GTK_LABEL (gtk_label_new (_("No data set")));
- gtk_misc_get_alignment (GTK_MISC (mgtxt->priv->label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (mgtxt->priv->label), 0., ya);
+ gtk_widget_set_halign (GTK_WIDGET (mgtxt->priv->label), GTK_ALIGN_START);
gtk_widget_show ((GtkWidget*) mgtxt->priv->label);
gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) mgtxt->priv->label, TRUE, TRUE, 0);
diff --git a/tools/browser/ldap-browser/filter-editor.c b/tools/browser/ldap-browser/filter-editor.c
index 9122fe4..b40e3dd 100644
--- a/tools/browser/ldap-browser/filter-editor.c
+++ b/tools/browser/ldap-browser/filter-editor.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
- * Copyright (C) 2011 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -138,7 +138,6 @@ filter_editor_new (TConnection *tcnc)
GdaDataModel *model;
GList *values;
GValue *v1, *v2;
- gfloat ya;
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
@@ -150,20 +149,16 @@ filter_editor_new (TConnection *tcnc)
gtk_box_pack_start (GTK_BOX (feditor), grid, TRUE, TRUE, 0);
label = gtk_label_new (_("Base DN:"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (label), 0., ya);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
label = gtk_label_new (_("Filter expression:"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (label), 0., ya);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
label = gtk_label_new (_("Attributes to fetch:"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (label), 0., ya);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
label = gtk_label_new (_("Search scope:"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (label), 0., ya);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
entry = gtk_entry_new ();
diff --git a/tools/browser/ldap-browser/ldap-classes-page.c b/tools/browser/ldap-browser/ldap-classes-page.c
index d4b7725..cc06bcd 100644
--- a/tools/browser/ldap-browser/ldap-classes-page.c
+++ b/tools/browser/ldap-browser/ldap-classes-page.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
- * Copyright (C) 2011 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -330,7 +330,6 @@ ldap_classes_page_new (TConnection *tcnc, const gchar *classname)
/* tree */
GtkWidget *vbox, *hview, *sw;
- gfloat yalign;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
gtk_paned_add1 (GTK_PANED (hp), vbox);
@@ -339,8 +338,7 @@ ldap_classes_page_new (TConnection *tcnc, const gchar *classname)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &yalign);
- gtk_misc_set_alignment (GTK_MISC (label), 0., yalign);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hview = classes_view_new (tcnc, NULL);
@@ -366,8 +364,7 @@ ldap_classes_page_new (TConnection *tcnc, const gchar *classname)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &yalign);
- gtk_misc_set_alignment (GTK_MISC (label), 0., yalign);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
GtkWidget *props;
diff --git a/tools/browser/ldap-browser/ldap-entries-page.c b/tools/browser/ldap-browser/ldap-entries-page.c
index 6fd015c..0904ce7 100644
--- a/tools/browser/ldap-browser/ldap-entries-page.c
+++ b/tools/browser/ldap-browser/ldap-entries-page.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
- * Copyright (C) 2011 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -336,7 +336,6 @@ ldap_entries_page_new (TConnection *tcnc, const gchar *dn)
/* tree */
GtkWidget *vbox, *hview, *sw;
- gfloat yalign;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
gtk_paned_add1 (GTK_PANED (hp), vbox);
@@ -345,8 +344,7 @@ ldap_entries_page_new (TConnection *tcnc, const gchar *dn)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &yalign);
- gtk_misc_set_alignment (GTK_MISC (label), 0., yalign);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hview = hierarchy_view_new (tcnc, dn);
@@ -372,8 +370,7 @@ ldap_entries_page_new (TConnection *tcnc, const gchar *dn)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &yalign);
- gtk_misc_set_alignment (GTK_MISC (label), 0., yalign);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
GtkWidget *props;
diff --git a/tools/browser/ldap-browser/ldap-favorite-selector.c
b/tools/browser/ldap-browser/ldap-favorite-selector.c
index 295b900..ee84ab3 100644
--- a/tools/browser/ldap-browser/ldap-favorite-selector.c
+++ b/tools/browser/ldap-browser/ldap-favorite-selector.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
- * Copyright (C) 2011 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -273,7 +273,6 @@ properties_activated_cb (GtkMenuItem *mitem, LdapFavoriteSelector *fsel)
if (! fsel->priv->popup_properties) {
GtkWidget *pcont, *vbox, *hbox, *label, *entry, *grid;
gchar *str;
- gfloat align;
pcont = popup_container_new (GTK_WIDGET (mitem));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -283,8 +282,7 @@ properties_activated_cb (GtkMenuItem *mitem, LdapFavoriteSelector *fsel)
str = g_strdup_printf ("<b>%s:</b>", _("Favorite's properties"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &align);
- gtk_misc_set_alignment (GTK_MISC (label), 0., align);
+ 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); /* HIG */
@@ -299,15 +297,14 @@ properties_activated_cb (GtkMenuItem *mitem, LdapFavoriteSelector *fsel)
str = g_strdup_printf ("<b>%s:</b>", _("Name"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &align);
- gtk_misc_set_alignment (GTK_MISC (label), 0., align);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
label = gtk_label_new ("");
str = g_strdup_printf ("<b>%s:</b>", _("Description"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
entry = gtk_entry_new ();
diff --git a/tools/browser/ldap-browser/ldap-search-page.c b/tools/browser/ldap-browser/ldap-search-page.c
index 35e9c65..973faf7 100644
--- a/tools/browser/ldap-browser/ldap-search-page.c
+++ b/tools/browser/ldap-browser/ldap-search-page.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
- * Copyright (C) 2011 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -282,13 +282,11 @@ ldap_search_page_new (TConnection *tcnc, const gchar *base_dn)
/* search filter settings */
GtkWidget *hb, *bb, *button, *wid;
gchar *tmp;
- gfloat ya;
tmp = g_markup_printf_escaped ("<b>%s:</b>", _("LDAP search settings"));
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (label), 0., ya);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (epage), label, FALSE, FALSE, 0);
hb = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -325,8 +323,7 @@ ldap_search_page_new (TConnection *tcnc, const gchar *base_dn)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &ya);
- gtk_misc_set_alignment (GTK_MISC (label), 0., ya);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (epage), label, FALSE, FALSE, 5);
wid = ui_formgrid_new (NULL, TRUE, 0);
diff --git a/tools/browser/ldap-browser/vtable-dialog.c b/tools/browser/ldap-browser/vtable-dialog.c
index 2e47392..7b64d5e 100644
--- a/tools/browser/ldap-browser/vtable-dialog.c
+++ b/tools/browser/ldap-browser/vtable-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2011 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -122,7 +122,7 @@ vtable_dialog_new (GtkWindow *parent, TConnection *tcnc)
gchar *str;
dcontents = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
str = g_markup_printf_escaped ("<b>%s:</b>\n<small>%s</small>",
_("Name of the virtual LDAP table to create"),
_("Everytime data is selected from the virtual table which will "
@@ -139,7 +139,7 @@ vtable_dialog_new (GtkWindow *parent, TConnection *tcnc)
gtk_box_pack_start (GTK_BOX (dcontents), grid, FALSE, FALSE, SPACING);
label = gtk_label_new (_("Table name:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
entry = gtk_entry_new ();
@@ -147,7 +147,7 @@ vtable_dialog_new (GtkWindow *parent, TConnection *tcnc)
dlg->priv->tname_entry = entry;
label = gtk_label_new (_("Replace if exists:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
button = gtk_check_button_new ();
diff --git a/tools/browser/login-dialog.c b/tools/browser/login-dialog.c
index 90640e9..1105fb3 100644
--- a/tools/browser/login-dialog.c
+++ b/tools/browser/login-dialog.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -135,7 +135,7 @@ login_dialog_init (LoginDialog *dialog)
"to open a connection to a \nnon defined data source"));
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 12);
gtk_widget_show_all (hbox);
diff --git a/tools/browser/query-exec/query-console-page.c b/tools/browser/query-exec/query-console-page.c
index fddbc9b..ba7d048 100644
--- a/tools/browser/query-exec/query-console-page.c
+++ b/tools/browser/query-exec/query-console-page.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -260,7 +260,7 @@ query_console_page_new (TConnection *tcnc)
str = g_strdup_printf ("<b>%s</b>", _("SQL code to execute:"));
gtk_label_set_markup (GTK_LABEL (wid), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_widget_set_tooltip_markup (wid, QUERY_EDITOR_TOOLTIP);
gtk_box_pack_start (GTK_BOX (vbox), wid, FALSE, FALSE, 0);
@@ -280,7 +280,7 @@ query_console_page_new (TConnection *tcnc)
str = g_strdup_printf ("<b>%s</b>", _("Variables' values:"));
gtk_label_set_markup (GTK_LABEL (wid), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), wid, FALSE, FALSE, 0);
GtkWidget *sw;
@@ -297,7 +297,7 @@ query_console_page_new (TConnection *tcnc)
wid = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (wid), VARIABLES_HELP);
- gtk_misc_set_alignment (GTK_MISC (wid), -1, 0.);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (tconsole->priv->params_form_box), wid);
tconsole->priv->params_form = wid;
@@ -352,7 +352,7 @@ query_console_page_new (TConnection *tcnc)
str = g_strdup_printf ("<b>%s</b>", _("Execution history:"));
gtk_label_set_markup (GTK_LABEL (wid), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), wid, FALSE, FALSE, 0);
wid = query_editor_new ();
@@ -391,7 +391,7 @@ query_console_page_new (TConnection *tcnc)
str = g_strdup_printf ("<b>%s</b>", _("Execution Results:"));
gtk_label_set_markup (GTK_LABEL (wid), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), wid, FALSE, FALSE, 0);
wid = query_result_new (tconsole->priv->history);
diff --git a/tools/browser/query-exec/query-favorite-selector.c
b/tools/browser/query-exec/query-favorite-selector.c
index cf69975..c5d8224 100644
--- a/tools/browser/query-exec/query-favorite-selector.c
+++ b/tools/browser/query-exec/query-favorite-selector.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -326,7 +326,6 @@ properties_activated_cb (GtkMenuItem *mitem, QueryFavoriteSelector *tsel)
if (! tsel->priv->popup_properties) {
GtkWidget *pcont, *vbox, *hbox, *label, *entry, *text, *grid;
gchar *str;
- gfloat align;
pcont = popup_container_new (GTK_WIDGET (mitem));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -336,8 +335,7 @@ properties_activated_cb (GtkMenuItem *mitem, QueryFavoriteSelector *tsel)
str = g_strdup_printf ("<b>%s:</b>", _("Favorite's properties"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &align);
- gtk_misc_set_alignment (GTK_MISC (label), 0., align);
+ 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); /* HIG */
@@ -352,15 +350,14 @@ properties_activated_cb (GtkMenuItem *mitem, QueryFavoriteSelector *tsel)
str = g_strdup_printf ("<b>%s:</b>", _("Name"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &align);
- gtk_misc_set_alignment (GTK_MISC (label), 0., align);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
label = gtk_label_new ("");
str = g_strdup_printf ("<b>%s:</b>", _("SQL Code"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
label = gtk_label_new ("");
@@ -371,8 +368,7 @@ properties_activated_cb (GtkMenuItem *mitem, QueryFavoriteSelector *tsel)
"which can be proposed for execution from grids\n"
"containing data. The parameters required to execute\n"
"the query will be defined from the row selected in the
grid"));
- gtk_misc_get_alignment (GTK_MISC (label), NULL, &align);
- gtk_misc_set_alignment (GTK_MISC (label), 0., align);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
entry = gtk_entry_new ();
diff --git a/tools/browser/query-exec/query-result.c b/tools/browser/query-exec/query-result.c
index b6eab38..2d96070 100644
--- a/tools/browser/query-exec/query-result.c
+++ b/tools/browser/query-exec/query-result.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -423,7 +423,7 @@ make_widget_for_set (GdaSet *set)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
img = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (img), 0., 0.);
+ gtk_widget_set_halign (img, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), img, FALSE, FALSE, 0);
GtkWidget *label;
@@ -469,7 +469,7 @@ make_widget_for_set (GdaSet *set)
}
}
gtk_label_set_markup (GTK_LABEL (label), string->str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
g_string_free (string, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
@@ -486,7 +486,7 @@ make_widget_for_error (GError *error)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
img = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (img), 0., 0.);
+ gtk_widget_set_halign (img, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), img, FALSE, FALSE, 0);
GtkWidget *label;
@@ -505,7 +505,7 @@ make_widget_for_error (GError *error)
g_string_append (string, _("No detail"));
gtk_label_set_markup (GTK_LABEL (label), string->str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
g_string_free (string, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
diff --git a/tools/browser/schema-browser/table-preferences.c
b/tools/browser/schema-browser/table-preferences.c
index 7721ca8..e13817d 100644
--- a/tools/browser/schema-browser/table-preferences.c
+++ b/tools/browser/schema-browser/table-preferences.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 David King <davidk openismus com>
- * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This program is free software; you can redistribute it and/or
@@ -333,7 +333,7 @@ table_preferences_new (TableInfo *tinfo)
str = g_strdup_printf ("<b>%s:</b>", _("Table's fields"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- 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, 1, 1);
GtkWidget *sw, *treeview;
@@ -377,7 +377,7 @@ table_preferences_new (TableInfo *tinfo)
str = g_strdup_printf ("<b>%s:</b>", _("Field's display preferences"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
tpref->priv->field_props = create_column_properties (tpref);
@@ -454,31 +454,31 @@ create_column_properties (TablePreferences *tpref)
gtk_widget_set_tooltip_text (label, _("Defines how data for the selected column\n"
"will be displayed in forms. Leave 'Default' to have\n"
"the default display"));
- 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, 1, 1);
/* plugin options */
tpref->priv->options_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_grid_attach (GTK_GRID (grid), tpref->priv->options_vbox, 1, 1, 1, 1);
tpref->priv->options_none = gtk_label_new (_("none"));
- gtk_misc_set_alignment (GTK_MISC (tpref->priv->options_none), 0., -1);
+ gtk_widget_set_halign (tpref->priv->options_none, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (tpref->priv->options_vbox), tpref->priv->options_none, FALSE, FALSE, 0);
label = gtk_label_new (_("Options:"));
- 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);
/* plugin preview */
tpref->priv->preview_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_grid_attach (GTK_GRID (grid), tpref->priv->preview_vbox, 1, 2, 1, 1);
tpref->priv->preview_none = gtk_label_new (_("none"));
- gtk_misc_set_alignment (GTK_MISC (tpref->priv->preview_none), 0., -1);
+ gtk_widget_set_halign (tpref->priv->preview_none, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (tpref->priv->preview_vbox), tpref->priv->preview_none, FALSE, FALSE, 0);
label = gtk_label_new (_("Preview:"));
gtk_widget_set_tooltip_text (label, _("Free form to test the configured\n"
"data entry"));
- 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);
gtk_widget_show_all (grid);
diff --git a/tools/browser/ui-formgrid.c b/tools/browser/ui-formgrid.c
index 1f172e4..d4041f6 100644
--- a/tools/browser/ui-formgrid.c
+++ b/tools/browser/ui-formgrid.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 David King <davidk openismus com>
- * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2015 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This program is free software; you can redistribute it and/or
@@ -701,7 +701,7 @@ execute_action_mitem_cb (GtkMenuItem *menuitem, UiFormGrid *formgrid)
label = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (label), tmp);
g_free (tmp);
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (dcontents), label, FALSE, FALSE, 5);
fg = ui_formgrid_new (GDA_DATA_MODEL (result), TRUE,
diff --git a/tools/browser/ui-support.c b/tools/browser/ui-support.c
index 656d2d5..e145d18 100644
--- a/tools/browser/ui-support.c
+++ b/tools/browser/ui-support.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2014 - 2015 Vivien Malerba <malerba gnome-db org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -403,7 +403,7 @@ ui_make_small_button (gboolean is_toggle, gboolean with_arrow,
if (label) {
GtkWidget *wid;
wid = gtk_label_new (label);
- gtk_misc_set_alignment (GTK_MISC (wid), 0., -1);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
if (hbox)
gtk_box_pack_start (GTK_BOX (hbox), wid, FALSE, FALSE, 5);
else
@@ -414,7 +414,8 @@ ui_make_small_button (gboolean is_toggle, gboolean with_arrow,
GtkWidget *arrow;
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, TRUE, 0);
- gtk_misc_set_alignment (GTK_MISC (arrow), 1, .5);
+ gtk_widget_set_halign (arrow, GTK_ALIGN_END);
+ gtk_widget_set_valign (arrow, GTK_ALIGN_CENTER);
gtk_widget_show (arrow);
}
@@ -450,8 +451,8 @@ _make_tab_label (const gchar *label,
wid = gtk_label_new (label);
gtk_label_set_single_line_mode (GTK_LABEL (wid), TRUE);
- gtk_misc_set_alignment (GTK_MISC (wid), 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (wid), 0, 0);
+ gtk_widget_set_halign (wid, GTK_ALIGN_START);
+ gtk_widget_set_valign (wid, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (hbox), wid, TRUE, TRUE, 0);
if (with_close) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]