Changeset 61ff6bd4fe8e…
Parent 691cf090e7f1…
by
Changes to 4 files · Browse files at 61ff6bd4fe8e Showing diff from parent 691cf090e7f1 Diff from another changeset...
@@ -186,6 +186,12 @@ self.disab_shortcuts.append(self.actionActivateFile)
self.disab_shortcuts.append(self.actionActivateRev)
+ def back(self):
+ self.repoview.back()
+
+ def forward(self):
+ self.repoview.forward()
+
def setMode(self, mode):
self.fileview.setMode(mode)
|
@@ -186,10 +186,6 @@
self.attachQuickBar(tb)
- # navigation toolbar
- #self.toolBar_edit.addAction(self.repoview._actions['back'])
- #self.toolBar_edit.addAction(self.repoview._actions['forward'])
-
findaction = self.find_toolbar.toggleViewAction()
findaction.setIcon(geticon('find'))
self.toolBar_edit.addAction(findaction)
@@ -248,12 +244,11 @@
def createActions(self):
# main window actions (from .ui file)
- connect(self.actionRefresh, SIGNAL('triggered()'),
- self.reload)
- connect(self.actionAbout, SIGNAL('triggered()'),
- self.on_about)
- connect(self.actionQuit, SIGNAL('triggered()'),
- self.close)
+ connect(self.actionRefresh, SIGNAL('triggered()'), self.reload)
+ connect(self.actionAbout, SIGNAL('triggered()'), self.on_about)
+ connect(self.actionQuit, SIGNAL('triggered()'), self.close)
+ connect(self.actionBack, SIGNAL('triggered()'), self.back)
+ connect(self.actionForward, SIGNAL('triggered()'), self.forward)
self.actionQuit.setIcon(geticon('quit'))
self.actionRefresh.setIcon(geticon('reload'))
@@ -351,6 +346,16 @@ connect(self.actionOpen_repository, SIGNAL('triggered()'),
self.openRepository)
+ def back(self):
+ w = self.repoTabsWidget.currentWidget()
+ if w:
+ w.back()
+
+ def forward(self):
+ w = self.repoTabsWidget.currentWidget()
+ if w:
+ w.forward()
+
def openRepository(self):
caption = _('Select repository directory to open')
FD = QtGui.QFileDialog
|
@@ -102,6 +102,8 @@ <attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
+ <addaction name="actionBack"/>
+ <addaction name="actionForward"/>
</widget>
<widget class="QToolBar" name="toolBar_treefilters">
<property name="enabled">
@@ -185,6 +187,24 @@ <string>Help</string>
</property>
</action>
+ <action name="actionBack">
+ <property name="icon">
+ <iconset resource="workbench.qrc">
+ <normaloff>:/icons/back.svg</normaloff>:/icons/back.svg</iconset>
+ </property>
+ <property name="text">
+ <string>Back</string>
+ </property>
+ </action>
+ <action name="actionForward">
+ <property name="icon">
+ <iconset resource="workbench.qrc">
+ <normaloff>:/icons/forward.svg</normaloff>:/icons/forward.svg</iconset>
+ </property>
+ <property name="text">
+ <string>Forward</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="workbench.qrc"/>
|
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'C:\Users\adi\hgrepos\thg-qt\tortoisehg\hgqt\workbench.ui'
#
-# Created: Wed May 12 00:19:14 2010
+# Created: Sat May 15 02:22:38 2010
# by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!
@@ -73,6 +73,16 @@ self.actionDisplayAllBranches.setObjectName("actionDisplayAllBranches")
self.actionHelp = QtGui.QAction(MainWindow)
self.actionHelp.setObjectName("actionHelp")
+ self.actionBack = QtGui.QAction(MainWindow)
+ icon1 = QtGui.QIcon()
+ icon1.addPixmap(QtGui.QPixmap(":/icons/back.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.actionBack.setIcon(icon1)
+ self.actionBack.setObjectName("actionBack")
+ self.actionForward = QtGui.QAction(MainWindow)
+ icon2 = QtGui.QIcon()
+ icon2.addPixmap(QtGui.QPixmap(":/icons/forward.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.actionForward.setIcon(icon2)
+ self.actionForward.setObjectName("actionForward")
self.menuFile.addAction(self.actionOpen_repository)
self.menuFile.addAction(self.actionRefresh)
self.menuFile.addSeparator()
@@ -82,6 +92,8 @@ self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.toolBar_file.addAction(self.actionRefresh)
+ self.toolBar_edit.addAction(self.actionBack)
+ self.toolBar_edit.addAction(self.actionForward)
self.toolBar_help.addAction(self.actionHelp)
self.retranslateUi(MainWindow)
@@ -108,5 +120,7 @@ self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
self.actionDisplayAllBranches.setText(QtGui.QApplication.translate("MainWindow", "displayAllBranches", None, QtGui.QApplication.UnicodeUTF8))
self.actionHelp.setText(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8))
+ self.actionBack.setText(QtGui.QApplication.translate("MainWindow", "Back", None, QtGui.QApplication.UnicodeUTF8))
+ self.actionForward.setText(QtGui.QApplication.translate("MainWindow", "Forward", None, QtGui.QApplication.UnicodeUTF8))
import workbench_rc
|
Loading...