Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-16 21:45:43 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-07-16 21:45:43 (GMT)
commit26f1b33c57dba184b2f2b6cb2db71ccd5e58647b (patch)
treef9bd2ba85e466cccfc9df277281dd733d6363eed
parent020273db15be775c14301b51cd8e616203061d9b (diff)
Remove files leftover from Browse-hulahop.
-rw-r--r--browser.dtd21
-rw-r--r--clickToView.xml239
-rw-r--r--globalhistory.py76
-rw-r--r--progresslistener.py101
-rw-r--r--promptservice.py64
-rw-r--r--securitydialogs.py49
-rw-r--r--sessionhistory.py71
7 files changed, 0 insertions, 621 deletions
diff --git a/browser.dtd b/browser.dtd
deleted file mode 100644
index ae2da59..0000000
--- a/browser.dtd
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!ELEMENT browser (#PCDATA|link|session)*>
-<!ATTLIST browser
- name CDATA #REQUIRED
->
-
-<!ELEMENT session (#PCDATA)* >
-<!ATTLIST session
- data CDATA #IMPLIED
->
-<!ELEMENT link (#PCDATA)* >
-<!ATTLIST link
- hash CDATA #REQUIRED
- url CDATA #IMPLIED
- title CDATA #IMPLIED
- thumb CDATA #IMPLIED
- owner CDATA #IMPLIED
- color CDATA #IMPLIED
- deleted CDATA #IMPLIED
->
diff --git a/clickToView.xml b/clickToView.xml
deleted file mode 100644
index 6164c73..0000000
--- a/clickToView.xml
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0"?>
-<!-- This provides a click-to-view capability to block flash
- and java content in Firefox. Derived from:
- http://www.squarefree.com/userstyles/xbl.html
- and modified to allow different messages for flash and java
- by Steve Zobell. This can be placed in the rez directory in
- the Firefox install (e.g. C:\Program Files\Mozilla Firefox\res).
-
- The blocking capabilities are derived from this description:
- http://www.wlug.org.nz/MozillaNotes
-
- Add the following to userContent.css (in the chrome directory
- in the user profile):
-
-/* Prevent flash animations from playing until you click on them. */
-object[classid$=":D27CDB6E-AE6D-11cf-96B8-444553540000"],
-object[codebase*="swflash.cab"],
-object[type="application/x-shockwave-flash"],
-embed[type="application/x-shockwave-flash"],
-embed[src$=".swf"]
-{ -moz-binding: url("resource:///res/clickToView.xml#flash"); }
-
-/* Block java, with a click to load feature. */
-object[codebase*="java"],
-object[type="application/java"],
-embed[type="application/java"],
-applet[code$=".class"]
-{ -moz-binding: url("resource:///res/clickToView.xml#java"); }
-
--->
-<bindings xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml">
-
-<binding id="flash">
- <implementation>
- <constructor>
- <![CDATA[
-
-
-var doomed = this;
-
-// Check parent too (case of working EMBED inside broken OBJECT)
-if (doomed.overrideCTV || doomed.parentNode.overrideCTV)
- return;
-doomed.overrideCTV = true;
-
-var placeholder = document.createElement("div");
-
-
-// === Styling ===
-
-var w = parseInt(doomed.width || doomed.style.width);
-var h = parseInt(doomed.height || doomed.style.height);
-
-if (!w || w < 32) w = 32; // !w catches e.g. NaN
-if (!h || h < 32) h = 32;
-
-placeholder.style.width = w + "px";
-placeholder.style.height = h + "px";
-placeholder.style.backgroundColor = "yellow";
-placeholder.style.MozOutline = "1px solid red";
-placeholder.style.textAlign = "center";
-placeholder.style.color = "black";
-placeholder.style.background = "white";
-placeholder.style.opacity = 0.4;
-placeholder.style.cursor = "pointer";
-placeholder.style.overflow = "hidden";
-
-var red = document.createElement("span");
-red.style.fontWeight = "bold";
-red.style.fontStyle = "italic";
-red.style.color = "red";
-red.appendChild(document.createTextNode("Flash"));
-
-var text = document.createTextNode(" [[Click to play]] ");
-
-
-// A button to dismiss the placeholder (instead of playing)
-// Useful for those wonderful flash animations that cover
-// the text on the page at the start.
-var bye = document.createElement("bye");
-bye.style.backgroundColor = "white";
-bye.style.MozOutline = "2px solid red";
-bye.style.textAlign = "center";
-bye.style.color = "red";
-bye.style.background = "white";
-bye.style.cursor = "pointer";
-bye.style.overflow = "hidden";
-bye.appendChild(document.createTextNode("X"));
-
-placeholder.appendChild(red);
-placeholder.appendChild(text);
-placeholder.appendChild(bye);
-
-placeholder.onmouseover = function()
-{
- this.style.MozOutline='3px outset white';
- this.style.opacity = 1.0;
- this.style.background='lightgrey'
-}
-placeholder.onmouseout = function()
-{
- this.style.background='white';
- this.style.opacity = 0.4;
- this.style.MozOutline='1px solid red';
-}
-
-
-// === Replacement ===
-
-var p = doomed.parentNode;
-
-// Do in a timeout to avoid bugginess
-setTimeout ( function ()
-{
- p.insertBefore(placeholder, doomed);
- p.removeChild(doomed);
-}, 0);
-
-// I love closures
-placeholder.onclick = function()
-{
- p.insertBefore(doomed, placeholder);
- p.removeChild(placeholder);
-}
-
-
-bye.onclick = function()
-{
- p.removeChild(placeholder);
-}
-
- ]]>
- </constructor>
- </implementation>
-</binding>
-
-
-<binding id="java">
- <implementation>
- <constructor>
- <![CDATA[
-
-
-var doomed = this;
-
-// Check parent too (case of working EMBED inside broken OBJECT)
-if (doomed.overrideCTV || doomed.parentNode.overrideCTV)
- return;
-doomed.overrideCTV = true;
-
-var placeholder = document.createElement("div");
-
-
-// === Styling ===
-
-var w = parseInt(doomed.width || doomed.style.width);
-var h = parseInt(doomed.height || doomed.style.height);
-
-if (!w || w < 32) w = 32; // !w catches e.g. NaN
-if (!h || h < 32) h = 32;
-
-placeholder.style.width = w + "px";
-placeholder.style.height = h + "px";
-placeholder.style.backgroundColor = "yellow";
-placeholder.style.MozOutline = "1px solid red";
-placeholder.style.textAlign = "center";
-placeholder.style.color = "black";
-placeholder.style.background = "white";
-placeholder.style.opacity = 0.4;
-placeholder.style.cursor = "pointer";
-placeholder.style.overflow = "hidden";
-
-var red = document.createElement("span");
-red.style.fontWeight = "bold";
-red.style.fontStyle = "italic";
-red.style.color = "red";
-red.appendChild(document.createTextNode("Java"))
-
-var text = document.createTextNode(" [[Click to play]] ");
-
-placeholder.appendChild(red);
-placeholder.appendChild(text);
-
-// A button to dismiss the placeholder (instead of playing)
-var bye = document.createElement("span");
-bye.style.backgroundColor = "white";
-bye.style.MozOutline = "2px solid red";
-bye.style.textAlign = "center";
-bye.style.color = "red";
-bye.style.background = "white";
-bye.style.cursor = "pointer";
-bye.style.overflow = "hidden";
-bye.appendChild(document.createTextNode("X"))
-placeholder.appendChild(bye);
-
-placeholder.onmouseover = function()
-{
- this.style.MozOutline='3px outset white';
- this.style.opacity = 1.0;
- this.style.background='lightgrey'
-}
-placeholder.onmouseout = function()
-{
- this.style.background='white';
- this.style.opacity = 0.4;
- this.style.MozOutline='1px solid red';
-}
-
-
-// === Replacement ===
-
-var p = doomed.parentNode;
-
-// Do in a timeout to avoid bugginess
-setTimeout ( function ()
-{
- p.insertBefore(placeholder, doomed);
- p.removeChild(doomed);
-}, 0);
-
-// I love closures
-placeholder.onclick = function()
-{
- p.insertBefore(doomed, placeholder);
- p.removeChild(placeholder);
-}
-
-
-bye.onclick = function()
-{
- p.removeChild(placeholder);
-}
-
- ]]>
- </constructor>
- </implementation>
-</binding>
-
-</bindings>
diff --git a/globalhistory.py b/globalhistory.py
deleted file mode 100644
index 6fe5953..0000000
--- a/globalhistory.py
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright (C) 2008, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-from datetime import datetime
-
-import places
-
-
-class GlobalHistory:
- #_com_interfaces_ = interfaces.nsIGlobalHistory, \
- # interfaces.nsIGlobalHistory2, \
- # interfaces.nsIGlobalHistory3
-
- cid = '{2a53cf28-c48e-4a01-ba18-3d3fef3e2985}'
- description = 'Sugar Global History'
-
- def __init__(self):
- self._store = places.get_store()
-
- def addPage(self, url):
- self.addURI(url, False, True, None)
-
- def isVisited(self, uri):
- place = self._store.lookup_place(uri.spec)
- return place != None
-
- def addURI(self, uri, redirect, toplevel, referrer):
- place = self._store.lookup_place(uri.spec)
- if place:
- place.visits += 1
- place.last_visit = datetime.now()
- self._store.update_place(place)
- else:
- place = places.Place(uri.spec)
- self._store.add_place(place)
-
- def setPageTitle(self, uri, title):
- place = self._store.lookup_place(uri.spec)
- if place:
- place.title = title
- self._store.update_place(place)
-
- def addDocumentRedirect(self, old_channel, new_channel, flags, toplevel):
- pass
-
- def getURIGeckoFlags(self, uri):
- place = self._store.lookup_place(uri.spec)
- if place:
- return place.gecko_flags
- else:
- return 0
-
- def setURIGeckoFlags(self, uri, flags):
- place = self._store.lookup_place(uri.spec)
- if place:
- place.gecko_flags = flags
- self._store.update_place(place)
-
-
-#components.registrar.registerFactory(GlobalHistory.cid,
-# GlobalHistory.description,
-# '@mozilla.org/browser/global-history;2',
-# Factory(GlobalHistory))
diff --git a/progresslistener.py b/progresslistener.py
deleted file mode 100644
index 1649c77..0000000
--- a/progresslistener.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright (C) 2006, Red Hat, Inc.
-# Copyright (C) 2007, One Laptop Per Child
-# Copyright (C) 2009, Tomeu Vizoso
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-import gobject
-
-
-class ProgressListener(gobject.GObject):
- _com_interfaces_ = interfaces.nsIWebProgressListener
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- self._location = None
- self._loading = False
- self._progress = 0.0
- self._total_requests = 0
- self._completed_requests = 0
-
- self._wrapped_self = xpcom.server.WrapObject( \
- self, interfaces.nsIWebProgressListener)
- weak_ref = xpcom.client.WeakReference(self._wrapped_self)
-
- def setup(self, browser):
- mask = interfaces.nsIWebProgress.NOTIFY_STATE_NETWORK | \
- interfaces.nsIWebProgress.NOTIFY_STATE_REQUEST | \
- interfaces.nsIWebProgress.NOTIFY_LOCATION
-
- browser.web_progress.addProgressListener(self._wrapped_self, mask)
-
- def _reset_requests_count(self):
- self._total_requests = 0
- self._completed_requests = 0
-
- def onLocationChange(self, webProgress, request, location):
- self._location = location
- self.notify('location')
-
- def onProgressChange(self, webProgress, request, curSelfProgress,
- maxSelfProgress, curTotalProgress, maxTotalProgress):
- pass
-
- def onSecurityChange(self, webProgress, request, state):
- pass
-
- def onStateChange(self, webProgress, request, stateFlags, status):
- if stateFlags & interfaces.nsIWebProgressListener.STATE_IS_REQUEST:
- if stateFlags & interfaces.nsIWebProgressListener.STATE_START:
- self._total_requests += 1
- elif stateFlags & interfaces.nsIWebProgressListener.STATE_STOP:
- self._completed_requests += 1
-
- if stateFlags & interfaces.nsIWebProgressListener.STATE_IS_NETWORK:
- if stateFlags & interfaces.nsIWebProgressListener.STATE_START:
- self._loading = True
- self._reset_requests_count()
- self.notify('loading')
- elif stateFlags & interfaces.nsIWebProgressListener.STATE_STOP:
- self._loading = False
- self.notify('loading')
-
- if self._total_requests < self._completed_requests:
- self._progress = 1.0
- elif self._total_requests > 0:
- self._progress = \
- self._completed_requests / float(self._total_requests)
- else:
- self._progress = 0.0
- self.notify('progress')
-
- def onStatusChange(self, webProgress, request, status, message):
- pass
-
- def _get_location(self):
- return self._location
-
- location = gobject.property(type=object, getter=_get_location)
-
- def _get_loading(self):
- return self._loading
-
- loading = gobject.property(type=bool, default=False, getter=_get_loading)
-
- def _get_progress(self):
- return self._progress
-
- progress = gobject.property(type=float, getter=_get_progress)
diff --git a/promptservice.py b/promptservice.py
deleted file mode 100644
index 7ba2655..0000000
--- a/promptservice.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright (C) 2007, One Laptop Per Child
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-import logging
-
-
-class PromptService:
- _com_interfaces_ = interfaces.nsIPromptService
-
- cid = '{836a90cb-6304-44f0-97df-c29913b908b7}'
- description = 'Sugar Prompt Service'
-
- def __init__(self):
- pass
-
- def alert(self, parent, dialogTitle, text):
- logging.debug('nsIPromptService.alert()')
-
- def alertCheck(self, parent, dialogTitle, text, checkMsg, checkState):
- logging.debug('nsIPromptService.alertCheck()')
-
- def confirm(self, parent, dialogTitle, text):
- logging.debug('nsIPromptService.confirm()')
-
- def confirmCheck(self, parent, dialogTitle, text, checkMsg, checkState):
- logging.debug('nsIPromptService.confirmCheck()')
-
- def confirmEx(self, parent, dialogTitle, text, buttonFlags, button0Title,
- button1Title, button2Title, checkMsg, checkState):
- logging.debug('nsIPromptService.confirmEx()')
-
- def prompt(self, parent, dialogTitle, text, value, checkMsg, checkState):
- logging.debug('nsIPromptService.prompt()')
-
- def promptPassword(self, parent, dialogTitle, text, password, checkMsg,
- checkState):
- logging.debug('nsIPromptService.promptPassword()')
-
- def promptUsernameAndPassword(self, parent, dialogTitle, text, username,
- password, checkMsg, checkState):
- logging.debug('nsIPromptService.promptUsernameAndPassword()')
-
- def select(self, parent, dialogTitle, text, count, selectList,
- outSelection):
- logging.debug('nsIPromptService.select()')
-
-
-#components.registrar.registerFactory(PromptService.cid,
-# PromptService.description,
-# '@mozilla.org/embedcomp/prompt-service;1',
-# Factory(PromptService))
diff --git a/securitydialogs.py b/securitydialogs.py
deleted file mode 100644
index 0ab64ee..0000000
--- a/securitydialogs.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) 2007, One Laptop Per Child
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-import logging
-
-
-class SecurityDialogs:
- _com_interfaces_ = interfaces.nsIBadCertListener
-
- cid = '{267d2fc2-1810-11dc-8314-0800200c9a66}'
- description = 'Sugar Security Dialogs'
-
- def __init__(self):
- pass
-
- def confirmCertExpired(socketInfo, cert):
- logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmCertExpired()')
- return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True
-
- def confirmMismatchDomain(socketInfo, targetURL, cert):
- logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmMismatchDomain()')
- return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True
-
- def confirmUnknownIssuer(socketInfo, cert, certAddType):
- logging.debug('UNIMPLEMENTED: SecurityDialogs.confirmUnknownIssuer()')
- return interfaces.nsIBadCertListener.ADD_TRUSTED_FOR_SESSION, True
-
- def notifyCrlNextupdate(socketInfo, targetURL, cert):
- logging.debug('UNIMPLEMENTED: SecurityDialogs.notifyCrlNextupdate()')
-
-"""
-components.registrar.registerFactory(SecurityDialogs.cid,
- SecurityDialogs.description,
- '@mozilla.org/nsBadCertListener;1',
- Factory(SecurityDialogs))
-"""
diff --git a/sessionhistory.py b/sessionhistory.py
deleted file mode 100644
index c9c830d..0000000
--- a/sessionhistory.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (C) 2007, One Laptop Per Child
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-import logging
-
-import gobject
-import xpcom
-from xpcom.components import interfaces
-
-
-class HistoryListener(gobject.GObject):
- __gsignals__ = {
- 'session-history-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([int])),
- 'session-link-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([str]))
- }
-
- def __init__(self):
- gobject.GObject.__init__(self)
-
- def setup(self, web_navigation):
- self._session_history = web_navigation.sessionHistory
- self._session_history.addSHistoryListener(self._wrapped_self)
-
- def OnHistoryGoBack(self, back_uri):
- logging.debug("OnHistoryGoBack: %s" % back_uri.spec)
- self.emit('session-link-changed', back_uri.spec)
- self.emit('session-history-changed', self._session_history.index - 1)
- return True
-
- def OnHistoryGoForward(self, forward_uri):
- logging.debug("OnHistoryGoForward: %s" % forward_uri.spec)
- self.emit('session-link-changed', forward_uri.spec)
- self.emit('session-history-changed', self._session_history.index + 1)
- return True
-
- def OnHistoryGotoIndex(self, index, goto_uri):
- logging.debug("OnHistoryGotoIndex: %i %s" % (index, goto_uri.spec))
- self.emit('session-link-changed', goto_uri.spec)
- self.emit('session-history-changed', index)
- return True
-
- def OnHistoryNewEntry(self, new_uri):
- logging.debug("OnHistoryNewEntry: %s" % new_uri.spec)
- self.emit('session-link-changed', new_uri.spec)
- self.emit('session-history-changed', self._session_history.index + 1)
-
- def OnHistoryPurge(self, num_entries):
- logging.debug("OnHistoryPurge: %i" % num_entries)
- #self.emit('session-history-changed')
- return True
-
- def OnHistoryReload(self, reload_uri, reload_flags):
- self.emit('session-link-changed', reload_uri.spec)
- logging.debug("OnHistoryReload: %s" % reload_uri.spec)
- return True