1 |
/* |
/* |
2 |
* Copyright (C) 2006-2017 Andreas Persson |
* Copyright (C) 2006-2019 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
2669 |
dialog.set_name("Gigedit"); |
dialog.set_name("Gigedit"); |
2670 |
#endif |
#endif |
2671 |
dialog.set_version(VERSION); |
dialog.set_version(VERSION); |
2672 |
dialog.set_copyright("Copyright (C) 2006-2017 Andreas Persson"); |
dialog.set_copyright("Copyright (C) 2006-2019 Andreas Persson"); |
2673 |
const std::string sComment = |
const std::string sComment = |
2674 |
_("Built " __DATE__ "\nUsing ") + |
_("Built " __DATE__ "\nUsing ") + |
2675 |
::gig::libraryName() + " " + ::gig::libraryVersion() + "\n\n" + |
::gig::libraryName() + " " + ::gig::libraryVersion() + "\n\n" + |
2998 |
|
|
2999 |
bool MainWindow::onQueryTreeViewTooltip(int x, int y, bool keyboardTip, const Glib::RefPtr<Gtk::Tooltip>& tooltip) { |
bool MainWindow::onQueryTreeViewTooltip(int x, int y, bool keyboardTip, const Glib::RefPtr<Gtk::Tooltip>& tooltip) { |
3000 |
Gtk::TreeModel::iterator iter; |
Gtk::TreeModel::iterator iter; |
3001 |
m_TreeView.get_tooltip_context_iter(x, y, keyboardTip, iter); |
if (!m_TreeView.get_tooltip_context_iter(x, y, keyboardTip, iter)) { |
3002 |
|
return false; |
3003 |
|
} |
3004 |
Gtk::TreeModel::Path path(iter); |
Gtk::TreeModel::Path path(iter); |
3005 |
Gtk::TreeModel::Row row = *iter; |
Gtk::TreeModel::Row row = *iter; |
3006 |
Gtk::TreeViewColumn* pointedColumn = NULL; |
Gtk::TreeViewColumn* pointedColumn = NULL; |
3032 |
static Glib::ustring scriptTooltipFor(gig::Instrument* instrument, int index) { |
static Glib::ustring scriptTooltipFor(gig::Instrument* instrument, int index) { |
3033 |
Glib::ustring name(gig_to_utf8(instrument->pInfo->Name)); |
Glib::ustring name(gig_to_utf8(instrument->pInfo->Name)); |
3034 |
const int iScriptSlots = instrument->ScriptSlotCount(); |
const int iScriptSlots = instrument->ScriptSlotCount(); |
3035 |
Glib::ustring tooltip = "<u>(" + ToString(index) + ") „" + name + "”</u>\n\n"; |
Glib::ustring tooltip = "<u>(" + ToString(index) + ") “" + name + "”</u>\n\n"; |
3036 |
if (!iScriptSlots) |
if (!iScriptSlots) |
3037 |
tooltip += "<span foreground='red'><i>No script assigned</i></span>"; |
tooltip += "<span foreground='red'><i>No script assigned</i></span>"; |
3038 |
else { |
else { |
3039 |
for (int i = 0; i < iScriptSlots; ++i) { |
for (int i = 0; i < iScriptSlots; ++i) { |
3040 |
tooltip += "• " + ToString(i+1) + ". Script: „<span foreground='#46DEFF'><b>" + |
tooltip += "• " + ToString(i+1) + ". Script: “<span foreground='#46DEFF'><b>" + |
3041 |
instrument->GetScriptOfSlot(i)->Name + "</b></span>”"; |
instrument->GetScriptOfSlot(i)->Name + "</b></span>”"; |
3042 |
if (i + 1 < iScriptSlots) tooltip += "\n\n"; |
if (i + 1 < iScriptSlots) tooltip += "\n\n"; |
3043 |
} |
} |