Changeset 7d1427eaebfd…
Parent be5d3e5e56ee…
by
Changes to 4 files · Browse files at 7d1427eaebfd Showing diff from parent be5d3e5e56ee Diff from another changeset...
@@ -519,6 +519,7 @@ class RepoRegistryView(QDockWidget):
openRepoSignal = QtCore.pyqtSignal(QtCore.QString)
+ visibilityChanged = QtCore.pyqtSignal(bool)
def __init__(self, parent):
QDockWidget.__init__(self, parent)
@@ -526,7 +527,7 @@ self.setFeatures(QDockWidget.DockWidgetClosable |
QDockWidget.DockWidgetMovable |
QDockWidget.DockWidgetFloatable)
- self.setWindowTitle(_('Repositories'))
+ self.setWindowTitle(_('Repository Registry'))
mainframe = QFrame()
lay = QVBoxLayout()
@@ -565,3 +566,9 @@
def close(self):
self.tmodel.write(settingsfilename())
+
+ def showEvent(self, event):
+ self.visibilityChanged.emit(True)
+
+ def hideEvent(self, event):
+ self.visibilityChanged.emit(False)
|
@@ -89,10 +89,13 @@ self.setupBranchCombo()
self.restoreSettings()
self.setAcceptDrops(True)
- self.showRepoRegistry()
- def showRepoRegistry(self):
- self.reporegistry.show()
+ def gotVisible(state):
+ self.actionShowRepoRegistry.setChecked(state)
+ self.reporegistry.visibilityChanged.connect(gotVisible)
+
+ def showRepoRegistry(self, show):
+ self.reporegistry.setVisible(show)
def openRepo(self, repopath):
repo = hg.repository(self.ui, path=str(repopath))
@@ -269,6 +272,7 @@ connect(self.actionBack, SIGNAL('triggered()'), self.back)
connect(self.actionForward, SIGNAL('triggered()'), self.forward)
connect(self.actionShowPaths, SIGNAL('toggled(bool)'), self.actionShowPathsToggled)
+ self.actionShowRepoRegistry.toggled.connect(self.showRepoRegistry)
self.actionQuit.setIcon(geticon('quit'))
self.actionRefresh.setIcon(geticon('reload'))
|
@@ -6,7 +6,7 @@ <rect>
<x>0</x>
<y>0</y>
- <width>685</width>
+ <width>627</width>
<height>721</height>
</rect>
</property>
@@ -65,7 +65,7 @@ <rect>
<x>0</x>
<y>0</y>
- <width>685</width>
+ <width>627</width>
<height>19</height>
</rect>
</property>
@@ -89,6 +89,7 @@ <property name="title">
<string>View</string>
</property>
+ <addaction name="actionShowRepoRegistry"/>
<addaction name="actionShowPaths"/>
</widget>
<addaction name="menuFile"/>
@@ -223,6 +224,14 @@ <string>Show paths</string>
</property>
</action>
+ <action name="actionShowRepoRegistry">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Show Repository Registry</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: Tue May 25 20:34:59 2010
+# Created: Tue May 25 21:23:46 2010
# by: PyQt4 UI code generator 4.7.3
#
# WARNING! All changes made in this file will be lost!
@@ -12,7 +12,7 @@class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
- MainWindow.resize(685, 721)
+ MainWindow.resize(627, 721)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/log.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
@@ -43,7 +43,7 @@ self.verticalLayout.addWidget(self.repotabs_splitter)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 685, 19))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 627, 19))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
@@ -95,12 +95,16 @@ self.actionShowPaths = QtGui.QAction(MainWindow)
self.actionShowPaths.setCheckable(True)
self.actionShowPaths.setObjectName("actionShowPaths")
+ self.actionShowRepoRegistry = QtGui.QAction(MainWindow)
+ self.actionShowRepoRegistry.setCheckable(True)
+ self.actionShowRepoRegistry.setObjectName("actionShowRepoRegistry")
self.menuFile.addAction(self.actionOpen_repository)
self.menuFile.addAction(self.actionRefresh)
self.menuFile.addSeparator()
self.menuFile.addAction(self.actionQuit)
self.menuHelp.addAction(self.actionAbout)
self.menuHelp.addAction(self.actionHelp)
+ self.menuView.addAction(self.actionShowRepoRegistry)
self.menuView.addAction(self.actionShowPaths)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuView.menuAction())
@@ -139,5 +143,6 @@ self.actionBack.setText(QtGui.QApplication.translate("MainWindow", "Back", None, QtGui.QApplication.UnicodeUTF8))
self.actionForward.setText(QtGui.QApplication.translate("MainWindow", "Forward", None, QtGui.QApplication.UnicodeUTF8))
self.actionShowPaths.setText(QtGui.QApplication.translate("MainWindow", "Show paths", None, QtGui.QApplication.UnicodeUTF8))
+ self.actionShowRepoRegistry.setText(QtGui.QApplication.translate("MainWindow", "Show Repository Registry", None, QtGui.QApplication.UnicodeUTF8))
import workbench_rc
|
Loading...