13
13
#include <sys/wait.h>
15
15
#include <glib/gi18n.h>
16
#include <libgnomeui/gnome-client.h>
17
#include <libgnomeui/gnome-ui-init.h>
17
#include <libegg/eggdesktopfile.h>
18
#include <libegg/eggsmclient.h>
19
20
#include <libpanel-util/panel-cleanup.h>
21
#include <libpanel-util/panel-glib.h>
21
23
#include "panel-gconf.h"
22
24
#include "panel-profile.h"
50
52
main (int argc, char **argv)
52
55
GOptionContext *context;
53
GnomeProgram *program;
55
58
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
56
59
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
57
60
textdomain (GETTEXT_PACKAGE);
62
/* We will register explicitly when we're ready -- see panel-session.c */
63
egg_sm_client_set_mode (EGG_SM_CLIENT_MODE_DISABLED);
65
g_set_prgname ("gnome-panel");
67
desktopfile = panel_g_lookup_in_applications_dirs ("gnome-panel.desktop");
69
egg_set_desktop_file (desktopfile);
59
73
context = g_option_context_new ("");
74
g_option_context_add_group (context,
75
egg_sm_client_get_option_group ());
76
g_option_context_add_group (context, gtk_get_option_group (TRUE));
61
77
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
63
program = gnome_program_init ("gnome-panel", VERSION,
66
GNOME_CLIENT_PARAM_SM_CONNECT, FALSE,
67
GNOME_PARAM_GOPTION_CONTEXT, context,
68
GNOME_PROGRAM_STANDARD_PROPERTIES,
70
panel_cleanup_register (PANEL_CLEAN_FUNC (g_object_unref), program);
72
g_set_application_name (_("Panel"));
73
gtk_window_set_default_icon_name (PANEL_ICON_PANEL);
79
gtk_init (&argc, &argv);
81
if (!bonobo_init (&argc, argv)) {
82
g_printerr ("Cannot initialize bonobo.\n");
87
if (!g_option_context_parse (context, &argc, &argv, &error)) {
88
g_printerr ("%s\n", error->message);
90
g_option_context_free (context);
95
g_option_context_free (context);
97
if (!egg_get_desktop_file ()) {
98
g_set_application_name (_("Panel"));
99
gtk_window_set_default_icon_name (PANEL_ICON_PANEL);
75
102
if (!panel_shell_register (replace)) {
76
103
panel_cleanup_do ();