[jokosher-devel] [PATCH] Ticket #145 : Tooltips
- From: Fabrice Silva <silva crans org>
- To: jokosher-devel-list gnome org
- Subject: [jokosher-devel] [PATCH] Ticket #145 : Tooltips
- Date: Tue, 15 Aug 2006 15:34:15 +0200
Hello
I've added tooltips for instruments icons in recording and mixing views
"Arm instrument for recording"
"Muted" or "Unmuted"
"Solo"
"Instrument effects"
in init and onUpdate functions of files InstrumentViewer.py and
MixerStrip.py (and a "Minimize instrument" too in mixing view)
--
Fabrice Silva <silva crans org>
Index: InstrumentViewer.py
===================================================================
--- InstrumentViewer.py (révision 602)
+++ InstrumentViewer.py (copie de travail)
@@ -91,22 +91,30 @@
if not (self.small):
recimg = gtk.image_new_from_stock(gtk.STOCK_MEDIA_RECORD, gtk.ICON_SIZE_BUTTON)
+ self.recTip = gtk.Tooltips()
self.recButton = gtk.ToggleButton("")
self.recButton.set_property("image", recimg)
+ self.recTip.set_tip(self.recButton, "Arm instrument for recording", None)
self.recButton.connect("toggled", self.OnArm)
self.muteButton = gtk.ToggleButton("")
self.muteButton.connect("toggled", self.OnMute)
+ self.muteTip = gtk.Tooltips()
+ self.muteTip.set_tip(self.muteButton, "Mute", None)
soloimg = gtk.Image()
soloimg.set_from_file(os.path.join(Globals.IMAGE_PATH, "solo.png"))
self.soloButton = gtk.ToggleButton("")
self.soloButton.set_image(soloimg)
+ self.soloTip = gtk.Tooltips()
+ self.soloTip.set_tip(self.soloButton, "Solo", None)
#self.recButton.set_property("image", soloimg)
self.soloButton.connect("toggled", self.OnSolo)
self.propsButton = gtk.Button("In")
self.propsButton.connect("button_press_event", self.OnProcessingMenu)
+ self.propsTip = gtk.Tooltips()
+ self.propsTip.set_tip(self.propsButton, "Instrument effects", None)
self.controlsBox.add(self.recButton)
self.controlsBox.add(self.muteButton)
@@ -204,13 +212,17 @@
if not self.small:
self.recButton.set_active(self.instrument.isArmed)
+ self.recTip.enable()
self.muteButton.set_active(self.instrument.actuallyIsMuted)
self.soloButton.set_active(self.instrument.isSolo)
+ self.soloTip.enable()
if self.instrument.actuallyIsMuted:
self.muteButton.set_image(gtk.image_new_from_icon_name("stock_volume-mute", gtk.ICON_SIZE_BUTTON))
+ self.muteTip.set_tip(self.muteButton, "Muted", None)
else:
self.muteButton.set_image(gtk.image_new_from_icon_name("stock_volume", gtk.ICON_SIZE_BUTTON))
+ self.muteTip.set_tip(self.muteButton, "Unmuted", None)
if self.instrument.isSelected:
#For some reason, putting self.style.base[3] in __init__ makes it return the wrong colour.
Index: MixerStrip.py
===================================================================
--- MixerStrip.py (révision 602)
+++ MixerStrip.py (copie de travail)
@@ -29,6 +29,8 @@
self.minbutt = gtk.Button()
img = gtk.image_new_from_stock(gtk.STOCK_GOTO_BOTTOM, gtk.ICON_SIZE_MENU)
self.minbutt.set_image(img)
+ self.mintip = gtk.Tooltips()
+ self.mintip.set_tip(self.minbutt, "Minimize instrument", None)
self.minbutt.connect("clicked", self.EmitMinimise)
self.vbox.pack_start(self.minbutt, False)
@@ -44,14 +46,20 @@
self.recButton = gtk.ToggleButton("")
self.recButton.set_property("image", img)
self.recButton.connect("toggled", self.OnArm)
+ self.recTip = gtk.Tooltips()
+ self.recTip.set_tip(self.recButton, "Arm instrument for recording", None)
self.muteButton = gtk.ToggleButton("")
self.muteButton.connect("toggled", self.OnMute)
+ self.muteTip = gtk.Tooltips()
+ self.muteTip.set_tip(self.muteButton, "Mute", None)
soloimg = gtk.Image()
soloimg.set_from_file(os.path.join(Globals.IMAGE_PATH, "solo.png"))
self.soloButton = gtk.ToggleButton("")
self.soloButton.set_image(soloimg)
+ self.soloTip = gtk.Tooltips()
+ self.soloTip.set_tip(self.soloButton, "Solo", None)
self.soloButton.connect("toggled", self.OnSolo)
hb.add(self.recButton)
@@ -105,17 +113,22 @@
def Update(self):
self.Updating = True
+ self.mintip.enable()
self.label.set_text(self.instrument.name)
self.recButton.set_active(self.instrument.isArmed)
+ self.recTip.enable()
self.muteButton.set_active(self.instrument.actuallyIsMuted)
if self.instrument.actuallyIsMuted:
self.muteButton.set_image(gtk.image_new_from_icon_name("stock_volume-mute", gtk.ICON_SIZE_BUTTON))
+ self.muteTip.set_tip(self.muteButton, "Muted", None)
else:
self.muteButton.set_image(gtk.image_new_from_icon_name("stock_volume", gtk.ICON_SIZE_BUTTON))
+ self.muteTip.set_tip(self.muteButton, "Unmuted", None)
self.soloButton.set_active(self.instrument.isSolo)
+ self.soloTip.enable()
self.Updating = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]