diff options
author | Walter Bender <walter.bender@gmail.com> | 2013-02-03 20:20:12 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2013-02-03 20:22:35 (GMT) |
commit | 2dbf5153326b87a14ba1018dafaa882e35893a51 (patch) | |
tree | 3c67faab3bb231d88b00c759d56efcb85c1cf2e0 | |
parent | e5acabbedb7e06beb405b470b1c0189f73b57766 (diff) |
moving icons to extensions; making fb a subdir
18 files changed, 233 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index fe1c67a..f88a61e 100644 --- a/configure.ac +++ b/configure.ac @@ -65,7 +65,9 @@ extensions/cpsection/updater/Makefile extensions/deviceicon/Makefile extensions/globalkey/Makefile extensions/web/Makefile -extensions/web/facebook/Makefile +extensions/web/fb/Makefile +extensions/web/fb/facebook/Makefile +extensions/web/fb/icons/Makefile extensions/Makefile Makefile po/Makefile.in diff --git a/extensions/cpsection/facebook/model.py b/extensions/cpsection/facebook/model.py index 02ff541..1c7d2de 100644 --- a/extensions/cpsection/facebook/model.py +++ b/extensions/cpsection/facebook/model.py @@ -21,7 +21,7 @@ from gi.repository import GConf import os import time -from web import facebook_online_account as fboa +from web.fb import facebook_online_account as fboa def save_access_token(access_token, expires_in): client = GConf.Client.get_default() diff --git a/extensions/web/Makefile.am b/extensions/web/Makefile.am index 31420cd..fc4e102 100644 --- a/extensions/web/Makefile.am +++ b/extensions/web/Makefile.am @@ -1,6 +1,5 @@ -SUBDIRS = facebook +SUBDIRS = fb sugardir = $(pkgdatadir)/extensions/web sugar_PYTHON = \ - __init__.py \ - facebook_online_account.py + __init__.py diff --git a/extensions/web/facebook/Makefile.am b/extensions/web/facebook/Makefile.am deleted file mode 100644 index f6d39b6..0000000 --- a/extensions/web/facebook/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -sugardir = $(pkgdatadir)/extensions/web/facebook -sugar_PYTHON = \ - __init__.py \ - facebook.py diff --git a/extensions/web/fb/Makefile.am b/extensions/web/fb/Makefile.am new file mode 100644 index 0000000..8e1fa0a --- /dev/null +++ b/extensions/web/fb/Makefile.am @@ -0,0 +1,6 @@ +SUBDIRS = facebook icons + +sugardir = $(pkgdatadir)/extensions/web/fb +sugar_PYTHON = \ + __init__.py \ + facebook_online_account.py diff --git a/extensions/web/facebook/__init__.py b/extensions/web/fb/__init__.py index e69de29..e69de29 100644 --- a/extensions/web/facebook/__init__.py +++ b/extensions/web/fb/__init__.py diff --git a/extensions/web/fb/facebook/Makefile.am b/extensions/web/fb/facebook/Makefile.am new file mode 100644 index 0000000..cda1445 --- /dev/null +++ b/extensions/web/fb/facebook/Makefile.am @@ -0,0 +1,4 @@ +sugardir = $(pkgdatadir)/extensions/web/fb/facebook +sugar_PYTHON = \ + __init__.py \ + facebook.py diff --git a/extensions/web/facebook/__init__.py b/extensions/web/fb/facebook/__init__.py index e69de29..e69de29 100644 --- a/extensions/web/facebook/__init__.py +++ b/extensions/web/fb/facebook/__init__.py diff --git a/extensions/web/facebook/facebook.py b/extensions/web/fb/facebook/facebook.py index 48d5921..48d5921 100644 --- a/extensions/web/facebook/facebook.py +++ b/extensions/web/fb/facebook/facebook.py diff --git a/extensions/web/facebook_online_account.py b/extensions/web/fb/facebook_online_account.py index f07209d..f07209d 100644 --- a/extensions/web/facebook_online_account.py +++ b/extensions/web/fb/facebook_online_account.py diff --git a/extensions/web/fb/icons/Makefile.am b/extensions/web/fb/icons/Makefile.am new file mode 100644 index 0000000..3f41580 --- /dev/null +++ b/extensions/web/fb/icons/Makefile.am @@ -0,0 +1,11 @@ +icondir = $(pkgdatadir)/extensions/web/fb/icons + +icon_DATA = \ + facebook-like.svg \ + facebook-like-insensitive.svg \ + facebook-refresh.svg \ + facebook-refresh-insensitive.svg \ + facebook-share.svg \ + facebook-share-insensitive.svg + +EXTRA_DIST = $(icon_DATA) diff --git a/extensions/web/fb/icons/facebook-like-insensitive.svg b/extensions/web/fb/icons/facebook-like-insensitive.svg new file mode 100644 index 0000000..0b7e046 --- /dev/null +++ b/extensions/web/fb/icons/facebook-like-insensitive.svg @@ -0,0 +1,26 @@ +<?xml version="1.0" ?><!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY fill_color "#A0A2A4"> + <!ENTITY stroke_color "#808284"> +]><svg enable-background="new 0 0 55.125 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> + <g + transform="translate(3.5,-1)"> + <path + d="m 3,25 12.5,0 0,22 L 3,47 z" + style="fill:&stroke_color;;fill-opacity:1;stroke:&stroke_color;;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m 15.5,28 6,-2.5 1.5,-1.5 7.5,-15 4.75,0 0,4.410117 -0.487457,2.50095 0.474914,7.410224 L 42.697031,23.5 45,25.5 45,44 l -4,4 -14,0 -4.5,-3.5 -7,0 z" + style="fill:#ffffff;fill-opacity:1;stroke:&stroke_color;;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <rect + width="11" + height="4" + x="3.75" + y="25.619982" + style="fill:&fill_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> + <path + d="m 16.25,40.25 8,0 2.5,2 13.5,0 4,-3.75 0,5.25 -3.5,3.5 -13.5,0 -4.5,-3.5 -6.5,0 z" + style="fill:&fill_color;;fill-opacity:1;stroke:none" /> + <path + d="M 34.5,24 31,23 32,14.5 34.482668,9.7783694 34.486519,13.421674 34,16 z" + style="fill:&fill_color;;fill-opacity:1;stroke:none" /> + </g> +</svg> diff --git a/extensions/web/fb/icons/facebook-like.svg b/extensions/web/fb/icons/facebook-like.svg new file mode 100644 index 0000000..098850d --- /dev/null +++ b/extensions/web/fb/icons/facebook-like.svg @@ -0,0 +1,26 @@ +<?xml version="1.0" ?><!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#405D9A"> + <!ENTITY fill_color "#6D83B2"> +]><svg enable-background="new 0 0 55.125 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> + <g + transform="translate(3.5,-1)"> + <path + d="m 3,25 12.5,0 0,22 L 3,47 z" + style="fill:&stroke_color;;fill-opacity:1;stroke:&stroke_color;;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <path + d="m 15.5,28 6,-2.5 1.5,-1.5 7.5,-15 4.75,0 0,4.410117 -0.487457,2.50095 0.474914,7.410224 L 42.697031,23.5 45,25.5 45,44 l -4,4 -14,0 -4.5,-3.5 -7,0 z" + style="fill:#ffffff;fill-opacity:1;stroke:&stroke_color;;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> + <rect + width="11" + height="4" + x="3.75" + y="25.619982" + style="fill:&fill_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> + <path + d="m 16.25,40.25 8,0 2.5,2 13.5,0 4,-3.75 0,5.25 -3.5,3.5 -13.5,0 -4.5,-3.5 -6.5,0 z" + style="fill:&fill_color;;fill-opacity:1;stroke:none" /> + <path + d="M 34.5,24 31,23 32,14.5 34.482668,9.7783694 34.486519,13.421674 34,16 z" + style="fill:&fill_color;;fill-opacity:1;stroke:none" /> + </g> +</svg> diff --git a/extensions/web/fb/icons/facebook-refresh-insensitive.svg b/extensions/web/fb/icons/facebook-refresh-insensitive.svg new file mode 100644 index 0000000..df76455 --- /dev/null +++ b/extensions/web/fb/icons/facebook-refresh-insensitive.svg @@ -0,0 +1,48 @@ +<?xml version="1.0" ?><!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#A0A2A4"> + <!ENTITY fill_color "#808284"> +]><svg enable-background="new 0 0 55.125 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> +<g + transform="matrix(0.54496364,0,0,0.54496364,17.97065,19.443998)" + id="g3096"><rect + width="55" + height="55" + ry="3.5" + x="0" + y="0" + style="fill:&fill_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> +<rect + width="46.27803" + height="7.8024411" + ry="0" + x="4.25" + y="42" + style="fill:&stroke_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> +<path + d="m 31.936745,49.899124 -9.4e-5,-19.765 -5.121906,3.22e-4 0,-7.260322 5.122,0 0,-6.564513 c 0,0 -0.01655,-3.640679 2.386886,-5.96745 C 35.295852,9.4009535 36.333355,8.8346775 37.555393,8.2535528 38.928642,7.6005213 41.1862,7.5079865 41.1862,7.5079865 l 6.167051,0.2482788 -0.149991,6.7138587 -5.420313,0 c 0,0 -0.592215,-0.08713 -1.325186,0.479666 -0.824694,0.637726 -0.763422,1.359824 -0.763422,1.359824 l 4.07e-4,6.564196 7.657,3.15e-4 -0.298,7.26 -7.359,0 -0.09987,19.765 z" + style="fill:#C0C2C4;fill-opacity:1;stroke:none" /> +</g> +<polygon + points="43.449,8.928 32.113,8.928 22.727,18.311 22.727,35.914 43.449,35.914 " + transform="translate(-15.13735,0)" + style="fill:#C0C2C4;stroke:&stroke_color;;stroke-width:3" /> +<polyline + style="fill:none;stroke:&stroke_color;;stroke-width:2.98670006" + points="22.727,18.311 32.113,18.311 32.113,8.928 " + transform="translate(-15.13735,0)" /> +<g + transform="translate(-2,0)"> + <line + x1="38.325649" + x2="38.325649" + y1="6" + y2="18.164" + style="fill:none;stroke:#C0C2C4;stroke-width:2.98670006;stroke-linecap:round;stroke-linejoin:round" /> + <polyline + transform="matrix(-1,0,0,1,55.03865,0)" + points=" 11.583,12.083 16.713,6 21.843,12.083 " + id="polyline20" + style="fill:none;stroke:#C0C2C4;stroke-width:2.98670006;stroke-linecap:round;stroke-linejoin:round" /> +</g> +</svg> + diff --git a/extensions/web/fb/icons/facebook-refresh.svg b/extensions/web/fb/icons/facebook-refresh.svg new file mode 100644 index 0000000..d5ada68 --- /dev/null +++ b/extensions/web/fb/icons/facebook-refresh.svg @@ -0,0 +1,47 @@ +<?xml version="1.0" ?><!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#6D83B2"> + <!ENTITY fill_color "#405D9A"> +]><svg enable-background="new 0 0 55.125 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> +<g + transform="matrix(0.54496364,0,0,0.54496364,17.97065,19.443998)" + id="g3096"><rect + width="55" + height="55" + ry="3.5" + x="0" + y="0" + style="fill:&fill_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> +<rect + width="46.27803" + height="7.8024411" + ry="0" + x="4.25" + y="42" + style="fill:&stroke_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> +<path + d="m 31.936745,49.899124 -9.4e-5,-19.765 -5.121906,3.22e-4 0,-7.260322 5.122,0 0,-6.564513 c 0,0 -0.01655,-3.640679 2.386886,-5.96745 C 35.295852,9.4009535 36.333355,8.8346775 37.555393,8.2535528 38.928642,7.6005213 41.1862,7.5079865 41.1862,7.5079865 l 6.167051,0.2482788 -0.149991,6.7138587 -5.420313,0 c 0,0 -0.592215,-0.08713 -1.325186,0.479666 -0.824694,0.637726 -0.763422,1.359824 -0.763422,1.359824 l 4.07e-4,6.564196 7.657,3.15e-4 -0.298,7.26 -7.359,0 -0.09987,19.765 z" + style="fill:#FFFFFF;fill-opacity:1;stroke:none" /> +</g> +<polygon + points="43.449,8.928 32.113,8.928 22.727,18.311 22.727,35.914 43.449,35.914 " + transform="translate(-15.13735,0)" + style="fill:#FFFFFF;stroke:#010101;stroke-width:3" /> +<polyline + style="fill:none;stroke:#010101;stroke-width:2.98670006" + points="22.727,18.311 32.113,18.311 32.113,8.928 " + transform="translate(-15.13735,0)" /> +<g + transform="translate(-2,0)"> + <line + x1="38.325649" + x2="38.325649" + y1="6" + y2="18.164" + style="fill:none;stroke:#FFFFFF;stroke-width:2.98670006;stroke-linecap:round;stroke-linejoin:round" /> + <polyline + transform="matrix(-1,0,0,1,55.03865,0)" + points=" 11.583,12.083 16.713,6 21.843,12.083 " + id="polyline20" + style="fill:none;stroke:#FFFFFF;stroke-width:2.98670006;stroke-linecap:round;stroke-linejoin:round" /> +</g> +</svg> diff --git a/extensions/web/fb/icons/facebook-share-insensitive.svg b/extensions/web/fb/icons/facebook-share-insensitive.svg new file mode 100644 index 0000000..a9b2794 --- /dev/null +++ b/extensions/web/fb/icons/facebook-share-insensitive.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" ?><!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#A0A2A4"> + <!ENTITY fill_color "#808284"> +]><svg enable-background="new 0 0 55.125 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> + <rect + width="55" + height="55" + ry="3.5" + x="0" + y="0" + style="fill:&fill_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> + <rect + width="46.25" + height="7.75" + ry="0" + x="4.5" + y="42" + style="fill:&stroke_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> + <path + d="m 31.936745,49.899124 -9.4e-5,-19.765 -5.121906,3.22e-4 0,-7.260322 5.122,0 0,-6.564513 c 0,0 -0.01655,-3.640679 2.386886,-5.96745 C 35.295852,9.4009535 36.333355,8.8346775 37.555393,8.2535528 38.928642,7.6005213 41.1862,7.5079865 41.1862,7.5079865 l 6.167051,0.2482788 -0.149991,6.7138587 -5.420313,0 c 0,0 -0.592215,-0.08713 -1.325186,0.479666 -0.824694,0.637726 -0.763422,1.359824 -0.763422,1.359824 l 4.07e-4,6.564196 7.657,3.15e-4 -0.298,7.26 -7.359,0 -0.09987,19.765 z" + style="fill:#C0C2C4;fill-opacity:1;stroke:none" /> +</svg> diff --git a/extensions/web/fb/icons/facebook-share.svg b/extensions/web/fb/icons/facebook-share.svg new file mode 100644 index 0000000..f87333f --- /dev/null +++ b/extensions/web/fb/icons/facebook-share.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" ?><!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) --><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#6D83B2"> + <!ENTITY fill_color "#405D9A"> +]><svg enable-background="new 0 0 55.125 55" height="55px" id="Layer_1" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> + <rect + width="55" + height="55" + ry="3.5" + x="0" + y="0" + style="fill:&fill_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> + <rect + width="46.25" + height="7.75" + ry="0" + x="4.5" + y="42" + style="fill:&stroke_color;;fill-opacity:1;fill-rule:nonzero;stroke:none" /> + <path + d="m 31.936745,49.899124 -9.4e-5,-19.765 -5.121906,3.22e-4 0,-7.260322 5.122,0 0,-6.564513 c 0,0 -0.01655,-3.640679 2.386886,-5.96745 C 35.295852,9.4009535 36.333355,8.8346775 37.555393,8.2535528 38.928642,7.6005213 41.1862,7.5079865 41.1862,7.5079865 l 6.167051,0.2482788 -0.149991,6.7138587 -5.420313,0 c 0,0 -0.592215,-0.08713 -1.325186,0.479666 -0.824694,0.637726 -0.763422,1.359824 -0.763422,1.359824 l 4.07e-4,6.564196 7.657,3.15e-4 -0.298,7.26 -7.359,0 -0.09987,19.765 z" + style="fill:#FFFFFF;fill-opacity:1;stroke:none" /> +</svg> diff --git a/src/jarabe/web/online_accounts_manager.py b/src/jarabe/web/online_accounts_manager.py index cb7a7ce..7cabadf 100644 --- a/src/jarabe/web/online_accounts_manager.py +++ b/src/jarabe/web/online_accounts_manager.py @@ -32,17 +32,21 @@ class OnlineAccountsManager(GObject.GObject): def all_accounts(cls): accounts = [] - for f in os.listdir(os.path.join(config.ext_path, 'web')): - if f.endswith('.py') and not f.startswith('__'): - module_name = f[:-3] - logging.debug("OnlineAccountsManager loading %s" % \ - (module_name)) - try: - mod = __import__('web.' + module_name, globals(), - locals(), [module_name]) - accounts.append(mod.get_account()) - except Exception: - logging.exception('Exception while loading extension:') + web_path = os.path.join(config.ext_path, 'web') + for d in os.listdir(web_path): + dir_path = os.path.join(web_path, d) + if os.path.isdir(dir_path): + for f in os.listdir(dir_path): + if f.endswith('.py') and not f.startswith('__'): + module_name = f[:-3] + logging.debug("OnlineAccountsManager loading %s" % \ + (module_name)) + try: + mod = __import__('web.' + d + '.' + module_name, globals(), + locals(), [module_name]) + accounts.append(mod.get_account()) + except Exception: + logging.exception('Exception while loading extension:') return accounts @classmethod |