revert to double click to view details

This commit is contained in:
guinux 2017-09-21 21:10:03 +02:00
parent cce060f221
commit e86ac4c3fd
2 changed files with 30 additions and 2 deletions

View File

@ -331,7 +331,6 @@
<property name="fixed_height_mode">True</property> <property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property> <property name="show_expanders">False</property>
<property name="rubber_banding">True</property> <property name="rubber_banding">True</property>
<property name="activate_on_single_click">True</property>
<signal name="button-press-event" handler="on_packages_treeview_button_press_event" swapped="no"/> <signal name="button-press-event" handler="on_packages_treeview_button_press_event" swapped="no"/>
<signal name="query-tooltip" handler="on_packages_treeview_query_tooltip" swapped="no"/> <signal name="query-tooltip" handler="on_packages_treeview_query_tooltip" swapped="no"/>
<signal name="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/> <signal name="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/>
@ -457,7 +456,6 @@
<property name="fixed_height_mode">True</property> <property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property> <property name="show_expanders">False</property>
<property name="rubber_banding">True</property> <property name="rubber_banding">True</property>
<property name="activate_on_single_click">True</property>
<signal name="button-press-event" handler="on_aur_treeview_button_press_event" swapped="no"/> <signal name="button-press-event" handler="on_aur_treeview_button_press_event" swapped="no"/>
<signal name="query-tooltip" handler="on_aur_treeview_query_tooltip" swapped="no"/> <signal name="query-tooltip" handler="on_aur_treeview_query_tooltip" swapped="no"/>
<signal name="row-activated" handler="on_aur_treeview_row_activated" swapped="no"/> <signal name="row-activated" handler="on_aur_treeview_row_activated" swapped="no"/>

View File

@ -504,6 +504,36 @@ namespace Pamac {
syncdbs.next (); syncdbs.next ();
} }
result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) alpm_pkg_compare_name)); result.join (syncpkgs.diff (result, (Alpm.List.CompareFunc) alpm_pkg_compare_name));
// search in Appstream
Alpm.List<unowned Alpm.Package> appstream_results = null;
app_store.get_apps ().foreach ((app) => {
var iter = HashTableIter<string,string> (app.get_names ());
unowned string name;
while (iter.next (null, out name)) {
if (search_string in name) {
unowned Alpm.Package? alpm_pkg = alpm_handle.localdb.get_pkg (app.get_pkgname_default ());
if (alpm_pkg == null) {
alpm_pkg = get_syncpkg (app.get_pkgname_default ());
}
if (alpm_pkg != null) {
appstream_results.add (alpm_pkg);
}
}
}
iter = HashTableIter<string,string> (app.get_descriptions ());
unowned string desc;
while (iter.next (null, out desc)) {
if (search_string in desc) {
unowned Alpm.Package? alpm_pkg = alpm_handle.localdb.get_pkg (app.get_pkgname_default ());
if (alpm_pkg == null) {
alpm_pkg = get_syncpkg (app.get_pkgname_default ());
}
if (alpm_pkg != null) {
appstream_results.add (alpm_pkg);
}
}
}
});
// use custom sort function // use custom sort function
global_search_string = search_string; global_search_string = search_string;
result.sort (result.length, (Alpm.List.CompareFunc) alpm_pkg_sort_search_by_relevance); result.sort (result.length, (Alpm.List.CompareFunc) alpm_pkg_sort_search_by_relevance);