Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/places.py
diff options
context:
space:
mode:
authorLucian Branescu Mihaila <lucian.branescu@gmail.com>2010-06-18 20:18:40 (GMT)
committer Lucian Branescu Mihaila <lucian.branescu@gmail.com>2010-06-18 20:18:40 (GMT)
commitfbeef143285c74c6aea1ea26423846e1a75b612b (patch)
tree1376be28dce930d00f74fd1baa27cf4b2018f389 /places.py
parent87b61970631dfbe825fe9c7c2678934b37ecc880 (diff)
Add tab box updates, improve load_uri to accept uris like 'google.com'.
Diffstat (limited to 'places.py')
-rw-r--r--places.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/places.py b/places.py
index 38fa7b2..19065ca 100644
--- a/places.py
+++ b/places.py
@@ -28,7 +28,6 @@ class Place(object):
self.uri = uri
self.title = None
self.bookmark = False
- self.gecko_flags = 0
self.visits = 0
self.last_visit = datetime.now()
@@ -50,7 +49,6 @@ class SqliteStore(object):
uri text,
title text,
bookmark boolean,
- gecko_flags integer,
visits integer,
last_visit timestamp
);
@@ -63,7 +61,7 @@ class SqliteStore(object):
try:
text = '%' + text + '%'
- cursor.execute('select uri, title, bookmark, gecko_flags, ' \
+ cursor.execute('select uri, title, bookmark, ' \
'visits, last_visit from places ' \
'where uri like ? or title like ? ' \
'order by visits desc limit 0, ?',
@@ -80,10 +78,10 @@ class SqliteStore(object):
try:
cursor.execute('insert into places (uri, title, bookmark, ' \
- 'gecko_flags, visits, last_visit) ' \
- 'values (?, ?, ?, ?, ?, ?)', \
+ 'visits, last_visit) ' \
+ 'values (?, ?, ?, ?, ?)', \
(place.uri, place.title, place.bookmark,
- place.gecko_flags, place.visits, place.last_visit))
+ place.visits, place.last_visit))
self._connection.commit()
finally:
cursor.close()
@@ -92,7 +90,7 @@ class SqliteStore(object):
cursor = self._connection.cursor()
try:
- cursor.execute('select uri, title, bookmark, gecko_flags,visits, ' \
+ cursor.execute('select uri, title, bookmark, visits, ' \
'last_visit from places where uri=?', (uri,))
row = cursor.fetchone()
@@ -107,9 +105,9 @@ class SqliteStore(object):
cursor = self._connection.cursor()
try:
- cursor.execute('update places set title=?, gecko_flags=?, '
+ cursor.execute('update places set title=?, '
'visits=?, last_visit=?, bookmark=? where uri=?',
- (place.title, place.gecko_flags, place.visits,
+ (place.title, place.visits,
place.last_visit, place.bookmark, place.uri))
self._connection.commit()
finally:
@@ -118,7 +116,7 @@ class SqliteStore(object):
def _place_from_row(self, row):
place = Place()
- place.uri, place.title, place.bookmark, place.gecko_flags, \
+ place.uri, place.title, place.bookmark, \
place.visits, place.last_visit = row
return place