[jokosher-devel] [PATCH] More tooltips
- From: "Adam Reid" <atomic0x gmail com>
- To: "Jokosher development list" <jokosher-devel-list gnome org>
- Subject: [jokosher-devel] [PATCH] More tooltips
- Date: Tue, 31 Oct 2006 13:22:36 -0500
Here's some more tooltips for panning and zoom sliders, context
sensitive workspace buttons. I also fixed the context sensitivity for
the click track button
Index: Jokosher/MixerStrip.py
===================================================================
--- Jokosher/MixerStrip.py (revision 865)
+++ Jokosher/MixerStrip.py (working copy)
@@ -45,7 +45,8 @@
self.pan = gtk.HScale()
self.pan.set_range(-1.0, 1.0)
self.pan.set_draw_value(False)
-
+ self.pantip = gtk.Tooltips()
+ self.pantip.set_tip(self.pan,_("Adjust instrument balance"),None)
if self.instrument.pan is not None:
self.pan.set_value(self.instrument.pan)
Index: Jokosher/TimeLineBar.py
===================================================================
--- Jokosher/TimeLineBar.py (revision 865)
+++ Jokosher/TimeLineBar.py (working copy)
@@ -220,13 +220,11 @@
#_____________________________________________________________________
def OnClick(self, widget):
- self.clicktip.set_tip(self.clickbutton, _("Turn click track off"), None)
-
if widget.get_active() == True:
self.project.EnableClick()
-
+ self.clicktip.set_tip(self.clickbutton, _("Turn click track off"), None)
if widget.get_active() == False:
self.project.DisableClick()
-
+ self.clicktip.set_tip(self.clickbutton, _("Turn click track on"), None)
#=========================================================================
Index: Jokosher/RecordingView.py
===================================================================
--- Jokosher/RecordingView.py (revision 865)
+++ Jokosher/RecordingView.py (working copy)
@@ -13,6 +13,7 @@
import InstrumentViewer
import TimeLineBar
import Globals
+import gettext
#=========================================================================
@@ -77,6 +78,8 @@
zoom.set_increments(0.2, 0.2)
zoom.set_draw_value(False)
zoom.set_value(40.0)
+ self.zoomtip = gtk.Tooltips()
+ self.zoomtip.set_tip(zoom,gettext.gettext("Zoom the timeline"),None)
zoom.connect("value-changed", self.OnZoom)
Index: Jokosher/JokosherApp.py
===================================================================
--- Jokosher/JokosherApp.py (revision 865)
+++ Jokosher/JokosherApp.py (working copy)
@@ -85,6 +85,8 @@
self.reverse = self.wTree.get_widget("Rewind")
self.forward = self.wTree.get_widget("Forward")
self.addInstrumentButton = self.wTree.get_widget("AddInstrument")
+ self.recordingButton = self.wTree.get_widget("Recording")
+ self.compactMixButton = self.wTree.get_widget("CompactMix")
self.editmenu = self.wTree.get_widget("editmenu")
self.undo = self.wTree.get_widget("undo")
self.redo = self.wTree.get_widget("redo")
@@ -117,11 +119,16 @@
# Initialise some useful vars
self.mode = None
self.settingButtons = True
- self.wTree.get_widget("Recording").set_active(True)
+ self.recordingButton.set_active(True)
self.settingButtons = False
self.isRecording = False
self.isPlaying = False
+ # Intialise context sensitive tooltips for workspaces buttons
+ self.contextTooltips = gtk.Tooltips()
+ self.contextTooltips.set_tip(self.recordingButton,_("Currently working in the recording workspace"),None)
+ self.contextTooltips.set_tip(self.compactMixButton,_("Switch to the Mixing workspace"),None)
+
# set sensitivity
self.SetGUIProjectLoaded()
@@ -199,8 +206,8 @@
def OnChangeView(self, view, mode):
if not self.settingButtons:
self.settingButtons = True
- self.wTree.get_widget("Recording").set_active(mode == self.MODE_RECORDING)
- self.wTree.get_widget("CompactMix").set_active(mode == self.MODE_COMPACT_MIX)
+ self.recordingButton.set_active(mode == self.MODE_RECORDING)
+ self.compactMixButton.set_active(mode == self.MODE_COMPACT_MIX)
self.settingButtons = False
if view:
@@ -227,13 +234,16 @@
def OnRecordingView(self, window=None):
if hasattr(self, "recording"):
self.OnChangeView(self.recording, self.MODE_RECORDING)
-
+ self.contextTooltips.set_tip(self.recordingButton,_("Currently working in the Recording workspace"),None)
+ self.contextTooltips.set_tip(self.compactMixButton,_("Switch to the Mixing workspace"),None)
+
#_____________________________________________________________________
def OnCompactMixView(self, window=None):
if hasattr(self, "compactmix"):
self.OnChangeView(self.compactmix, self.MODE_COMPACT_MIX)
-
+ self.contextTooltips.set_tip(self.recordingButton,_("Switch to the Recording workspace"),None)
+ self.contextTooltips.set_tip(self.compactMixButton,_("Currently working in the Mixing workspace"),None)
#_____________________________________________________________________
def OnDestroy(self, widget=None, event=None):
@@ -873,14 +883,11 @@
if self.tvtoolitem in self.wTree.get_widget("MainToolbar").get_children():
self.wTree.get_widget("MainToolbar").remove(self.tvtoolitem)
- RecordingToggle = self.wTree.get_widget("Recording")
- CompactToggle = self.wTree.get_widget("CompactMix")
-
ctrls = (self.save, self.save_as, self.close, self.addInstrumentButton,
self.reverse, self.forward, self.play, self.stop, self.record,
self.projectmenu, self.export, self.cut, self.copy, self.paste,
self.undo, self.redo, self.delete,
- RecordingToggle, CompactToggle,
+ self.recordingButton,self.compactMixButton,
self.wTree.get_widget("WorkspacesLabel"))
if self.project:
@@ -912,7 +919,7 @@
#untoggle all toggle buttons when the project is unloaded
self.settingButtons = True
- for t in (RecordingToggle, CompactToggle):
+ for t in (self.recordingButton, self.compactMixButton):
t.set_active(False)
self.settingButtons = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]