~ubuntu-branches/ubuntu/wily/gajim/wily

« back to all changes in this revision

Viewing changes to src/history_manager.py

  • Committer: Bazaar Package Importer
  • Author(s): Yann Leboulanger
  • Date: 2011-06-07 19:30:43 UTC
  • mfrom: (10.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110607193043-hmjwviw7ws7mcx94
Tags: 0.14.2-1
* New upstream release.
* Fix CPU usage when testing file transfer proxies. Closes: #626576

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
            path = rowref.get_path()
280
280
            if path is None:
281
281
                continue
282
 
            jid = liststore[path][0] # jid
 
282
            jid = liststore[path][0].decode('utf-8') # jid
283
283
            self._fill_logs_listview(jid)
284
284
 
285
285
    def _get_jid_id(self, jid):
471
471
        dlg.destroy()
472
472
 
473
473
    def on_delete_menuitem_activate(self, widget, listview):
 
474
        widget_name = gtk.Buildable.get_name(listview)
474
475
        liststore, list_of_paths = listview.get_selection().get_selected_rows()
475
 
        if listview.name == 'jids_listview':
 
476
        if widget_name == 'jids_listview':
476
477
            self._delete_jid_logs(liststore, list_of_paths)
477
 
        elif listview.name in ('logs_listview', 'search_results_listview'):
 
478
        elif widget_name in ('logs_listview', 'search_results_listview'):
478
479
            self._delete_logs(liststore, list_of_paths)
479
480
        else: # Huh ? We don't know this widget
480
481
            return
625
626
    def on_search_results_listview_row_activated(self, widget, path, column):
626
627
        # get log_line_id, jid_id from row we double clicked
627
628
        log_line_id = self.search_results_liststore[path][0]
628
 
        jid = self.search_results_liststore[path][1]
 
629
        jid = self.search_results_liststore[path][1].decode('utf-8')
629
630
        # make it string as in gtk liststores I have them all as strings
630
631
        # as this is what db returns so I don't have to fight with types
631
632
        jid_id = self._get_jid_id(jid)