From 5d45f44431adfecde72970fbcaeb6510ec89ced8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= Date: Wed, 24 Jul 2013 14:21:22 -0700 Subject: [PATCH] glib: fix deprecation symbols for gtk+ 3.10 --- glib/demo/annots.c | 8 ++++---- glib/demo/attachments.c | 4 ++-- glib/demo/main.c | 6 +++--- glib/demo/page.c | 4 ++-- glib/demo/utils.c | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/glib/demo/annots.c b/glib/demo/annots.c index 3ff7f12..ff35456 100644 --- a/glib/demo/annots.c +++ b/glib/demo/annots.c @@ -411,8 +411,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", @@ -549,7 +549,7 @@ pgd_annot_view_set_annot (PgdAnnotsDemo *demo, break; } - button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); + button = gtk_button_new_with_mnemonic ("_Remove"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (pgd_annots_remove_annot), (gpointer) demo); @@ -747,7 +747,7 @@ pgd_annots_add_annot (GtkWidget *button, dialog = gtk_dialog_new_with_buttons ("Add new annotation", GTK_WINDOW (gtk_widget_get_toplevel (button)), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + "_Cancel", GTK_RESPONSE_CANCEL, "Add annotation", GTK_RESPONSE_ACCEPT, NULL); 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 2523800..e77b427 100644 --- a/glib/demo/main.c +++ b/glib/demo/main.c @@ -187,11 +187,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); @@ -208,7 +208,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..e17d99c 100644 --- a/glib/demo/page.c +++ b/glib/demo/page.c @@ -184,8 +184,8 @@ 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_image_set_from_icon_name (GTK_IMAGE (demo->thumbnail), + "missing-image", 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.7.9.5