From e4140fb95fd49f868e6c96b43ca61608dd0bbc51 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 7/8] 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, 7 insertions(+), 10 deletions(-) diff --git a/glib/demo/annots.c b/glib/demo/annots.c index c9cc59b..40aedf4 100644 --- a/glib/demo/annots.c +++ b/glib/demo/annots.c @@ -497,7 +497,6 @@ pgd_annot_view_set_annot (PgdAnnotsDemo *demo, { GtkWidget *alignment; GtkWidget *table; - GtkWidget *button; gint row = 0; gchar *text; time_t timet; @@ -567,13 +566,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; GtkWidget *type_selector; @@ -965,6 +957,12 @@ pgd_annots_create_widget (PopplerDocument *document) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0); 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); + button = gtk_button_new_with_label ("Add Annot"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (pgd_annots_add_annot), @@ -972,7 +970,6 @@ pgd_annots_create_widget (PopplerDocument *document) gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); - type_selector = gtk_combo_box_text_new (); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (type_selector), "None"); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (type_selector), "Text"); -- 1.7.9.5