gnome-specimen r170 - in trunk-from-bzr: . data specimen
- From: wbolster svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-specimen r170 - in trunk-from-bzr: . data specimen
- Date: Tue, 17 Jun 2008 18:44:19 +0000 (UTC)
Author: wbolster
Date: Tue Jun 17 18:44:19 2008
New Revision: 170
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=170&view=rev
Log:
* data/gnome-specimen.glade:
* specimen/specimenwindow.py:
- Start "find mode" when the user starts typing when the
fonts treeview is focused by disabling the builtin
treeview search mode and handling key press events
correctly (only for alphanumeric characters).
Modified:
trunk-from-bzr/ (props changed)
trunk-from-bzr/data/gnome-specimen.glade
trunk-from-bzr/specimen/specimenwindow.py
Modified: trunk-from-bzr/data/gnome-specimen.glade
==============================================================================
--- trunk-from-bzr/data/gnome-specimen.glade (original)
+++ trunk-from-bzr/data/gnome-specimen.glade Tue Jun 17 18:44:19 2008
@@ -209,10 +209,11 @@
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="reorderable">False</property>
- <property name="enable_search">True</property>
+ <property name="enable_search">False</property>
<property name="fixed_height_mode">False</property>
<property name="hover_selection">False</property>
<property name="hover_expand">False</property>
+ <signal name="key_press_event" handler="on_fonts_treeview_key_press_event" last_modification_time="Fri, 08 Jun 2007 16:18:29 GMT"/>
</widget>
</child>
</widget>
Modified: trunk-from-bzr/specimen/specimenwindow.py
==============================================================================
--- trunk-from-bzr/specimen/specimenwindow.py (original)
+++ trunk-from-bzr/specimen/specimenwindow.py Tue Jun 17 18:44:19 2008
@@ -313,6 +313,12 @@
self.fonts_treeview.get_selection().select_path((0,))
self.fonts_treeview.grab_focus()
+ def on_fonts_treeview_key_press_event(self, treeview, event):
+ if event.string.isalnum(): # only strings, no cursor keys
+ self.find_entry.set_text(event.string)
+ self.start_find()
+ self.find_entry.set_position(-1) # move cursor to end
+
# previews
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]