summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-12-10 21:05:39 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-12-10 21:05:39 -0500
commit8e82e1cd922db2eb3f6c2b2e8d9b5106f482bf59 (patch)
treed51145536598118449fec9e1dfb3d2635e85b537
parent95895e73f0750b86c2e6c0d1162535ecd8c6ee9d (diff)
combox/gui.py (ComboxConfigDialog.apply)
Glued the graphical interface with the combox configuration function; now the ComboxConfigDialog.apply method writes the configuration information to the default combox configuration directory.
-rw-r--r--ChangeLog6
-rw-r--r--combox/gui.py16
2 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 19932e8..44aac0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-12-10 Siddharth Ravikumar <sravik@bgsu.edu>
+
+ * combox/gui.py (ComboxConfigDialog.apply): now writes the
+ configuration to disk in the default combox configuration
+ directory.
+
2015-12-03 Siddharth Ravikumar <sravik@bgsu.edu>
* combox/gui.py: input validation kinda done + added status bar.
diff --git a/combox/gui.py b/combox/gui.py
index df1118a..a6630d9 100644
--- a/combox/gui.py
+++ b/combox/gui.py
@@ -23,6 +23,8 @@ import tkFileDialog
from Tkinter import *
+from combox.config import config_cb
+
#
# Adapted from:
# http://effbot.org/tkinterbook/tkinter-dialog-windows.htm
@@ -278,13 +280,19 @@ class ComboxConfigDialog(object):
no_nodes = self.cb_no_nodes_entry.get()
passp = self.cb_pp_entry.get()
- print combox_name, combox_dir, passp, no_nodes
+ config_info = [combox_name, combox_dir, '', no_nodes]
# get info about nodes.
for i in xrange(len(self.node_path_entries)):
- print "node %d" % i,
- print self.node_path_entries[i].get(),
- print self.node_size_entries[i].get()
+ config_info.append("node_%d" % i)
+ config_info.append(self.node_path_entries[i].get())
+ config_info.append(self.node_size_entries[i].get())
+
+ config_info_iter = iter(config_info)
+ def_input = lambda(x): next(config_info_iter)
+ def_pass = lambda: passp
+
+ config_cb(pass_func=def_pass, input_func=def_input)
def create_askdirectory_button(self, entry, row):