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>
|
2005-08-18 Christopher Aillon <caillon@redhat.com>
|
||||||
|
|
||||||
* gnome/applet/other-network-dialog.c:
|
* gnome/applet/other-network-dialog.c:
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <libgnomeui/libgnomeui.h>
|
#include <libgnomeui/libgnomeui.h>
|
||||||
#include <glib/gi18n-lib.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[])
|
int main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
NMWirelessApplet * nmwa;
|
NMWirelessApplet * nmwa;
|
||||||
GnomeClient * client;
|
GnomeClient * client = NULL;
|
||||||
|
int i;
|
||||||
|
gboolean session = TRUE;
|
||||||
|
|
||||||
gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE,
|
gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE,
|
||||||
argc, argv,
|
argc, argv,
|
||||||
GNOME_PARAM_NONE);
|
GNOME_PARAM_NONE);
|
||||||
|
|
||||||
client = gnome_master_client ();
|
for (i = 0; i < argc; i++)
|
||||||
gnome_client_set_restart_command (client, argc, argv);
|
if (strcmp (argv[i], "--no-session") == 0)
|
||||||
gnome_client_set_restart_style (client, GNOME_RESTART_IMMEDIATELY);
|
session = FALSE;
|
||||||
|
|
||||||
g_signal_connect (client, "save_yourself", G_CALLBACK (session_save), NULL);
|
if (session)
|
||||||
g_signal_connect (client, "die", G_CALLBACK (session_die), NULL);
|
{
|
||||||
|
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);
|
bindtextdomain (GETTEXT_PACKAGE, NULL);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
@@ -67,7 +77,8 @@ int main (int argc, char *argv[])
|
|||||||
gtk_main ();
|
gtk_main ();
|
||||||
}
|
}
|
||||||
|
|
||||||
gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
|
if (session)
|
||||||
|
gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user