Commit 91f23d5fcb7c1e7acb48b6961ef2795c19e1826a
1 parent
85711309
Exists in
master
and in
5 other branches
Ajustando para versao windows
Showing
1 changed file
with
13 additions
and
2 deletions
Show diff stats
src/pw3270/main.c
... | ... | @@ -99,15 +99,20 @@ static void toplevel_setup(GtkWindow *window) |
99 | 99 | g_free(name); |
100 | 100 | } |
101 | 101 | |
102 | +#if ! defined( WIN32 ) | |
102 | 103 | static gboolean appname(const gchar *option_name, const gchar *value, gpointer data,GError **error) |
103 | 104 | { |
104 | 105 | g_set_application_name(value); |
105 | 106 | return TRUE; |
106 | 107 | } |
108 | +#endif // !win32 | |
107 | 109 | |
108 | 110 | int main(int argc, char *argv[]) |
109 | 111 | { |
110 | -// static const gchar * appname = PACKAGE_NAME; | |
112 | +#if defined( WIN32 ) | |
113 | + static const gchar * appname = PACKAGE_NAME; | |
114 | +#endif // WIN32 | |
115 | + | |
111 | 116 | static const gchar * host = NULL; |
112 | 117 | int rc = 0; |
113 | 118 | |
... | ... | @@ -149,7 +154,11 @@ int main(int argc, char *argv[]) |
149 | 154 | { |
150 | 155 | static const GOptionEntry app_options[] = |
151 | 156 | { |
157 | +#if ! defined( WIN32 ) | |
152 | 158 | { "appname", 'a', 0, G_OPTION_ARG_CALLBACK, appname, N_( "Application name" ), PACKAGE_NAME }, |
159 | +#else | |
160 | + { "appname", 'a', 0, G_OPTION_ARG_STRING, &appname, N_( "Application name" ), PACKAGE_NAME }, | |
161 | +#endif // WIN32 | |
153 | 162 | { "host", 'h', 0, G_OPTION_ARG_STRING, &host, N_( "Host to connect"), NULL }, |
154 | 163 | { NULL } |
155 | 164 | }; |
... | ... | @@ -194,7 +203,9 @@ int main(int argc, char *argv[]) |
194 | 203 | } |
195 | 204 | } |
196 | 205 | |
197 | -// g_set_application_name(appname); | |
206 | +#if defined(WIN32) | |
207 | + g_set_application_name(appname); | |
208 | +#endif // WIN32 | |
198 | 209 | |
199 | 210 | rc = initialize(); |
200 | 211 | if(!rc) | ... | ... |