Commit d8a198ab authored by Alberto Fanjul's avatar Alberto Fanjul

Add typeahead find feature

Search on commit list will start as soon as you type
parent 83d3802b
Pipeline #76476 passed with stages
in 8 minutes and 56 seconds
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment