table->AddSpacer (0);
add_label_to_sizer (table, _misc_panel, _("Default directory for new films"));
-#ifdef __WXMSW__
+#ifdef DVDOMATIC_USE_OWN_DIR_PICKER
_default_directory = new DirPickerCtrl (_misc_panel);
#else
_default_directory = new wxDirPickerCtrl (_misc_panel, wxDD_DIR_MUST_EXIST);
#include <wx/spinctrl.h>
#include <wx/listctrl.h>
#include <wx/filepicker.h>
+#include "wx_util.h"
class DirPickerCtrl;
class wxNotebook;
wxTextCtrl* _tms_user;
wxTextCtrl* _tms_password;
wxSpinCtrl* _num_local_encoding_threads;
-#ifdef __WXMSW__
+#ifdef DVDOMATIC_USE_OWN_DIR_PICKER
DirPickerCtrl* _default_directory;
#else
wxDirPickerCtrl* _default_directory;
#include <wx/stdpaths.h>
#include "lib/config.h"
#include "new_film_dialog.h"
-#if defined(__WXMSW__) || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 24 && GTK_MICRO_VERSION == 17)
+#include "wx_util.h"
+#ifdef DVDOMATIC_USE_OWN_DIR_PICKER
#include "dir_picker_ctrl.h"
#endif
-#include "wx_util.h"
using namespace std;
using namespace boost;
add_label_to_sizer (table, this, _("Create in folder"));
- /* 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)
+#ifdef DVDOMATIC_USE_OWN_DIR_PICKER
_folder = new DirPickerCtrl (this);
#else
_folder = new wxDirPickerCtrl (this, wxDD_DIR_MUST_EXIST);
#include <wx/wx.h>
#include <wx/filepicker.h>
-#ifdef __WXGTK__
-#include <gtk/gtk.h>
-#endif
+#include "wx_util.h"
class DirPickerCtrl;
private:
wxTextCtrl* _name;
-#if defined(__WXMSW__) || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 24 && GTK_MICRO_VERSION == 17)
+#ifdef DVDOMATIC_USE_OWN_DIR_PICKER
DirPickerCtrl* _folder;
#else
wxDirPickerCtrl* _folder;
*/
+#ifndef DVDOMATIC_WX_UTIL_H
+#define DVDOMATIC_WX_UTIL_H
+
#include <wx/wx.h>
#include <wx/gbsizer.h>
#include <boost/function.hpp>
#include <boost/thread.hpp>
+#ifdef __WXGTK__
+#include <gtk/gtk.h>
+#endif
class wxFilePickerCtrl;
class wxSpinCtrl;
extern void checked_set (wxCheckBox* widget, bool value);
extern void checked_set (wxRadioButton* widget, bool value);
extern void checked_set (wxStaticText* widget, std::string value);
+
+/* 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)
+#define DVDOMATIC_USE_OWN_DIR_PICKER
+#endif
+
+#endif