Commit 574537e95ced0e67e044e4905040d9e8b365e4ab

Authored by Perry Werneck
1 parent a5aa3e92

Fixing linux build after osx changes.

src/objects/application/application.c
... ... @@ -175,6 +175,7 @@ static void pw3270Application_class_init(pw3270ApplicationClass *klass) {
175 175  
176 176 }
177 177  
  178 +#ifndef __APPLE__
178 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 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 194  
194 195 g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_GNOME);
195 196 g_settings_set_boolean(win_settings,"toolbar-visible",TRUE);
196   -#ifndef __APPLE__
197 197 g_settings_set_boolean(win_settings,"menubar-visible",FALSE);
198   -#endif // __APPLE__
199 198  
200 199 } else if(!g_ascii_strcasecmp(value,"classic")) {
201 200  
202 201 g_settings_set_uint(app_settings,"ui-style",PW3270_UI_STYLE_CLASSICAL);
203 202 g_settings_set_boolean(win_settings,"toolbar-visible",TRUE);
204   -#ifndef __APPLE__
205 203 g_settings_set_boolean(win_settings,"menubar-visible",TRUE);
206   -#endif // __APPLE__
207 204  
208 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 220 return TRUE;
224 221  
225 222 }
  223 +#endif // __APPLE__
226 224  
227 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 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 230 static void pw3270Application_init(pw3270Application *app) {
233 231  
234 232 static GOptionEntry cmd_options[] = {
235   -
  233 +#ifndef __APPLE__
236 234 {
237 235 "user-interface",
238 236 'U',
... ... @@ -242,6 +240,7 @@ static void pw3270Application_init(pw3270Application *app) {
242 240 N_( "Set the user-interface type" ),
243 241 NULL
244 242 },
  243 +#endif // __APPLE__
245 244 {
246 245 "logfile",
247 246 'l',
... ... @@ -293,7 +292,6 @@ static void pw3270Application_init(pw3270Application *app) {
293 292 lib3270_autoptr(char) plugin_path = lib3270_build_data_filename("plugins",NULL);
294 293 pw3270_load_plugins_from_path(app, plugin_path);
295 294 }
296   -
297 295 #else
298 296 //
299 297 // Setup linux UI
... ... @@ -568,7 +566,7 @@ PW3270_UI_STYLE pw3270_application_get_ui_style(GApplication *app) {
568 566  
569 567 #ifdef __APPLE__
570 568 return PW3270_UI_STYLE_GNOME;
571   -#else
  569 +#else
572 570 g_return_val_if_fail(PW3270_IS_APPLICATION(app),PW3270_UI_STYLE_CLASSICAL);
573 571 return PW3270_APPLICATION(app)->ui_style;
574 572 #endif // __APPLE__
... ...
src/objects/application/private.h
... ... @@ -50,7 +50,9 @@
50 50 #include <gtkosxapplication.h>
51 51 #endif // __APPLE__
52 52  
53   -typedef struct _pw3270Application {
  53 +#include <pw3270/application.h>
  54 +
  55 +struct _pw3270Application {
54 56 #ifdef __APPLE__
55 57 GtkosxApplication parent;
56 58 #else
... ... @@ -63,7 +65,7 @@ typedef struct _pw3270Application {
63 65 gchar * logfile;
64 66 GSList * plugins; ///< @brief Handlers of the loaded plugins.
65 67  
66   -} pw3270Application;
  68 +};
67 69  
68 70 struct _pw3270ApplicationClass {
69 71 GtkApplicationClass parent_class;
... ...