2004-10-06 Vinay M R <
[email protected]>
* control-center.spec: Update.
* metacity.spec: Update.
* patches/control-center-19-logout-shorcut.diff:
* patches/metacity-07-logout-shortcut.diff:
Provide user an option to assign shortcut to logout.
Fixes bug #5101706.
--- a/ChangeLog Wed Oct 06 03:30:51 2004 +0000
+++ b/ChangeLog Wed Oct 06 09:27:32 2004 +0000
@@ -1,3 +1,12 @@
+2004-10-06 Vinay M R <[email protected]>
+
+ * control-center.spec: Update.
+ * metacity.spec: Update.
+ * patches/control-center-19-logout-shorcut.diff:
+ * patches/metacity-07-logout-shortcut.diff:
+ Provide user an option to assign shortcut to logout.
+ Fixes bug #5101706.
+
2004-10-05 Erwann Chenede - <[email protected]>
* Solaris/SUNWgnome-panel.spec: Added requirements on xorg libs
--- a/control-center.spec Wed Oct 06 03:30:51 2004 +0000
+++ b/control-center.spec Wed Oct 06 09:27:32 2004 +0000
@@ -43,6 +43,7 @@
Patch16: control-center-16-solaris-tar-command.diff
Patch17: control-center-17-g11n-potfiles.diff
Patch18: control-center-18-xkb-workaround.diff
+Patch19: control-center-19-logout-shortcut.diff
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -109,6 +110,7 @@
%endif
%patch17 -p1
%patch18 -p1
+%patch19 -p1
%build
%ifos linux
@@ -225,6 +227,12 @@
%changelog
+* Wed Oct 06 2004 - [email protected]
+- Added control-center-19-logout-shortcut.diff Patch to remove the
+ "/apps/gnome_settings_daemon/keybindings/power" and use
+ "/apps/metacity/global_keybindings/logout" in the capplet.
+ Fixes bug #5101706.
+
* Fri Sep 24 2004 - [email protected]
- Added control-center-17-g11n-potfiles.diff
--- a/metacity.spec Wed Oct 06 03:30:51 2004 +0000
+++ b/metacity.spec Wed Oct 06 09:27:32 2004 +0000
@@ -16,6 +16,7 @@
Patch4: metacity-04-sunpowerswitch-key.diff
Patch5: metacity-05-bigstruts.diff
Patch6: metacity-06-raise-on-frame-click.diff
+Patch7: metacity-07-logout-shortcut.diff
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}/doc
@@ -45,6 +46,7 @@
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
bzcat %SOURCE1 | tar xf -
%build
@@ -115,6 +117,11 @@
%{_mandir}/man1/*
%changelog
+* Wed Oct 06 2004 - [email protected]
+- Added metacity-07-logout-shortcut.diff Patch to implement an
+ "apps/metacity/global_keybindings/logout" gconf key and
+ its functionality. Fixes bug #5101706.
+
* Fri Oct 01 2004 - [email protected]
- Add the window_raise_on_frame_only key under sun-extenstions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/control-center-19-logout-shortcut.diff Wed Oct 06 09:27:32 2004 +0000
@@ -0,0 +1,90 @@
+--- control-center-2.6.1/capplets/keybindings/gnome-keybinding-properties.c 2004-09-28 18:44:26.000000000 +0530
++++ control-center-2.6.1-new/capplets/keybindings/gnome-keybinding-properties.c 2004-09-28 18:49:13.000000000 +0530
+@@ -42,12 +42,12 @@ typedef struct
+ const KeyListEntry desktop_key_list[] =
+ {
+ { "/apps/gnome_settings_daemon/keybindings/help", ALWAYS_VISIBLE, 0 },
+- { "/apps/gnome_settings_daemon/keybindings/power", ALWAYS_VISIBLE, 0 },
+ { "/apps/gnome_settings_daemon/keybindings/sleep", ALWAYS_VISIBLE, 0 },
+ { "/apps/gnome_settings_daemon/keybindings/screensaver", ALWAYS_VISIBLE, 0 },
+ { "/apps/gnome_settings_daemon/keybindings/home", ALWAYS_VISIBLE, 0 },
+ { "/apps/gnome_settings_daemon/keybindings/search", ALWAYS_VISIBLE, 0 },
+ { "/apps/gnome_settings_daemon/keybindings/email", ALWAYS_VISIBLE, 0 },
++ { "/apps/metacity/global_keybindings/logout", ALWAYS_VISIBLE, 0 },
+ { "/apps/gnome_settings_daemon/keybindings/www", ALWAYS_VISIBLE, 0 },
+ { "/apps/metacity/global_keybindings/panel_run_dialog", ALWAYS_VISIBLE, 0 },
+ { "/apps/metacity/global_keybindings/panel_main_menu", ALWAYS_VISIBLE, 0 },
+--- control-center-2.6.1/gnome-settings-daemon/gnome-settings-multimedia-keys.c 2004-09-28 18:44:32.000000000 +0530
++++ control-center-2.6.1-new/gnome-settings-daemon/gnome-settings-multimedia-keys.c 2004-09-28 19:47:18.000000000 +0530
+@@ -643,22 +643,6 @@ do_www_action (Acme *acme, const char *u
+ }
+
+ static void
+-do_exit_action (Acme *acme)
+-{
+- GnomeClient *master;
+-
+- master = gnome_master_client();
+- g_return_if_fail(master != NULL);
+-
+- gnome_client_request_save(master,
+- GNOME_SAVE_BOTH,
+- TRUE,
+- GNOME_INTERACT_ANY,
+- FALSE,
+- TRUE);
+-}
+-
+-static void
+ do_eject_action (Acme *acme)
+ {
+ GtkWidget *progress;
+@@ -799,9 +783,6 @@ do_action (Acme *acme, int type)
+ case VOLUME_UP_KEY:
+ do_sound_action (acme, type);
+ break;
+- case POWER_KEY:
+- do_exit_action (acme);
+- break;
+ case EJECT_KEY:
+ do_eject_action (acme);
+ break;
+--- control-center-2.6.1/gnome-settings-daemon/actions/acme.h 2004-09-28 18:44:32.000000000 +0530
++++ control-center-2.6.1-new/gnome-settings-daemon/actions/acme.h 2004-09-28 19:48:07.000000000 +0530
+@@ -29,7 +29,6 @@ enum {
+ MUTE_KEY,
+ VOLUME_DOWN_KEY,
+ VOLUME_UP_KEY,
+- POWER_KEY,
+ EJECT_KEY,
+ HOME_KEY,
+ SEARCH_KEY,
+@@ -64,7 +63,6 @@ static struct {
+ { MUTE_KEY, GCONF_BINDING_DIR "/volume_mute",NULL },
+ { VOLUME_DOWN_KEY, GCONF_BINDING_DIR "/volume_down", NULL },
+ { VOLUME_UP_KEY, GCONF_BINDING_DIR "/volume_up", NULL },
+- { POWER_KEY, GCONF_BINDING_DIR "/power", NULL },
+ { EJECT_KEY, GCONF_BINDING_DIR "/eject", NULL },
+ { HOME_KEY, GCONF_BINDING_DIR "/home", NULL },
+ { SEARCH_KEY, GCONF_BINDING_DIR "/search", NULL },
+--- control-center-2.6.1/schemas/apps_gnome_settings_daemon_keybindings.schemas.in 2004-09-28 18:44:21.000000000 +0530
++++ control-center-2.6.1-new/schemas/apps_gnome_settings_daemon_keybindings.schemas.in 2004-09-28 18:52:06.000000000 +0530
+@@ -50,18 +50,6 @@
+
+
+ <schema>
+- <key>/schemas/apps/gnome_settings_daemon/keybindings/power</key>
+- <applyto>/apps/gnome_settings_daemon/keybindings/power</applyto>
+- <type>string</type>
+- <default></default>
+- <locale name="C">
+- <short>Log Out</short>
+- <long>Log Out's shortcut.</long>
+- </locale>
+- </schema>
+-
+-
+- <schema>
+ <key>/schemas/apps/gnome_settings_daemon/keybindings/eject</key>
+ <applyto>/apps/gnome_settings_daemon/keybindings/eject</applyto>
+ <type>string</type>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/metacity-07-logout-shortcut.diff Wed Oct 06 09:27:32 2004 +0000
@@ -0,0 +1,145 @@
+--- metacity-2.8.0/src/keybindings.c 2004-09-28 18:29:45.000000000 +0530
++++ metacity-2.8.0-new/src/keybindings.c 2004-09-29 09:50:10.000000000 +0530
+@@ -30,6 +30,7 @@
+ #include "place.h"
+ #include "prefs.h"
+ #include "effects.h"
++#include "session.h"
+
+ #include <X11/keysym.h>
+ #include <string.h>
+@@ -88,6 +89,11 @@ static void handle_toggle_desktop (M
+ MetaWindow *window,
+ XEvent *event,
+ MetaKeyBinding *binding);
++static void handle_logout (MetaDisplay *display,
++ MetaScreen *screen,
++ MetaWindow *window,
++ XEvent *event,
++ MetaKeyBinding *binding);
+ static void handle_panel_keybinding (MetaDisplay *display,
+ MetaScreen *screen,
+ MetaWindow *window,
+@@ -297,6 +303,8 @@ static const MetaKeyHandler screen_handl
+ GINT_TO_POINTER (META_TAB_LIST_DOCKS) },
+ { META_KEYBINDING_SHOW_DESKTOP, handle_toggle_desktop,
+ NULL },
++ { META_KEYBINDING_LOGOUT, handle_logout,
++ NULL },
+ { META_KEYBINDING_PANEL_MAIN_MENU, handle_panel_keybinding,
+ GINT_TO_POINTER (META_KEYBINDING_ACTION_PANEL_MAIN_MENU) },
+ { META_KEYBINDING_PANEL_RUN_DIALOG, handle_panel_keybinding,
+@@ -2781,6 +2789,16 @@ handle_toggle_desktop (MetaDisplay *d
+ }
+
+ static void
++handle_logout (MetaDisplay *display,
++ MetaScreen *screen,
++ MetaWindow *window,
++ XEvent *event,
++ MetaKeyBinding *binding)
++{
++ meta_session_request_logout ();
++}
++
++static void
+ handle_panel_keybinding (MetaDisplay *display,
+ MetaScreen *screen,
+ MetaWindow *window,
+--- metacity-2.8.0/src/metacity.schemas.in 2004-09-28 18:29:39.000000000 +0530
++++ metacity-2.8.0-new/src/metacity.schemas.in 2004-09-29 15:02:43.000000000 +0530
+@@ -1641,6 +1641,29 @@ you set
+ </locale>
+ </schema>
+
++<schema>
++ <key>/schemas/apps/metacity/global_keybindings/logout</key>
++ <applyto>/apps/metacity/global_keybindings/logout</applyto>
++ <owner>metacity</owner>
++ <type>string</type>
++ <default>disabled</default>
++ <locale name="C">
++ <short>Log out</short>
++ <long>
++ The keybinding that logs you out from the session.
++
++ The format looks like "<Control>a" or
++ "<Shift><Alt>F1.
++
++ The parser is fairly liberal and allows lower or upper case,
++ and also abbreviations such as "<Ctl>" and
++ "<Ctrl>". If you set the option to the special string
++ "disabled", then there will be no keybinding for this
++ action.
++ </long>
++ </locale>
++ </schema>
++
+ <schema>
+ <key>/schemas/apps/metacity/global_keybindings/panel_main_menu</key>
+ <applyto>/apps/metacity/global_keybindings/panel_main_menu</applyto>
+--- metacity-2.8.0/src/prefs.c 2004-09-28 18:29:45.000000000 +0530
++++ metacity-2.8.0-new/src/prefs.c 2004-09-28 18:39:34.000000000 +0530
+@@ -1408,6 +1408,7 @@ static MetaKeyPref screen_bindings[] = {
+ { META_KEYBINDING_CYCLE_PANELS, 0, 0, TRUE },
+ { META_KEYBINDING_CYCLE_PANELS_BACKWARD, 0, 0, TRUE },
+ { META_KEYBINDING_SHOW_DESKTOP, 0, 0, FALSE },
++ { META_KEYBINDING_LOGOUT, 0, 0, FALSE },
+ { META_KEYBINDING_PANEL_MAIN_MENU, 0, 0, FALSE },
+ { META_KEYBINDING_PANEL_RUN_DIALOG, 0, 0, FALSE },
+ { META_KEYBINDING_COMMAND_1, 0, 0, FALSE },
+--- metacity-2.8.0/src/prefs.h 2004-09-28 18:29:45.000000000 +0530
++++ metacity-2.8.0-new/src/prefs.h 2004-09-28 18:41:02.000000000 +0530
+@@ -111,6 +111,7 @@ void meta_prefs_change_workspace_
+ #define META_KEYBINDING_CYCLE_PANELS "cycle_panels"
+ #define META_KEYBINDING_CYCLE_PANELS_BACKWARD "cycle_panels_backward"
+ #define META_KEYBINDING_SHOW_DESKTOP "show_desktop"
++#define META_KEYBINDING_LOGOUT "logout"
+ #define META_KEYBINDING_PANEL_MAIN_MENU "panel_main_menu"
+ #define META_KEYBINDING_PANEL_RUN_DIALOG "panel_run_dialog"
+ #define META_KEYBINDING_COMMAND_1 "run_command_1"
+@@ -215,6 +216,7 @@ typedef enum _MetaKeyBindingAction
+ META_KEYBINDING_ACTION_CYCLE_PANELS,
+ META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
+ META_KEYBINDING_ACTION_SHOW_DESKTOP,
++ META_KEYBINDING_ACTION_LOGOUT,
+ META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
+ META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
+ META_KEYBINDING_ACTION_COMMAND_1,
+--- metacity-2.8.0/src/session.c 2004-09-28 18:29:39.000000000 +0530
++++ metacity-2.8.0-new/src/session.c 2004-09-29 09:56:52.000000000 +0530
+@@ -355,6 +355,24 @@ meta_session_init (const char *previous_
+ g_free (saved_client_id);
+ }
+
++/**
++ * meta_session_request_logout:
++ *
++ * Requests that a save_yourself be sent to the session manager so that we log
++ * out.
++ **/
++void
++meta_session_request_logout (void)
++{
++ if (!session_connection)
++ {
++ meta_warning (_("Cannot log out because we could not connect to the session manager\n"));
++ return;
++ }
++
++ SmcRequestSaveYourself (session_connection, SmSaveGlobal, TRUE, SmInteractStyleAny, FALSE, TRUE);
++}
++
+ void
+ meta_session_shutdown (void)
+ {
+--- metacity-2.8.0/src/session.h 2004-09-28 18:29:39.000000000 +0530
++++ metacity-2.8.0-new/src/session.h 2004-09-29 09:57:12.000000000 +0530
+@@ -72,6 +72,7 @@ void meta_window
+ void meta_session_init (const char *client_id,
+ const char *save_file);
+
++void meta_session_request_logout (void);
+
+ void meta_session_shutdown (void);
+