aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-28 14:57:10 -0500
committerTed Gould <ted@canonical.com>2009-09-28 14:57:10 -0500
commit1a4031894fcc9e003aac8b50a8c8e4be5ecaceea (patch)
tree9c83413173e6bb4f6f1d841a6efbc2a9b250e6dc
parent2bddafc048379759d720f250739c59fcad7f6249 (diff)
parentf5c0bb7915f8d9f7dc3c63285f7ebaa13e86c507 (diff)
downloadayatana-indicator-session-1a4031894fcc9e003aac8b50a8c8e4be5ecaceea.tar.gz
ayatana-indicator-session-1a4031894fcc9e003aac8b50a8c8e4be5ecaceea.tar.bz2
ayatana-indicator-session-1a4031894fcc9e003aac8b50a8c8e4be5ecaceea.zip
Merging in the launch protections.
-rw-r--r--debian/changelog6
-rw-r--r--src/gtk-dialog/logout-dialog.c4
-rw-r--r--src/indicator-session.c29
3 files changed, 29 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog
index db347f4..2dc73d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+indicator-session (0.1.5-0ubuntu1~ppa2~launch1) UNRELEASED; urgency=low
+
+ * Merging in the launch protections.
+
+ -- Ted Gould <ted@ubuntu.com> Mon, 28 Sep 2009 14:56:54 -0500
+
indicator-session (0.1.5-0ubuntu1~ppa1) karmic; urgency=low
* Upstream release 0.1.5
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);
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 8a4e298..99ce460 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);
@@ -275,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;
}
@@ -367,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;
}
@@ -444,14 +453,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 session 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;
}