diff --git a/Gui test/h2inc.glade b/Gui test/h2inc.glade index d6b0cad..df693c9 100644 --- a/Gui test/h2inc.glade +++ b/Gui test/h2inc.glade @@ -86,7 +86,7 @@ True 5 5 - Select source directory! + /usr/include 2 @@ -142,7 +142,7 @@ True 5 5 - Select destination directory! + ~/include 2 @@ -185,6 +185,26 @@ True + + 0 + 3 + 6 + + + + + Use default directories! + True + True + False + 5 + 5 + 5 + 5 + 0 + True + + 0 2 diff --git a/Gui test/h2inc.glade~ b/Gui test/h2inc.glade~ index 65decf7..b04c077 100644 --- a/Gui test/h2inc.glade~ +++ b/Gui test/h2inc.glade~ @@ -86,7 +86,7 @@ True 5 5 - Select source directory! + /usr/include 2 @@ -142,7 +142,7 @@ True 5 5 - Select destination directory! + ~/include 2 @@ -182,10 +182,25 @@ 5 5 0 - True True + + 0 + 3 + 6 + + + + + Use default directories! + True + True + False + 0 + True + + 0 2 diff --git a/Gui test/h2inc_gtk.py b/Gui test/h2inc_gtk.py index 43b5be5..a268040 100644 --- a/Gui test/h2inc_gtk.py +++ b/Gui test/h2inc_gtk.py @@ -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)