示例#1
0
文件: maemo5.py 项目: funkycode/mieru
  def __init__(self, mieru, GTK=True):
    BasePlatform.__init__(self)

    self.mieru = mieru
    self.GTK = GTK
    if GTK:
      window = self.mieru.gui.getWindow()

      # enable zoom/volume keys for usage by mieru
      self.enableZoomKeys(window)

      # enable rotation
      self.rotationObject = self._startAutorotation()

      # add application menu
      menu = hildon.AppMenu()
      openFolderButton = gtk.Button("Open folder")
      openFolderButton.connect('clicked',self.startChooserCB, "folder")
      openFileButton = gtk.Button("Open file")
      openFileButton.connect('clicked',self.startChooserCB, "file")
      fullscreenButton = gtk.Button("Fullscreen")
      fullscreenButton.connect('clicked',self._toggleFullscreenCB)

      # last open mangas list
      self.historyStore = gtk.ListStore(gobject.TYPE_STRING)
      self.historyLocked = False
      self._updateHistory()
      selector = self._getHistorySelector()
      selector.connect('changed', self._historyRowSelected)
      historyPickerButton = self.getVerticalPickerButton("History")
      historyPickerButton.set_selector(selector)
      self.historyPickerButton = historyPickerButton
      self.mieru.watch('openMangasHistory', self._updateHistoryCB)

      optionsButton = gtk.Button("Options")
      optionsButton.connect('clicked',self._showOptionsCB)

      infoButton = gtk.Button("Info")
      infoButton.connect('clicked',self._showInfoCB)

      pagingButton = gtk.Button("Paging")
      pagingButton.connect('clicked',self.showPagingDialogCB)

      fittPickerButton = self._getFittingPickerButton("Page fitting", arangement=hildon.BUTTON_ARRANGEMENT_VERTICAL)

      menu.append(openFileButton)
      menu.append(openFolderButton)
      menu.append(fullscreenButton)
      menu.append(historyPickerButton)
      menu.append(pagingButton)
      menu.append(fittPickerButton)
      menu.append(optionsButton)
      menu.append(infoButton)

      # Show all menu items
      menu.show_all()

      # Add the menu to the window
      window.set_app_menu(menu)
示例#2
0
文件: pc.py 项目: funkycode/mieru
 def __init__(self, mieru):
   BasePlatform.__init__(self)
   self.mieru = mieru
示例#3
0
 def __init__(self, panora):
   BasePlatform.__init__(self)
   self.panora = panora
示例#4
0
 def __init__(self, mieru):
     BasePlatform.__init__(self)
     self.mieru = mieru
示例#5
0
文件: pc.py 项目: M4rtinK/repho
 def __init__(self, repho):
   BasePlatform.__init__(self)
   self.repho = repho
   self.mb = self._addMenu()
示例#6
0
 def __init__(self, repho):
   BasePlatform.__init__(self)
   self.repho = repho
示例#7
0
    def __init__(self, mieru, GTK=False):
        BasePlatform.__init__(self)

        self.mieru = mieru
        self.GTK = GTK
示例#8
0
文件: maemo5.py 项目: M4rtinK/mieru
  def __init__(self, mieru, GTK=False):
    BasePlatform.__init__(self)

    self.mieru = mieru
    self.GTK = GTK
示例#9
0
 def __init__(self, panora):
     BasePlatform.__init__(self)
     self.panora = panora