#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"
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
#include <wx/wx.h>
#include <wx/filepicker.h>
+#ifdef __WXGTK__
+#include <gtk/gtk.h>
+#endif
class DirPickerCtrl;
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;
};
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'
if conf.env.TARGET_LINUX:
conf.check_cfg(package='liblzma', args='--cflags --libs', uselib_store='LZMA', mandatory=True)
+ # On Linux we need to be able to include <gtk/gtk.h> to check GTK's version
+ conf.check_cfg(package='gtk+-2.0', args='--cflags', uselib_store='GTK', mandatory=True)
conf.check_cfg(package = '', path = conf.options.magickpp_config, args = '--cppflags --cxxflags --libs', uselib_store = 'MAGICK', mandatory = True)