summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-01-14 17:50:26 +0000
committerjstebbins <[email protected]>2014-01-14 17:50:26 +0000
commit1c0097edfa33274b8eef7eef028d6465654b4cb6 (patch)
tree87692c9dbabf681fb0fe804b2be7a8f234cd0f59
parent81003b39a7c463b54f74bab1ddcd632b2f6ee757 (diff)
LinGui: fix deprecated GTK_STOCK_*
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5968 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/callbacks.c4
-rw-r--r--gtk/src/ghbcompat.h10
-rw-r--r--gtk/src/presets.c8
3 files changed, 16 insertions, 6 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 7563eb926..01a935338 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1215,8 +1215,8 @@ destination_browse_clicked_cb(GtkButton *button, signal_user_data_t *ud)
dialog = gtk_file_chooser_dialog_new ("Choose Destination",
NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ GHB_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GHB_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), destname);
basename = g_path_get_basename(destname);
diff --git a/gtk/src/ghbcompat.h b/gtk/src/ghbcompat.h
index 2acaa63b9..2c4ba99ad 100644
--- a/gtk/src/ghbcompat.h
+++ b/gtk/src/ghbcompat.h
@@ -38,4 +38,14 @@ static inline gboolean gtk_widget_get_realized(GtkWidget *widget)
#define GHB_PAUSE_ICON "media-playback-pause"
#endif
+#if !GTK_CHECK_VERSION(3, 10, 0)
+#define GHB_STOCK_OPEN GTK_STOCK_OPEN
+#define GHB_STOCK_CANCEL GTK_STOCK_CANCEL
+#define GHB_STOCK_SAVE GTK_STOCK_SAVE
+#else
+#define GHB_STOCK_OPEN "_Open"
+#define GHB_STOCK_CANCEL "_Cancel"
+#define GHB_STOCK_SAVE "_Save"
+#endif
+
#endif // _GHB_COMPAT_H_
diff --git a/gtk/src/presets.c b/gtk/src/presets.c
index 8562401e7..d2ea4c022 100644
--- a/gtk/src/presets.c
+++ b/gtk/src/presets.c
@@ -3721,8 +3721,8 @@ preset_import_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
dialog = gtk_file_chooser_dialog_new("Import Preset", NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ GHB_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GHB_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
NULL);
filter = gtk_file_filter_new();
@@ -3843,8 +3843,8 @@ preset_export_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
dialog = gtk_file_chooser_dialog_new("Export Preset", NULL,
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ GHB_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GHB_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
exportDir = ghb_settings_get_string(ud->settings, "ExportDirectory");