mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-02 14:13:48 +00:00
Add typeahead find feature
Search on commit list will start as soon as you type
This commit is contained in:
parent
83d3802b33
commit
d8a198ab2f
|
@ -266,6 +266,15 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
|
|||
}
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
public bool on_key_pressed (Gtk.Widget widget, Gdk.EventKey event) {
|
||||
bool ret = d_search_bar.handle_event(event);
|
||||
if (ret) {
|
||||
d_search_bar.search_mode_enabled = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
construct
|
||||
{
|
||||
if (Gitg.PlatformSupport.use_native_window_controls())
|
||||
|
|
|
@ -1134,7 +1134,6 @@ namespace GitgHistory
|
|||
set
|
||||
{
|
||||
d_main.commit_list_view.set_search_entry(value);
|
||||
d_main.commit_list_view.set_enable_search(value != null);
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<property name="has_focus">True</property>
|
||||
<property name="fixed-height-mode">True</property>
|
||||
<property name="headers-visible">False</property>
|
||||
<property name="enable-search">False</property>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="column_commit_list_subject">
|
||||
<property name="title" translatable="yes">Subject</property>
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
<property name="has_focus">True</property>
|
||||
<property name="fixed-height-mode">True</property>
|
||||
<property name="headers-visible">False</property>
|
||||
<property name="enable-search">False</property>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="column_commit_list_subject">
|
||||
<property name="title" translatable="yes">Subject</property>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<property name="default_width">1000</property>
|
||||
<property name="default_height">600</property>
|
||||
<property name="icon_name">gitg</property>
|
||||
<signal name="key-press-event" after="yes" handler="on_key_pressed"/>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="d_header_bar">
|
||||
<property name="visible">True</property>
|
||||
|
|
Loading…
Reference in a new issue