glib/demo/annots.c      |    8 ++++----
 glib/demo/attachments.c |    4 ++--
 glib/demo/main.c        |   11 ++++-------
 glib/demo/page.c        |    6 +++---
 glib/demo/utils.c       |    4 ++--
 5 files changed, 15 insertions(+), 18 deletions(-)

New commits:
commit 4a4fe80d85a31b10822c7cd8eb5a0698bf306a52
Author: Hib Eris <[email protected]>
Date:   Fri Aug 1 07:16:36 2014 +0200

    glib-demo: Replace use of deprecated gtk stock items
    
    https://bugs.freedesktop.org/show_bug.cgi?id=82384

diff --git a/glib/demo/annots.c b/glib/demo/annots.c
index 2e843fc..19457d1 100644
--- a/glib/demo/annots.c
+++ b/glib/demo/annots.c
@@ -553,8 +553,8 @@ pgd_annot_save_file_attachment_button_clicked (GtkButton    
              *butto
     file_chooser = gtk_file_chooser_dialog_new ("Save attachment",
                                                GTK_WINDOW 
(gtk_widget_get_toplevel (GTK_WIDGET (button))),
                                                GTK_FILE_CHOOSER_ACTION_SAVE,
-                                               GTK_STOCK_CANCEL, 
GTK_RESPONSE_CANCEL,
-                                               GTK_STOCK_SAVE, 
GTK_RESPONSE_ACCEPT,
+                                               "_Cancel", GTK_RESPONSE_CANCEL,
+                                               "_Save", GTK_RESPONSE_ACCEPT,
                                                NULL);
     gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_chooser), 
attachment->name);
     g_signal_connect (G_OBJECT (file_chooser), "response",
@@ -1289,7 +1289,7 @@ pgd_annots_create_widget (PopplerDocument *document)
     gtk_widget_show (label);
     g_free (str);
 
-    demo->remove_button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+    demo->remove_button = gtk_button_new_with_mnemonic ("_Remove");
     gtk_widget_set_sensitive (demo->remove_button, FALSE);
     g_signal_connect (G_OBJECT (demo->remove_button), "clicked",
                       G_CALLBACK (pgd_annots_remove_annot),
@@ -1299,7 +1299,7 @@ pgd_annots_create_widget (PopplerDocument *document)
 
     gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
 
-    button = gtk_button_new_from_stock (GTK_STOCK_ADD);
+    button = gtk_button_new_with_mnemonic ("_Add");
     g_signal_connect (G_OBJECT (button), "clicked",
                       G_CALLBACK (pgd_annots_start_add_annot),
                       (gpointer) demo);
diff --git a/glib/demo/attachments.c b/glib/demo/attachments.c
index 6fe7eda..0ecd5b8 100644
--- a/glib/demo/attachments.c
+++ b/glib/demo/attachments.c
@@ -168,8 +168,8 @@ pgd_attachments_save_button_clicked (GtkButton   *button,
        file_chooser = gtk_file_chooser_dialog_new ("Save attachment",
                                                    GTK_WINDOW 
(gtk_widget_get_toplevel (GTK_WIDGET (treeview))),
                                                    
GTK_FILE_CHOOSER_ACTION_SAVE,
-                                                   GTK_STOCK_CANCEL, 
GTK_RESPONSE_CANCEL,
-                                                   GTK_STOCK_SAVE, 
GTK_RESPONSE_ACCEPT,
+                                                   "_Cancel", 
GTK_RESPONSE_CANCEL,
+                                                   "_Save", 
GTK_RESPONSE_ACCEPT,
                                                    NULL);
        gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_chooser), 
attachment->name);
        g_signal_connect (G_OBJECT (file_chooser), "response",
diff --git a/glib/demo/main.c b/glib/demo/main.c
index 7a472b7..1816825 100644
--- a/glib/demo/main.c
+++ b/glib/demo/main.c
@@ -186,11 +186,11 @@ pgd_demo_get_auth_dialog (GFile *uri_file)
 
        gtk_window_set_title (GTK_WINDOW (dialog), "Enter password");
        gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
-       gtk_window_set_icon_name (GTK_WINDOW (dialog), 
GTK_STOCK_DIALOG_AUTHENTICATION);
+       gtk_window_set_icon_name (GTK_WINDOW (dialog), "dialog-password");
        gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
 
        gtk_dialog_add_buttons (dialog,
-                               GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                               "_Cancel", GTK_RESPONSE_CANCEL,
                                "_Unlock Document", GTK_RESPONSE_OK,
                                NULL);
        gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
@@ -207,7 +207,7 @@ pgd_demo_get_auth_dialog (GFile *uri_file)
        gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
        gtk_widget_show (hbox);
 
-       icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION,
+       icon = gtk_image_new_from_icon_name ("dialog-password",
                                         GTK_ICON_SIZE_DIALOG);
 
        gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
diff --git a/glib/demo/page.c b/glib/demo/page.c
index ddf7789..f9413a8 100644
--- a/glib/demo/page.c
+++ b/glib/demo/page.c
@@ -184,9 +184,9 @@ pgd_page_set_page (PgdPageDemo *demo,
                gtk_label_set_markup (GTK_LABEL (demo->thumbnail_size), str);
                g_free (str);
 
-               gtk_image_set_from_stock (GTK_IMAGE (demo->thumbnail),
-                                         GTK_STOCK_MISSING_IMAGE,
-                                         GTK_ICON_SIZE_DIALOG);
+               gtk_image_set_from_icon_name (GTK_IMAGE (demo->thumbnail),
+                                             "image-missing",
+                                             GTK_ICON_SIZE_DIALOG);
        }
 }
 
diff --git a/glib/demo/utils.c b/glib/demo/utils.c
index c7ae39d..5833104 100644
--- a/glib/demo/utils.c
+++ b/glib/demo/utils.c
@@ -394,7 +394,7 @@ pgd_action_view_set_action (GtkWidget     *action_view,
                                                        &row);
                        }
 
