Skip to content

Commit

Permalink
Merge from 2.3 (Fix for issue #2207)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Mar 1, 2015
2 parents bc2963a + f219e6c commit d91a322
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
20 changes: 15 additions & 5 deletions spyderlib/spyder.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,17 @@


#==============================================================================
# Splash screen
# Create our QApplication instance here because it's needed to render the
# splash screen created below
#==============================================================================
from spyderlib.utils.qthelpers import qapplication
MAIN_APP = qapplication()


#==============================================================================
# Create splash screen out of MainWindow to reduce perceived startup time.
#==============================================================================
from spyderlib.baseconfig import _, get_image_path, DEV
SPLASH_APP = QApplication([''])
SPLASH = QSplashScreen(QPixmap(get_image_path('splash.png'), 'png'))
SPLASH_FONT = SPLASH.font()
SPLASH_FONT.setPixelSize(10)
Expand Down Expand Up @@ -140,8 +147,8 @@
create_module_bookmark_actions,
create_bookmark_action,
create_program_action, DialogManager,
keybinding, qapplication,
create_python_script_action, file_uri)
keybinding, create_python_script_action,
file_uri)
from spyderlib.guiconfig import get_shortcut, remove_deprecated_shortcuts
from spyderlib.otherplugins import get_spyderplugins_mods
from spyderlib import tour # FIXME: Better place for this?
Expand Down Expand Up @@ -2214,7 +2221,7 @@ def about(self):
"""<b>Spyder %s</b> %s
<br>The Scientific PYthon Development EnviRonment
<p>Copyright &copy; 2009-2012 Pierre Raybaut
<br>Copyright &copy; 2010-1015 The Spyder Development Team
<br>Copyright &copy; 2010-2015 The Spyder Development Team
<br>Licensed under the terms of the MIT License
<p>Created by Pierre Raybaut
<br>Developed and maintained by the
Expand Down Expand Up @@ -2642,6 +2649,9 @@ def show_tour(self, index):
#==============================================================================
def initialize():
"""Initialize Qt, patching sys.exit and eventually setting up ETS"""
# This doesn't create our QApplication, just holds a reference to
# MAIN_APP, created above to show our splash screen as early as
# possible
app = qapplication()

#----Monkey patching PyQt4.QtGui.QApplication
Expand Down
5 changes: 4 additions & 1 deletion spyderlib/utils/qthelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ def qapplication(translate=True):
SpyderApplication = QApplication

app = SpyderApplication.instance()
if not app:
if app is None:
# Set Application name for Gnome 3
# https://groups.google.com/forum/#!topic/pyside/24qxvwfrRDs
app = SpyderApplication(['Spyder'])

# Set application name for KDE (See issue 2207)
app.setApplicationName('Spyder')
if translate:
install_translator(app)
return app
Expand Down

0 comments on commit d91a322

Please sign in to comment.