- don't add a "Shut Down..." button on the panel when GDM is not running;

this complies with old behaviour (that's for you sthen@) which we want
because we don't use dbus+polkit+consolekit.
This commit is contained in:
ajacoutot 2009-01-28 16:36:41 +00:00
parent f45c224b2e
commit 87daa7fbc0
2 changed files with 35 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.47 2009/01/20 23:13:31 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.48 2009/01/28 16:36:41 ajacoutot Exp $
COMMENT= GNOME panel
GNOME_PROJECT= gnome-panel
GNOME_VERSION= 2.24.3
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
SHARED_LIBS= panel-applet-2 2.24 # .2.26
CATEGORIES= x11

View File

@ -0,0 +1,33 @@
$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);
+ }
}
}