diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-28 10:40:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-28 10:40:23 +0100 |
| commit | 75305b8c7630c28d520d4c9006a5c4df7216cf82 (patch) | |
| tree | 1141441b5ede9f15694e448063f8f46a07c4c658 /src | |
| parent | 318d819afd66b76e3ea7ce728452c2fb668c0b80 (diff) | |
Use our own DirPicker on GTK 2.24.17 (which seems to have a bugs in its GtkFileChooserButton).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/new_film_dialog.cc | 10 | ||||
| -rw-r--r-- | src/wx/new_film_dialog.h | 9 | ||||
| -rw-r--r-- | src/wx/wscript | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/wx/new_film_dialog.cc b/src/wx/new_film_dialog.cc index 191482a7c..91caa4963 100644 --- a/src/wx/new_film_dialog.cc +++ b/src/wx/new_film_dialog.cc @@ -21,7 +21,7 @@ #include <wx/stdpaths.h> #include "lib/config.h" #include "new_film_dialog.h" -#ifdef __WXMSW__ +#if defined(__WXMSW__) || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 24 && GTK_MICRO_VERSION == 17) #include "dir_picker_ctrl.h" #endif #include "wx_util.h" @@ -46,8 +46,12 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent) table->Add (_name, 1, wxEXPAND); add_label_to_sizer (table, this, _("Create in folder")); -#ifdef __WXMSW__ - _folder = new DirPickerCtrl (this); + + /* GTK 2.24.17 has a buggy GtkFileChooserButton and it was put in Ubuntu 13.04. + Use our own dir picker as this is the least bad option I can think of. + */ +#if defined(__WXMSW__) || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 24 && GTK_MICRO_VERSION == 17) + _folder = new DirPickerCtrl (this); #else _folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST); #endif diff --git a/src/wx/new_film_dialog.h b/src/wx/new_film_dialog.h index bfcbd423c..70bb7945b 100644 --- a/src/wx/new_film_dialog.h +++ b/src/wx/new_film_dialog.h @@ -19,6 +19,9 @@ #include <wx/wx.h> #include <wx/filepicker.h> +#ifdef __WXGTK__ +#include <gtk/gtk.h> +#endif class DirPickerCtrl; @@ -32,10 +35,10 @@ public: private: wxTextCtrl* _name; -#ifdef __WXMSW__ +#if defined(__WXMSW__) || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 24 && GTK_MICRO_VERSION == 17) DirPickerCtrl* _folder; -#else +#else wxDirPickerCtrl* _folder; -#endif +#endif static boost::optional<std::string> _directory; }; diff --git a/src/wx/wscript b/src/wx/wscript index 9213d7220..4bc79d6bb 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -52,6 +52,8 @@ def build(bld): obj.includes = [ '..' ] obj.export_includes = ['.'] obj.uselib = 'WXWIDGETS' + if bld.env.TARGET_LINUX: + obj.uselib += ' GTK' obj.use = 'libdvdomatic' obj.source = sources obj.target = 'dvdomatic-wx' |
