Helpviewer/UrlBar/BookmarkActionSelectionDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2954
bf0215fe12d1
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
2 2
3 # Copyright (c) 2012 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2012 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to select the action to be performed on the bookmark. 7 Module implementing a dialog to select the action to be performed on the
8 bookmark.
8 """ 9 """
9 10
10 from __future__ import unicode_literals # __IGNORE_WARNING__ 11 from __future__ import unicode_literals # __IGNORE_WARNING__
11 12
12 from PyQt4.QtCore import pyqtSlot 13 from PyQt4.QtCore import pyqtSlot
17 import UI.PixmapCache 18 import UI.PixmapCache
18 19
19 20
20 class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog): 21 class BookmarkActionSelectionDialog(QDialog, Ui_BookmarkActionSelectionDialog):
21 """ 22 """
22 Class implementing a dialog to select the action to be performed on the bookmark. 23 Class implementing a dialog to select the action to be performed on
24 the bookmark.
23 """ 25 """
24 Undefined = -1 26 Undefined = -1
25 AddBookmark = 0 27 AddBookmark = 0
26 EditBookmark = 1 28 EditBookmark = 1
27 AddSpeeddial = 2 29 AddSpeeddial = 2
51 self.__bmAction = self.EditBookmark 53 self.__bmAction = self.EditBookmark
52 self.bookmarkPushButton.setText(self.trUtf8("Edit Bookmark")) 54 self.bookmarkPushButton.setText(self.trUtf8("Edit Bookmark"))
53 55
54 if Helpviewer.HelpWindow.HelpWindow.speedDial().pageForUrl(url).url: 56 if Helpviewer.HelpWindow.HelpWindow.speedDial().pageForUrl(url).url:
55 self.__sdAction = self.RemoveSpeeddial 57 self.__sdAction = self.RemoveSpeeddial
56 self.speeddialPushButton.setText(self.trUtf8("Remove from Speed Dial")) 58 self.speeddialPushButton.setText(
59 self.trUtf8("Remove from Speed Dial"))
57 else: 60 else:
58 self.__sdAction = self.AddSpeeddial 61 self.__sdAction = self.AddSpeeddial
59 self.speeddialPushButton.setText(self.trUtf8("Add to Speed Dial")) 62 self.speeddialPushButton.setText(self.trUtf8("Add to Speed Dial"))
60 63
61 @pyqtSlot() 64 @pyqtSlot()
75 self.accept() 78 self.accept()
76 79
77 def getAction(self): 80 def getAction(self):
78 """ 81 """
79 Public method to get the selected action. 82 Public method to get the selected action.
83
84 @return reference to the associated action
80 """ 85 """
81 return self.__action 86 return self.__action

eric ide

mercurial