mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Remove about dialog in db manager
This commit is contained in:
parent
2120bb8001
commit
445144ceb5
@ -320,10 +320,6 @@ class DBManager(QMainWindow):
|
||||
self.unregisterAction( action, menuName )
|
||||
del self._registeredDbActions
|
||||
|
||||
def about(self):
|
||||
from .dlg_about import DlgAbout
|
||||
DlgAbout(self).exec_()
|
||||
|
||||
def setupUi(self):
|
||||
self.setWindowTitle("DB Manager")
|
||||
self.setWindowIcon(QIcon(":/db_manager/icon"))
|
||||
@ -359,8 +355,6 @@ class DBManager(QMainWindow):
|
||||
actionMenuSchema = self.menuBar.addMenu(self.menuSchema)
|
||||
self.menuTable = QMenu("&Table", self)
|
||||
actionMenuTable = self.menuBar.addMenu(self.menuTable)
|
||||
self.menuHelp = QMenu("&Help", self)
|
||||
actionMenuHelp = self.menuBar.addMenu(self.menuHelp)
|
||||
|
||||
self.setMenuBar(self.menuBar)
|
||||
|
||||
@ -391,9 +385,6 @@ class DBManager(QMainWindow):
|
||||
self.actionShowSystemTables.setChecked(True)
|
||||
self.actionShowSystemTables.setVisible(False)
|
||||
|
||||
# menu HELP
|
||||
self.actionAbout = self.menuHelp.addAction(QIcon(":/db_manager/about"), "&About", self.about)
|
||||
|
||||
# add actions to the toolbar
|
||||
self.toolBar.addAction( self.actionRefresh )
|
||||
self.toolBar.addAction( self.actionSqlWindow )
|
||||
|
@ -1,48 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
|
||||
from .ui.ui_DlgAbout import Ui_DlgAbout
|
||||
from .__init__ import name, description, version
|
||||
import platform
|
||||
|
||||
try:
|
||||
import resources
|
||||
except ImportError:
|
||||
import resources_rc
|
||||
|
||||
class DlgAbout(QDialog, Ui_DlgAbout):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.logo.setPixmap( QPixmap( ":/faunalia/logo" ) )
|
||||
self.title.setText( name() )
|
||||
self.description.setText( description() )
|
||||
|
||||
text = self.txt.toHtml()
|
||||
text = text.replace( "$PLUGIN_NAME$", name() )
|
||||
|
||||
subject = "Help: %s" % name()
|
||||
body = """\n\n
|
||||
--------
|
||||
Plugin name: %s
|
||||
Plugin version: %s
|
||||
Python version: %s
|
||||
Platform: %s - %s
|
||||
--------
|
||||
""" % ( name(), version(), platform.python_version(), platform.system(), platform.version() )
|
||||
|
||||
mail = QUrl( "mailto:abc@abc.com" )
|
||||
mail.addQueryItem( "subject", subject )
|
||||
mail.addQueryItem( "body", body )
|
||||
|
||||
text = text.replace( "$MAIL_SUBJECT$", unicode(mail.encodedQueryItemValue( "subject" )) )
|
||||
text = text.replace( "$MAIL_BODY$", unicode(mail.encodedQueryItemValue( "body" )) )
|
||||
|
||||
self.txt.setHtml(text)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user