diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-09 20:35:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-09 20:35:39 +0100 |
| commit | 89115db77729a2c99f1a09ff6a461720e16f889e (patch) | |
| tree | e528ec014b820d4e0efa28893dcee91cd76ee618 /src/wx/wx_util.h | |
| parent | f8ad440cf187c517b7800f3efdfc0954025c4422 (diff) | |
| parent | d2ff6a6b0256e256b6df416f280c846072f7682f (diff) | |
Merge master.
Diffstat (limited to 'src/wx/wx_util.h')
| -rw-r--r-- | src/wx/wx_util.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h index bff11647e..de6a09c35 100644 --- a/src/wx/wx_util.h +++ b/src/wx/wx_util.h @@ -17,23 +17,32 @@ */ +#ifndef DCPOMATIC_WX_UTIL_H +#define DCPOMATIC_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; class wxGridBagSizer; +#define DCPOMATIC_SIZER_X_GAP 8 +#define DCPOMATIC_SIZER_Y_GAP 8 + /** @file src/wx/wx_util.h * @brief Some utility functions and classes. */ extern void error_dialog (wxWindow *, wxString); extern bool confirm_dialog (wxWindow *, wxString); -extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, int prop = 0); -extern wxStaticText* add_label_to_grid_bag_sizer (wxGridBagSizer *, wxWindow *, wxString, wxGBPosition, wxGBSpan span = wxDefaultSpan); +extern wxStaticText* add_label_to_sizer (wxSizer *, wxWindow *, wxString, bool left, int prop = 0); +extern wxStaticText* add_label_to_grid_bag_sizer (wxGridBagSizer *, wxWindow *, wxString, bool, wxGBPosition, wxGBSpan span = wxDefaultSpan); extern std::string wx_to_std (wxString); extern wxString std_to_wx (std::string); extern void dcpomatic_setup_i18n (); @@ -69,3 +78,12 @@ extern void checked_set (wxTextCtrl* widget, std::string value); 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 DCPOMATIC_USE_OWN_DIR_PICKER +#endif + +#endif |
