Commit 1a7e4dfe1fa6a1d628191af6bb009af26894528a

Authored by Perry Werneck
1 parent 1ec062ce

Working on windows customized build.

Showing 2 changed files with 12 additions and 13 deletions   Show diff stats
src/include/config.h.in
... ... @@ -50,9 +50,7 @@
50 50 #undef HAVE_ICONV
51 51 #undef ICONV_CONST
52 52  
53   - #ifdef _WIN32
54   - #define ENABLE_WINDOWS_REGISTRY 1
55   - #endif // _WIN32
  53 + #undef ENABLE_WINDOWS_REGISTRY
56 54  
57 55 #undef HAVE_GNOME
58 56 #undef HAVE_GTKMAC
... ...
src/pw3270/main.c
... ... @@ -236,10 +236,7 @@ static gboolean startup(GtkWidget *toplevel)
236 236 int main(int argc, char *argv[])
237 237 {
238 238 const gchar * pluginpath = NULL;
239   -
240   -#ifdef _WIN32
241   - const char * app_name = PACKAGE_NAME;
242   -#endif // _WIN32
  239 + const char * app_name = NULL;
243 240  
244 241 #ifdef DEFAULT_SESSION_NAME
245 242 const gchar * session_name = G_STRINGIFY(DEFAULT_SESSION_NAME);
... ... @@ -343,7 +340,6 @@ int main(int argc, char *argv[])
343 340 }
344 341 #else
345 342 {
346   - #error aqui
347 343 bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
348 344 textdomain(PACKAGE_NAME);
349 345 }
... ... @@ -370,9 +366,7 @@ int main(int argc, char *argv[])
370 366 { "autodisconnect", 'D', 0, G_OPTION_ARG_INT, &timer, N_( "Minutes for auto-disconnect" ), 0 },
371 367 { "pluginpath", 'P', 0, G_OPTION_ARG_STRING, &pluginpath, N_( "Path for plugin files" ), NULL },
372 368  
373   -#ifdef _WIN32
374   - { "application-name", 'A', 0, G_OPTION_ARG_STRING, &app_name, N_( "Application name" ), PACKAGE_NAME },
375   -#endif // _WIN32
  369 + { "application-name", 'A', 0, G_OPTION_ARG_STRING, &app_name, N_( "Application name" ), NULL },
376 370  
377 371 #if defined( HAVE_SYSLOG )
378 372 { "syslog", 'l', 0, G_OPTION_ARG_NONE, &log_to_syslog, N_( "Send messages to syslog" ), NULL },
... ... @@ -420,8 +414,15 @@ int main(int argc, char *argv[])
420 414 }
421 415 }
422 416  
  417 + if(app_name)
  418 + {
  419 + g_set_application_name(app_name);
  420 + }
423 421 #ifdef _WIN32
424   - g_set_application_name(app_name);
  422 + else
  423 + {
  424 + g_set_application_name(PACKAGE_NAME);
  425 + }
425 426 #endif // _WIN32
426 427  
427 428 // Init GTK
... ... @@ -445,7 +446,7 @@ int main(int argc, char *argv[])
445 446  
446 447 g_message("Windows Application directory is \"%s\"",appdir);
447 448 g_message("Application name is \"%s\"", g_get_application_name());
448   - g_message("Session name is \"%s\"", session_name);
  449 + g_message("Session name is \"%s\"", session_name ? session_name : "undefined");
449 450  
450 451 #if defined(ENABLE_WINDOWS_REGISTRY)
451 452 g_message("Registry path is \"HKCU\\%s\"",PACKAGE_NAME);
... ...