Example #1
0
 def AddInternetButtons(self):
     """Add Internet and Email buttons"""
     # the  " " bellow is necessary to avoid iqual names of this item and the internet section in some translations
     self.addtomenu(_("Browse Internet") + " ", "web-browser", 1, "", backend.get_default_internet_browser())
     self.addtomenu(_("E-mail") + " ", "emblem-mail", 1, "", backend.get_default_mail_client())
Example #2
0
			def characters(self, chars):
				if self.currently_in_title:
					self.title += chars
				elif self.currently_in_smarturl:
					self.current_bookmark_href += chars

		old_tree = Parser (self.bookmarks_file).root_menu
		return old_tree_format_to_new (old_tree, None)


browsers_supported.append (XbelFormatBookmarksParser())

## Wrapper

browser_cmd = backend.get_default_internet_browser()

class BookmarksMenu:
	def __init__ (self):
		self.format = None
		self.file = None
		for i in browsers_supported:
			if i.isBrowser (browser_cmd):
				self.format = i
				self.file = i.bookmarksFilename (browser_cmd)
				break
		self.mtime = self.get_mtime()
		self.tree = None
		self.dirty = True

	def is_dirty (self):