87daa7fbc0
this complies with old behaviour (that's for you sthen@) which we want because we don't use dbus+polkit+consolekit.
34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
$OpenBSD: patch-gnome-panel_panel-menu-items_c,v 1.1 2009/01/28 16:36:41 ajacoutot Exp $
|
|
|
|
Don't add a "Shut Down..." button if GDM is not running.
|
|
|
|
+++ gnome-panel/panel-menu-items.c Wed Jan 28 17:02:01 2009
|
|
@@ -43,6 +43,7 @@
|
|
#include <libpanel-util/panel-glib.h>
|
|
#include <libpanel-util/panel-keyfile.h>
|
|
#include <libpanel-util/panel-show.h>
|
|
+#include <panel-gdm.h>
|
|
|
|
#include "menu.h"
|
|
#include "panel-action-button.h"
|
|
@@ -1507,12 +1508,14 @@ panel_menu_items_append_lock_logout (GtkWidget *menu)
|
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
|
}
|
|
|
|
- item = panel_menu_items_create_action_item (PANEL_ACTION_SHUTDOWN);
|
|
- if (item != NULL) {
|
|
- if (!separator_inserted)
|
|
- add_menu_separator (menu);
|
|
+ if (gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN)) {
|
|
+ item = panel_menu_items_create_action_item (PANEL_ACTION_SHUTDOWN);
|
|
+ if (item != NULL) {
|
|
+ if (!separator_inserted)
|
|
+ add_menu_separator (menu);
|
|
|
|
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
|
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
|
+ }
|
|
}
|
|
}
|
|
|