[Dicson] Fix getting the name of widgets. Fixes #6026
This commit is contained in:
parent
5fa8dab30f
commit
76bf05f533
|
@ -285,7 +285,6 @@ If you plan to do massive deletions, please make sure Gajim is not running. Gene
|
|||
<property name="visible">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="accel_group">accelgroup1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -346,5 +345,4 @@ If you plan to do massive deletions, please make sure Gajim is not running. Gene
|
|||
<action-widget response="-5">save_button</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkAccelGroup" id="accelgroup1"/>
|
||||
</interface>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue