static gboolean test_local_cmdline(GApplication * application, gchar *** arguments, gint * exit_status) { TrgGtkAppPrivate *priv = GET_PRIVATE(application); gchar **argv; gchar *cwd = g_get_current_dir(); gchar *tmp; gint i; argv = *arguments; shift_args(argv, 0); i = 0; while (argv[i]) { if (is_minimised_arg(argv[i])) { shift_args(argv, i); priv->min_start = TRUE; } else if (!is_url(argv[i]) && !is_magnet(argv[i]) && g_file_test(argv[i], G_FILE_TEST_IS_REGULAR) && !g_path_is_absolute(argv[i])) { tmp = g_build_path(G_DIR_SEPARATOR_S, cwd, argv[i], NULL); g_free(argv[i]); argv[i] = tmp; } i++; } *exit_status = 0; g_free(cwd); return FALSE; }
gboolean should_be_minimised(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) if (is_minimised_arg(argv[i])) return TRUE; return FALSE; }