mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-27 06:47:07 -05:00
Remove custom config from GUI CLI args, because GUI users can configure OnionShare in the GUI
This commit is contained in:
parent
9f0e031c8b
commit
598db21dcd
@ -95,12 +95,6 @@ def main():
|
|||||||
nargs="+",
|
nargs="+",
|
||||||
help="List of files or folders to share",
|
help="List of files or folders to share",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--config",
|
|
||||||
metavar="config",
|
|
||||||
default=False,
|
|
||||||
help="Custom JSON config file location (optional)",
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
filenames = args.filenames
|
filenames = args.filenames
|
||||||
@ -108,10 +102,6 @@ def main():
|
|||||||
for i in range(len(filenames)):
|
for i in range(len(filenames)):
|
||||||
filenames[i] = os.path.abspath(filenames[i])
|
filenames[i] = os.path.abspath(filenames[i])
|
||||||
|
|
||||||
config = args.config
|
|
||||||
if config:
|
|
||||||
common.load_settings(config)
|
|
||||||
|
|
||||||
local_only = bool(args.local_only)
|
local_only = bool(args.local_only)
|
||||||
verbose = bool(args.verbose)
|
verbose = bool(args.verbose)
|
||||||
|
|
||||||
@ -156,7 +146,7 @@ def main():
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Attach the GUI common parts to the common object
|
# Attach the GUI common parts to the common object
|
||||||
common.gui = GuiCommon(common, qtapp, local_only, config)
|
common.gui = GuiCommon(common, qtapp, local_only)
|
||||||
|
|
||||||
# Launch the gui
|
# Launch the gui
|
||||||
main_window = MainWindow(common, filenames)
|
main_window = MainWindow(common, filenames)
|
||||||
|
@ -30,17 +30,13 @@ class GuiCommon:
|
|||||||
MODE_RECEIVE = "receive"
|
MODE_RECEIVE = "receive"
|
||||||
MODE_WEBSITE = "website"
|
MODE_WEBSITE = "website"
|
||||||
|
|
||||||
def __init__(self, common, qtapp, local_only, config):
|
def __init__(self, common, qtapp, local_only):
|
||||||
self.common = common
|
self.common = common
|
||||||
self.qtapp = qtapp
|
self.qtapp = qtapp
|
||||||
self.local_only = local_only
|
self.local_only = local_only
|
||||||
|
|
||||||
# Load settings, if a custom config was passed in
|
# Load settings
|
||||||
self.config = config
|
self.common.load_settings()
|
||||||
if self.config:
|
|
||||||
self.common.load_settings(self.config)
|
|
||||||
else:
|
|
||||||
self.common.load_settings()
|
|
||||||
|
|
||||||
# Load strings
|
# Load strings
|
||||||
strings.load_strings(self.common)
|
strings.load_strings(self.common)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user