TWBlue starts automatically if there is only an account

This commit is contained in:
Manuel Cortez 2014-11-27 07:18:05 -06:00
parent 0f2fbc775a
commit acb8c5acd3
2 changed files with 22 additions and 4 deletions

View File

@ -504,7 +504,7 @@ class mainFrame(wx.Frame):
dlg = dialogs.lists.removeUserListDialog(self) dlg = dialogs.lists.removeUserListDialog(self)
if dlg.ShowModal() == wx.ID_OK: if dlg.ShowModal() == wx.ID_OK:
try: try:
list = self.twitter.twitter.delete_list_member(list_id=self.db.settings["lists"][dlg.get_selected()]["id"], screen_name=user) list = self.twitter.twitter.delete_list_member(list_id=self.db.settings["lists"][dlg.lista.get_selected()]["id"], screen_name=user)
older_list = twitter.utils.find_item(self.db.settings["lists"][dlg.get_selected()]["id"], self.db.settings["lists"]) older_list = twitter.utils.find_item(self.db.settings["lists"][dlg.get_selected()]["id"], self.db.settings["lists"])
if list["mode"] == "private": if list["mode"] == "private":
self.db.settings["lists"].pop(older_list) self.db.settings["lists"].pop(older_list)

View File

@ -20,7 +20,7 @@ A twitter accessible, easy of use and cross platform application."""
# #
############################################################ ############################################################
import wx import wx
import os
ssmg = None ssmg = None
import gui import gui
import paths import paths
@ -32,14 +32,32 @@ from sessionmanager import manager
from sessionmanager import gui as smGUI from sessionmanager import gui as smGUI
manager.setup() manager.setup()
import sys import sys
import config
import output
import sound
import languageHandler
if hasattr(sys, 'frozen'): if hasattr(sys, 'frozen'):
sys.stderr = open(paths.logs_path("stderr.log"), 'w') sys.stderr = open(paths.logs_path("stderr.log"), 'w')
sys.stdout = open(paths.logs_path("stdout.log"), 'w') sys.stdout = open(paths.logs_path("stdout.log"), 'w')
app = wx.App() app = wx.App()
configured = False
configs = []
for i in os.listdir(paths.config_path()):
if os.path.isdir(paths.config_path(i)): configs.append(i)
if len(configs) == 1:
manager.manager.set_current_session(configs[0])
config.MAINFILE = "%s/session.conf" % (manager.manager.get_current_session())
config.setup()
lang=config.main['general']['language']
languageHandler.setLanguage(lang)
sound.setup()
output.setup()
configured = True
else:
ssmg = smGUI.sessionManagerWindow() ssmg = smGUI.sessionManagerWindow()
if ssmg.ShowModal() == wx.ID_OK: if configured == True or ssmg.ShowModal() == wx.ID_OK:
frame = gui.main.mainFrame() frame = gui.main.mainFrame()
frame.Show() frame.Show()
frame.showing = True frame.showing = True