OLD | NEW |
1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ | 1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ |
2 /* vim:set et sts=4: */ | 2 /* vim:set et sts=4: */ |
3 /* ibus - The Input Bus | 3 /* ibus - The Input Bus |
4 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> | 4 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> |
5 * Copyright (C) 2008-2010 Red Hat, Inc. | 5 * Copyright (C) 2008-2010 Red Hat, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 { "daemonize", 'd', 0, G_OPTION_ARG_NONE, &daemonize, "run ibus as backgro
und process.", NULL }, | 58 { "daemonize", 'd', 0, G_OPTION_ARG_NONE, &daemonize, "run ibus as backgro
und process.", NULL }, |
59 { "single", 's', 0, G_OPTION_ARG_NONE, &single, "do not execute pane
l and config module.", NULL }, | 59 { "single", 's', 0, G_OPTION_ARG_NONE, &single, "do not execute pane
l and config module.", NULL }, |
60 { "xim", 'x', 0, G_OPTION_ARG_NONE, &xim, "execute ibus XIM se
rver.", NULL }, | 60 { "xim", 'x', 0, G_OPTION_ARG_NONE, &xim, "execute ibus XIM se
rver.", NULL }, |
61 { "desktop", 'n', 0, G_OPTION_ARG_STRING, &desktop, "specify the name of
desktop session. [default=gnome]", "name" }, | 61 { "desktop", 'n', 0, G_OPTION_ARG_STRING, &desktop, "specify the name of
desktop session. [default=gnome]", "name" }, |
62 { "panel", 'p', 0, G_OPTION_ARG_STRING, &panel, "specify the cmdline
of panel program. pass 'disable' not to start a panel program.", "cmdline" }, | 62 { "panel", 'p', 0, G_OPTION_ARG_STRING, &panel, "specify the cmdline
of panel program. pass 'disable' not to start a panel program.", "cmdline" }, |
63 { "config", 'c', 0, G_OPTION_ARG_STRING, &config, "specify the cmdline
of config program. pass 'disable' not to start a config program.", "cmdline" }, | 63 { "config", 'c', 0, G_OPTION_ARG_STRING, &config, "specify the cmdline
of config program. pass 'disable' not to start a config program.", "cmdline" }, |
64 { "address", 'a', 0, G_OPTION_ARG_STRING, &g_address, "specify the addre
ss of ibus daemon.", "address" }, | 64 { "address", 'a', 0, G_OPTION_ARG_STRING, &g_address, "specify the addre
ss of ibus daemon.", "address" }, |
65 { "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "if there is an old
ibus-daemon is running, it will be replaced.", NULL }, | 65 { "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "if there is an old
ibus-daemon is running, it will be replaced.", NULL }, |
66 { "cache", 't', 0, G_OPTION_ARG_STRING, &g_cache, "specify the cache m
ode. [auto/refresh/none]", NULL }, | 66 { "cache", 't', 0, G_OPTION_ARG_STRING, &g_cache, "specify the cache m
ode. [auto/refresh/none]", NULL }, |
67 { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply t
imeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout
[default is 5000]" }, | 67 { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply t
imeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout
[default is 5000]" }, |
68 #ifdef G_THREADS_ENABLED | |
69 { "monitor-timeout", 'j', 0, G_OPTION_ARG_INT, &g_monitor_timeout, "timeo
ut of poll changes of engines in seconds. 0 to disable it. ", "timeout [default
is 0]" }, | |
70 #endif | |
71 { "mem-profile", 'm', 0, G_OPTION_ARG_NONE, &g_mempro, "enable memory pr
ofile, send SIGUSR2 to print out the memory profile.", NULL }, | 68 { "mem-profile", 'm', 0, G_OPTION_ARG_NONE, &g_mempro, "enable memory pr
ofile, send SIGUSR2 to print out the memory profile.", NULL }, |
72 { "restart", 'R', 0, G_OPTION_ARG_NONE, &restart, "restart panel an
d config processes when they die.", NULL }, | 69 { "restart", 'R', 0, G_OPTION_ARG_NONE, &restart, "restart panel an
d config processes when they die.", NULL }, |
73 { "verbose", 'v', 0, G_OPTION_ARG_NONE, &g_verbose, "verbose.", NULL }
, | 70 { "verbose", 'v', 0, G_OPTION_ARG_NONE, &g_verbose, "verbose.", NULL }
, |
74 { NULL }, | 71 { NULL }, |
75 }; | 72 }; |
76 | 73 |
77 /** | 74 /** |
78 * execute_cmdline: | 75 * execute_cmdline: |
79 * @cmdline: An absolute path of the executable and its parameters, e.g. "/usr/
lib/ibus/ibus-x11 --kill-daemon". | 76 * @cmdline: An absolute path of the executable and its parameters, e.g. "/usr/
lib/ibus/ibus-x11 --kill-daemon". |
80 * @returns: TRUE if both parsing cmdline and executing the command succeed. | 77 * @returns: TRUE if both parsing cmdline and executing the command succeed. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 273 |
277 /* execute ibus xim server */ | 274 /* execute ibus xim server */ |
278 if (xim) { | 275 if (xim) { |
279 if (!execute_cmdline (LIBEXECDIR "/ibus-x11 --kill-daemon")) | 276 if (!execute_cmdline (LIBEXECDIR "/ibus-x11 --kill-daemon")) |
280 exit (-1); | 277 exit (-1); |
281 } | 278 } |
282 | 279 |
283 bus_server_run (); | 280 bus_server_run (); |
284 return 0; | 281 return 0; |
285 } | 282 } |
OLD | NEW |