From e65d809e426935fd57df00b1849f958f8aa22f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= Date: Sat, 28 Sep 2013 20:45:32 -0700 Subject: [PATCH 2/3] glib: Make the Remove annotation button prominent in demo Move out from Annotation properties to the top. This make better use of the space. --- glib/demo/annots.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/glib/demo/annots.c b/glib/demo/annots.c index 39ff235..3c740bc 100644 --- a/glib/demo/annots.c +++ b/glib/demo/annots.c @@ -491,7 +491,6 @@ pgd_annot_view_set_annot (PgdAnnotsDemo *demo, { GtkWidget *alignment; GtkWidget *table; - GtkWidget *button; gint row = 0; gchar *text; time_t timet; @@ -561,13 +560,6 @@ pgd_annot_view_set_annot (PgdAnnotsDemo *demo, break; } - button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); - g_signal_connect (G_OBJECT (button), "clicked", - G_CALLBACK (pgd_annots_remove_annot), - (gpointer) demo); - gtk_grid_attach (GTK_GRID (table), button, 0, row, 2, 1); - gtk_widget_show (button); - gtk_container_add (GTK_CONTAINER (alignment), table); gtk_widget_show (table); } @@ -929,8 +921,8 @@ pgd_annots_create_widget (PopplerDocument *document) PgdAnnotsDemo *demo; GtkWidget *label; GtkWidget *vbox, *vbox2; - GtkWidget *hbox, *page_selector; GtkWidget *button; + GtkWidget *hbox, *page_selector; GtkWidget *hpaned; GtkWidget *swindow, *treeview; GtkTreeSelection *selection; @@ -967,6 +959,13 @@ pgd_annots_create_widget (PopplerDocument *document) gtk_widget_show (label); g_free (str); + button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); + g_signal_connect (G_OBJECT (button), "clicked", + G_CALLBACK (pgd_annots_remove_annot), + (gpointer) demo); + gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 6); + gtk_widget_show (button); + button = gtk_button_new_with_label ("Add Annotation"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (pgd_annots_add_annot), -- 1.7.9.5