xed-view: Add shortcuts for change case
Closes https://github.com/linuxmint/xed/issues/154
This commit is contained in:
parent
6159ad5be2
commit
ddaf70747c
|
@ -219,6 +219,26 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsGroup">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="title" translatable="yes">Tools</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><shift>F7</property>
|
||||||
|
<property name="title" translatable="yes">Check spelling</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><ctrl>P</property>
|
||||||
|
<property name="title" translatable="yes">Print the document</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsGroup">
|
<object class="GtkShortcutsGroup">
|
||||||
<property name="visible">1</property>
|
<property name="visible">1</property>
|
||||||
|
@ -265,7 +285,6 @@
|
||||||
<property name="title" translatable="yes">Move current word right</property>
|
<property name="title" translatable="yes">Move current word right</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<!--
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="visible">1</property>
|
<property name="visible">1</property>
|
||||||
|
@ -280,6 +299,13 @@
|
||||||
<property name="title" translatable="yes">Convert to lowercase</property>
|
<property name="title" translatable="yes">Convert to lowercase</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkShortcutsShortcut">
|
||||||
|
<property name="visible">1</property>
|
||||||
|
<property name="accelerator"><ctrl>T</property>
|
||||||
|
<property name="title" translatable="yes">Convert to title case</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="visible">1</property>
|
<property name="visible">1</property>
|
||||||
|
@ -287,7 +313,6 @@
|
||||||
<property name="title" translatable="yes">Invert case</property>
|
<property name="title" translatable="yes">Invert case</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
-->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="visible">1</property>
|
<property name="visible">1</property>
|
||||||
|
@ -304,26 +329,6 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="visible">1</property>
|
|
||||||
<property name="title" translatable="yes">Tools</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="visible">1</property>
|
|
||||||
<property name="accelerator"><shift>F7</property>
|
|
||||||
<property name="title" translatable="yes">Check spelling</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="visible">1</property>
|
|
||||||
<property name="accelerator"><ctrl>P</property>
|
|
||||||
<property name="title" translatable="yes">Print the document</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
|
@ -607,8 +607,36 @@ xed_view_class_init (XedViewClass *klass)
|
||||||
|
|
||||||
binding_set = gtk_binding_set_by_class (klass);
|
binding_set = gtk_binding_set_by_class (klass);
|
||||||
|
|
||||||
gtk_binding_entry_add_signal (binding_set, GDK_KEY_d, GDK_CONTROL_MASK, "delete_from_cursor", 2, G_TYPE_ENUM,
|
gtk_binding_entry_add_signal (binding_set,
|
||||||
GTK_DELETE_PARAGRAPHS, G_TYPE_INT, 1);
|
GDK_KEY_d,
|
||||||
|
GDK_CONTROL_MASK,
|
||||||
|
"delete_from_cursor", 2,
|
||||||
|
G_TYPE_ENUM, GTK_DELETE_PARAGRAPHS,
|
||||||
|
G_TYPE_INT, 1);
|
||||||
|
|
||||||
|
gtk_binding_entry_add_signal (binding_set,
|
||||||
|
GDK_KEY_u,
|
||||||
|
GDK_CONTROL_MASK,
|
||||||
|
"change_case", 1,
|
||||||
|
G_TYPE_ENUM, GTK_SOURCE_CHANGE_CASE_UPPER);
|
||||||
|
|
||||||
|
gtk_binding_entry_add_signal (binding_set,
|
||||||
|
GDK_KEY_l,
|
||||||
|
GDK_CONTROL_MASK,
|
||||||
|
"change_case", 1,
|
||||||
|
G_TYPE_ENUM, GTK_SOURCE_CHANGE_CASE_LOWER);
|
||||||
|
|
||||||
|
gtk_binding_entry_add_signal (binding_set,
|
||||||
|
GDK_KEY_asciitilde,
|
||||||
|
GDK_CONTROL_MASK,
|
||||||
|
"change_case", 1,
|
||||||
|
G_TYPE_ENUM, GTK_SOURCE_CHANGE_CASE_TOGGLE);
|
||||||
|
|
||||||
|
gtk_binding_entry_add_signal (binding_set,
|
||||||
|
GDK_KEY_t,
|
||||||
|
GDK_CONTROL_MASK,
|
||||||
|
"change_case", 1,
|
||||||
|
G_TYPE_ENUM, GTK_SOURCE_CHANGE_CASE_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue