From c77842e1becfa458dac24d4137c47bf17748db27 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Fri, 17 Dec 2010 14:36:14 +0000 Subject: fixed #1892 save folded rosters and info_win_height in the config file --- src/config.py | 8 ++++---- src/core.py | 66 +++++++++-------------------------------------------------- src/roster.py | 13 +++++++++++- 3 files changed, 26 insertions(+), 61 deletions(-) (limited to 'src') diff --git a/src/config.py b/src/config.py index f85de1e2..685c8eb6 100644 --- a/src/config.py +++ b/src/config.py @@ -45,13 +45,13 @@ class Config(RawConfigParser): """ try: if type(default) == int: - res = self.getint(option) + res = self.getint(option, section) elif type(default) == float: - res = self.getfloat(option) + res = self.getfloat(option, section) elif type(default) == bool: - res = self.getboolean(option) + res = self.getboolean(option, section) else: - res = self.getstr(option) + res = self.getstr(option, section) except NoOptionError: return default return res diff --git a/src/core.py b/src/core.py index ac456704..ba07abb8 100644 --- a/src/core.py +++ b/src/core.py @@ -26,7 +26,6 @@ import sys import shlex import curses import threading -import webbrowser from datetime import datetime @@ -85,7 +84,7 @@ class Core(object): self.init_curses(self.stdscr) self.xmpp = xmpp self.information_buffer = TextBuffer() - self.information_win_size = 0 # Todo, get this from config + self.information_win_size = config.get('info_win_height', 2, 'var') default_tab = tabs.InfoTab(self, "Info") if self.xmpp.anon\ else tabs.RosterInfoTab(self) default_tab.on_gain_focus() @@ -121,7 +120,6 @@ class Core(object): 'available': (self.command_avail, _("Usage: /available [message]\nAvailable: Sets your availability to available and (optional) sets your status message. This is equivalent to '/show available [message]'"), None), 'bookmark': (self.command_bookmark, _("Usage: /bookmark [roomname][/nick]\nBookmark: Bookmark the specified room (you will then auto-join it on each poezio start). This commands uses the same syntaxe as /join. Type /help join for syntaxe examples. Note that when typing \"/bookmark\" on its own, the room will be bookmarked with the nickname you\'re currently using in this room (instead of default_nick)"), None), 'set': (self.command_set, _("Usage: /set