From ca017127198b41373659e87bab6b0e493c73599c Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 1 Aug 2014 07:16:36 +0200 Subject: [PATCH] glib-demo: Replace use of deprecated gtk stock items https://bugs.freedesktop.org/show_bug.cgi?id=82384 --- glib/demo/annots.c | 8 ++++---- glib/demo/attachments.c | 4 ++-- glib/demo/main.c | 6 +++--- glib/demo/page.c | 6 +++--- glib/demo/utils.c | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) 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 5bb13c9..e0c8669 100644 --- a/glib/demo/main.c +++ b/glib/demo/main.c @@ -189,11 +189,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); @@ -210,7 +210,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), "Need Poster:", poppler_movie_need_poster (movie) ? "Yes" : "No", &row); pgd_table_add_property (GTK_GRID (table), "Show Controls:", 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); -- 1.8.3.2