mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
Implement on_output for settings.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"""
|
"""
|
||||||
.. module:: SettingsWindow
|
.. module:: SettingsWindow
|
||||||
:platform: Unix, Windows, Mac
|
:platform: Unix, Windows, Mac
|
||||||
:synopsis: Settings Window of the Ivolution GUI designed to be supported by all platforms.
|
:synopsis: Settings Window of the Ivolution GUI.
|
||||||
|
|
||||||
.. moduleauthor:: Julien Lengrand-Lambert <jlengrand@gmail.com>
|
.. moduleauthor:: Julien Lengrand-Lambert <jlengrand@gmail.com>
|
||||||
|
|
||||||
@@ -11,11 +11,6 @@
|
|||||||
import wx
|
import wx
|
||||||
import wx.lib.newevent
|
import wx.lib.newevent
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import logging
|
|
||||||
import webbrowser
|
|
||||||
|
|
||||||
from .. import get_data # used to load images and files
|
from .. import get_data # used to load images and files
|
||||||
|
|
||||||
from SettingsTemplate import SettingsTemplate
|
from SettingsTemplate import SettingsTemplate
|
||||||
@@ -31,31 +26,35 @@ class SettingsWindow(SettingsTemplate):
|
|||||||
"""
|
"""
|
||||||
SettingsTemplate.__init__(self, parent)
|
SettingsTemplate.__init__(self, parent)
|
||||||
# TODO : Set icon
|
# TODO : Set icon
|
||||||
#self.SetIcon(wx.Icon('ivolution/data/media/icons/spanner_48.ico', wx.BITMAP_TYPE_ICO)) # Sets icon
|
# Sets icon
|
||||||
|
#self.SetIcon(wx.Icon('ivolution/data/media/icons/spanner_48.ico',
|
||||||
|
# wx.BITMAP_TYPE_ICO))
|
||||||
|
|
||||||
# Defining settings value
|
# Defining settings value
|
||||||
self.output_folder = parent.out_fo
|
self.output_folder = parent.out_fo
|
||||||
self.file_name = "Ivolution"
|
self.video_name = "Ivolution"
|
||||||
|
self.type = ""
|
||||||
|
self.mode = ""
|
||||||
|
self.speed = ""
|
||||||
|
self.sort = ""
|
||||||
|
|
||||||
|
# setting default value from main window
|
||||||
|
self.outputLocationLabel.SetLabel(self.output_folder)
|
||||||
|
|
||||||
|
|
||||||
self.outputLocationLabel.SetLabel(self.output_folder) # setting default value from main window
|
|
||||||
|
|
||||||
# Virtual event handlers, overide them in your derived class
|
# Virtual event handlers, overide them in your derived class
|
||||||
def on_output( self, event ):
|
def on_output(self, event):
|
||||||
pass
|
self.outputdialog = wx.DirDialog(self,
|
||||||
# default_dir = "~/Pictures"
|
"Please choose your output directory",
|
||||||
# self.inputdialog = wx.DirDialog(self, "Please choose your input directory", style=1, defaultPath=default_dir)
|
style=1,
|
||||||
|
defaultPath=self.output_folder)
|
||||||
|
|
||||||
# if self.inputdialog.ShowModal() == wx.ID_OK:
|
if self.outputdialog.ShowModal() == wx.ID_OK:
|
||||||
# self.inputtextbox.SetLabel(self.inputdialog.GetPath())
|
self.output_folder = self.outputdialog.GetPath()
|
||||||
# self.inputdialog.Destroy()
|
self.outputLocationLabel.SetLabel(self.output_folder)
|
||||||
|
self.outputdialog.Destroy()
|
||||||
|
|
||||||
def on_cancel( self, event ):
|
def on_cancel(self, event):
|
||||||
self.Close(True) # Close the frame.
|
self.Close(True) # Close the frame.
|
||||||
|
|
||||||
def on_save( self, event ):
|
def on_save(self, event):
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|||||||
Reference in New Issue
Block a user