[jokosher-devel] [PATCH] Tooltips for most of the interface
- From: Adam Reid <atomic0x gmail com>
- To: Jokosher development list <jokosher-devel-list gnome org>
- Subject: [jokosher-devel] [PATCH] Tooltips for most of the interface
- Date: Sun, 29 Oct 2006 12:05:49 -0500
Hello all,
This is my first patch ever for any project, but I love what you guys
are doing so I thought I'd help where I can.
This patch contains tooltips for almost everything. Things I haven't
done yet are the balance sliders, zoom sliders, and context sensitivity
for the workspace button. I can't quite wrap my head around how to
manipulate the widget properties from the wTree.
Let me know if there are any problems with this patch or if I missed
other things.
Cheers,
Adam Reid
Index: Jokosher/Jokosher.glade
===================================================================
--- Jokosher/Jokosher.glade (revision 851)
+++ Jokosher/Jokosher.glade (working copy)
@@ -51,6 +51,7 @@
<child>
<widget class="GtkImageMenuItem" id="new1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Create a new project</property>
<property name="label">gtk-new</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_new_activate"/>
@@ -60,6 +61,7 @@
<child>
<widget class="GtkImageMenuItem" id="open">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Open an existing project</property>
<property name="label">gtk-open</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_open_activate"/>
@@ -69,6 +71,7 @@
<child>
<widget class="GtkImageMenuItem" id="save">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save the current project</property>
<property name="label">gtk-save</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_save_activate"/>
@@ -78,6 +81,7 @@
<child>
<widget class="GtkImageMenuItem" id="save_as">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save a copy of the current project</property>
<property name="label">gtk-save-as</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_save_as_activate"/>
@@ -87,6 +91,7 @@
<child>
<widget class="GtkImageMenuItem" id="close">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Close the current project</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_close_activate"/>
@@ -96,6 +101,7 @@
<child>
<widget class="GtkMenuItem" id="recentprojects">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Open a recent project</property>
<property name="label" translatable="yes">Recent Projects</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_recent_projects1_activate"/>
@@ -110,6 +116,7 @@
<child>
<widget class="GtkImageMenuItem" id="export">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Export current project to an audio file</property>
<property name="label" translatable="yes">_Mixdown Project</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_export_activate"/>
@@ -137,6 +144,7 @@
<child>
<widget class="GtkImageMenuItem" id="quit2">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Quit Jokosher</property>
<property name="label">gtk-quit</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_MainWindow_destroy"/>
@@ -160,6 +168,7 @@
<child>
<widget class="GtkImageMenuItem" id="undo">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Undo the last edit</property>
<property name="label" translatable="yes">Undo</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_undo_activate"/>
@@ -182,6 +191,7 @@
<child>
<widget class="GtkImageMenuItem" id="redo">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Redo the previous edit</property>
<property name="label" translatable="yes">Redo</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_redo_activate"/>
@@ -210,6 +220,7 @@
<child>
<widget class="GtkImageMenuItem" id="cut">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Cut the current selection</property>
<property name="label">gtk-cut</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_cut_activate"/>
@@ -219,6 +230,7 @@
<child>
<widget class="GtkImageMenuItem" id="copy">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Copy the current selection</property>
<property name="label">gtk-copy</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_copy_activate"/>
@@ -228,6 +240,7 @@
<child>
<widget class="GtkImageMenuItem" id="paste">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Paste the contents of the clipboard</property>
<property name="label">gtk-paste</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_paste_activate"/>
@@ -237,6 +250,7 @@
<child>
<widget class="GtkImageMenuItem" id="delete">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Delete the current selection</property>
<property name="label">gtk-delete</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_delete_activate"/>
@@ -252,6 +266,7 @@
<child>
<widget class="GtkImageMenuItem" id="preferences">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Edit Jokosher preferences</property>
<property name="label">gtk-preferences</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_preferences_activate"/>
@@ -275,6 +290,7 @@
<child>
<widget class="GtkImageMenuItem" id="add_instrument1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add an instrument to the project</property>
<property name="label" translatable="yes">Add Instrument</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_AddInstrument_clicked"/>
@@ -296,6 +312,7 @@
<child>
<widget class="GtkMenuItem" id="changeinstrumenttype">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Change the selected instrument type</property>
<property name="label" translatable="yes">Change Instrument Type</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_ChangeInstrumentType_clicked"/>
@@ -305,6 +322,7 @@
<child>
<widget class="GtkImageMenuItem" id="instrument_connections1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Manage instrument recording inputs</property>
<property name="label" translatable="yes">Instrument Connections</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_instrumentconnections_activate"/>
@@ -326,6 +344,7 @@
<child>
<widget class="GtkMenuItem" id="time_format1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Change the timeline</property>
<property name="label" translatable="yes">Time Format</property>
<property name="use_underline">True</property>
@@ -335,6 +354,7 @@
<child>
<widget class="GtkRadioMenuItem" id="show_as_bars_beats_ticks">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Change the timeline to show bars, beats and ticks</property>
<property name="label" translatable="yes">Show as Bars, Beats, Ticks</property>
<property name="use_underline">True</property>
<property name="active">True</property>
@@ -345,6 +365,7 @@
<child>
<widget class="GtkRadioMenuItem" id="show_as_hours_minutes_seconds">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Change the timeline to show hours, minutes and seconds</property>
<property name="label" translatable="yes">Show as Hours, Minutes, Seconds</property>
<property name="use_underline">True</property>
<property name="active">True</property>
@@ -379,6 +400,7 @@
<child>
<widget class="GtkMenuItem" id="manage_extensions1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Open the extension manager</property>
<property name="label" translatable="yes">_Manage Extensions</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_ExtensionManager_activate"/>
@@ -401,6 +423,7 @@
<child>
<widget class="GtkImageMenuItem" id="pre-release_notes1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Notes about this release</property>
<property name="label" translatable="yes">Pre-release Notes</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_prereleasenotes_activate"/>
@@ -422,6 +445,7 @@
<child>
<widget class="GtkImageMenuItem" id="contributing_to_jokosher1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Find out how you can help</property>
<property name="label" translatable="yes">Contributing to Jokosher</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_contributing_activate"/>
@@ -443,6 +467,7 @@
<child>
<widget class="GtkImageMenuItem" id="About">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Version information, credits and licence</property>
<property name="label">gtk-about</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_About_activate"/>
@@ -477,6 +502,7 @@
<child>
<widget class="GtkToolButton" id="AddInstrument">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add a new instrument</property>
<property name="label">Add Instrument</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-add</property>
@@ -484,8 +510,8 @@
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<accessibility>
+ <atkrelation target="Record" type="flows-to"/>
<atkrelation target="Rewind" type="flows-to"/>
- <atkrelation target="Record" type="flows-to"/>
</accessibility>
<signal name="clicked" handler="on_AddInstrument_clicked"/>
</widget>
@@ -511,13 +537,14 @@
<child>
<widget class="GtkToolButton" id="Rewind">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Click and hold to rewind</property>
<property name="stock_id">gtk-media-rewind</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<accessibility>
+ <atkrelation target="Stop" type="flows-to"/>
<atkrelation target="AddInstrument" type="flows-from"/>
- <atkrelation target="Stop" type="flows-to"/>
</accessibility>
<signal name="clicked" handler="on_Rewind_clicked"/>
</widget>
@@ -531,13 +558,14 @@
<widget class="GtkToolButton" id="Stop">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="tooltip" translatable="yes">Stop playback</property>
<property name="stock_id">gtk-media-stop</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<accessibility>
+ <atkrelation target="Play" type="flows-to"/>
<atkrelation target="Rewind" type="flows-from"/>
- <atkrelation target="Play" type="flows-to"/>
</accessibility>
<signal name="clicked" handler="on_Stop_clicked"/>
</widget>
@@ -550,14 +578,15 @@
<child>
<widget class="GtkToggleToolButton" id="Play">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Start playback</property>
<property name="stock_id">gtk-media-play</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<property name="active">False</property>
<accessibility>
+ <atkrelation target="Forward" type="flows-to"/>
<atkrelation target="Stop" type="flows-from"/>
- <atkrelation target="Forward" type="flows-to"/>
</accessibility>
<signal name="toggled" handler="on_Play_toggled"/>
</widget>
@@ -570,13 +599,14 @@
<child>
<widget class="GtkToolButton" id="Forward">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Click and hold to fast forward</property>
<property name="stock_id">gtk-media-forward</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<accessibility>
+ <atkrelation target="Record" type="flows-to"/>
<atkrelation target="Play" type="flows-from"/>
- <atkrelation target="Record" type="flows-to"/>
</accessibility>
<signal name="clicked" handler="on_Forward_clicked"/>
</widget>
@@ -690,6 +720,7 @@
<child>
<widget class="GtkToggleButton" id="Recording">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Switch to Recording workspace</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Recording</property>
<property name="use_underline">True</property>
@@ -709,6 +740,7 @@
<child>
<widget class="GtkToggleButton" id="CompactMix">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Switch to Mixing workspace</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Mixing</property>
<property name="use_underline">True</property>
@@ -1219,9 +1251,10 @@
<child>
<widget class="GtkHBox" id="hbox10">
+ <property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">12</property>
<child>
<widget class="GtkLabel" id="label57">
@@ -1251,6 +1284,7 @@
<child>
<widget class="GtkEntry" id="instrument_search">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Type here to search for an instrument</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
@@ -1312,6 +1346,7 @@
<child>
<widget class="GtkButton" id="cancelButton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Don't add an instrument</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
@@ -1325,6 +1360,7 @@
<child>
<widget class="GtkButton" id="okButton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add the selected instrument</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
@@ -2106,6 +2142,7 @@
<child>
<widget class="GtkButton" id="closeButton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save preferences and close</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
@@ -2217,6 +2254,7 @@
<child>
<widget class="GtkEntry" id="author">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Enter the authors name</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
@@ -2315,6 +2353,7 @@
<child>
<widget class="GtkEntry" id="name">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Enter the projects name</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
@@ -2392,6 +2431,7 @@
<child>
<widget class="GtkButton" id="cancelButton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Don't create the project</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
@@ -2405,6 +2445,7 @@
<child>
<widget class="GtkButton" id="okButton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Create the project</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
@@ -2512,6 +2553,7 @@
<child>
<widget class="GtkTreeView" id="recentprojectslist">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Double-click on a recent project to open</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="rules_hint">False</property>
@@ -2533,6 +2575,7 @@
<child>
<widget class="GtkButton" id="openrecentprojectbutton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Select a project to open from the list</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -2625,6 +2668,7 @@
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Start Jokosher with an empty project</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -2704,6 +2748,7 @@
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Find and open an existing project</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -2783,6 +2828,7 @@
<child>
<widget class="GtkButton" id="button3">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Change Jokosher preferences</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -2862,6 +2908,7 @@
<child>
<widget class="GtkButton" id="button4">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Quit Jokosher</property>
<property name="can_focus">True</property>
<property name="label">gtk-quit</property>
<property name="use_stock">True</property>
@@ -2894,6 +2941,7 @@
<child>
<widget class="GtkCheckButton" id="startupcb">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">I'm sorry, do I annoy you?</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Don't show this on start-up</property>
<property name="use_underline">True</property>
@@ -2945,6 +2993,7 @@
<child>
<widget class="GtkButton" id="closebutton1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save your connections and close this widow</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
@@ -3042,6 +3091,7 @@
<child>
<widget class="GtkButton" id="cancelbutton1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Stop mixing the project</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
@@ -3583,6 +3633,7 @@
<child>
<widget class="GtkButton" id="transportbutton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Listen to these effects</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-media-play</property>
@@ -3596,6 +3647,7 @@
<child>
<widget class="GtkButton" id="cancelbutton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Don't use these effects</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
@@ -3609,6 +3661,7 @@
<child>
<widget class="GtkButton" id="okbutton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Use these effects</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
@@ -3754,6 +3807,7 @@
<child>
<widget class="GtkButton" id="addbutton">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Add the selected effect</property>
<property name="can_focus">True</property>
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
@@ -3848,6 +3902,7 @@
<child internal-child="entry">
<widget class="GtkEntry" id="comboboxentry-entry1">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Type the presets name</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
@@ -3868,6 +3923,7 @@
<child>
<widget class="GtkButton" id="chainpresetsave">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Save the current effects configuration</property>
<property name="can_focus">True</property>
<property name="label">gtk-save</property>
<property name="use_stock">True</property>
@@ -4208,6 +4264,7 @@
<child>
<widget class="GtkButton" id="button5">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Edit Jokosher preferences</property>
<property name="label">gtk-preferences</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
@@ -4276,6 +4333,7 @@
<widget class="GtkButton" id="button13">
<property name="width_request">85</property>
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Close the extension manager</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
Index: Jokosher/TimeLineBar.py
===================================================================
--- Jokosher/TimeLineBar.py (revision 851)
+++ Jokosher/TimeLineBar.py (working copy)
@@ -11,6 +11,8 @@
import gtk
import TimeLine
+import gettext
+_=gettext.gettext
class TimeLineBar(gtk.Frame):
def __init__(self, project, projectview, mainview):
@@ -24,11 +26,15 @@
# add click / bpm / signature box
self.clickbutton = gtk.ToggleButton("C")
+ self.clicktip = gtk.Tooltips()
+ self.clicktip.set_tip(self.clickbutton,_("Turn click track on"),None)
self.clickbutton.connect("toggled", self.OnClick)
self.bpmeventbox = gtk.EventBox()
self.bpmeventbox.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#87d987"))
self.bpmframe = gtk.Frame()
+ self.bpmframetip = gtk.Tooltips()
+ self.bpmframetip.set_tip(self.bpmframe, _("Beats per minute"), None)
self.bpmframe.set_shadow_type(gtk.SHADOW_ETCHED_OUT)
self.bpmframe.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#87d987"))
@@ -211,6 +217,7 @@
#_____________________________________________________________________
def OnClick(self, widget):
+ self.clicktip.set_tip(self.clickbutton, _("Turn click track off"),None)
dlg = gtk.MessageDialog(None,
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
gtk.MESSAGE_WARNING,
Index: Jokosher/JokosherApp.py
===================================================================
--- Jokosher/JokosherApp.py (revision 851)
+++ Jokosher/JokosherApp.py (working copy)
@@ -37,7 +37,9 @@
gtk.glade.textdomain(Globals.LOCALE_APP)
self.wTree = gtk.glade.XML(Globals.GLADE_PATH, "MainWindow")
-
+ def printTree():
+ for widget in wTree:
+ print widget
#Connect event handlers
signals = {
"on_MainWindow_destroy" : self.OnDestroy,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]