Commit 574537e95ced0e67e044e4905040d9e8b365e4ab
1 parent
a5aa3e92
Exists in
master
and in
2 other branches
Fixing linux build after osx changes.
Showing
2 changed files
with
9 additions
and
9 deletions
Show diff stats
src/objects/application/application.c
@@ -175,6 +175,7 @@ static void pw3270Application_class_init(pw3270ApplicationClass *klass) { | @@ -175,6 +175,7 @@ static void pw3270Application_class_init(pw3270ApplicationClass *klass) { | ||
175 | 175 | ||
176 | } | 176 | } |
177 | 177 | ||
178 | +#ifndef __APPLE__ | ||
178 | static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gchar *value, gpointer G_GNUC_UNUSED(dunno), GError **error) { | 179 | static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gchar *value, gpointer G_GNUC_UNUSED(dunno), GError **error) { |
179 | 180 | ||
180 | g_autoptr(GSettings) app_settings = pw3270_application_settings_new(); | 181 | g_autoptr(GSettings) app_settings = pw3270_application_settings_new(); |
@@ -193,17 +194,13 @@ static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gcha | @@ -193,17 +194,13 @@ static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gcha | ||
193 | 194 | ||
194 | g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_GNOME); | 195 | g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_GNOME); |
195 | g_settings_set_boolean(win_settings,"toolbar-visible",TRUE); | 196 | g_settings_set_boolean(win_settings,"toolbar-visible",TRUE); |
196 | -#ifndef __APPLE__ | ||
197 | g_settings_set_boolean(win_settings,"menubar-visible",FALSE); | 197 | g_settings_set_boolean(win_settings,"menubar-visible",FALSE); |
198 | -#endif // __APPLE__ | ||
199 | 198 | ||
200 | } else if(!g_ascii_strcasecmp(value,"classic")) { | 199 | } else if(!g_ascii_strcasecmp(value,"classic")) { |
201 | 200 | ||
202 | g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_CLASSICAL); | 201 | g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_CLASSICAL); |
203 | g_settings_set_boolean(win_settings,"toolbar-visible",TRUE); | 202 | g_settings_set_boolean(win_settings,"toolbar-visible",TRUE); |
204 | -#ifndef __APPLE__ | ||
205 | g_settings_set_boolean(win_settings,"menubar-visible",TRUE); | 203 | g_settings_set_boolean(win_settings,"menubar-visible",TRUE); |
206 | -#endif // __APPLE__ | ||
207 | 204 | ||
208 | } else if(!g_ascii_strcasecmp(value,"default")) { | 205 | } else if(!g_ascii_strcasecmp(value,"default")) { |
209 | 206 | ||
@@ -223,6 +220,7 @@ static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gcha | @@ -223,6 +220,7 @@ static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gcha | ||
223 | return TRUE; | 220 | return TRUE; |
224 | 221 | ||
225 | } | 222 | } |
223 | +#endif // __APPLE__ | ||
226 | 224 | ||
227 | static gboolean on_logfile(const gchar G_GNUC_UNUSED(*option), const gchar *value, gpointer G_GNUC_UNUSED(dunno), GError G_GNUC_UNUSED(**error)) { | 225 | static gboolean on_logfile(const gchar G_GNUC_UNUSED(*option), const gchar *value, gpointer G_GNUC_UNUSED(dunno), GError G_GNUC_UNUSED(**error)) { |
228 | pw3270_application_set_log_filename(g_application_get_default(),value); | 226 | pw3270_application_set_log_filename(g_application_get_default(),value); |
@@ -232,7 +230,7 @@ static gboolean on_logfile(const gchar G_GNUC_UNUSED(*option), const gchar *valu | @@ -232,7 +230,7 @@ static gboolean on_logfile(const gchar G_GNUC_UNUSED(*option), const gchar *valu | ||
232 | static void pw3270Application_init(pw3270Application *app) { | 230 | static void pw3270Application_init(pw3270Application *app) { |
233 | 231 | ||
234 | static GOptionEntry cmd_options[] = { | 232 | static GOptionEntry cmd_options[] = { |
235 | - | 233 | +#ifndef __APPLE__ |
236 | { | 234 | { |
237 | "user-interface", | 235 | "user-interface", |
238 | 'U', | 236 | 'U', |
@@ -242,6 +240,7 @@ static void pw3270Application_init(pw3270Application *app) { | @@ -242,6 +240,7 @@ static void pw3270Application_init(pw3270Application *app) { | ||
242 | N_( "Set the user-interface type" ), | 240 | N_( "Set the user-interface type" ), |
243 | NULL | 241 | NULL |
244 | }, | 242 | }, |
243 | +#endif // __APPLE__ | ||
245 | { | 244 | { |
246 | "logfile", | 245 | "logfile", |
247 | 'l', | 246 | 'l', |
@@ -293,7 +292,6 @@ static void pw3270Application_init(pw3270Application *app) { | @@ -293,7 +292,6 @@ static void pw3270Application_init(pw3270Application *app) { | ||
293 | lib3270_autoptr(char) plugin_path = lib3270_build_data_filename("plugins",NULL); | 292 | lib3270_autoptr(char) plugin_path = lib3270_build_data_filename("plugins",NULL); |
294 | pw3270_load_plugins_from_path(app, plugin_path); | 293 | pw3270_load_plugins_from_path(app, plugin_path); |
295 | } | 294 | } |
296 | - | ||
297 | #else | 295 | #else |
298 | // | 296 | // |
299 | // Setup linux UI | 297 | // Setup linux UI |
@@ -568,7 +566,7 @@ PW3270_UI_STYLE pw3270_application_get_ui_style(GApplication *app) { | @@ -568,7 +566,7 @@ PW3270_UI_STYLE pw3270_application_get_ui_style(GApplication *app) { | ||
568 | 566 | ||
569 | #ifdef __APPLE__ | 567 | #ifdef __APPLE__ |
570 | return PW3270_UI_STYLE_GNOME; | 568 | return PW3270_UI_STYLE_GNOME; |
571 | -#else | 569 | +#else |
572 | g_return_val_if_fail(PW3270_IS_APPLICATION(app),PW3270_UI_STYLE_CLASSICAL); | 570 | g_return_val_if_fail(PW3270_IS_APPLICATION(app),PW3270_UI_STYLE_CLASSICAL); |
573 | return PW3270_APPLICATION(app)->ui_style; | 571 | return PW3270_APPLICATION(app)->ui_style; |
574 | #endif // __APPLE__ | 572 | #endif // __APPLE__ |
src/objects/application/private.h
@@ -50,7 +50,9 @@ | @@ -50,7 +50,9 @@ | ||
50 | #include <gtkosxapplication.h> | 50 | #include <gtkosxapplication.h> |
51 | #endif // __APPLE__ | 51 | #endif // __APPLE__ |
52 | 52 | ||
53 | -typedef struct _pw3270Application { | 53 | +#include <pw3270/application.h> |
54 | + | ||
55 | +struct _pw3270Application { | ||
54 | #ifdef __APPLE__ | 56 | #ifdef __APPLE__ |
55 | GtkosxApplication parent; | 57 | GtkosxApplication parent; |
56 | #else | 58 | #else |
@@ -63,7 +65,7 @@ typedef struct _pw3270Application { | @@ -63,7 +65,7 @@ typedef struct _pw3270Application { | ||
63 | gchar * logfile; | 65 | gchar * logfile; |
64 | GSList * plugins; ///< @brief Handlers of the loaded plugins. | 66 | GSList * plugins; ///< @brief Handlers of the loaded plugins. |
65 | 67 | ||
66 | -} pw3270Application; | 68 | +}; |
67 | 69 | ||
68 | struct _pw3270ApplicationClass { | 70 | struct _pw3270ApplicationClass { |
69 | GtkApplicationClass parent_class; | 71 | GtkApplicationClass parent_class; |