forked from openlp/openlp
Open Data Folder
bzr-revno: 1287
This commit is contained in:
commit
dedd98f439
@ -216,6 +216,9 @@ class Ui_MainWindow(object):
|
|||||||
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem',
|
self.ToolsAddToolItem = icon_action(mainWindow, u'ToolsAddToolItem',
|
||||||
u':/tools/tools_add.png')
|
u':/tools/tools_add.png')
|
||||||
mainWindow.actionList.add_action(self.ToolsAddToolItem, u'Tools')
|
mainWindow.actionList.add_action(self.ToolsAddToolItem, u'Tools')
|
||||||
|
self.ToolsOpenDataFolder = icon_action(mainWindow, u'ToolsOpenDataFolder',
|
||||||
|
u':/general/general_open.png')
|
||||||
|
mainWindow.actionList.add_action(self.ToolsOpenDataFolder, u'Tools')
|
||||||
self.settingsPluginListItem = icon_action(mainWindow,
|
self.settingsPluginListItem = icon_action(mainWindow,
|
||||||
u'settingsPluginListItem', u':/system/settings_plugin_list.png')
|
u'settingsPluginListItem', u':/system/settings_plugin_list.png')
|
||||||
mainWindow.actionList.add_action(self.settingsPluginListItem,
|
mainWindow.actionList.add_action(self.settingsPluginListItem,
|
||||||
@ -276,6 +279,7 @@ class Ui_MainWindow(object):
|
|||||||
self.SettingsLanguageMenu.menuAction(), None,
|
self.SettingsLanguageMenu.menuAction(), None,
|
||||||
self.SettingsShortcutsItem, self.SettingsConfigureItem))
|
self.SettingsShortcutsItem, self.SettingsConfigureItem))
|
||||||
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
|
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None))
|
||||||
|
add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None))
|
||||||
add_actions(self.HelpMenu, (self.HelpDocumentationItem,
|
add_actions(self.HelpMenu, (self.HelpDocumentationItem,
|
||||||
self.HelpOnlineHelpItem, None, self.HelpWebSiteItem,
|
self.HelpOnlineHelpItem, None, self.HelpWebSiteItem,
|
||||||
self.HelpAboutItem))
|
self.HelpAboutItem))
|
||||||
@ -433,6 +437,10 @@ class Ui_MainWindow(object):
|
|||||||
translate('OpenLP.MainWindow', 'Add &Tool...'))
|
translate('OpenLP.MainWindow', 'Add &Tool...'))
|
||||||
self.ToolsAddToolItem.setStatusTip(translate('OpenLP.MainWindow',
|
self.ToolsAddToolItem.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
'Add an application to the list of tools.'))
|
'Add an application to the list of tools.'))
|
||||||
|
self.ToolsOpenDataFolder.setText(
|
||||||
|
translate('OpenLP.MainWindow', 'Open &Data Folder...'))
|
||||||
|
self.ToolsOpenDataFolder.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
|
'Open the folder where songs, bibles and other data resides.'))
|
||||||
self.ModeDefaultItem.setText(
|
self.ModeDefaultItem.setText(
|
||||||
translate('OpenLP.MainWindow', '&Default'))
|
translate('OpenLP.MainWindow', '&Default'))
|
||||||
self.ModeDefaultItem.setStatusTip(translate('OpenLP.MainWindow',
|
self.ModeDefaultItem.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
@ -515,6 +523,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked)
|
||||||
QtCore.QObject.connect(self.HelpAboutItem,
|
QtCore.QObject.connect(self.HelpAboutItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onHelpAboutItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onHelpAboutItemClicked)
|
||||||
|
QtCore.QObject.connect(self.ToolsOpenDataFolder,
|
||||||
|
QtCore.SIGNAL(u'triggered()'), self.onToolsOpenDataFolderClicked)
|
||||||
QtCore.QObject.connect(self.settingsPluginListItem,
|
QtCore.QObject.connect(self.settingsPluginListItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
||||||
QtCore.QObject.connect(self.SettingsConfigureItem,
|
QtCore.QObject.connect(self.SettingsConfigureItem,
|
||||||
@ -703,6 +713,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.pluginForm.load()
|
self.pluginForm.load()
|
||||||
self.pluginForm.exec_()
|
self.pluginForm.exec_()
|
||||||
|
|
||||||
|
def onToolsOpenDataFolderClicked(self):
|
||||||
|
"""
|
||||||
|
Open data folder
|
||||||
|
"""
|
||||||
|
path = AppLocation.get_data_path()
|
||||||
|
QtGui.QDesktopServices.openUrl(QtCore.QUrl("file:///" + path))
|
||||||
|
|
||||||
def onSettingsConfigureItemClicked(self):
|
def onSettingsConfigureItemClicked(self):
|
||||||
"""
|
"""
|
||||||
Show the Settings dialog
|
Show the Settings dialog
|
||||||
|
Loading…
Reference in New Issue
Block a user