From dca1f97b93a41d96ae1a41753f68bd32ceadf8e6 Mon Sep 17 00:00:00 2001 From: David Barth Date: Fri, 25 Sep 2009 10:44:11 +0200 Subject: remove superfluous window buttons --- src/gtk-dialog/logout-dialog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtk-dialog/logout-dialog.c b/src/gtk-dialog/logout-dialog.c index a94c649..c53590e 100644 --- a/src/gtk-dialog/logout-dialog.c +++ b/src/gtk-dialog/logout-dialog.c @@ -275,7 +275,9 @@ logout_dialog_init (LogoutDialog *logout_dialog) gtk_window_stick(GTK_WINDOW(logout_dialog)); gtk_window_set_keep_above(GTK_WINDOW(logout_dialog), TRUE); gtk_widget_realize(GTK_WIDGET(logout_dialog)); - gdk_window_set_functions(GTK_WIDGET(logout_dialog)->window, GDK_FUNC_CLOSE); + /* remove superfluous window buttons */ + gdk_window_set_functions (GTK_WIDGET(logout_dialog)->window, 0); + gdk_window_set_decorations (GTK_WIDGET(logout_dialog)->window, GDK_DECOR_BORDER | GDK_DECOR_TITLE); /* center window */ gtk_window_set_position (GTK_WINDOW(logout_dialog), GTK_WIN_POS_CENTER); -- cgit v1.2.3 From c2a35dea3a5876a254206523122ee07112991e62 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 14:48:05 -0500 Subject: Adding a check for null on the client in reorder and making it so that the inability to start a service is no longer an error. Just a critical. --- src/indicator-session.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index 8a4e298..13abb7d 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -138,6 +138,11 @@ child_realized (DbusmenuMenuitem * child, gpointer userdata) return; } + if (client == NULL) { + g_warning("Child realized for a menu we don't have? Section: %s", errorstr); + return; + } + position += posfunc(); g_debug("SUS: Adding child: %d", position); GtkMenuItem * widget = dbusmenu_gtkclient_menuitem_get(client, child); @@ -444,14 +449,16 @@ build_session_menu (gpointer userdata) return TRUE; } - if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_SESSION_DBUS_NAME, 0, &returnval, &error)) { - g_error("Unable to send message to DBus to start service: %s", error != NULL ? error->message : "(NULL error)" ); - g_error_free(error); + if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_SESSION_DBUS_NAME, 0 /* Flags */, &returnval, &error)) { + g_critical("Unable to send message to DBus to start service: %s", error != NULL ? error->message : "(NULL error)" ); + if (error != NULL) { + g_error_free(error); + } return FALSE; } if (returnval != DBUS_START_REPLY_SUCCESS && returnval != DBUS_START_REPLY_ALREADY_RUNNING) { - g_error("Return value isn't indicative of success: %d", returnval); + g_critical("Return value isn't indicative of success: %d", returnval); return FALSE; } -- cgit v1.2.3 From f5c0bb7915f8d9f7dc3c63285f7ebaa13e86c507 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 14:53:02 -0500 Subject: Criticalizing the other services as well. --- src/indicator-session.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index 13abb7d..99ce460 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -280,8 +280,10 @@ build_status_menu (gpointer userdata) } if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_STATUS_DBUS_NAME, 0, &returnval, &error)) { - g_error("Unable to send message to DBus to start service: %s", error != NULL ? error->message : "(NULL error)" ); - g_error_free(error); + g_critical("Unable to send message to DBus to start status service"); + if (error != NULL) { + g_error_free(error); + } return FALSE; } @@ -372,13 +374,15 @@ build_users_menu (gpointer userdata) } if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_USERS_DBUS_NAME, 0, &returnval, &error)) { - g_error("Unable to send message to DBus to start service"); - g_error_free(error); + g_critical("Unable to send message to DBus to start users service"); + if (error != NULL) { + g_error_free(error); + } return FALSE; } if (returnval != DBUS_START_REPLY_SUCCESS && returnval != DBUS_START_REPLY_ALREADY_RUNNING) { - g_error("Return value isn't indicative of success: %d", returnval); + g_critical("Return value isn't indicative of success: %d", returnval); return FALSE; } @@ -450,7 +454,7 @@ build_session_menu (gpointer userdata) } if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_SESSION_DBUS_NAME, 0 /* Flags */, &returnval, &error)) { - g_critical("Unable to send message to DBus to start service: %s", error != NULL ? error->message : "(NULL error)" ); + g_critical("Unable to send message to DBus to start session service"); if (error != NULL) { g_error_free(error); } -- cgit v1.2.3 From 1cb13d3b119dab14b9cceadf03429ab2a92e3c1a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 14:58:12 -0500 Subject: releasing version 0.1.5-0ubuntu1~ppa2~launch1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2dc73d6..93c0bc7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-session (0.1.5-0ubuntu1~ppa2~launch1) UNRELEASED; urgency=low +indicator-session (0.1.5-0ubuntu1~ppa2~launch1) karmic; urgency=low * Merging in the launch protections. - -- Ted Gould Mon, 28 Sep 2009 14:56:54 -0500 + -- Ted Gould Mon, 28 Sep 2009 14:58:10 -0500 indicator-session (0.1.5-0ubuntu1~ppa1) karmic; urgency=low -- cgit v1.2.3 From b8e0182839512f896fd7cce12aee4eedd2d00683 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 15:49:59 -0500 Subject: Whew, okay now all startup is two phased, asyncronous and pulled into a set of common functions. --- src/indicator-session.c | 134 ++++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 74 deletions(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index 99ce460..470f442 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -62,6 +62,8 @@ static guint status_menu_pos_offset (void); static guint users_menu_pos_offset (void); static guint session_menu_pos_offset (void); static void child_realized (DbusmenuMenuitem * child, gpointer userdata); +static gboolean start_service (gpointer userdata); +static void start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer data); GtkLabel * get_label (void) @@ -267,31 +269,9 @@ connect_to_status (gpointer userdata) return FALSE; } -static gboolean -build_status_menu (gpointer userdata) +static void +status_followup (void) { - g_debug("Building Status Menu"); - guint returnval = 0; - GError * error = NULL; - - if (proxy == NULL) { - /* If we don't have DBus, let's stay in the idle loop */ - return TRUE; - } - - if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_STATUS_DBUS_NAME, 0, &returnval, &error)) { - g_critical("Unable to send message to DBus to start status service"); - if (error != NULL) { - g_error_free(error); - } - return FALSE; - } - - if (returnval != DBUS_START_REPLY_SUCCESS && returnval != DBUS_START_REPLY_ALREADY_RUNNING) { - g_error("Return value isn't indicative of success: %d", returnval); - return FALSE; - } - status_client = dbusmenu_gtkclient_new(INDICATOR_STATUS_DBUS_NAME, INDICATOR_STATUS_DBUS_OBJECT); g_signal_connect(G_OBJECT(status_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(status_menu_root_changed), main_menu); @@ -301,7 +281,7 @@ build_status_menu (gpointer userdata) g_idle_add(connect_to_status, NULL); - return FALSE; + return; } /* Users menu */ @@ -361,31 +341,9 @@ users_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, return; } -static gboolean -build_users_menu (gpointer userdata) +static void +users_followup (void) { - g_debug("Building Users Menu"); - guint returnval = 0; - GError * error = NULL; - - if (proxy == NULL) { - /* If we don't have DBus, let's stay in the idle loop */ - return TRUE; - } - - if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_USERS_DBUS_NAME, 0, &returnval, &error)) { - g_critical("Unable to send message to DBus to start users service"); - if (error != NULL) { - g_error_free(error); - } - return FALSE; - } - - if (returnval != DBUS_START_REPLY_SUCCESS && returnval != DBUS_START_REPLY_ALREADY_RUNNING) { - g_critical("Return value isn't indicative of success: %d", returnval); - return FALSE; - } - users_client = dbusmenu_gtkclient_new(INDICATOR_USERS_DBUS_NAME, INDICATOR_USERS_DBUS_OBJECT); g_signal_connect(G_OBJECT(users_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(users_menu_root_changed), main_menu); @@ -393,7 +351,7 @@ build_users_menu (gpointer userdata) gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), users_separator); gtk_widget_hide(users_separator); /* Should be default, I'm just being explicit. $(%*#$ hide already! */ - return FALSE; + return; } /* Session Menu Stuff */ @@ -441,39 +399,67 @@ session_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot return; } -static gboolean -build_session_menu (gpointer userdata) +static void +session_followup (void) { - g_debug("Building Session Menu"); - guint returnval = 0; - GError * error = NULL; + session_client = dbusmenu_gtkclient_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT); + g_signal_connect(G_OBJECT(session_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(session_menu_root_changed), main_menu); - if (proxy == NULL) { - /* If we don't have DBus, let's stay in the idle loop */ - return TRUE; + return; +} + +/* Base menu stuff */ +static void +start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer data) +{ + if (error != NULL) { + g_critical("Starting service has resulted in error."); + g_error_free(error); + /* Try it all again, we need to get this started! */ + g_idle_add(start_service, data); + return; } - if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_SESSION_DBUS_NAME, 0 /* Flags */, &returnval, &error)) { - g_critical("Unable to send message to DBus to start session service"); - if (error != NULL) { - g_error_free(error); - } - return FALSE; + if (status != DBUS_START_REPLY_SUCCESS && status != DBUS_START_REPLY_ALREADY_RUNNING) { + g_critical("Return value isn't indicative of success: %d", status); + /* Try it all again, we need to get this started! */ + g_idle_add(start_service, data); + return; } - if (returnval != DBUS_START_REPLY_SUCCESS && returnval != DBUS_START_REPLY_ALREADY_RUNNING) { - g_critical("Return value isn't indicative of success: %d", returnval); - return FALSE; + switch (GPOINTER_TO_INT(data)) { + case STATUS_SECTION: + status_followup(); + break; + case USERS_SECTION: + users_followup(); + break; + case SESSION_SECTION: + session_followup(); + break; + default: + g_critical("Oh, how can we get a value that we don't know!"); + break; } - session_client = dbusmenu_gtkclient_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT); - g_signal_connect(G_OBJECT(session_client), DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED, G_CALLBACK(session_menu_root_changed), main_menu); + return; +} + +static gboolean +start_service (gpointer userdata) +{ + g_debug("Starting a service"); + + if (proxy == NULL) { + /* If we don't have DBus, let's stay in the idle loop */ + return TRUE; + } + + org_freedesktop_DBus_start_service_by_name_async (proxy, INDICATOR_SESSION_DBUS_NAME, 0 /* Flags */, start_service_phase2, userdata); return FALSE; } -/* Base menu stuff */ - GtkMenu * get_menu (void) { @@ -483,9 +469,9 @@ get_menu (void) g_warning("Unable to get proxy for DBus itself. Seriously."); } - g_idle_add(build_status_menu, NULL); - g_idle_add(build_users_menu, NULL); - g_idle_add(build_session_menu, NULL); + g_idle_add(start_service, GINT_TO_POINTER(STATUS_SECTION)); + g_idle_add(start_service, GINT_TO_POINTER(USERS_SECTION)); + g_idle_add(start_service, GINT_TO_POINTER(SESSION_SECTION)); main_menu = GTK_MENU(gtk_menu_new()); loading_item = gtk_menu_item_new_with_label("Loading..."); -- cgit v1.2.3 From 7988f91ae2f476f96e81ed0a8aa4f4462321ee0f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 15:51:28 -0500 Subject: releasing version 0.1.5-0ubuntu1~ppa2~launch2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 943aa99..d335e8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-session (0.1.5-0ubuntu1~ppa2~launch2) UNRELEASED; urgency=low +indicator-session (0.1.5-0ubuntu1~ppa2~launch2) karmic; urgency=low * Getting a little crazy in here. - -- Ted Gould Mon, 28 Sep 2009 15:50:27 -0500 + -- Ted Gould Mon, 28 Sep 2009 15:51:25 -0500 indicator-session (0.1.5-0ubuntu1~ppa2~launch1) karmic; urgency=low -- cgit v1.2.3 From 1f32472486b4148225736fa256ff060471dee486 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 15:56:11 -0500 Subject: Oops, forgot to choose a service. --- src/indicator-session.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index 470f442..64c7bc8 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -455,7 +455,23 @@ start_service (gpointer userdata) return TRUE; } - org_freedesktop_DBus_start_service_by_name_async (proxy, INDICATOR_SESSION_DBUS_NAME, 0 /* Flags */, start_service_phase2, userdata); + const gchar * service = NULL; + switch (GPOINTER_TO_INT(userdata)) { + case STATUS_SECTION: + service = INDICATOR_STATUS_DBUS_NAME; + break; + case USERS_SECTION: + service = INDICATOR_USERS_DBUS_NAME; + break; + case SESSION_SECTION: + service = INDICATOR_SESSION_DBUS_NAME; + break; + default: + g_critical("Oh, how can we get a value that we don't know!"); + return FALSE; + } + + org_freedesktop_DBus_start_service_by_name_async (proxy, service, 0 /* Flags */, start_service_phase2, userdata); return FALSE; } -- cgit v1.2.3 From 10294ce80952ff0598fe2ff2c26deec1be388c85 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 15:57:29 -0500 Subject: releasing version 0.1.5-0ubuntu1~ppa2~launch3 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4801a63..7a856db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -indicator-session (0.1.5-0ubuntu1~ppa2~launch3) UNRELEASED; urgency=low +indicator-session (0.1.5-0ubuntu1~ppa2~launch3) karmic; urgency=low * Starting *all* the services - -- Ted Gould Mon, 28 Sep 2009 15:56:27 -0500 + -- Ted Gould Mon, 28 Sep 2009 15:57:25 -0500 indicator-session (0.1.5-0ubuntu1~ppa2~launch2) karmic; urgency=low -- cgit v1.2.3 From 1d503f248600668c4dcc6ac6df25d4912cd46459 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Sep 2009 17:43:06 -0500 Subject: Commenting the changes. --- src/indicator-session.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/indicator-session.c b/src/indicator-session.c index 64c7bc8..a4bb5e1 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -269,6 +269,10 @@ connect_to_status (gpointer userdata) return FALSE; } +/* Follow up the service being started by connecting + up the DBus Menu Client and creating our separator. + Also creates an idle func to connect to the service for + getting the icon that we should be using on the panel. */ static void status_followup (void) { @@ -341,6 +345,8 @@ users_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot, return; } +/* Follow up the service being started by connecting + up the DBus Menu Client and creating our separator. */ static void users_followup (void) { @@ -399,6 +405,8 @@ session_menu_root_changed(DbusmenuGtkClient * client, DbusmenuMenuitem * newroot return; } +/* Follow up the service being started by connecting + up the DBus Menu Client. */ static void session_followup (void) { @@ -409,9 +417,15 @@ session_followup (void) } /* Base menu stuff */ + +/* This takes the response to the service starting up. + It checks to see if it's started and if so, continues + with the follow function for the particular area that + it's working in. */ static void start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer data) { + /* If we've got an error respond to it */ if (error != NULL) { g_critical("Starting service has resulted in error."); g_error_free(error); @@ -420,6 +434,7 @@ start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer return; } + /* If it's not running or we started it, try again */ if (status != DBUS_START_REPLY_SUCCESS && status != DBUS_START_REPLY_ALREADY_RUNNING) { g_critical("Return value isn't indicative of success: %d", status); /* Try it all again, we need to get this started! */ @@ -427,6 +442,8 @@ start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer return; } + /* Check which part of the menu we're in and do the + appropriate follow up from the service being started. */ switch (GPOINTER_TO_INT(data)) { case STATUS_SECTION: status_followup(); @@ -445,6 +462,10 @@ start_service_phase2 (DBusGProxy * proxy, guint status, GError * error, gpointer return; } +/* Our idle service starter. It looks at the section that + we're doing and then asks async for that service to be + started by dbus. Probably not really useful to be in + the idle loop as it's so quick, but why not. */ static gboolean start_service (gpointer userdata) { @@ -476,6 +497,9 @@ start_service (gpointer userdata) return FALSE; } +/* Indicator based function to get the menu for the whole + applet. This starts up asking for the parts of the menu + from the various services. */ GtkMenu * get_menu (void) { @@ -485,10 +509,13 @@ get_menu (void) g_warning("Unable to get proxy for DBus itself. Seriously."); } + /* Startup in the idle loop */ g_idle_add(start_service, GINT_TO_POINTER(STATUS_SECTION)); g_idle_add(start_service, GINT_TO_POINTER(USERS_SECTION)); g_idle_add(start_service, GINT_TO_POINTER(SESSION_SECTION)); + /* Build a temp menu incase someone can ask for it + before the services start. Fast user! */ main_menu = GTK_MENU(gtk_menu_new()); loading_item = gtk_menu_item_new_with_label("Loading..."); gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), loading_item); -- cgit v1.2.3 From 9efc81691426e023df3a2124a6d65a7f4e4fb327 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 29 Sep 2009 16:25:35 -0500 Subject: Making the locking menu item a global and make it sensitive based on whether there is autologin. --- src/users-service.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/users-service.c b/src/users-service.c index dc11e8d..894b832 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -53,6 +53,8 @@ static DbusmenuMenuitem *root_menuitem = NULL; static GMainLoop *mainloop = NULL; static UsersServiceDbus *dbus_interface = NULL; +static DbusmenuMenuitem *lock_menuitem = NULL; + static DBusGProxy * gdm_settings_proxy = NULL; static gboolean gdm_auto_login = FALSE; static const gchar * gdm_auto_login_string = "daemon/AutomaticLoginEnable"; @@ -78,6 +80,14 @@ gdm_settings_change (DBusGProxy * proxy, const gchar * value, const gchar * old, gdm_auto_login = FALSE; } + if (lock_menuitem != NULL) { + if (gdm_auto_login) { + dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false"); + } else { + dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true"); + } + } + return; } @@ -277,10 +287,15 @@ rebuild_items (DbusmenuMenuitem *root, g_list_foreach (children, (GFunc)g_object_unref, NULL); g_list_free (children); - mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen")); - g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL); - dbusmenu_menuitem_child_append(root, mi); + lock_menuitem = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen")); + g_signal_connect(G_OBJECT(lock_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL); + dbusmenu_menuitem_child_append(root, lock_menuitem); + if (gdm_auto_login) { + dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false"); + } else { + dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true"); + } if (can_activate == TRUE) { -- cgit v1.2.3 From 36c4001d54b67fa5c687255d73f5db79a421db7f Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Tue, 29 Sep 2009 16:52:32 -0500 Subject: Set MAXIMUM_USERS from 7 or 1 --- src/users-service-dbus.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/users-service-dbus.h b/src/users-service-dbus.h index fc14beb..9ba05c9 100644 --- a/src/users-service-dbus.h +++ b/src/users-service-dbus.h @@ -50,8 +50,11 @@ struct _UserData UsersServiceDbus *service; }; +/* XXX - MAXIMUM_USERS should be set to 7 once we've + * got some gdm issues worked out. + */ #define MINIMUM_USERS 1 -#define MAXIMUM_USERS 7 +#define MAXIMUM_USERS 1 struct _UsersServiceDbus { GObject parent; -- cgit v1.2.3 From 13cb4dfa96124d14aaf86b422ff47c481acbcd49 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 29 Sep 2009 21:03:36 -0500 Subject: Checking to see if we're the guest user. No locking the guest. --- src/users-service.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/users-service.c b/src/users-service.c index 894b832..9877ba6 100644 --- a/src/users-service.c +++ b/src/users-service.c @@ -54,6 +54,7 @@ static GMainLoop *mainloop = NULL; static UsersServiceDbus *dbus_interface = NULL; static DbusmenuMenuitem *lock_menuitem = NULL; +static gboolean is_guest = FALSE; static DBusGProxy * gdm_settings_proxy = NULL; static gboolean gdm_auto_login = FALSE; @@ -81,7 +82,7 @@ gdm_settings_change (DBusGProxy * proxy, const gchar * value, const gchar * old, } if (lock_menuitem != NULL) { - if (gdm_auto_login) { + if (gdm_auto_login || is_guest) { dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false"); } else { dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true"); @@ -291,7 +292,7 @@ rebuild_items (DbusmenuMenuitem *root, dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen")); g_signal_connect(G_OBJECT(lock_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL); dbusmenu_menuitem_child_append(root, lock_menuitem); - if (gdm_auto_login) { + if (gdm_auto_login || is_guest) { dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "false"); } else { dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_SENSITIVE, "true"); @@ -409,6 +410,10 @@ main (int argc, char ** argv) return 1; } + if (!g_strcmp0(g_get_user_name(), "guest")) { + is_guest = TRUE; + } + g_idle_add(build_gdm_proxy, NULL); dbus_interface = g_object_new (USERS_SERVICE_DBUS_TYPE, NULL); -- cgit v1.2.3 From 75bf969d3ee50d5d49817e1737b351eb0857b05c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 1 Oct 2009 15:17:43 -0500 Subject: 0.1.6 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0ce9fbc..193e88c 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.1.5) +AM_INIT_AUTOMAKE(indicator-session, 0.1.6) AM_MAINTAINER_MODE -- cgit v1.2.3 From 6a03cb8f3370e032b9fbf7b6bb3082e32d6e206a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 1 Oct 2009 15:26:23 -0500 Subject: releasing version 0.1.6-0ubuntu1~ppa1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3d74832..f9619d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-session (0.1.6-0ubuntu1~ppa1) UNRELEASED; urgency=low +indicator-session (0.1.6-0ubuntu1~ppa1) karmic; urgency=low * Upstream release 0.1.6 * Making startup of services asynchronous (LP: #436181) @@ -6,7 +6,7 @@ indicator-session (0.1.6-0ubuntu1~ppa1) UNRELEASED; urgency=low GDM autologin (LP: #436724) * Disabling "Lock Screen" in guest session (LP: #439068) - -- Ted Gould Mon, 28 Sep 2009 21:01:22 -0500 + -- Ted Gould Thu, 01 Oct 2009 15:26:19 -0500 indicator-session (0.1.5-0ubuntu2) karmic; urgency=low -- cgit v1.2.3