[gnoduino] add upload verbose option
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] add upload verbose option
- Date: Mon, 9 Apr 2012 18:01:18 +0000 (UTC)
commit 522483080d19e8423fb4ad44db57cffc17f12986
Author: Lucian Langa <lucilanga gnome org>
Date: Mon Apr 9 19:05:52 2012 +0200
add upload verbose option
src/config.py | 1 +
src/prefs.py | 1 +
src/uploader.py | 18 +++++++++---------
ui/main.ui | 20 ++++++++++++++++++--
4 files changed, 29 insertions(+), 11 deletions(-)
---
diff --git a/src/config.py b/src/config.py
index 6e577cc..653847c 100644
--- a/src/config.py
+++ b/src/config.py
@@ -7,6 +7,7 @@ cur_iter = -1
cur_editor_font = -1
cur_console_font = -1
build_verbose = -1
+upload_verbose = -1
user_library = -1
serial_baud_rate = -1
show_numbers = -1
diff --git a/src/prefs.py b/src/prefs.py
index 1cea6fe..6912b4d 100644
--- a/src/prefs.py
+++ b/src/prefs.py
@@ -41,6 +41,7 @@ config_keys = [
[ "editor.font", "/apps/gnoduino/editor_font", "string", "Monospace,10" ],
[ "console.font", "/apps/gnoduino/console_font", "string", "Monospace,10" ],
[ "build.verbose", "/apps/gnoduino/build_verbose", "string", "false" ],
+[ "upload.verbose", "/apps/gnoduino/upload_verbose", "string", "false" ],
[ "show.numbers", "/apps/gnoduino/show_numbers", "string", "false" ]]
class preferences(object):
diff --git a/src/uploader.py b/src/uploader.py
index 1cd523e..c2fac87 100644
--- a/src/uploader.py
+++ b/src/uploader.py
@@ -81,12 +81,12 @@ def burnBootloader(serial, output, notify, id):
compline.append("-Uhfuse:w:" + b.getFuseHigh(b.getBoard()) + ":m")
compline.append("-Ulfuse:w:" + b.getFuseLow(b.getBoard()) + ":m")
try:
- if p.getBoolValue("build.verbose"):
+ if p.getBoolValue("upload.verbose"):
sys.stderr.write(' '.join(compline)+"\n")
misc.printMessageLn(output, ' '.join(compline))
(run, sout) = misc.runProg(compline)
- misc.printMessageLn(output, sout, p.getBoolValue("build.verbose"), 'false')
- if p.getBoolValue("build.verbose"): sys.stderr.write(sout+"\n")
+ misc.printMessageLn(output, sout, p.getBoolValue("upload.verbose"), 'false')
+ if p.getBoolValue("upload.verbose"): sys.stderr.write(sout+"\n")
if run == False: raise
except:
misc.printErrorLn(notify, output, _("Burn Error"), _("Burn ERROR."))
@@ -112,12 +112,12 @@ def burnBootloader(serial, output, notify, id):
compline.append("-Uflash:w:" + findBootLoader() + ":i")
compline.append("-Ulock:w:" + b.getFuseLock(b.getBoard()) + ":m")
try:
- if p.getBoolValue("build.verbose"):
+ if p.getBoolValue("upload.verbose"):
sys.stderr.write(' '.join(compline)+"\n")
misc.printMessageLn(output, ' '.join(compline))
(run, sout) = misc.runProg(compline)
- misc.printMessageLn(output, sout, p.getBoolValue("build.verbose"), 'false')
- if p.getBoolValue("build.verbose"): sys.stderr.write(sout+"\n")
+ misc.printMessageLn(output, sout, p.getBoolValue("upload.verbose"), 'false')
+ if p.getBoolValue("upload.verbose"): sys.stderr.write(sout+"\n")
if run == False: raise
except:
misc.printErrorLn(notify, output, _("Burn Error"), _("Burn ERROR."))
@@ -170,12 +170,12 @@ def upload(obj, serial, output, notify):
compline.append("-p" + b.getBoardMCU(b.getBoard()))
compline.append("-Uflash:w:"+obj+".hex:i")
try:
- if p.getBoolValue("build.verbose"):
+ if p.getBoolValue("upload.verbose"):
sys.stderr.write(' '.join(compline)+"\n")
misc.printMessageLn(output, ' '.join(compline))
(run, sout) = misc.runProg(compline)
- misc.printMessageLn(output, sout, p.getBoolValue("build.verbose"), 'false')
- if p.getBoolValue("build.verbose"): sys.stderr.write(sout+"\n")
+ misc.printMessageLn(output, sout, p.getBoolValue("upload.verbose"), 'false')
+ if p.getBoolValue("upload.verbose"): sys.stderr.write(sout+"\n")
if run == False: raise
except:
misc.printErrorLn(notify, output, _("Flashing Error"), _("Flash ERROR.\n"))
diff --git a/ui/main.ui b/ui/main.ui
index 226c420..8d4fd3c 100644
--- a/ui/main.ui
+++ b/ui/main.ui
@@ -402,6 +402,22 @@ Pascal de Bruijn <pmjdebruijn pcode nl></property>
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="build.upload">
+ <property name="label" translatable="yes">Verbose upload</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -439,7 +455,7 @@ Pascal de Bruijn <pmjdebruijn pcode nl></property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -452,7 +468,7 @@ Pascal de Bruijn <pmjdebruijn pcode nl></property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]