gnome-panel r11184 - trunk/gnome-panel
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11184 - trunk/gnome-panel
- Date: Mon, 4 Aug 2008 02:06:29 +0000 (UTC)
Author: vuntz
Date: Mon Aug 4 02:06:29 2008
New Revision: 11184
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11184&view=rev
Log:
2008-08-04 Vincent Untz <vuntz gnome org>
* panel-util.c: (panel_lock_screen_action_available),
(panel_lock_screen_action): check the lock screen lockdown setting
before doing anything. The UI is already blocking the user for locking
the screen (by making the widget non-sensitive, eg), but this is extra
safety.
* gnome-desktop-item-edit.c: update to make it compile because of this
change...
Based on a patch from Matt Keenan <matt keenan sun com>
Part of bug #522453
Modified:
trunk/gnome-panel/ChangeLog
trunk/gnome-panel/gnome-desktop-item-edit.c
trunk/gnome-panel/panel-util.c
Modified: trunk/gnome-panel/gnome-desktop-item-edit.c
==============================================================================
--- trunk/gnome-panel/gnome-desktop-item-edit.c (original)
+++ trunk/gnome-panel/gnome-desktop-item-edit.c Mon Aug 4 02:06:29 2008
@@ -20,6 +20,8 @@
GConfClient *panel_gconf_get_client (void) { return NULL; }
#include "panel-config-global.h"
gboolean panel_global_config_get_tooltips_enabled (void) { return FALSE; }
+#include "panel-lockdown.h"
+gboolean panel_lockdown_get_disable_lock_screen (void) { return FALSE; }
static int dialogs = 0;
static gboolean create_new = FALSE;
Modified: trunk/gnome-panel/panel-util.c
==============================================================================
--- trunk/gnome-panel/panel-util.c (original)
+++ trunk/gnome-panel/panel-util.c Mon Aug 4 02:06:29 2008
@@ -43,6 +43,7 @@
#include "panel-globals.h"
#include "launcher.h"
#include "panel-icon-names.h"
+#include "panel-lockdown.h"
static int
panel_ditem_launch (GnomeDesktopItem *item,
@@ -672,6 +673,10 @@
g_return_val_if_fail (action != NULL, FALSE);
+ if (strcmp (action, "prefs") != 0 &&
+ panel_lockdown_get_disable_lock_screen ())
+ return FALSE;
+
command = panel_lock_screen_action_get_command (action);
if (command)
enabled = TRUE;
@@ -691,6 +696,10 @@
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (action != NULL);
+ if (strcmp (action, "prefs") != 0 &&
+ panel_lockdown_get_disable_lock_screen ())
+ return;
+
command = panel_lock_screen_action_get_command (action);
if (!command)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]