diff options
author | James Meyer <james.meyer@operamail.com> | 2009-10-07 04:17:08 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-10-07 04:17:08 (GMT) |
commit | 5b34c13180e4095721b7d0802dfd51751b5992e0 (patch) | |
tree | 8ac06caf0bfe6c1a688bfcb3764a16c16f599587 /build_tools/bin | |
parent | b2391f7712f10081e16400200529d898f7d6c83c (diff) | |
download | linhes_dev-5b34c13180e4095721b7d0802dfd51751b5992e0.zip |
bld: create new groups
Diffstat (limited to 'build_tools/bin')
-rw-r--r-- | build_tools/bin/bld_resource.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/build_tools/bin/bld_resource.py b/build_tools/bin/bld_resource.py index f5fd898..afcb1d6 100644 --- a/build_tools/bin/bld_resource.py +++ b/build_tools/bin/bld_resource.py @@ -45,6 +45,7 @@ bld_data="%s/.bld_session_data" %homedir print bld_data + class OutLog: def __init__(self, edit, out=None, color=None): """(edit, out=None, color=None) -> can write stdout, stderr to a @@ -1198,6 +1199,7 @@ class Ui_MainWindow(object): self.thread_pkg_load = load_pkg_thread() self.run_cmd_thread = run_cmd_thread() self.upload_file_thread = run_cmd_thread() + sys.stdout = OutLog(self.textEdit,out=sys.__stdout__) sys.stderr = OutLog(self.textEdit,out=sys.__stdout__) #self.DLG = search.BookmarksDlg(['uno', 'dos'], None) @@ -2645,7 +2647,19 @@ class Ui_MainWindow(object): self.populate_group_box() def createGroup(self): - print "creating group" + text, ok = QtGui.QInputDialog.getText(None, 'Input Dialog', 'Enter group name:') + if ok: + outtext = "Creating group: %s" %(text) + self.update_ouputwindow(outtext) + filename = ("%s/%s.group") %(self.all_settings['group_file_location'],text) + cmd="touch %s" %filename + try: + os.system(cmd) + except: + outtext = "Could not create group: %s" %(text) + self.update_ouputwindow(outtext) + + def updateSystem(self): runcmd="pacman" |