Skip to content

Commit d2668f0

Browse files
committed
forgot to update
2 parents 1f3eaf7 + f069dd3 commit d2668f0

File tree

5 files changed

+51
-4
lines changed

5 files changed

+51
-4
lines changed

MANIFEST

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
AUTHORS
2+
CHANGELOG
3+
LICENSE
4+
README
5+
light.theme
6+
sample-config
7+
sample.theme
8+
setup.py
9+
bpython/__init__.py
10+
bpython/_internal.py
11+
bpython/cli.py
12+
bpython/config.py
13+
bpython/formatter.py
14+
bpython/gtk_.py
15+
bpython/importcompletion.py
16+
bpython/inspection.py
17+
bpython/logo.png
18+
bpython/keys.py
19+
bpython/pager.py
20+
bpython/repl.py
21+
data/bpython
22+
data/bpython-gtk
23+
data/bpython.desktop
24+
doc/bpython-config.5
25+
doc/bpython.1

bpython/gtk_.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from __future__ import with_statement
3131
import inspect
3232
import sys
33+
import os
3334
from locale import LC_ALL, getpreferredencoding, setlocale
3435

3536
import gobject
@@ -43,7 +44,7 @@
4344

4445

4546
_COLORS = dict(b='blue', c='cyan', g='green', m='magenta', r='red',
46-
w='white', y='yellow', k='black')
47+
w='white', y='yellow', k='black', d='black')
4748

4849

4950
class ArgspecFormatter(object):
@@ -130,7 +131,7 @@ def __nonzero__(self):
130131

131132
class SuggestionWindow(gtk.Window):
132133
"""
133-
The window where suggestiosn are displayed.
134+
The window where suggestions are displayed.
134135
"""
135136
__gsignals__ = dict(expose_event=None,
136137
selection_changed=(gobject.SIGNAL_RUN_LAST, None,
@@ -264,6 +265,9 @@ def __init__(self, interpreter, config):
264265
self.list_win.connect('selection-changed',
265266
self.on_suggestion_selection_changed)
266267
self.list_win.hide()
268+
269+
self.modify_base('normal', gtk.gdk.color_parse(_COLORS[self.config.color_scheme['background']]))
270+
267271
self.text_buffer = self.get_buffer()
268272
tags = dict()
269273
for (name, value) in self.config.color_scheme.iteritems():
@@ -628,15 +632,24 @@ def main(args=None):
628632
interpreter = repl.Interpreter(None, getpreferredencoding())
629633
repl_widget = ReplWidget(interpreter, config)
630634

631-
sys.stderr = repl_widget
635+
# sys.stderr = repl_widget
632636
sys.stdout = repl_widget
633637

634638
gobject.idle_add(init_import_completion)
635639

636640
window = gtk.Window()
637641

638642
# branding
643+
644+
# fix icon to be distributed and loaded from the correct path
645+
icon = gtk.gdk.pixbuf_new_from_file(os.path.join(os.path.dirname(__file__),
646+
'logo.png'))
647+
639648
window.set_title('bpython')
649+
window.set_icon(icon)
650+
window.resize(600, 300)
651+
652+
# read from config
640653

641654
sw = gtk.ScrolledWindow()
642655
sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)

bpython/logo.png

12.9 KB
Loading

data/bpython-gtk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env python
2+
3+
import sys
4+
from bpython.gtk_ import main
5+
6+
sys.exit(main())

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@
4646
(os.path.join(man_dir, 'man5'), ['doc/bpython-config.5']),
4747
('share/applications', ['data/bpython.desktop'])
4848
],
49+
package_data = {'bpython': ['logo.png']},
4950
entry_points = {
5051
'console_scripts': [
5152
'bpython = bpython.cli:main',
53+
'bpython-gtk = bpython.gtk_:main',
5254
],
5355
},
54-
scripts = ([] if using_setuptools else ['data/bpython']),
56+
scripts = ([] if using_setuptools else ['data/bpython',
57+
'data/bpython-gtk']),
5558
cmdclass=dict(build_py=build_py)
5659
)
5760

0 commit comments

Comments
 (0)