}
static void parse_command_line(int argc, char *argv[], gchar **path, gchar **file,
- GList **cmd_list, GList **collection_list)
+ GList **cmd_list, GList **collection_list,
+ gchar **geometry)
{
GList *list = NULL;
GList *remote_list = NULL;
{
startup_command_line_collection = TRUE;
}
+ else if (strncmp(cmd_line, "--geometry=", 11) == 0)
+ {
+ if (!*geometry) *geometry = g_strdup(cmd_line + 11);
+ }
else if (strcmp(cmd_line, "-r") == 0 ||
strcmp(cmd_line, "--remote") == 0)
{
print_term(_(" -f, --fullscreen start in full screen mode\n"));
print_term(_(" -s, --slideshow start in slideshow mode\n"));
print_term(_(" -l, --list open collection window for command line\n"));
+ print_term(_(" --geometry=GEOMETRY set main window location\n"));
print_term(_(" -r, --remote send following commands to open window\n"));
print_term(_(" -rh,--remote-help print remote command list\n"));
print_term(_(" --debug turn on debug output\n"));
GList *cmd_list = NULL;
GList *collection_list = NULL;
CollectionData *first_collection = NULL;
+ gchar *geometry = NULL;
gchar *buf;
gchar *bufl;
setup_default_options();
load_options();
- parse_command_line(argc, argv, &cmd_path, &cmd_file, &cmd_list, &collection_list);
+ parse_command_line(argc, argv, &cmd_path, &cmd_file, &cmd_list, &collection_list, &geometry);
gtk_init (&argc, &argv);
path = get_current_dir();
}
- lw = layout_new(NULL, tools_float, tools_hidden);
+ lw = layout_new_with_geometry(NULL, tools_float, tools_hidden, geometry);
layout_sort_set(lw, file_sort_method, file_sort_ascending);
if (collection_list && !startup_command_line_collection)
}
}
+ g_free(geometry);
g_free(cmd_path);
g_free(cmd_file);
path_list_free(cmd_list);