[gnoduino] fix displaying libraries/examples in additional library paths
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] fix displaying libraries/examples in additional library paths
- Date: Fri, 10 May 2013 23:04:41 +0000 (UTC)
commit e2777e13096c3332c77e879fd426e44db1c10023
Author: Lucian Langa <lucilanga gnome org>
Date: Sat May 11 01:00:08 2013 +0200
fix displaying libraries/examples in additional library paths
src/ui.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ui.py b/src/ui.py
index 8d742f1..ecc5d4f 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -685,7 +685,7 @@ def importProcess(widget):
def populateExampleLine(entry, menu):
subitem = gtk.Menu()
- menuItem = gtk.MenuItem(os.path.basename(entry))
+ menuItem = gtk.MenuItem(os.path.basename(os.path.normpath(entry)))
ext = False
for i in sorted(os.listdir(entry)):
if os.path.isdir(os.path.join(entry,i)):
@@ -725,7 +725,7 @@ def populateExampleLine(entry, menu):
def populateImportLine(entry, menu):
subitem = gtk.Menu()
- menuItem = gtk.MenuItem(os.path.basename(entry))
+ menuItem = gtk.MenuItem(os.path.basename(os.path.normpath(entry)))
for i in sorted(os.listdir(entry)):
if os.path.isdir(os.path.join(entry,i)):
f = os.path.join(entry, i, i + ".h")
@@ -788,7 +788,7 @@ def populateImport():
q = []
if os.path.isdir(os.path.join(p, "examples")):
q.append(p)
- for c in sorted(q): populateImportLine(c, submenu)
+ for c in sorted(q): populateImportLine(c, submenu)
ex = gtk.MenuItem(_("Import Library"), use_underline=True)
ex.set_submenu(submenu)
gui.get_object("sketchmenu").insert(ex, 2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]