diff -Nru unity-scope-isgd-0.1/data/isgd.scope.in unity-scope-isgd-0.1/data/isgd.scope.in --- unity-scope-isgd-0.1/data/isgd.scope.in 2013-11-19 16:12:33.000000000 +0000 +++ unity-scope-isgd-0.1/data/isgd.scope.in 2013-11-20 13:13:21.000000000 +0000 @@ -6,8 +6,8 @@ RequiredMetadata= OptionalMetadata= Loader=/usr/share/unity-scopes/isgd/unity_isgd_daemon.py -RemoteContent=true -Type=utilities +RemoteContent=false +Type=info _Name=Isgd _Description=Find Isgd items _SearchHint=Search Isgd diff -Nru unity-scope-isgd-0.1/debian/bzr-builder.manifest unity-scope-isgd-0.1/debian/bzr-builder.manifest --- unity-scope-isgd-0.1/debian/bzr-builder.manifest 2013-11-19 16:12:33.000000000 +0000 +++ unity-scope-isgd-0.1/debian/bzr-builder.manifest 2013-11-20 13:13:22.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~15 -lp:~submarine/unity-scope-isgd/build-fixes revid:markjtully@gmail.com-20131119155935-ohxdq1zlf2y3a7xl +# bzr-builder format 0.3 deb-version {debupstream}-0~16 +lp:~submarine/unity-scope-isgd/build-fixes revid:markjtully@gmail.com-20131120123712-cx2ul9zo7bl00jwt diff -Nru unity-scope-isgd-0.1/debian/changelog unity-scope-isgd-0.1/debian/changelog --- unity-scope-isgd-0.1/debian/changelog 2013-11-19 16:12:33.000000000 +0000 +++ unity-scope-isgd-0.1/debian/changelog 2013-11-20 13:13:22.000000000 +0000 @@ -1,8 +1,8 @@ -unity-scope-isgd (0.1-0~15~ubuntu13.10.1) saucy; urgency=low +unity-scope-isgd (0.1-0~16~ubuntu13.10.1) saucy; urgency=low * Auto build. - -- Mark Tully Tue, 19 Nov 2013 16:12:33 +0000 + -- Mark Tully Wed, 20 Nov 2013 13:13:22 +0000 unity-scope-isgd (0.1) UNRELEASED; urgency=low diff -Nru unity-scope-isgd-0.1/po/unity-scope-isgd.pot unity-scope-isgd-0.1/po/unity-scope-isgd.pot --- unity-scope-isgd-0.1/po/unity-scope-isgd.pot 2013-11-19 16:12:33.000000000 +0000 +++ unity-scope-isgd-0.1/po/unity-scope-isgd.pot 2013-11-20 13:13:21.000000000 +0000 @@ -3,13 +3,13 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: ../src/unity_isgd_daemon.py:38 +#: ../src/unity_isgd_daemon.py:42 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-19 15:58+0000\n" +"POT-Creation-Date: 2013-11-20 12:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,73 +18,73 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../src/unity_isgd_daemon.py:36 +#: ../src/unity_isgd_daemon.py:40 msgid "Shorten URL with is.gd" msgstr "" -#: ../src/unity_isgd_daemon.py:37 +#: ../src/unity_isgd_daemon.py:41 msgid "Sorry, there is no url to shorten" msgstr "" -#: ../src/unity_isgd_daemon.py:47 +#: ../src/unity_isgd_daemon.py:51 msgid "Shorten URL" msgstr "" -#: ../src/unity_isgd_daemon.py:82 +#: ../src/unity_isgd_daemon.py:87 #, python-format msgid "Shorten %s with is.gd" msgstr "" #. description = '' + self.result.title + "\n\n" -#: ../src/unity_isgd_daemon.py:100 +#: ../src/unity_isgd_daemon.py:105 msgid "is.gd is a free service for shortening web addresses and " msgstr "" -#: ../src/unity_isgd_daemon.py:101 +#: ../src/unity_isgd_daemon.py:106 msgid "other URLs. This is useful in many circumstances e.g. when " msgstr "" -#: ../src/unity_isgd_daemon.py:102 +#: ../src/unity_isgd_daemon.py:107 msgid "" "sending an address to a phone via SMS and character count is limited.\n" "\n" msgstr "" -#: ../src/unity_isgd_daemon.py:103 +#: ../src/unity_isgd_daemon.py:108 #, python-format msgid "Click the Shorten url button below to shorten %s " msgstr "" -#: ../src/unity_isgd_daemon.py:104 +#: ../src/unity_isgd_daemon.py:109 msgid "and copy the shortened link to the clipboard, ready for pasting or the " msgstr "" -#: ../src/unity_isgd_daemon.py:105 +#: ../src/unity_isgd_daemon.py:110 msgid "is.gd Preferences button to visit is.gd's preferences " msgstr "" -#: ../src/unity_isgd_daemon.py:106 +#: ../src/unity_isgd_daemon.py:111 msgid "page." msgstr "" -#: ../src/unity_isgd_daemon.py:108 +#: ../src/unity_isgd_daemon.py:113 msgid "Shorten url" msgstr "" -#: ../src/unity_isgd_daemon.py:110 +#: ../src/unity_isgd_daemon.py:115 msgid "is.gd Preferences" msgstr "" -#: ../src/unity_isgd_daemon.py:244 +#: ../src/unity_isgd_daemon.py:249 msgid "Copied shortened url to clipboard" msgstr "" -#: ../src/unity_isgd_daemon.py:244 +#: ../src/unity_isgd_daemon.py:249 #, python-format msgid "%s → %s" msgstr "" -#: ../src/unity_isgd_daemon.py:246 +#: ../src/unity_isgd_daemon.py:251 #, python-format msgid "Unable to shorten %s" msgstr "" diff -Nru unity-scope-isgd-0.1/src/unity_isgd_daemon.py unity-scope-isgd-0.1/src/unity_isgd_daemon.py --- unity-scope-isgd-0.1/src/unity_isgd_daemon.py 2013-11-19 16:12:33.000000000 +0000 +++ unity-scope-isgd-0.1/src/unity_isgd_daemon.py 2013-11-20 13:13:21.000000000 +0000 @@ -1,6 +1,10 @@ #! /usr/bin/python3 # -*- coding: utf-8 -*- +''' +unity_isgd_daemon.py shortens urls entered into the dash +''' + # Copyright(C) 2013 Mark Tully # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -14,7 +18,7 @@ # You should have received a copy of the GNU General Public License along # with this program. If not, see . -from gi.repository import GLib, Gio, Gtk, Gdk +from gi.repository import Gio, Gtk, Gdk from gi.repository import Unity import gettext import urllib.request @@ -65,8 +69,9 @@ query = clipboard.wait_for_text() # Only add a result if it's a webpage - if not query.startswith("http://"): - query = "http://%s" % query + if not query.startswith("http"): + if not '://' in query: + query = "http://%s" % query regex = r"^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$" if re.match(regex, query):