summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bookmark.py2
-rw-r--r--src/tabs.py11
-rw-r--r--src/theming.py4
3 files changed, 14 insertions, 3 deletions
diff --git a/src/bookmark.py b/src/bookmark.py
index 45616d93..b63ddbdf 100644
--- a/src/bookmark.py
+++ b/src/bookmark.py
@@ -78,7 +78,7 @@ class Bookmark(object):
"""
jid = el.get('jid')
name = el.get('name')
- autojoin = True if el.get('autojoin', False) == 'true' else False
+ autojoin = True if el.get('autojoin', 'false').lower() in ('true', '1') else False
nick = None
for n in iter(el, 'nick'):
nick = nick.text
diff --git a/src/tabs.py b/src/tabs.py
index 374cdc4f..7df200b0 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -2390,6 +2390,17 @@ class MucListTab(Tab):
self.list_header.refresh()
curses.doupdate()
+ def sort_by(self):
+ if self.list_header.get_order():
+ self.listview.sort_by_column(col_name=self.list_header.get_sel_column(),asc=False)
+ self.list_header.set_order(False)
+ self.list_header.refresh()
+ else:
+ self.listview.sort_by_column(col_name=self.list_header.get_sel_column(),asc=True)
+ self.list_header.set_order(True)
+ self.list_header.refresh()
+ curses.doupdate()
+
def join_selected(self):
row = self.listview.get_selected_row()
if not row:
diff --git a/src/theming.py b/src/theming.py
index 815b059f..25188f81 100644
--- a/src/theming.py
+++ b/src/theming.py
@@ -278,8 +278,8 @@ def reload_theme():
file_path = os.path.join(themes_dir, theme_name)+'.py'
log.debug('Theme file to load: %s' %(file_path,))
new_theme = imp.load_source('theme', os.path.join(themes_dir, theme_name)+'.py')
- except:
- return 'Theme not found'
+ except Exception as e:
+ return 'Failed to load theme: %s' % (e,)
theme = new_theme.theme
if __name__ == '__main__':