/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static void lock_socket_input_cb (gpointer data,
gint source,
GdkInputCondition condition);
-#ifndef CLAWS
-static
-#endif
+
gchar *get_socket_name (void);
gtk_accel_map_load (userrc);
g_free(userrc);
- gtk_settings_set_long_property(gtk_settings_get_default(),
- "gtk-can-change-accels",
- (glong)TRUE, "XProperty");
-
CHDIR_RETURN_VAL_IF_FAIL(get_rc_dir(), 1);
MAKE_DIR_IF_NOT_EXIST(get_mail_base_dir());
gtkaspell_checkers_init();
prefs_spelling_init();
#endif
-
+
sock_set_io_timeout(prefs_common.io_timeout_secs);
#ifdef HAVE_LIBETPAN
imap_main_set_timeout(prefs_common.io_timeout_secs);
}
} else if (!strncmp(argv[i], "--send", 6)) {
cmd.send = TRUE;
- } else if (!strncmp(argv[i], "--version", 9)) {
+ } else if (!strncmp(argv[i], "--version", 9) ||
+ !strncmp(argv[i], "-v", 2)) {
puts("Claws Mail version " VERSION);
exit(0);
} else if (!strncmp(argv[i], "--status-full", 13)) {
cmd.online_mode = ONLINE_MODE_ONLINE;
} else if (!strncmp(argv[i], "--offline", 9)) {
cmd.online_mode = ONLINE_MODE_OFFLINE;
- } else if (!strncmp(argv[i], "--help", 6)) {
+ } else if (!strncmp(argv[i], "--help", 6) ||
+ !strncmp(argv[i], "-h", 2)) {
gchar *base = g_path_get_basename(argv[0]);
g_print(_("Usage: %s [OPTION]...\n"), base);
" folder is a folder id like 'folder/sub_folder'"));
g_print("%s\n", _(" --online switch to online mode"));
g_print("%s\n", _(" --offline switch to offline mode"));
- g_print("%s\n", _(" --exit exit Claws Mail"));
+ g_print("%s\n", _(" --exit --quit -q exit Claws Mail"));
g_print("%s\n", _(" --debug debug mode"));
- g_print("%s\n", _(" --help display this help and exit"));
- g_print("%s\n", _(" --version output version information and exit"));
+ g_print("%s\n", _(" --help -h display this help and exit"));
+ g_print("%s\n", _(" --version -v output version information and exit"));
g_print("%s\n", _(" --config-dir output configuration directory"));
g_free(base);
} else if (!strncmp(argv[i], "--config-dir", sizeof "--config-dir" - 1)) {
puts(RC_DIR);
exit(0);
- } else if (!strncmp(argv[i], "--exit", 6)) {
+ } else if (!strncmp(argv[i], "--exit", 6) ||
+ !strncmp(argv[i], "--quit", 6) ||
+ !strncmp(argv[i], "-q", 2)) {
cmd.exit = TRUE;
} else if (!strncmp(argv[i], "--select", 8) && i+1 < argc) {
cmd.target = argv[i+1];
cmd.subscribe = TRUE;
cmd.subscribe_uri = p;
}
+ } else {
+ g_print(_("Unknown option\n"));
+ exit(1);
}
}
-
}
if (cmd.attach_files && cmd.compose == FALSE) {
* CLAWS: want this public so crash dialog can delete the
* lock file too
*/
-#ifndef CLAWS
-static
-#endif
gchar *get_socket_name(void)
{
static gchar *filename = NULL;