-                       button = gtk_button_new_from_stock 
(GTK_STOCK_MEDIA_PLAY);
+                       button = gtk_button_new_with_mnemonic ("_Play");
                        g_signal_connect (button, "clicked",
                                          G_CALLBACK 
(pgd_action_view_play_rendition),
                                          action->rendition.media);
@@ -572,7 +572,7 @@ pgd_movie_view_set_movie (GtkWidget    *movie_view,
        pgd_table_add_property (GTK_GRID (table), "<b>Need Poster:</b>", 
poppler_movie_need_poster (movie) ? "Yes" : "No", &row);
        pgd_table_add_property (GTK_GRID (table), "<b>Show Controls:</b>", 
poppler_movie_show_controls (movie) ? "Yes" : "No", &row);
 
-       button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
+       button = gtk_button_new_with_mnemonic ("_Play");
        g_signal_connect (button, "clicked",
                          G_CALLBACK (pgd_movie_view_play_movie),
                          movie);
commit ec6bad36cf5e9521f35285a3295976c05a69f76a
Author: Hib Eris <[email protected]>
Date:   Fri Aug 1 07:51:10 2014 +0200

    glib-demo: Remove use of deprecated gtk_dialog_get_action_area()
    
    https://bugs.freedesktop.org/show_bug.cgi?id=82385

diff --git a/glib/demo/main.c b/glib/demo/main.c
index 5bb13c9..7a472b7 100644
--- a/glib/demo/main.c
+++ b/glib/demo/main.c
@@ -169,7 +169,7 @@ static GtkDialog *
 pgd_demo_get_auth_dialog (GFile *uri_file)
 {
        GtkDialog *dialog;
-       GtkWidget *content_area, *action_area;
+       GtkWidget *content_area;
        GtkWidget *entry_container;
        GtkWidget *password_entry;
        GtkWidget *hbox, *main_vbox, *vbox, *icon;
@@ -179,13 +179,10 @@ pgd_demo_get_auth_dialog (GFile *uri_file)
 
        dialog = GTK_DIALOG (gtk_dialog_new ());
        content_area = gtk_dialog_get_content_area (dialog);
-       action_area = gtk_dialog_get_action_area (dialog);
 
        /* Set the dialog up with HIG properties */
        gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
        gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
-       gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
-       gtk_box_set_spacing (GTK_BOX (action_area), 6);
 
        gtk_window_set_title (GTK_WINDOW (dialog), "Enter password");
        gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to