summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorDiego Celix <dcelix@gmail.com>2011-06-13 01:39:48 +0200
committerMatthias Clasen <mclasen@redhat.com>2011-08-28 20:16:59 -0400
commit9b31aff56c9cda92819107340357bfaf5b307c3d (patch)
treebb99dce0a9e6f5d1fbfc9ed8f6dd0da4a6cd5c22 /demos
parenta3719d3033305822a17f6024ef7491d270a0681f (diff)
downloadgtk+-9b31aff56c9cda92819107340357bfaf5b307c3d.tar.gz
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
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/pickers.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index e1f82ca02e..b7754b5626 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);