-
Mark McLoughlin authored
2004-01-19 Mark McLoughlin <mark@skynet.ie> Based on a patch from Matt Keenan <matt.keenan@sun.com> Add some more lockdown keys: /desktop/gnome/lockdown/disable_command_line /apps/panel/global/disable_log_out /apps/panel/global/disable_lock_screen /apps/panel/globak/disable_force_quit Also, consolidate the per-profile and per-panel "locked_down" keys into a single key: /apps/panel/global/locked_down * Makefile.am: add panel-lockdown.[ch] * panel-lockdown.[ch]: utilities for reading and monitoring the lockdown keys. * applet.[ch]: (panel_applet_toggle_locked): don't handle lock toggling lockdown conditions - the toggle isn't visible when locked down. (panel_applet_recreate_menu): impl. re-creating the context menu. (panel_applet_add_callback): add an "is_enabled" callback so we can implement this in the applets themselves. (panel_applet_remove_callback): kill, unused. (panel_applet_create_menu): check if the item is enabled. Don't add remove/move/lock items if locked down. (panel_applet_destroy): remove the lockdown notification. (panel_applet_register): add the lockdown notification. * button-widget.[ch]: implement an "activatable" property and grey out the button if its not activatable. * drawer.c: (load_drawer_applet): only have propertis menu item if not locked down. * launcher.c: (launcher_properties): shouldn't be reached if locked down. (lancher_properties_enabled), (load_launcher_applet): don't enable launcher properties if not locked down and disable_command_line isn't set. * menu.c: (show_item_menu): don't show the menu's context menu if locked down. (setup_full_menuitem), (setup_applet_drag), (setup_internal_applet_drag): disable dnd if locked down. (append_internal_applets): decide which action buttons to have in the menu depending on disable_command_line etc. (create_applets_menu): only add if the applet isn't in the disabled_applets list. (create_desktop_menu): respect disable_log_out etc. * panel-action-button.c: grey out any action button that should be disabled. * panel-applet-frame.c: respect changes in the lockdown keys. * panel-global.schemas.in: add new lockdown keys. * panel-menu-bar.c: respect the lockdown keys when creating the menus. * panel-menu-button.c: ditto. * panel-profile.[ch]: remove per-profile and per-toplevel locked_down keys. * panel-run-dialog.c: (panel_run_dialog_present): don't show the run dialog if locked down. * panel-toplevel.c: (panel_toplevel_begin_grab_op): don't allow moving the panel if locked down. * panel-toplevel.schemas.in: remove per-panel locked_down key. * panel.c: respect the locked_down key when creating the panel context menu.
50855ce2