Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2011-08-12 22:52:36 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2011-08-12 18:24:48 (GMT)
commit936588fccb392d6d9564484ddccbd01f322d0eaa (patch)
tree1b8c215b27cfc4c36a8b7b2704522ef94d5438a6
parent55faff89aa1bf0ab4793d8f4b681eec317b0c04f (diff)
Use a standard gtk.Entry instead of the custom AddressEntry from the toolkit
The GtkEntry widget in version 2.16 has support for displaying a progress bar inside of an entry widget. This allows us to remove our custom widget. Signed-off-by: Simon Schampijer <simon@laptop.org> Signed-off-by: Rafael Ortiz <rafael@activitycentral.com>
-rw-r--r--webtoolbar.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index 6cb3ee7..9e0f660 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -26,7 +26,6 @@ from xpcom import components
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.menuitem import MenuItem
-from sugar._sugarext import AddressEntry
try:
from sugar.graphics.toolbarbox import ToolbarBox as ToolbarBase
from sugar.activity.widgets import ActivityToolbarButton
@@ -44,7 +43,7 @@ import places
_MAX_HISTORY_ENTRIES = 15
-class WebEntry(AddressEntry):
+class WebEntry(gtk.Entry):
_COL_ADDRESS = 0
_COL_TITLE = 1
@@ -385,7 +384,10 @@ class PrimaryToolbar(ToolbarBase):
self._set_progress(progress_listener.progress)
def _set_progress(self, progress):
- self.entry.props.progress = progress
+ if progress == 1.0:
+ self.entry.set_progress_fraction(0.0)
+ else:
+ self.entry.set_progress_fraction(progress)
def _set_address(self, uri):
if uri and self._browser is not None: