default to an icon based terminal bell indication, and add such an icon from Tango.
This commit is contained in:
parent
07a142c6a0
commit
b3eaa85cc9
Binary file not shown.
After Width: | Height: | Size: 863 B |
2
setup.py
2
setup.py
|
@ -175,6 +175,8 @@ setup(name=APP_NAME.capitalize(),
|
||||||
('share/icons/hicolor/32x32/apps', glob.glob('data/icons/32x32/apps/*.png')),
|
('share/icons/hicolor/32x32/apps', glob.glob('data/icons/32x32/apps/*.png')),
|
||||||
('share/icons/hicolor/48x48/apps', glob.glob('data/icons/48x48/apps/*.png')),
|
('share/icons/hicolor/48x48/apps', glob.glob('data/icons/48x48/apps/*.png')),
|
||||||
('share/icons/hicolor/16x16/actions', glob.glob('data/icons/16x16/actions/*.png')),
|
('share/icons/hicolor/16x16/actions', glob.glob('data/icons/16x16/actions/*.png')),
|
||||||
|
('share/icons/hicolor/16x16/status',
|
||||||
|
glob.glob('data/icons/16x16/status/*.png')),
|
||||||
],
|
],
|
||||||
packages=['terminatorlib', 'terminatorlib.configobj',
|
packages=['terminatorlib', 'terminatorlib.configobj',
|
||||||
'terminatorlib.plugins'],
|
'terminatorlib.plugins'],
|
||||||
|
|
|
@ -151,8 +151,9 @@ DEFAULTS = {
|
||||||
'default': {
|
'default': {
|
||||||
'allow_bold' : True,
|
'allow_bold' : True,
|
||||||
'audible_bell' : False,
|
'audible_bell' : False,
|
||||||
'visible_bell' : True,
|
'visible_bell' : False,
|
||||||
'urgent_bell' : False,
|
'urgent_bell' : False,
|
||||||
|
'icon_bell' : True,
|
||||||
'background_color' : '#000000000000',
|
'background_color' : '#000000000000',
|
||||||
'background_darkness' : 0.5,
|
'background_darkness' : 0.5,
|
||||||
'background_type' : 'solid',
|
'background_type' : 'solid',
|
||||||
|
|
|
@ -632,7 +632,8 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
self.vte.set_audible_bell(self.config['audible_bell'])
|
self.vte.set_audible_bell(self.config['audible_bell'])
|
||||||
self.vte.set_visible_bell(self.config['visible_bell'])
|
self.vte.set_visible_bell(self.config['visible_bell'])
|
||||||
self.cnxids.remove_signal(self.vte, 'beep')
|
self.cnxids.remove_signal(self.vte, 'beep')
|
||||||
if self.config['urgent_bell'] == True:
|
if self.config['urgent_bell'] == True or \
|
||||||
|
self.config['icon_bell'] == True:
|
||||||
try:
|
try:
|
||||||
self.cnxids.new(self.vte, 'beep', self.on_beep)
|
self.cnxids.new(self.vte, 'beep', self.on_beep)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
@ -1181,8 +1182,11 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||||
|
|
||||||
def on_beep(self, widget):
|
def on_beep(self, widget):
|
||||||
"""Set the urgency hint for our window"""
|
"""Set the urgency hint for our window"""
|
||||||
window = util.get_top_window(self)
|
if self.config['urgent_bell'] == True:
|
||||||
window.set_urgency_hint(True)
|
window = util.get_top_window(self)
|
||||||
|
window.set_urgency_hint(True)
|
||||||
|
if self.config['icon_bell'] == True:
|
||||||
|
self.titlebar.icon_bell()
|
||||||
|
|
||||||
def describe_layout(self, count, parent, global_layout):
|
def describe_layout(self, count, parent, global_layout):
|
||||||
"""Describe our layout"""
|
"""Describe our layout"""
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Titlebar(gtk.EventBox):
|
||||||
groupicon = None
|
groupicon = None
|
||||||
grouplabel = None
|
grouplabel = None
|
||||||
groupentry = None
|
groupentry = None
|
||||||
|
bellicon = None
|
||||||
|
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
'clicked': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
|
'clicked': (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
|
||||||
|
@ -50,6 +51,8 @@ class Titlebar(gtk.EventBox):
|
||||||
grouphbox = gtk.HBox()
|
grouphbox = gtk.HBox()
|
||||||
self.grouplabel = gtk.Label()
|
self.grouplabel = gtk.Label()
|
||||||
self.groupicon = gtk.Image()
|
self.groupicon = gtk.Image()
|
||||||
|
self.bellicon = gtk.Image()
|
||||||
|
self.bellicon.set_no_show_all(True)
|
||||||
|
|
||||||
self.groupentry = gtk.Entry()
|
self.groupentry = gtk.Entry()
|
||||||
self.groupentry.set_no_show_all(True)
|
self.groupentry.set_no_show_all(True)
|
||||||
|
@ -74,10 +77,12 @@ class Titlebar(gtk.EventBox):
|
||||||
self.ebox.add(grouphbox)
|
self.ebox.add(grouphbox)
|
||||||
self.ebox.show_all()
|
self.ebox.show_all()
|
||||||
|
|
||||||
|
self.bellicon.set_from_icon_name('terminal-bell', gtk.ICON_SIZE_MENU)
|
||||||
hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
hbox.pack_start(self.ebox, False, True, 0)
|
hbox.pack_start(self.ebox, False, True, 0)
|
||||||
hbox.pack_start(gtk.VSeparator(), False, True, 0)
|
hbox.pack_start(gtk.VSeparator(), False, True, 0)
|
||||||
hbox.pack_start(self.label, True, True)
|
hbox.pack_start(self.label, True, True)
|
||||||
|
hbox.pack_end(self.bellicon, False, False, 2)
|
||||||
|
|
||||||
self.add(hbox)
|
self.add(hbox)
|
||||||
hbox.show_all()
|
hbox.show_all()
|
||||||
|
@ -218,4 +223,14 @@ class Titlebar(gtk.EventBox):
|
||||||
if key == 'Escape':
|
if key == 'Escape':
|
||||||
self.groupentry_cancel(None, None)
|
self.groupentry_cancel(None, None)
|
||||||
|
|
||||||
|
def icon_bell(self):
|
||||||
|
"""A bell signal requires we display our bell icon"""
|
||||||
|
self.bellicon.show()
|
||||||
|
gobject.timeout_add(1000, self.icon_bell_hide)
|
||||||
|
|
||||||
|
def icon_bell_hide(self):
|
||||||
|
"""Handle a timeout which means we now hide the bell icon"""
|
||||||
|
self.bellicon.hide()
|
||||||
|
return(False)
|
||||||
|
|
||||||
gobject.type_register(Titlebar)
|
gobject.type_register(Titlebar)
|
||||||
|
|
Loading…
Reference in New Issue