Permalink
Browse files

Add icon to qtconsole app

	It's clearly not definitive, as most of the file are not in the right
	location and icon should be graphically improved, so il will certainly be rebased later.
	But as it goes with UI improvemetn in the menubar I add it to this branch.

	Note: About the svg Icon, I've done it from scratch in inkscape, inspired by
	iTerm2 icon, which is under GPL
	the .icns file is OSX Specific.
  • Loading branch information...
1 parent 3bceb23 commit c181f23c6ff46b078056a884c83ef39098ad0691 @Carreau Carreau committed with fperez Sep 21, 2011

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -49,6 +49,7 @@
from IPython.zmq.session import Session, default_secure
from IPython.zmq.zmqshell import ZMQInteractiveShell
+import application_rc
#-----------------------------------------------------------------------------
# Network Constants
@@ -183,6 +184,9 @@ def closeEvent(self, event):
box.addButton(closeall, QtGui.QMessageBox.YesRole)
box.setDefaultButton(closeall)
box.setEscapeButton(cancel)
+ pixmap = QtGui.QPixmap(':/icon/IPythonConsole.png')
+ scaledpixmap = pixmap.scaledToWidth(64,mode=QtCore.Qt.SmoothTransformation)
+ box.setIconPixmap(scaledpixmap)
reply = box.exec_()
if reply == 1: # close All
kernel_manager.shutdown_kernel()
@@ -522,6 +526,10 @@ def init_kernel_manager(self):
def init_qt_elements(self):
# Create the widget.
self.app = QtGui.QApplication([])
+ pixmap=QtGui.QPixmap(':/icon/IPythonConsole.png')
+ icon=QtGui.QIcon(pixmap)
+ QtGui.QApplication.setWindowIcon(icon)
+
local_kernel = (not self.existing) or self.ip in LOCAL_IPS
self.widget = self.widget_factory(config=self.config,
local_kernel=local_kernel)
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>icon/IPythonConsole.png</file>
+</qresource>
+</RCC>
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit c181f23

Please sign in to comment.