[gnoduino] Bug 673692 - Serial Terminal message in status bar not correct
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] Bug 673692 - Serial Terminal message in status bar not correct
- Date: Sun, 29 Apr 2012 12:41:43 +0000 (UTC)
commit 519387dcdd7c19c21da7515b08c114f4055dda72
Author: Lucian Langa <lucilanga gnome org>
Date: Sun Apr 29 14:38:03 2012 +0200
Bug 673692 - Serial Terminal message in status bar not correct
src/misc.py | 14 ++++++++------
src/serialio.py | 2 +-
2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/misc.py b/src/misc.py
index d394ddb..377e1e4 100644
--- a/src/misc.py
+++ b/src/misc.py
@@ -269,17 +269,19 @@ def clearConsole(console):
def printError(notify, console, message):
console.modify_text(gtk.STATE_NORMAL, gtk.gdk.Color(red=1.0))
b = console.get_buffer()
- context = notify.get_context_id("main")
- notify.pop(context)
- notify.push(context, _("Error compiling."))
+ if notify is not None:
+ context = notify.get_context_id("main")
+ notify.pop(context)
+ notify.push(context, _("Error compiling."))
b.delete(b.get_start_iter(), b.get_end_iter())
b.set_text(message)
def printErrorLn(notify, console, error, message):
b = console.get_buffer()
- context = notify.get_context_id("main")
- notify.pop(context)
- notify.push(context, error)
+ if notify is not None:
+ context = notify.get_context_id("main")
+ notify.pop(context)
+ notify.push(context, error)
b.insert_with_tags_by_name(b.get_end_iter(), message, "red_foreground")
b.place_cursor(b.get_end_iter())
mark = b.get_insert()
diff --git a/src/serialio.py b/src/serialio.py
index 5d1934c..5dd4591 100644
--- a/src/serialio.py
+++ b/src/serialio.py
@@ -88,7 +88,7 @@ class sconsole:
return [i[0] for i in self.serial.getSupportedBaudrates() if i[1] >= 300 and i[1] <= 1150000]
def getConfigSerialPort(self, notify, output):
if config.cur_serial_port == -1:
- misc.printError(notify, output, \
+ misc.printError(None, output, \
_("Serial port not configured!\nUse Tools->Serial Port to configure port."))
return -1
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]