[ease] [editor] Enable key accelerators
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] [editor] Enable key accelerators
- Date: Sun, 25 Jul 2010 19:39:54 +0000 (UTC)
commit af74d0e48ac8e593cf6146e6f1655b6442f11539
Author: Nate Stedman <natesm gmail com>
Date: Sun Jul 25 15:39:32 2010 -0400
[editor] Enable key accelerators
data/ui/editor-window.ui | 14 ++++++++++++--
src/ease-editor-window.vala | 3 +++
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/editor-window.ui b/data/ui/editor-window.ui
index 8dc114c..7ec97db 100644
--- a/data/ui/editor-window.ui
+++ b/data/ui/editor-window.ui
@@ -22,6 +22,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_main_show_welcome"/>
</object>
</child>
@@ -31,6 +32,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_open_dialog_run"/>
</object>
</child>
@@ -45,6 +47,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_editor_window_save_document"/>
</object>
</child>
@@ -54,6 +57,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
</object>
</child>
<child>
@@ -109,6 +113,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_editor_window_on_quit"/>
</object>
</child>
@@ -130,6 +135,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
</object>
</child>
<child>
@@ -138,6 +144,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
</object>
</child>
<child>
@@ -146,6 +153,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
</object>
</child>
<child>
@@ -154,6 +162,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_editor_window_on_delete"/>
</object>
</child>
@@ -216,7 +225,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
- <property name="accel_group">Menu Accelerators</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_editor_window_zoom_in"/>
</object>
</child>
@@ -226,6 +235,7 @@
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
+ <property name="accel_group">accel-group</property>
<signal name="activate" handler="ease_editor_window_zoom_out"/>
</object>
</child>
@@ -505,7 +515,7 @@
<property name="yalign">0.49000000953674316</property>
<property name="stock">gtk-copy</property>
</object>
- <object class="GtkAccelGroup" id="Menu Accelerators"/>
+ <object class="GtkAccelGroup" id="accel-group"/>
<object class="GtkMenu" id="add-slide-menu">
<property name="visible">True</property>
</object>
diff --git a/src/ease-editor-window.vala b/src/ease-editor-window.vala
index af4e234..2a0ef50 100644
--- a/src/ease-editor-window.vala
+++ b/src/ease-editor-window.vala
@@ -182,6 +182,9 @@ public class Ease.EditorWindow : Gtk.Window
inspector.hide();
slides_shown = true;
+ // register the accelerator group
+ add_accel_group(builder.get_object("accel-group") as Gtk.AccelGroup);
+
// close the window
delete_event.connect((sender, event) => {
if (last_saved == 0) return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]