diff --git a/data/gui/history_manager.ui b/data/gui/history_manager.ui
index 9f0ab1590..e8b4e7128 100644
--- a/data/gui/history_manager.ui
+++ b/data/gui/history_manager.ui
@@ -285,7 +285,6 @@ If you plan to do massive deletions, please make sure Gajim is not running. Gene
TrueTrueTrue
- accelgroup1
@@ -346,5 +345,4 @@ If you plan to do massive deletions, please make sure Gajim is not running. Gene
save_button
-
diff --git a/src/history_manager.py b/src/history_manager.py
index a0deb2f36..ce8f5841a 100644
--- a/src/history_manager.py
+++ b/src/history_manager.py
@@ -471,10 +471,11 @@ class HistoryManager:
dlg.destroy()
def on_delete_menuitem_activate(self, widget, listview):
+ widget_name = gtk.Buildable.get_name(listview)
liststore, list_of_paths = listview.get_selection().get_selected_rows()
- if listview.name == 'jids_listview':
+ if widget_name == 'jids_listview':
self._delete_jid_logs(liststore, list_of_paths)
- elif listview.name in ('logs_listview', 'search_results_listview'):
+ elif widget_name in ('logs_listview', 'search_results_listview'):
self._delete_logs(liststore, list_of_paths)
else: # Huh ? We don't know this widget
return