Move more logic into GuiCommon and out of MainWindow

This commit is contained in:
Micah Lee 2019-10-20 21:36:30 -07:00
parent b246f22e7a
commit 940b89a30b
3 changed files with 39 additions and 29 deletions

View file

@ -17,6 +17,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from onionshare import strings
class GuiCommon:
@ -28,8 +29,20 @@ class GuiCommon:
MODE_RECEIVE = "receive"
MODE_WEBSITE = "website"
def __init__(self, common):
def __init__(self, common, qtapp, local_only, config):
self.common = common
self.qtapp = qtapp
self.local_only = local_only
# Load settings, if a custom config was passed in
self.config = config
if self.config:
self.common.load_settings(self.config)
else:
self.common.load_settings()
# Load strings
strings.load_strings(self.common)
self.css = {
# OnionShareGui styles