mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-23 11:48:07 -06:00
TWBlue starts automatically if there is only an account
This commit is contained in:
parent
0f2fbc775a
commit
acb8c5acd3
@ -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)
|
||||||
|
22
src/main.py
22
src/main.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user