[gnome-shell] Remove icon and menu from titlebar



commit 98a093a2792c9625348fdbaab36735d9fffb1eee
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Apr 12 18:02:56 2010 -0400

    Remove icon and menu from titlebar
    
    To avoid visual duplication with the application menu, eliminate
    the window menu button. (The window menu can still be accessed by
    right-clicking on the title bar, or Alt-right-clicking anywhere on the
    window.)
    
    This is implemented using the new Mutter facility for GConf key
    redirection; we add separate key for 'button_layout' with a default
    that omits the menu button.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=591390

 data/gnome-shell.schemas |   26 ++++++++++++++++++++++++++
 src/gnome-shell-plugin.c |    3 +++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/data/gnome-shell.schemas b/data/gnome-shell.schemas
index 7c17afe..0f01325 100644
--- a/data/gnome-shell.schemas
+++ b/data/gnome-shell.schemas
@@ -134,6 +134,32 @@
         </locale>
       </schema>
 
+      <schema>
+        <key>/schemas/desktop/gnome/shell/windows/button_layout</key>
+        <applyto>/desktop/gnome/shell/windows/button_layout</applyto>
+        <owner>gnome-shell</owner>
+        <type>string</type>
+        <default>:minimize,maximize,close</default>
+        <locale name="C">
+           <short>Arrangement of buttons on the titlebar</short>
+           <long>
+             Arrangement of buttons on the titlebar. The
+             value should be a string, such as
+             "menu:minimize,maximize,spacer,close"; the colon separates the
+             left corner of the window from the right corner, and
+             the button names are comma-separated. Duplicate buttons
+             are not allowed. Unknown button names are silently ignored
+             so that buttons can be added in future gnome-shell versions
+             without breaking older versions.
+             A special spacer tag can be used to insert some space between
+             two adjacent buttons.
+
+             This key overrides /apps/metacity/general/button_layout when
+             running GNOME Shell.
+           </long>
+        </locale>
+      </schema>
+
   </schemalist>
 
 </gconfschemafile>
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 899c713..198d1ce 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -139,6 +139,9 @@ static void
 gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
 {
   _shell_global_set_plugin (shell_global_get(), MUTTER_PLUGIN(shell_plugin));
+
+  meta_prefs_override_preference_location ("/apps/metacity/general/button_layout",
+                                           "/desktop/gnome/shell/windows/button_layout");
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]