[gtk+] demo-pickers: gtk_misc_set_alignment replacing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] demo-pickers: gtk_misc_set_alignment replacing
- Date: Mon, 29 Aug 2011 00:36:06 +0000 (UTC)
commit 9b31aff56c9cda92819107340357bfaf5b307c3d
Author: Diego Celix <dcelix gmail com>
Date: Mon Jun 13 01:39:48 2011 +0200
demo-pickers: gtk_misc_set_alignment replacing
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
demos/gtk-demo/pickers.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
demos/gtk-demo/pickers.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index e1f82ca..b7754b5 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -33,33 +33,38 @@ do_pickers (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (table), 10);
label = gtk_label_new ("Color:");
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
picker = gtk_color_button_new ();
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 0, 1);
label = gtk_label_new ("Font:");
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
picker = gtk_font_button_new ();
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 1, 2);
label = gtk_label_new ("File:");
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
picker = gtk_file_chooser_button_new ("Pick a File",
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3);
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 2, 3);
label = gtk_label_new ("Folder:");
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
picker = gtk_file_chooser_button_new ("Pick a Folder",
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4);
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 3, 4);
label = gtk_label_new ("Mail:");
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
picker = gtk_app_chooser_button_new ("x-scheme-handler/mailto");
gtk_app_chooser_button_set_show_dialog_item (GTK_APP_CHOOSER_BUTTON (picker), TRUE);
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 4, 5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]