Added default dir checkbutton
This commit is contained in:
@@ -74,6 +74,7 @@ destdir = ''
|
||||
fileindex = 0
|
||||
filecnt = 0
|
||||
incinc = False
|
||||
defdir = False
|
||||
|
||||
def sourcedir_filecnt(sourcedir):
|
||||
### Return the number of files, ending with '.h', in sourcedir - including subdirectories ###
|
||||
@@ -179,6 +180,7 @@ class ExampleApp:
|
||||
self.obj("window").set_application(app)
|
||||
self.obj("window").set_wmclass("h2inc_gtk","h2inc_gtk")
|
||||
self.obj("window").show_all()
|
||||
self.obj("default_dir_checkbutton").set_active(False)
|
||||
self.obj("include_checkbutton").set_active(True)
|
||||
|
||||
button = Gtk.Button.new_from_stock(Gtk.STOCK_CANCEL)
|
||||
@@ -281,6 +283,10 @@ class ExampleApp:
|
||||
global incinc
|
||||
incinc = self.obj("include_checkbutton").get_active()
|
||||
|
||||
def on_default_dir_checkbutton_toggled(self, widget):
|
||||
global defdir
|
||||
defdir = self.obj("default_dir_checkbutton").get_active()
|
||||
|
||||
def on_translate_button_clicked(self, widget, data=None):
|
||||
self.obj("sourceframe").set_sensitive(False)
|
||||
self.obj("translate_button").set_sensitive(False)
|
||||
|
||||
Reference in New Issue
Block a user