[gedit] Install special gtkrc key theme for OSX bindings
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Install special gtkrc key theme for OSX bindings
- Date: Wed, 30 Dec 2009 22:18:15 +0000 (UTC)
commit 561dee2cfc3e7946ebb9bc2b75acde52247847dd
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Wed Dec 30 23:17:57 2009 +0100
Install special gtkrc key theme for OSX bindings
This installs some of the more general text
editing key bindings on OSX and overrides some
of the gedit specific bindings such as
interactive-search and delete-line
osx/gedit.bundle | 1 +
osx/gtkrc | 29 +--------------------------
osx/gtkrc.key.osx | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+), 27 deletions(-)
---
diff --git a/osx/gedit.bundle b/osx/gedit.bundle
index 78ebba3..0d83b77 100644
--- a/osx/gedit.bundle
+++ b/osx/gedit.bundle
@@ -98,6 +98,7 @@
<!-- Custom theme settings -->
<data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc">${project}/gtkrc</data>
+ <data dest="${bundle}/Contents/Resources/share/themes/GeditOSX/gtk-2.0-key/gtkrc">${project}/gtkrc.key.osx</data>
<!-- Icon theme -->
<icon-theme icons="auto">Tango</icon-theme>
diff --git a/osx/gtkrc b/osx/gtkrc
old mode 100644
new mode 100755
index e3c20e9..0e92e6f
--- a/osx/gtkrc
+++ b/osx/gtkrc
@@ -4,6 +4,7 @@
gtk-color-scheme = "base_color:#ffffff\nfg_color:#000000\ntooltip_fg_color:#000000\nselected_bg_color:#86ABD9\nselected_fg_color:#ffffff\ntext_color:#1A1A1A\nbg_color:#EDECEB\ntooltip_bg_color:#F5F5B5"
gtk-icon-theme-name = "Tango"
+gtk-key-theme-name = "GeditOSX"
gtk-toolbar-style = GTK_TOOLBAR_ICONS
@@ -425,30 +426,4 @@ widget_class "*<GtkCList>" style "fg_is_text_color_workaround"
widget_class "*<EelEditableLabel>" style "fg_is_text_color_workaround"
# See the documentation of the style.
-widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "evo_new_button_workaround"
-
-# Custom bindings
-binding "gedit-view-mac-bindings"
-{
- bind "<super>d" {
- "delete-from-cursor" (GTK_DELETE_PARAGRAPHS, 1)
- }
- bind "<super>k" {
- "start-interactive-search" ()
- }
- bind "<super>i" {
- "start-interactive-goto-line" ()
- }
- bind "<super><shift>k" {
- "reset-searched-text" ()
- }
-
- unbind "<ctrl>d"
-
-# Unbinding these somehow makes the others not work, very strange
-# unbind "<ctrl>k"
-# unbind "<ctrl>i"
-# unbind "<ctrl><shift>k"
-}
-
-widget "*GeditView" binding "gedit-view-mac-bindings"
\ No newline at end of file
+widget_class "EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*" style "evo_new_button_workaround"
\ No newline at end of file
diff --git a/osx/gtkrc.key.osx b/osx/gtkrc.key.osx
new file mode 100644
index 0000000..099717e
--- /dev/null
+++ b/osx/gtkrc.key.osx
@@ -0,0 +1,55 @@
+binding "gtk-osx-editable"
+{
+ bind "<super>c" { "copy-clipboard" () }
+ bind "<super>x" { "cut-clipboard" () }
+ bind "<super>v" { "paste-clipboard" () }
+
+ bind "<super>Left" { "move-cursor" (display-line-ends, -1, 0) }
+ bind "<super><shift>Left" { "move-cursor" (display-line-ends, -1, 1) }
+ bind "<super>Right" { "move-cursor" (display-line-ends, 1, 0) }
+ bind "<super><shift>Right" { "move-cursor" (display-line-ends, 1, 1) }
+}
+
+binding "gtk-osx-text-entry"
+{
+ bind "<super>a" {
+ "move-cursor" (buffer-ends, -1, 0)
+ "move-cursor" (buffer-ends, 1, 1)
+ }
+}
+
+binding "gtk-osx-text-view"
+{
+ bind "<super>a" { "select-all" (1) }
+}
+
+binding "gtk-osx-tree-view"
+{
+ bind "<super>s" { "start-interactive-search" () }
+}
+
+binding "gedit-osx-view"
+{
+ bind "<super>d" {
+ "delete-from-cursor" (GTK_DELETE_PARAGRAPHS, 1)
+ }
+ bind "<super>k" {
+ "start-interactive-search" ()
+ }
+ bind "<super>i" {
+ "start-interactive-goto-line" ()
+ }
+ bind "<super><shift>k" {
+ "reset-searched-text" ()
+ }
+}
+
+class "GtkEntry" binding "gtk-osx-editable"
+class "GtkEntry" binding "gtk-osx-text-entry"
+
+class "GtkTextView" binding "gtk-osx-editable"
+class "GtkTextView" binding "gtk-osx-text-view"
+
+class "GtkTreeView" binding "gtk-osx-tree-view"
+
+class "GeditView" binding "gedit-osx-view"
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]