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