2005-08-18 Dan Williams <dcbw@redhat.com>
* gnome/applet/main.c - Add new "--no-session" parameter that disables applet session management, ie for testing git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@874 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2005-08-18 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* gnome/applet/main.c
|
||||
- Add new "--no-session" parameter that disables applet
|
||||
session management, ie for testing
|
||||
|
||||
2005-08-18 Christopher Aillon <caillon@redhat.com>
|
||||
|
||||
* gnome/applet/other-network-dialog.c:
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <libgnomeui/libgnomeui.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
@@ -44,18 +45,27 @@ static gboolean session_save (GnomeClient *client, gpointer client_data)
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
NMWirelessApplet * nmwa;
|
||||
GnomeClient * client;
|
||||
GnomeClient * client = NULL;
|
||||
int i;
|
||||
gboolean session = TRUE;
|
||||
|
||||
gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE,
|
||||
argc, argv,
|
||||
GNOME_PARAM_NONE);
|
||||
|
||||
client = gnome_master_client ();
|
||||
gnome_client_set_restart_command (client, argc, argv);
|
||||
gnome_client_set_restart_style (client, GNOME_RESTART_IMMEDIATELY);
|
||||
for (i = 0; i < argc; i++)
|
||||
if (strcmp (argv[i], "--no-session") == 0)
|
||||
session = FALSE;
|
||||
|
||||
g_signal_connect (client, "save_yourself", G_CALLBACK (session_save), NULL);
|
||||
g_signal_connect (client, "die", G_CALLBACK (session_die), NULL);
|
||||
if (session)
|
||||
{
|
||||
client = gnome_master_client ();
|
||||
gnome_client_set_restart_command (client, argc, argv);
|
||||
gnome_client_set_restart_style (client, GNOME_RESTART_IMMEDIATELY);
|
||||
|
||||
g_signal_connect (client, "save_yourself", G_CALLBACK (session_save), NULL);
|
||||
g_signal_connect (client, "die", G_CALLBACK (session_die), NULL);
|
||||
}
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, NULL);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
@@ -67,7 +77,8 @@ int main (int argc, char *argv[])
|
||||
gtk_main ();
|
||||
}
|
||||
|
||||
gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
|
||||
if (session)
|
||||
gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user