From 574537e95ced0e67e044e4905040d9e8b365e4ab Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 16 Dec 2021 23:14:26 -0300 Subject: [PATCH] Fixing linux build after osx changes. --- src/objects/application/application.c | 12 +++++------- src/objects/application/private.h | 6 ++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/objects/application/application.c b/src/objects/application/application.c index 98ba738..0a4b0b5 100644 --- a/src/objects/application/application.c +++ b/src/objects/application/application.c @@ -175,6 +175,7 @@ static void pw3270Application_class_init(pw3270ApplicationClass *klass) { } +#ifndef __APPLE__ static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gchar *value, gpointer G_GNUC_UNUSED(dunno), GError **error) { 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 g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_GNOME); g_settings_set_boolean(win_settings,"toolbar-visible",TRUE); -#ifndef __APPLE__ g_settings_set_boolean(win_settings,"menubar-visible",FALSE); -#endif // __APPLE__ } else if(!g_ascii_strcasecmp(value,"classic")) { g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_CLASSICAL); g_settings_set_boolean(win_settings,"toolbar-visible",TRUE); -#ifndef __APPLE__ g_settings_set_boolean(win_settings,"menubar-visible",TRUE); -#endif // __APPLE__ } else if(!g_ascii_strcasecmp(value,"default")) { @@ -223,6 +220,7 @@ static gboolean on_user_interface(const gchar G_GNUC_UNUSED(*option), const gcha return TRUE; } +#endif // __APPLE__ static gboolean on_logfile(const gchar G_GNUC_UNUSED(*option), const gchar *value, gpointer G_GNUC_UNUSED(dunno), GError G_GNUC_UNUSED(**error)) { 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 static void pw3270Application_init(pw3270Application *app) { static GOptionEntry cmd_options[] = { - +#ifndef __APPLE__ { "user-interface", 'U', @@ -242,6 +240,7 @@ static void pw3270Application_init(pw3270Application *app) { N_( "Set the user-interface type" ), NULL }, +#endif // __APPLE__ { "logfile", 'l', @@ -293,7 +292,6 @@ static void pw3270Application_init(pw3270Application *app) { lib3270_autoptr(char) plugin_path = lib3270_build_data_filename("plugins",NULL); pw3270_load_plugins_from_path(app, plugin_path); } - #else // // Setup linux UI @@ -568,7 +566,7 @@ PW3270_UI_STYLE pw3270_application_get_ui_style(GApplication *app) { #ifdef __APPLE__ return PW3270_UI_STYLE_GNOME; -#else +#else g_return_val_if_fail(PW3270_IS_APPLICATION(app),PW3270_UI_STYLE_CLASSICAL); return PW3270_APPLICATION(app)->ui_style; #endif // __APPLE__ diff --git a/src/objects/application/private.h b/src/objects/application/private.h index 3f85e65..af92a5e 100644 --- a/src/objects/application/private.h +++ b/src/objects/application/private.h @@ -50,7 +50,9 @@ #include #endif // __APPLE__ -typedef struct _pw3270Application { +#include + +struct _pw3270Application { #ifdef __APPLE__ GtkosxApplication parent; #else @@ -63,7 +65,7 @@ typedef struct _pw3270Application { gchar * logfile; GSList * plugins; ///< @brief Handlers of the loaded plugins. -} pw3270Application; +}; struct _pw3270ApplicationClass { GtkApplicationClass parent_class; -- libgit2 0.21.2