Skip to content
Permalink
Browse files

DBManager: remove label from separators (fix #5393)

  • Loading branch information
brushtyler authored and jef-n committed May 21, 2012
1 parent 86243eb commit 8cb380ade1912ec029e38c840f508d399ded3d5d
Showing with 5 additions and 5 deletions.
  1. +5 −5 python/plugins/db_manager/db_manager.py
@@ -223,7 +223,7 @@ def registerAction(self, action, menuName, callback=None):
# get the placeholder's position to insert before it
pos = 0
for pos in range(len(menuActions)):
if menuActions[pos].isSeparator() and menuActions[pos].text() == "placeholder":
if menuActions[pos].isSeparator() and menuActions[pos].objectName().endsWith("_placeholder"):
menuActions[pos].setVisible(True)
break

@@ -301,7 +301,7 @@ def unregisterAction(self, action, menuName):
# hide the placeholder if there're no other registered actions
if len(self._registeredDbActions[menuName]) <= 0:
for i in range(len(menuActions)):
if menuActions[i].isSeparator() and menuActions[i].text() == "placeholder":
if menuActions[i].isSeparator() and menuActions[i].objectName().endsWith("_placeholder"):
menuActions[i].setVisible(False)
break

@@ -369,18 +369,18 @@ def setupUi(self):
# create menus' actions

# menu DATABASE
sep = self.menuDb.addAction("placeholder"); sep.setSeparator(True); sep.setVisible(False)
sep = self.menuDb.addSeparator(); sep.setObjectName("DB_Manager_DbMenu_placeholder"); sep.setVisible(False)
self.actionRefresh = self.menuDb.addAction( QIcon(":/db_manager/actions/refresh"), "&Refresh", self.refreshActionSlot, QKeySequence("F5") )
self.actionSqlWindow = self.menuDb.addAction( QIcon(":/db_manager/actions/sql_window"), "&SQL window", self.runSqlWindow, QKeySequence("F2") )
self.menuDb.addSeparator()
self.actionClose = self.menuDb.addAction( QIcon(), "&Exit", self.close, QKeySequence("CTRL+Q") )

# menu SCHEMA
sep = self.menuSchema.addAction("placeholder"); sep.setSeparator(True); sep.setVisible(False)
sep = self.menuSchema.addSeparator(); sep.setObjectName("DB_Manager_SchemaMenu_placeholder"); sep.setVisible(False)
actionMenuSchema.setVisible(False)

# menu TABLE
sep = self.menuTable.addAction("placeholder"); sep.setSeparator(True); sep.setVisible(False)
sep = self.menuTable.addSeparator(); sep.setObjectName("DB_Manager_TableMenu_placeholder"); sep.setVisible(False)
actionMenuTable.setVisible(False)
self.actionShowSystemTables = self.menuTable.addAction("Show system tables/views", self.showSystemTables)
self.actionShowSystemTables.setCheckable(True)

0 comments on commit 8cb380a

Please sign in to comment.
You can’t perform that action at this time.