From 4a51f37982c2d5d358971e947d05786b939af88e Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Mon, 8 Oct 2012 08:42:13 +0000 Subject: Added pictures to the list of Android permissions. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@266 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 17 +++++++++++++++++ plugins/python/androperms/Makefile.am | 2 ++ plugins/python/androperms/android.png | Bin 0 -> 1102 bytes plugins/python/androperms/androperms.py | 14 +++++++++++--- plugins/python/androperms/panel.py | 12 ++++++++++-- plugins/python/androperms/routine.png | Bin 0 -> 568 bytes 6 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 plugins/python/androperms/android.png create mode 100644 plugins/python/androperms/routine.png diff --git a/ChangeLog b/ChangeLog index 0f1d521..e2c92d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +12-10-08 Cyrille Bagard + + * plugins/python/androperms/android.png: + Add pictures to the list of Android permissions. + + * plugins/python/androperms/androperms.py: + New entry: picture for the treeview. + + * plugins/python/androperms/Makefile.am: + Add the new *.png files to androperms_DATA. + + * plugins/python/androperms/panel.py: + Add pictures to the list of Android permissions. + + * plugins/python/androperms/routine.png: + New entry: picture for the treeview. + 12-10-07 Cyrille Bagard * src/gtkext/easygtk.h: diff --git a/plugins/python/androperms/Makefile.am b/plugins/python/androperms/Makefile.am index f44be3c..c9c8430 100644 --- a/plugins/python/androperms/Makefile.am +++ b/plugins/python/androperms/Makefile.am @@ -3,6 +3,7 @@ andropermsdir = $(datadir)/openida/plugins/python/androperms androperms_DATA = \ __init__.py \ + android.png \ androperms.db \ androperms.py \ defs.py \ @@ -10,6 +11,7 @@ androperms_DATA = \ panel.py \ parser.py \ reader.py \ + routine.png \ stack.py \ string.py diff --git a/plugins/python/androperms/android.png b/plugins/python/androperms/android.png new file mode 100644 index 0000000..ce9c905 Binary files /dev/null and b/plugins/python/androperms/android.png differ diff --git a/plugins/python/androperms/androperms.py b/plugins/python/androperms/androperms.py index c9af7c4..a11c37d 100644 --- a/plugins/python/androperms/androperms.py +++ b/plugins/python/androperms/androperms.py @@ -96,18 +96,26 @@ class AndroPerms(Plugin): locations = gtk.TreeViewColumn() self._tree.append_column(locations) + cell = gtk.CellRendererPixbuf() + locations.pack_start(cell, False) + locations.add_attribute(cell, 'pixbuf', 0) + cell = gtk.CellRendererText() locations.pack_start(cell, False) - locations.add_attribute(cell, "text", 0) + locations.add_attribute(cell, 'text', 1) functions = gtk.TreeViewColumn() self._tree.append_column(functions) + cell = gtk.CellRendererPixbuf() + functions.pack_start(cell, False) + functions.add_attribute(cell, 'pixbuf', 2) + cell = gtk.CellRendererText() functions.pack_start(cell, True) - functions.add_attribute(cell, "text", 1) + functions.add_attribute(cell, 'text', 3) - self._store = gtk.TreeStore(str, str) + self._store = gtk.TreeStore(gtk.gdk.Pixbuf, str, gtk.gdk.Pixbuf, str) self._tree.set_model(self._store) pi = PanelItem(name="Permissions", lname="Permissions", widget=self._scrolled_window, path="SE") diff --git a/plugins/python/androperms/panel.py b/plugins/python/androperms/panel.py index ca7bb90..ecbd762 100644 --- a/plugins/python/androperms/panel.py +++ b/plugins/python/androperms/panel.py @@ -3,6 +3,8 @@ import os +import gtk + class PermsPanel: """Display all permissions found in the Manifest.""" @@ -71,7 +73,13 @@ class PermsPanel: if len(self._used[p]) > 0: - it = store.append(None, [p, None]) + img = os.path.dirname(os.path.abspath(__file__)) + '/android.png' + buf = gtk.gdk.pixbuf_new_from_file(img) + + it = store.append(None, [buf, p, None, None]) + + img = os.path.dirname(os.path.abspath(__file__)) + '/routine.png' + buf = gtk.gdk.pixbuf_new_from_file(img) for f in self._used[p]: - store.append(it, ["0x%08x" % f[0], f[1]]) + store.append(it, [None, "0x%08x" % f[0], buf, f[1]]) diff --git a/plugins/python/androperms/routine.png b/plugins/python/androperms/routine.png new file mode 100644 index 0000000..2ddc67a Binary files /dev/null and b/plugins/python/androperms/routine.png differ -- cgit v0.11.2-87-g4458