Commit e2eff006af7bd60c9400f85294deb9df7fa26260

Authored by Perry Werneck
2 parents 6e0ec5db f2c770bd

Merge branch 'develop' into macos

@@ -59,12 +59,15 @@ gschemas.compiled @@ -59,12 +59,15 @@ gschemas.compiled
59 *.gschema.xml 59 *.gschema.xml
60 metainfo.xml 60 metainfo.xml
61 *.metainfo.xml 61 *.metainfo.xml
62 -  
63 *.[0-9] 62 *.[0-9]
64 -  
65 *.3270 63 *.3270
66 macos/**/*.app 64 macos/**/*.app
67 mime.xml 65 mime.xml
68 *.patch 66 *.patch
69 *.orig 67 *.orig
70 *.rej 68 *.rej
  69 +ABOUT-NLS
  70 +intl
  71 +m4
  72 +po
  73 +
src/objects/application/application.c
@@ -240,9 +240,27 @@ static void pw3270Application_init(pw3270Application *app) { @@ -240,9 +240,27 @@ static void pw3270Application_init(pw3270Application *app) {
240 240
241 static GOptionEntry cmd_options[] = { 241 static GOptionEntry cmd_options[] = {
242 242
243 - { "user-interface", 'U', 0, G_OPTION_ARG_CALLBACK, &on_user_interface, N_( "Set the user-interface type" ), NULL },  
244 - { "logfile", 'l', 0, G_OPTION_ARG_CALLBACK, &on_logfile, N_( "Set default log file name" ), NULL },  
245 - { NULL } 243 + {
  244 + "user-interface",
  245 + 'U',
  246 + 0,
  247 + G_OPTION_ARG_CALLBACK,
  248 + &on_user_interface,
  249 + N_( "Set the user-interface type" ),
  250 + NULL
  251 + },
  252 + {
  253 + "logfile",
  254 + 'l',
  255 + 0,
  256 + G_OPTION_ARG_CALLBACK,
  257 + &on_logfile,
  258 + N_( "Set default log file name" ),
  259 + NULL
  260 + },
  261 + {
  262 + NULL
  263 + }
246 264
247 }; 265 };
248 266
src/objects/application/open.c
@@ -43,81 +43,6 @@ void pw3270_application_open(GApplication *application, GFile **files, gint n_fi @@ -43,81 +43,6 @@ void pw3270_application_open(GApplication *application, GFile **files, gint n_fi
43 debug("%s(%d,%p)",__FUNCTION__,file,files[file]); 43 debug("%s(%d,%p)",__FUNCTION__,file,files[file]);
44 pw3270_application_open_file(GTK_APPLICATION(application),&window,files[file]); 44 pw3270_application_open_file(GTK_APPLICATION(application),&window,files[file]);
45 45
46 - /*  
47 -  
48 - g_autofree gchar *path = g_file_get_path(files[file]);  
49 -  
50 - if(!path) {  
51 -  
52 - // It's not a session file descriptor, is it an URL?  
53 - g_autofree gchar * scheme = g_file_get_uri_scheme(files[file]);  
54 -  
55 - if(!(g_ascii_strcasecmp(scheme,"tn3270") && g_ascii_strcasecmp(scheme,"tn3270s"))) {  
56 -  
57 - // It's an URL, load it in the default session.  
58 -  
59 - g_autofree gchar * uri = g_file_get_uri(files[file]);  
60 - size_t sz = strlen(uri);  
61 -  
62 - if(sz > 0 && uri[sz-1] == '/')  
63 - uri[sz-1] = 0;  
64 -  
65 - if(!(window && pw3270_application_allow_tabs(application))) {  
66 - debug("%s: Creating new window",__FUNCTION__);  
67 - window = pw3270_application_window_new(GTK_APPLICATION(application), NULL);  
68 - } else {  
69 - debug("%s: Creating new tab",__FUNCTION__);  
70 - window = pw3270_application_window_new_tab(window, NULL);  
71 - }  
72 -  
73 - // Load default  
74 - GtkWidget * terminal = pw3270_application_window_get_active_terminal(window);  
75 -  
76 - v3270_set_default_session(terminal);  
77 - v3270_set_url(terminal,uri);  
78 -  
79 - }  
80 -  
81 - continue;  
82 -  
83 - }  
84 -  
85 - if(g_file_test(path,G_FILE_TEST_IS_REGULAR)) {  
86 -  
87 - // The file exists, use it.  
88 - debug("%s: Loading '%s'",__FUNCTION__,path);  
89 -  
90 - if(!(window && pw3270_application_allow_tabs(application))) {  
91 - debug("%s: Creating new window",__FUNCTION__);  
92 - window = pw3270_application_window_new(GTK_APPLICATION(application), path);  
93 - } else {  
94 - debug("%s: Creating new tab",__FUNCTION__);  
95 - pw3270_application_window_new_tab(window,path);  
96 - }  
97 -  
98 - continue;  
99 - }  
100 -  
101 - {  
102 - g_autofree gchar * basename = g_file_get_basename(files[file]);  
103 - g_autofree gchar * filename = v3270_keyfile_find(basename);  
104 -  
105 - if(filename) {  
106 -  
107 - if(!window) {  
108 - debug("%s: Creating new window",__FUNCTION__);  
109 - window = pw3270_application_window_new(GTK_APPLICATION(application), filename);  
110 - } else {  
111 - debug("%s: Creating new tab",__FUNCTION__);  
112 - pw3270_application_window_new_tab(window, filename);  
113 - }  
114 -  
115 - continue;  
116 - }  
117 -  
118 - }  
119 -  
120 - */  
121 } 46 }
122 47
123 if(window) 48 if(window)