combox

split and encrypted files between online file storage providers
git clone git://git.ricketyspace.net/combox.git
Log | Files | Refs

commit 8e82e1cd922db2eb3f6c2b2e8d9b5106f482bf59
parent 95895e73f0750b86c2e6c0d1162535ecd8c6ee9d
Author: Siddharth Ravikumar <sravik@bgsu.edu>
Date:   Thu, 10 Dec 2015 21:05:39 -0500

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.

Diffstat:
ChangeLog | 6++++++
combox/gui.py | 16++++++++++++----
2 files changed, 18 insertions(+), 4 deletions(-)

diff --git 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 @@ -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):