diff --git a/capplet/Makefile.am b/capplet/Makefile.am index 7b8736a..3f0d590 100644 --- a/capplet/Makefile.am +++ b/capplet/Makefile.am @@ -27,7 +27,6 @@ AM_CPPFLAGS = \ $(NWAM_MANAGER_CFLAGS) \ -DNWAM_MANAGER_DATADIR=\""$(pkgdatadir)"\" \ -DNWAM_MANAGER_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - -DGLADEDIR=\""$(pkgdatadir)"\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DPRINTER_HELPER_PATH=\"$(libexecdir)\" \ $(NULL) @@ -114,7 +113,6 @@ EXTRA_DIST = \ nwam_vpn_pref_dialog.h \ nwam_wireless_chooser.h \ nwam_wireless_dialog.h \ - $(glade_DATA) \ $(NULL) DISTCLEANFILES = \ diff --git a/capplet/main.c b/capplet/main.c index ca55e42..2e5ca05 100644 --- a/capplet/main.c +++ b/capplet/main.c @@ -28,9 +28,6 @@ #include #include #include -#include -#include -#include #include #include "nwam_tree_view.h" @@ -77,33 +74,8 @@ GOptionEntry application_options[] = { { NULL } }; -static GtkWidget* -customwidgethandler(GladeXML *xml, - gchar *func_name, - gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2, - gpointer user_data) -{ - if (g_ascii_strcasecmp(name, "address_table") == 0 || - g_ascii_strcasecmp(name, "connection_status_table") == 0 || - g_ascii_strcasecmp(name, "location_tree") == 0 || - g_ascii_strcasecmp(name, "vpn_apps_list") == 0 || - g_ascii_strcasecmp(name, "network_profile_table") == 0) { - g_debug("CUSTOMIZED WIDGET %s", name); - return nwam_tree_view_new(); - } - - return NULL; -} -static UniqueResponse -nwamui_unique_message_handler( UniqueApp *app, - gint command, - UniqueMessageData *message_data, - guint time_, - gpointer user_data) +static void +activate (GApplication *app, gpointer user_data) { NwamPrefIFace *dialog_iface = NULL; @@ -111,27 +83,17 @@ nwamui_unique_message_handler( UniqueApp *app, dialog_iface = NWAM_PREF_IFACE(user_data); } - switch ( command ) { - case UNIQUE_ACTIVATE: - nwamui_debug("Got Unique ACTIVATE command (%d)", command ); - if ( dialog_iface != NULL ) { - capplet_dialog_raise( dialog_iface ); - return( UNIQUE_RESPONSE_OK ); - } - break; - default: - nwamui_debug("Got unexpected Unique command %d, ignoring...", command ); - break; + g_debug("Got activate signal"); + if ( dialog_iface != NULL ) { + capplet_dialog_raise( dialog_iface ); } - - return( UNIQUE_RESPONSE_PASSTHROUGH ); } static void -add_unique_message_handler( UniqueApp *app, NwamPrefIFace *capplet_dialog ) +add_unique_message_handler(GApplication *app, NwamPrefIFace *capplet_dialog ) { if ( app != NULL ) { - g_signal_connect(app, "message-received", (GCallback)nwamui_unique_message_handler, (gpointer)capplet_dialog); + g_signal_connect(app, "activate", G_CALLBACK (activate), (gpointer)capplet_dialog); } } @@ -141,8 +103,7 @@ add_unique_message_handler( UniqueApp *app, NwamPrefIFace *capplet_dialog ) int main(int argc, char** argv) { - UniqueApp *app = NULL; - GnomeProgram* program = NULL; + GApplication *app = NULL; GOptionContext* option_context = NULL; GError* err = NULL; NwamPrefIFace *capplet_dialog = NULL; @@ -154,18 +115,9 @@ main(int argc, char** argv) textdomain (GETTEXT_PACKAGE); g_option_context_add_main_entries(option_context, application_options, GETTEXT_PACKAGE); - /* Initialise Thread Support */ - g_thread_init( NULL ); - /* Setup log handler to trap debug messages */ nwamui_util_default_log_handler_init(); - program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, - argc, argv, - GNOME_PARAM_GOPTION_CONTEXT, option_context, - GNOME_PARAM_APP_DATADIR, NWAM_MANAGER_DATADIR, - GNOME_PARAM_NONE); - nwamui_util_set_debug_mode( debug ); if (!nwamui_prof_check_ui_auth(nwamui_prof_get_instance_noref(), UI_AUTH_ALL)) { @@ -180,11 +132,19 @@ main(int argc, char** argv) prof = nwamui_prof_get_instance_noref(); } - app = unique_app_new("com.sun.nwam-manager-properties", NULL); + app = g_application_new("com.sun.nwam-manager-properties", 0); if ( !nwamui_util_is_debug_mode() ) { - if (unique_app_is_running(app)) { + GError *error = NULL; + + g_application_register (G_APPLICATION (app), NULL, &error); + if (error != NULL) { + g_warning ("Unable to register GApplication: %s", error->message); + g_error_free (error); + error = NULL; + } + if (g_application_get_is_remote (G_APPLICATION (app))) { /* Send request to other app to show itself */ - unique_app_send_message(app, UNIQUE_ACTIVATE, NULL); + g_application_activate(G_APPLICATION (app)); /* nwamui_util_show_message( NULL, GTK_MESSAGE_INFO, _("NWAM Manager Properties"), _("\nAnother instance is running.\nThis instance will exit now."), TRUE ); @@ -200,11 +160,6 @@ main(int argc, char** argv) gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), NWAM_MANAGER_DATADIR G_DIR_SEPARATOR_S "icons"); -#if 0 - /* - * We probably don't need this any more if we are using - * gnome_program_init. - */ if (gtk_init_with_args(&argc, &argv, _("NWAM Configuration Capplet"), application_options, NULL, &err) == FALSE ) { if ( err != NULL && err->message != NULL ) { g_printerr(err->message); @@ -215,9 +170,6 @@ main(int argc, char** argv) } exit(1); } -#endif - - glade_set_custom_handler(customwidgethandler, NULL); if( vpn_pref_dialog ) { capplet_dialog = NWAM_PREF_IFACE(nwam_vpn_pref_dialog_new()); diff --git a/capplet/nwam-manager-properties.glade b/capplet/nwam-manager-properties.glade deleted file mode 100644 index 79ee040..0000000 --- a/capplet/nwam-manager-properties.glade +++ /dev/null @@ -1,5680 +0,0 @@ - - - - - - Network Preferences - icons/network-idle.png - dialog - False - - - True - - - True - 6 - 12 - - - True - 6 - 2 - 6 - 3 - - - True - Connection Status -Network Profile ---- -Automatic Profile -Wired (hme0) ---- -User Profile -Wired (hme1) -Wireless (bcm0) - - - 1 - 2 - - - - - - True - 1 - Sho_w: - True - right - - - - - - - - - False - 0 - - - - - True - False - False - - - True - 6 - - - True - 0 - Enabled connections: - - - False - False - 0 - - - - - True - True - never - never - in - - - True - - - - - 1 - - - - - True - 3 - 4 - 6 - 3 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - User - - - 2 - 3 - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 1 - <b>Network Profile:</b> - True - right - - - 1 - 2 - - - - - True - True - False - - - True - 0 - 0 - - - True - 4 - - - True - gtk-edit - - - False - False - 0 - - - - - True - _Locations... - True - - - False - False - 1 - - - - - - - - - 3 - 4 - 1 - 2 - GTK_FILL - - - - - - True - True - True - False - - - True - 0 - 0 - - - True - 4 - - - True - gtk-connect - - - False - False - 0 - - - - - True - _VPN Applications... - True - - - False - False - 1 - - - - - - - - - 3 - 4 - 2 - 3 - GTK_FILL - - - - - - True - 1 - <b>Location:</b> - True - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - Automatic - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - 0 - 0 - 0 - 12 - - - _Repair Selected - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Advanced - True - True - - - label_item - - - - - 3 - - - - - True - 1 - <b>VPN:</b> - True - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - CiscoVPN active - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - - - - False - 6 - 2 - - - - - - - True - Connection Status - - - False - tab - - - - - True - 6 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0.94999998807907104 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - Active _Profile: - True - - - False - 0 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Automatic -User - - - 1 - - - - - - - False - False - 0 - - - - - True - 6 - 12 - - - True - - - - - False - False - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - _View/Edit Profile: - True - - - False - 0 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Automatic -User - - - 1 - - - - - Connections... - True - True - True - - - False - 2 - - - - - False - 2 - - - - - True - 0 - -Choose which connections are enabled in this profile: - - - False - 3 - - - - - True - 2 - 2 - 6 - 12 - - - True - 6 - - - True - False - 0 - Selected gro_up: - True - - - False - 0 - - - - - True - False - Exactly one connection is enabled -One or more connections may be enabled -All connections must be enabled - - - 1 - - - - - 1 - 2 - - - - - - True - True - automatic - automatic - in - - - True - - - - - - - True - 3 - start - - - _Enable - True - True - True - True - - - False - False - 0 - - - - - Di_sable - True - True - True - True - - - False - False - 1 - - - - - New _Group - True - True - True - True - - - False - False - 2 - - - - - gtk-go-up - True - True - True - False - True - - - False - False - 3 - - - - - gtk-go-down - True - True - True - False - True - - - False - False - 4 - - - - - True - True - True - False - - - True - 0 - 0 - - - True - 2 - - - True - gtk-edit - - - False - False - 0 - - - - - True - _Rename - True - - - False - False - 1 - - - - - - - - - False - False - 5 - - - - - 1 - 2 - - - - - - - - - 12 - 4 - - - - - 1 - - - - - True - hme0 - - - 1 - False - tab - - - - - True - True - - - True - 12 - 3 - 2 - 24 - 3 - - - True - False - False - - - True - 2 - 2 - 6 - 16 - - - True - 0 - _Subnet Mask: - True - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - _Address: - True - - - GTK_FILL - - - - - - True - 0.34999999403953552 - 255.255.255.0 - - - 1 - 2 - 1 - 2 - - - - - - True - 0.34999999403953552 - 192.168.1.2 - - - 1 - 2 - - - - - - - - True - DHCP - - - False - tab - - - - - True - 2 - 2 - 6 - 3 - - - True - 0 - _Subnet Mask: - True - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - _Address: - True - - - GTK_FILL - - - - - - True - 0 - 0 - 84 - - - True - True - 15 - - 192.168.1.2 - - - - - 1 - 2 - - - - - - True - 0 - 0 - 84 - - - True - True - 15 - - 255.255.255.0 - - - - - 1 - 2 - 1 - 2 - - - - - - 1 - - - - - True - Manual - - - 1 - False - tab - - - - - True - 2 - 3 - 6 - 3 - - - gtk-add - True - True - False - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - gtk-remove - True - True - False - True - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - True - automatic - automatic - in - - - True - True - True - False - - - - - 3 - - - - - True - 0 - <i><small>Double-click table cells to edit</small></i> - True - - - 1 - 2 - - - - - - 2 - - - - - True - Multiple - - - 2 - False - tab - - - - - 2 - 1 - 2 - 12 - - - - - True - True - 6 - - - True - 2 - 2 - 12 - 6 - - - True - Disabled -Enabled - - - 1 - 2 - GTK_FILL - - - - - True - False - False - - - True - 5 - 3 - 6 - 3 - - - True - 1 - <i><small>Double-click table cells to edit</small></i> - True - - - 4 - 5 - - - - - - True - 1 - 0.85000002384185791 - - - True - True - automatic - automatic - in - - - True - True - True - False - - - - - - - 3 - 3 - 4 - - - - - Accept _stateless addresses from router - True - False - True - True - - - 3 - 1 - 2 - GTK_FILL - - - - - - Accept state_ful addresses from router - True - False - True - True - - - 3 - GTK_FILL - - - - - - Stati_c addresses: - True - True - False - True - True - - - 3 - 2 - 3 - GTK_FILL - - - - - - gtk-remove - True - True - False - True - - - 2 - 3 - 4 - 5 - GTK_FILL - - - - - - gtk-add - True - True - False - True - - - 1 - 2 - 4 - 5 - GTK_FILL - - - - - - - - True - Multiple - - - False - tab - - - - - True - 3 - 2 - 6 - 16 - - - True - 0 - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - True - 1 - Ro_uter: - True - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - 16 - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - 2001:0db8:3c4d:0015:0000:0000:abcd:ef12 - - - 1 - 2 - - - - - - True - 1 - Prefi_x: - True - - - 2 - 3 - GTK_FILL - - - - - - True - 1 - _Address: - True - - - GTK_FILL - - - - - - 1 - - - - - True - DHCP - - - 1 - False - tab - - - - - True - 3 - 2 - 6 - 3 - - - True - 0 - 0 - - - True - True - - - - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - - 1 - 2 - 1 - 2 - - - - - - True - 1 - _Prefix: - True - - - 2 - 3 - GTK_FILL - - - - - - True - 1 - _Router: - True - ipv6_router_entry - - - 1 - 2 - GTK_FILL - - - - - - True - 1 - _Address: - True - ipv6_address_entry - - - GTK_FILL - - - - - - True - True - 39 - - 2001:0db8:3c4d:0015:0000:0000:abcd:ef12 - - - 1 - 2 - - - - - - 2 - - - - - True - Manual - - - 2 - False - tab - - - - - 2 - 1 - 2 - - - - - - True - 1 - IPv6 I_P: - True - - - GTK_FILL - - - - - - - - True - Current IPv_6 setting: enabled - True - - - label_item - - - - - 2 - 2 - 3 - - - - - - True - 1 - Current IPv_4 setting: - True - - - - - - - - - True - Disabled -DHCP assigned -Manually assigned -Multiple addresses - - - 1 - 2 - - - - - - - - True - IP Address - - - False - tab - - - - - True - 12 - 24 - - - True - 2 - 2 - 6 - 3 - - - True - 0 - Favorite wireless networks, in the order that -connection will be attempted: - - - 2 - GTK_FILL - - - - - - True - 0 - 0 - - - True - 3 - - - gtk-add - True - True - True - False - True - - - False - False - 0 - - - - - gtk-remove - True - True - True - False - True - - - False - False - 1 - - - - - gtk-edit - True - True - True - False - True - - - False - False - 2 - - - - - gtk-go-up - True - True - True - False - True - - - False - False - 3 - - - - - gtk-go-down - True - True - True - False - True - - - False - False - 4 - - - - - - - 1 - 2 - 1 - 2 - - - - - - - True - True - never - automatic - in - - - True - True - True - False - - - - - 1 - 2 - - - - - False - False - 0 - - - - - True - 3 - - - True - 0 - If no favorite networks are available: - - - False - False - 0 - - - - - True - Show list of available networks -Join an open network -Do not connect - - - - False - False - 1 - - - - - False - False - 1 - - - - - True - True - - - True - - - True - 0 - none - - - True - 12 - - - True - - - Joining an open network that is not in your favorites list - True - True - False - True - True - True - - - False - False - 0 - - - - - Joining any favorite network - True - True - False - True - True - - - False - False - 1 - - - - - Adding any new network to your favorites list - True - True - False - True - True - True - - - False - False - 2 - - - - - - - - - 0 - - - - - - - True - Ask before... - - - label_item - - - - - False - False - 2 - - - - - 1 - - - - - True - Wireless - - - 1 - False - tab - - - - - Not required for Phase 1 - - - 2 - - - - - True - Ethernet - - - 2 - False - tab - - - - - 2 - - - - - True - Network Profile - - - 2 - False - tab - - - - - 1 - - - - - 1 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-refresh - -2 - True - True - True - False - True - - - False - False - 1 - - - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 2 - - - - - gtk-ok - -5 - True - True - True - False - True - - - False - False - 3 - - - - - False - end - 0 - - - - - - - Location Properties : %s - icons/network-idle.png - dialog - False - - - True - - - True - 12 - 12 - - - True - True - - - 6 - 6 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 6 - - - True - 6 - - - True - 0 - _Configuration: - True - - - False - False - 0 - - - - - True - Direct connection to internet -Manually assigned -From configuration (PAC) file - - - 1 - - - - - - - False - False - 0 - - - - - True - False - False - - - True - 12 - 8 - 5 - 6 - 3 - - - True - 1 - _HTTP: - True - http_name - - - GTK_FILL - - - - - - True - 1 - HTTP_S: - True - https_name - - - 2 - 3 - GTK_FILL - - - - - - True - 1 - _Gopher: - True - gopher_name - - - 4 - 5 - GTK_FILL - - - - - - True - 1 - Soc_ks: - True - socks_name - - - 5 - 6 - GTK_FILL - - - - - - True - True - - - - 1 - 2 - - - - - - True - True - - - - 1 - 2 - 2 - 3 - - - - - - True - True - - - - 1 - 2 - 3 - 4 - - - - - - True - True - - - - 1 - 2 - 4 - 5 - - - - - - True - True - - - - 1 - 2 - 5 - 6 - - - - - - True - 0 - Port: - - - 2 - 3 - 3 - 4 - GTK_FILL - - - - - - True - 0 - Port: - - - 2 - 3 - 4 - 5 - GTK_FILL - - - - - - True - 0 - Port: - - - 2 - 3 - 5 - 6 - GTK_FILL - - - - - - True - 12 - - - Use for all connection types - True - True - False - True - True - - - - - 1 - 4 - 1 - 2 - GTK_FILL - - - - - - _Password... - True - True - False - True - - - 4 - 5 - GTK_FILL - - - - - - True - 1 - _FTP: - True - ftp_name - - - 3 - 4 - GTK_FILL - - - - - - True - 1 - 0.79000002145767212 - _No proxy for: - True - right - - - 6 - 7 - GTK_FILL - GTK_FILL - - - - - True - 0 - Port: - - - 2 - 3 - 2 - 3 - GTK_FILL - - - - - - True - 0 - <small><i><b>Example:</b> 192.168.1.1, my.local.net, *.remote.net</i></small> - True - - - 1 - 4 - 7 - 8 - GTK_FILL - - - - - - True - 0 - Port: - - - 2 - 3 - GTK_FILL - - - - - - True - True - 80 0 65535 1 10 0 - 1 - - - 3 - 4 - - - - - - True - True - 80 0 65535 1 10 0 - 1 - - - 3 - 4 - 2 - 3 - - - - - - True - True - 80 0 65535 1 10 0 - 1 - - - 3 - 4 - 3 - 4 - - - - - - True - True - 80 0 65535 1 10 0 - 1 - - - 3 - 4 - 4 - 5 - - - - - - True - True - 1080 0 65535 1 10 0 - 1 - - - 3 - 4 - 5 - 6 - - - - - - True - 12 - - - True - True - - - - - - 1 - 4 - 6 - 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Manual - - - False - tab - - - - - True - 0 - 0 - - - True - 6 - - - True - Configuration _file: - True - - - False - False - 0 - - - - - True - False - Select a Proxy Configuration File - - - 1 - - - - - - - 1 - - - - - True - PAC - - - 1 - False - tab - - - - - 1 - - - - - False - - - - - True - Proxies - - - False - tab - - - - - True - 12 - 12 - 12 - 12 - - - True - 6 - - - True - 9 - 5 - 3 - 6 - - - _LDAP - True - True - False - True - True - - - 5 - 6 - GTK_FILL - GTK_FILL - - - - - _Files - True - True - False - True - True - - - 5 - 7 - 9 - GTK_FILL - GTK_FILL - - - - - True - False - True - (optional) - - - 4 - 5 - GTK_FILL - - - - - True - False - True - (required) - - - 4 - 5 - 1 - 2 - GTK_FILL - - - - - True - False - True - (optional) - - - 4 - 5 - 4 - 5 - GTK_FILL - - - - - True - False - 0 - D_omain: - True - - - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - Ser_vers: - True - - - 3 - 4 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - Sear_ch: - True - - - 3 - 4 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - Domain: - - - 3 - 4 - 3 - 4 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - (enter below) - - - 4 - 5 - 3 - 4 - GTK_FILL - - - - - True - False - 0 - S_ervers: - True - - - 3 - 4 - 4 - 5 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - Domain: - - - 3 - 4 - 5 - 6 - GTK_FILL - GTK_FILL - - - - - True - False - 0 - (enter below) - - - 4 - 5 - 5 - 6 - GTK_FILL - - - - - _DNS - True - True - False - True - True - - - GTK_FILL - - - - - D_HCP - True - True - False - True - True - True - - - 1 - 2 - GTK_FILL - - - - - _Manual - True - True - False - True - True - True - dns_dhcp_rb - - - 2 - 3 - GTK_FILL - - - - - _NIS - True - True - False - True - True - - - 3 - 4 - GTK_FILL - - - - - DHC_P - True - True - False - True - True - True - - - 1 - 2 - 3 - 4 - GTK_FILL - - - - - Man_ual - True - True - False - True - True - True - nis_dhcp_rb - - - 2 - 3 - 3 - 4 - GTK_FILL - - - - - True - False - True - (optional) - - - 4 - 5 - 2 - 3 - - - - - True - False - 0 - S_ervers: - True - - - 3 - 4 - 6 - 7 - GTK_FILL - GTK_FILL - - - - - True - False - True - (optional) - - - 4 - 5 - 6 - 7 - GTK_FILL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - 0 - - - - - True - 3 - 3 - 3 - 6 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - nsswitch file: - - - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - _Default - True - True - True - True - - - 2 - 3 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - False - True - - - 1 - 3 - - - - - - True - False - 0 - De_fault domain: - True - - - GTK_FILL - GTK_FILL - - - - - True - 6 - - - True - False - 1 - <i><small>Used by manual NIS and LDAP configurations</small></i> - True - - - - - 3 - 1 - 2 - GTK_FILL - - - - - False - 1 - - - - - - - 1 - - - - - True - Name Services - - - 3 - False - tab - - - - - True - 12 - 6 - 6 - - - True - 12 - - - True - 0 - none - - - True - 12 - - - True - 4 - 2 - 6 - 3 - - - True - False - Select IPfilter Configuration File - - - 1 - 2 - 1 - 2 - - - - - - True - False - Select IPfilter Configuration File - - - 1 - 2 - 2 - 3 - - - - - - True - False - Select IPpool Configuration File - - - 1 - 2 - 3 - 4 - - - - - - True - False - Select IPfilter Configuration File - - - 1 - 2 - GTK_EXPAND - - - - - _NAT configuration: - True - True - False - True - True - - - GTK_FILL - - - - - IP_filter configuration: - True - True - False - True - True - - - 1 - 2 - GTK_FILL - - - - - IPfilter v_6 configuration: - True - True - False - True - True - - - 2 - 3 - GTK_FILL - - - - - IP_pool configuration: - True - True - False - True - True - - - 3 - 4 - GTK_FILL - - - - - - - - - True - <b>IPfilter</b> - True - - - label_item - - - - - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - 2 - 2 - 6 - 3 - - - True - False - Select IPnat Configuration File - - - 1 - 2 - 1 - 2 - - - - - - IPsec p_olicy configuration - True - True - False - True - True - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - False - Select IPfilter Configuration File - - - 1 - 2 - - - - - - I_KE configuration: - True - True - False - True - True - - - GTK_FILL - GTK_FILL - - - - - - - - - True - <b>IPsec</b> - True - - - label_item - - - - - 1 - - - - - - - 2 - - - - - True - Security - - - 2 - False - tab - - - - - True - 12 - 4 - 2 - 6 - 3 - - - True - True - automatic - automatic - in - - - True - True - False - True - - - - - 3 - 4 - - - - - True - True - automatic - automatic - in - - - True - True - False - True - - - - - 1 - 2 - - - - - True - 0 - Enable these services when this location is active: - - - 2 - - - - - - True - 0 - -Disable these services when this location is active: - - - 2 - 2 - 3 - - - - - - True - 0 - 0 - - - True - 3 - - - gtk-add - True - True - True - False - True - - - False - False - 0 - - - - - gtk-remove - True - True - True - False - True - - - False - False - 1 - - - - - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - 0 - - - True - 3 - - - gtk-add - True - True - True - False - True - - - False - False - 0 - - - - - gtk-remove - True - True - True - False - True - - - False - False - 1 - - - - - - - 1 - 2 - 3 - 4 - - - - - - 3 - - - - - True - Network Services - - - 3 - False - tab - - - - - 0 - - - - - 1 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 1 - - - - - gtk-apply - -10 - True - True - True - False - True - - - False - False - 2 - - - - - gtk-ok - -5 - True - True - True - False - True - - - False - False - 3 - - - - - False - end - 0 - - - - - - - Add Wireless Network - False - icons/network-idle.png - dialog - True - False - - - True - - - True - 12 - 12 - - - True - 3 - 2 - 6 - 3 - - - True - None -WEP Hex -WEP ASCII -WPA Personal (PSK) -WPA Enterprise (Radius) - - - 1 - 2 - 1 - 2 - - - - - - True - 1 - _Security type: - True - - - 1 - 2 - GTK_FILL - - - - - - True - 1 - _Network name (ESSID): - True - - - - - - - - True - False - False - - - True - 2 - 6 - 3 - - - True - True - 64 - False - - - - 1 - 2 - - - - - - True - 1 - _Password: - True - wep_password_entry - - - - - - - - - - True - WEP - - - False - tab - - - - - True - 4 - 2 - 6 - 3 - - - True - True - False - - - - 1 - 2 - 1 - 2 - - - - - - True - 1 - _Username: - True - wpa_username_entry - - - - - - - - True - 1 - _Password: - True - wpa_password_entry - - - 1 - 2 - - - - - - True - True - - - - 1 - 2 - - - - - - True - LEAP -PEAP/MSCHAPv2 - - - 1 - 2 - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - 1 - _Configuration: - True - - - 2 - 3 - - - - - - True - - - 1 - 2 - 3 - 4 - GTK_FILL - - - - - True - 1 - Certificate _File: - True - - - 3 - 4 - GTK_FILL - - - - - - 1 - - - - - True - WPA/2 - - - 1 - False - tab - - - - - 2 - 2 - 3 - GTK_SHRINK - - - - - True - - - 1 - 2 - GTK_FILL - - - - - 0 - - - - - True - - - _Show passwords while typing - True - True - False - True - True - - - False - False - 0 - - - - - _Add to list of favorite networks on successful connection - True - True - False - True - True - True - - - False - False - 1 - - - - - 1 - - - - - True - True - - - True - 0 - none - - - True - 25 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - 3 - 6 - 6 - - - True - 0 - Known access points (_BSSIDs): - True - - - 3 - - - - - True - 0 - <small><i>Double-click rows to edit</i></small> - True - - - 2 - 3 - - - - - True - True - automatic - automatic - - - True - True - - - - - 3 - 1 - 2 - - - - - True - 3 - True - end - - - gtk-add - True - True - True - True - - - False - False - 0 - - - - - gtk-remove - True - True - True - True - - - False - False - 1 - - - - - 1 - 3 - 2 - 3 - - - - - - - - - - - True - Ad_vanced - True - - - label_item - - - - - 2 - - - - - 1 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 1 - - - - - gtk-ok - -5 - True - False - True - True - False - True - - - False - False - 2 - - - - - False - end - 0 - - - - - - - Connect to Wireless Network - icons/network-idle.png - dialog - False - - - True - - - True - 12 - 6 - - - True - 0 - The following wireless networks were detected at your location: - True - - - False - False - 0 - - - - - True - True - never - automatic - in - - - True - True - True - - - - - 1 - - - - - _Add to list of favorite networks on successful connection - True - True - False - True - True - - - False - False - 2 - - - - - 1 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 1 - - - - - Join _Unlisted... - True - True - True - True - - - False - False - 2 - - - - - gtk-connect - -5 - True - True - True - False - True - - - False - False - 3 - - - - - False - end - 0 - - - - - - - VPN Applications - icons/network-idle.png - dialog - False - - - True - - - True - 6 - 12 - - - True - 3 - - - True - 0 - Available VPN applications: - - - False - False - 0 - - - - - True - 2 - 2 - 3 - 6 - - - True - 12 - - - Start/stop '$vpn' according to rules - True - True - False - True - - - 0 - - - - - Edit _Rules... - True - True - True - True - - - False - False - 1 - - - - - 1 - 2 - GTK_FILL - - - - - True - True - never - automatic - in - - - True - - - - - - - True - 3 - start - - - gtk-add - True - True - True - False - True - - - False - False - 0 - - - - - gtk-remove - True - True - True - False - True - - - False - False - 1 - - - - - True - False - True - True - False - - - True - 0 - 0 - - - True - 2 - - - True - gtk-media-play - - - False - False - 0 - - - - - True - S_tart - True - - - False - False - 1 - - - - - - - - - False - False - 2 - - - - - gtk-media-stop - True - False - True - True - False - True - - - False - False - 3 - - - - - 1 - 2 - GTK_FILL - - - - - - - - 1 - - - - - 0 - - - - - True - 12 - - - True - 0 - none - - - True - 12 - - - True - 2 - 3 - 6 - 3 - - - True - 0 - Start _Command: - True - start_cmd_entry - - - GTK_FILL - - - - - - True - 0 - Stop Co_mmand: - True - stop_cmd_entry - - - 1 - 2 - GTK_FILL - - - - - - True - True - - - - 1 - 2 - - - - - - True - True - - - - 1 - 2 - 1 - 2 - - - - - - True - True - False - - - True - 0 - 0 - - - True - 2 - - - True - gtk-open - - - False - False - 0 - - - - - True - _Browse... - True - - - False - False - 1 - - - - - - - - - 2 - 3 - GTK_FILL - - - - - - True - True - False - - - True - 0 - 0 - - - True - 2 - - - True - gtk-open - - - False - False - 0 - - - - - True - Bro_wse... - True - - - False - False - 1 - - - - - - - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - - - - - Manage VPN using command line applications: - True - True - False - True - True - - - label_item - - - - - False - 0 - - - - - True - 0 - none - - - True - 12 - - - True - 2 - 2 - 6 - 3 - - - True - False - 0 - Service _FMRI: - True - process_entry - - - GTK_FILL - - - - - - True - False - True - - - - 1 - 2 - - - - - - True - False - 0 - <small><i><b>Examples:</b> -svc://localhost/system/system-log:default -svc:/system/system-log:default -system/system-log:default -</i></small> - True - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - - - - - - - - Manage VPN using an SMF service: - True - True - False - True - True - vpn_cli_rb - - - label_item - - - - - False - 1 - - - - - False - 1 - - - - - 1 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 1 - - - - - gtk-ok - -5 - True - True - True - False - True - - - False - False - 2 - - - - - False - end - 0 - - - - - - - Rename Location - False - True - center-on-parent - gtk-edit - dialog - False - - - True - - - True - 12 - 6 - - - True - _Name: - True - rename_environment_entry - - - False - False - 0 - - - - - True - True - - Office - - - 1 - - - - - False - False - 1 - - - - - True - end - - - gtk-cancel - -6 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - False - True - center-on-parent - dialog - False - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 3 - 3 - 3 - 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - 12 - gtk-dialog-authentication - - - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <big><b>Proxy Authentication</b></big> -Enter username and password for http://$HOST:$PORT - - True - - - 1 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - _Username: - True - right - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 2 - 3 - 1 - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - 2 - 3 - 2 - 3 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - _Password: - True - right - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - False - False - 12 - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - end - - - gtk-help - -11 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - False - False - 0 - True - - - - - gtk-cancel - -6 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - False - False - 1 - - - - - gtk-ok - -5 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - - - False - False - 2 - - - - - False - end - 0 - - - - - - - 5 - Location Properties : <location name> - True - center-on-parent - icons/network-idle.png - dialog - True - nwam_location_properties - False - - - True - 2 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 12 - 12 - 12 - 12 - - - True - 2 - 3 - 6 - 3 - - - True - True - automatic - automatic - in - - - True - True - True - False - - - - - 1 - 2 - - - - - True - 0 - _Custom properties associated with this location: - True - - - 3 - - - - - - True - start - - - gtk-edit - True - True - True - True - - - False - False - 0 - - - - - 1 - 3 - 1 - 2 - - - - - - - - 1 - - - - - True - end - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - - 5 - Network Locations - center-on-parent - icons/network-idle.png - dialog - False - - - True - 2 - - - True - 3 - 2 - 12 - 6 - - - True - 0 - _Locations: - True - - - 2 - GTK_FILL - - - - - True - True - automatic - automatic - in - - - True - - - - - 1 - 2 - - - - - True - 0 - 0 - - - True - 3 - - - gtk-add - True - True - True - True - - - False - False - 0 - - - - - gtk-remove - True - True - True - True - - - False - False - 1 - - - - - _Rename - True - True - True - True - - - False - False - 2 - - - - - _Duplicate - True - True - True - True - - - False - False - 3 - - - - - gtk-edit - True - True - True - True - - - False - False - 4 - - - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - True - 3 - - - True - 0 - _Selected location is: - True - - - False - 0 - - - - - True - manual activation only -activated by rules -activated by system - - - False - 1 - - - - - False - 0 - - - - - Edit _Rules... - True - False - True - True - True - - - False - 1 - - - - - 2 - 3 - GTK_FILL - GTK_SHRINK - 12 - - - - - - - - 1 - - - - - True - end - - - gtk-help - -11 - True - True - True - False - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - - 5 - SMF Service - center-on-parent - icons/network-idle.png - normal - True - nwam_location_properties - False - - - True - 2 - - - True - 6 - - - True - 0 - _Service FMRI: - True - - - False - False - 0 - - - - - True - True - - - False - False - 1 - - - - - True - 0 - <small><i><b>Examples:</b> -svc://localhost/system/system-log:default -svc:/system/system-log:default -system/system-log:default -</i></small> - True - word-char - - - False - False - 2 - - - - - False - False - 1 - - - - - True - end - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 0 - - - - - gtk-ok - -5 - True - True - True - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - - 500 - 200 - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - True - center-on-parent - icons/network-idle.png - dialog - False - - - True - - - True - 6 - - - True - - - True - 0 - If the following conditions are true: - - - False - 2 - 0 - - - - - True - 1 - 0 - - - True - - - Match a_ny - True - True - False - True - 0 - 1 - True - - - False - 2 - 0 - - - - - Match _all - True - True - False - True - 0 - 1 - True - rules_match_any_rb - - - False - 2 - 1 - - - - - - - 1 - - - - - False - 0 - - - - - True - True - never - automatic - in - - - - - - 2 - 1 - - - - - 1 - - - - - True - end - - - gtk-revert-to-saved - -2 - True - True - True - True - - - False - False - 0 - - - - - gtk-cancel - -6 - True - True - True - True - - - False - False - 1 - - - - - gtk-ok - -5 - True - True - True - True - - - False - False - 2 - - - - - False - end - 0 - - - - - - diff --git a/common/Makefile.am b/common/Makefile.am index 1967933..e994229 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -25,7 +25,6 @@ AM_CPPFLAGS = \ $(NWAM_MANAGER_CFLAGS) \ -DNWAM_MANAGER_DATADIR=\""$(datadir)"\" \ -DNWAM_MANAGER_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - -DGLADEDIR=\""$(gladedir)"\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DPRINTER_HELPER_PATH=\"$(libexecdir)\" \ $(NULL) @@ -68,8 +67,6 @@ libnwamui_la_LIBADD = \ install-data-local: -gladedir = $(datadir)/nwam-manager - EXTRA_DIST = \ libnwamui.h \ help_refs.h \ diff --git a/common/libnwamui.c b/common/libnwamui.c index 11c26a0..b14db67 100644 --- a/common/libnwamui.c +++ b/common/libnwamui.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -51,6 +50,8 @@ #define RENAME_ENVIRONMENT_ENTRY "rename_environment_entry" #define RENAME_ENVIRONMENT_OK_BTN "rename_environment_ok_btn" +#define HELP_DOCUMENT "/gnome/help/nwam-manager/C/nwam-manager.xml" + #define PIXBUF_COMPOSITE_NO_SCALE(src, dest) \ gdk_pixbuf_composite(GDK_PIXBUF(src), GDK_PIXBUF(dest), \ 0, 0, \ @@ -869,10 +870,20 @@ nwamui_util_get_wireless_strength_icon_with_size( nwamui_wifi_signal_strength_t extern void nwamui_util_show_help( const gchar* link_name ) { - GError *error = NULL; - - gnome_help_display(PACKAGE, (link_name?link_name:""), &error); + GError *error; + gchar *child_argv[3]; + + child_argv[0] = "yelp"; + if (link_name) { + child_argv[1] = g_strconcat("ghelp://", NWAM_MANAGER_DATADIR, HELP_DOCUMENT, "?", link_name, NULL); + } else { + child_argv[1] = g_strconcat("ghelp://", NWAM_MANAGER_DATADIR, HELP_DOCUMENT, NULL); + } + child_argv[2] = NULL; + error = NULL; + g_spawn_async(NULL, child_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error); + if (error) { GtkWidget *dialog; dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL, diff --git a/configure.in b/configure.in index 4edce13..755d696 100644 --- a/configure.in +++ b/configure.in @@ -114,10 +114,8 @@ AM_GLIB_GNU_GETTEXT IT_PROG_INTLTOOL([0.35.0]) PKG_CHECK_MODULES(NWAM_MANAGER, - libgnomeui-2.0 >= 2.1.5 - glib-2.0 gconf-2.0 libglade-2.0 gtk+-2.0 >= 2.6.0 - libnotify >= 0.3.0 - unique-1.0 >= 1.0.8) + glib-2.0 gconf-2.0 gtk+-2.0 >= 2.6.0 + libnotify >= 0.3.0) AC_SUBST(NWAM_MANAGER_CFLAGS) AC_SUBST(NWAM_MANAGER_LIBS) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 99f33c0..a7f9ba9 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -26,7 +26,6 @@ AM_CPPFLAGS = \ $(NWAM_MANAGER_CFLAGS) \ -DNWAM_MANAGER_DATADIR=\""$(pkgdatadir)"\" \ -DNWAM_MANAGER_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - -DGLADEDIR=\""$(gladedir)"\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DGCONF_CONFIG_SOURCE=\"$(GCONF_SCHEMA_CONFIG_SOURCE)\" \ -DPRINTER_HELPER_PATH=\"$(libexecdir)\" \ diff --git a/daemon/main.c b/daemon/main.c index 273b376..4b8bc50 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -26,12 +26,10 @@ */ #include #include -#include #include #include #include #include -#include #include "libnwamui.h" #include "nwam_tree_view.h" @@ -90,12 +88,11 @@ init_wait_for_embedding(gpointer data) int main( int argc, char* argv[] ) { - GnomeProgram *program; GOptionContext *option_context; - GnomeClient *client; struct sigaction act; NwamuiProf* prof; GtkStatusIcon *status_icon = NULL; + GApplication *app = NULL; option_context = g_option_context_new (PACKAGE); @@ -104,12 +101,7 @@ main( int argc, char* argv[] ) textdomain (GETTEXT_PACKAGE); g_option_context_add_main_entries(option_context, option_entries, GETTEXT_PACKAGE); - program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, - argc, argv, - GNOME_PARAM_APP_DATADIR, NWAM_MANAGER_DATADIR, - GNOME_PARAM_GOPTION_CONTEXT, option_context, - GNOME_PARAM_NONE); - + gtk_init( &argc, &argv ); gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), NWAM_MANAGER_DATADIR G_DIR_SEPARATOR_S "icons"); @@ -146,32 +138,27 @@ main( int argc, char* argv[] ) } #endif + app = g_application_new("com.sun.nwam-manager", 0); if ( !nwamui_util_is_debug_mode() ) { - UniqueApp *app = NULL; - - app = unique_app_new("com.sun.nwam-manager", NULL); - if (unique_app_is_running(app)) { -/* unique_app_add_command(app, "", 1); */ -/* unique_app_send_message(app, 1, NULL); */ - nwamui_util_show_message( NULL, GTK_MESSAGE_INFO, _("NWAM Manager"), - _("\nAnother instance is running.\nThis instance will exit now."), TRUE ); - g_debug("Another instance is running, exiting."); - exit(0); + GError *error = NULL; + + g_application_register (G_APPLICATION (app), NULL, &error); + if (error != NULL) { + g_warning ("Unable to register GApplication: %s", error->message); + g_error_free (error); + error = NULL; + } else { + if (g_application_get_is_remote (G_APPLICATION (app))) { + nwamui_util_show_message( NULL, GTK_MESSAGE_INFO, _("NWAM Manager"), + _("\nAnother instance is running.\nThis instance will exit now."), TRUE ); + g_debug("Another instance is running, exiting."); + g_object_unref (app); + exit(0); + } } - - client = gnome_master_client (); - gnome_client_set_restart_command (client, argc, argv); - gnome_client_set_restart_style (client, GNOME_RESTART_IMMEDIATELY); } else { - g_debug("Auto restart and uniqueness disabled while in debug mode."); - } - - gtk_init( &argc, &argv ); - - /* Initialise Thread Support */ - if (!g_thread_supported()) { - g_thread_init(NULL); + g_debug("Uniqueness is disabled while in debug mode."); } NWAM_TYPE_TREE_VIEW; /* Dummy to cause NwamTreeView to be loaded for GtkBuilder to find symbol */ @@ -192,7 +179,8 @@ main( int argc, char* argv[] ) g_debug ("exiting..."); g_object_unref(status_icon); - g_object_unref (G_OBJECT (program)); + + g_object_unref(app); return 0; } diff --git a/data/nwam-manager-properties b/data/nwam-manager-properties index a735faf..33ec045 100644 --- a/data/nwam-manager-properties +++ b/data/nwam-manager-properties @@ -47,6 +47,4 @@ if isRunningNWAM; then else exec $GKSU "$NWAM_MANAGER_PROPERTIES $@" fi -else - exec ${BASEDIR}/bin/network-admin ${1+"$@"} fi diff --git a/tests/Makefile.am b/tests/Makefile.am index 0774cda..49e9c15 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -27,7 +27,6 @@ AM_CPPFLAGS = \ -DPACKAGE=\"$(PACKAGE)\" \ -DNWAM_MANAGER_DATADIR=\""$(pkgdatadir)"\" \ -DNWAM_MANAGER_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - -DGLADEDIR=\""$(gladedir)"\" \ -DUIDATA=\""$(uidir)/$(ui_DATA)"\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DGCONF_CONFIG_SOURCE=\"$(GCONF_SCHEMA_CONFIG_SOURCE)\" \ diff --git a/tests/main.c b/tests/main.c index 9c89c49..32f0d05 100644 --- a/tests/main.c +++ b/tests/main.c @@ -28,7 +28,6 @@ #include #include #include -#include #include @@ -66,14 +65,10 @@ GOptionEntry application_options[] = { int main(int argc, char** argv) { - GnomeProgram *program; GOptionContext* option_context = NULL; GError* err = NULL; NwamuiDaemon* daemon = NULL; - /* Initialise Thread Support */ - g_thread_init( NULL ); - /* g_type_init_with_debug_flags( G_TYPE_DEBUG_OBJECTS | G_TYPE_DEBUG_SIGNALS ); */ /* Initialize i18n support */ @@ -85,11 +80,7 @@ main(int argc, char** argv) option_context = g_option_context_new("test-nwam"); g_option_context_add_main_entries(option_context, application_options, NULL); - program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, - argc, argv, - GNOME_PARAM_APP_DATADIR, NWAM_MANAGER_DATADIR, - GNOME_PARAM_GOPTION_CONTEXT, option_context, - GNOME_PARAM_NONE); + gtk_init(&argc, &argv); nwamui_util_set_debug_mode( debug ); @@ -108,8 +99,6 @@ main(int argc, char** argv) gtk_main(); - g_object_unref (G_OBJECT (program)); - return (EXIT_SUCCESS); }