mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 22:26:29 +01:00
Remove some unused classes, methods and variables, mostly in ARDOUR_UI
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3254 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
da91ac6686
commit
656524c23e
11 changed files with 0 additions and 461 deletions
|
|
@ -105,10 +105,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
|
|||
preroll_clock (X_("preroll"), false, X_("PreRollClock"), true, true),
|
||||
postroll_clock (X_("postroll"), false, X_("PostRollClock"), true, true),
|
||||
|
||||
/* adjuster table */
|
||||
|
||||
adjuster_table (3, 3),
|
||||
|
||||
/* preroll stuff */
|
||||
|
||||
preroll_button (_("pre\nroll")),
|
||||
|
|
@ -795,8 +791,6 @@ ARDOUR_UI::ask_about_saving_session (const string & what)
|
|||
window.set_resizable (false);
|
||||
window.show_all ();
|
||||
|
||||
save_the_session = 0;
|
||||
|
||||
window.set_keep_above (true);
|
||||
window.present ();
|
||||
|
||||
|
|
@ -1127,33 +1121,6 @@ ARDOUR_UI::open_recent_session ()
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::filter_ardour_session_dirs (const FileFilter::Info& info)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
if (stat (info.filename.c_str(), &statbuf) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!S_ISDIR(statbuf.st_mode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// XXX Portability
|
||||
|
||||
string session_file = info.filename;
|
||||
session_file += '/';
|
||||
session_file += Glib::path_get_basename (info.filename);
|
||||
session_file += ".ardour";
|
||||
|
||||
if (stat (session_file.c_str(), &statbuf) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return S_ISREG (statbuf.st_mode);
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::check_audioengine ()
|
||||
{
|
||||
|
|
@ -1862,17 +1829,6 @@ ARDOUR_UI::save_state_canfail (string name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::restore_state (string name)
|
||||
{
|
||||
if (session) {
|
||||
if (name.length() == 0) {
|
||||
name = session->name();
|
||||
}
|
||||
session->restore_state (name);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::primary_clock_value_changed ()
|
||||
{
|
||||
|
|
@ -1897,37 +1853,6 @@ ARDOUR_UI::secondary_clock_value_changed ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::rec_enable_button_blink (bool onoff, AudioDiskstream *dstream, Widget *w)
|
||||
{
|
||||
if (session && dstream && dstream->record_enabled()) {
|
||||
|
||||
Session::RecordState rs;
|
||||
|
||||
rs = session->record_status ();
|
||||
|
||||
switch (rs) {
|
||||
case Session::Disabled:
|
||||
case Session::Enabled:
|
||||
if (w->get_state() != STATE_SELECTED) {
|
||||
w->set_state (STATE_SELECTED);
|
||||
}
|
||||
break;
|
||||
|
||||
case Session::Recording:
|
||||
if (w->get_state() != STATE_ACTIVE) {
|
||||
w->set_state (STATE_ACTIVE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (w->get_state() != STATE_NORMAL) {
|
||||
w->set_state (STATE_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::transport_rec_enable_blink (bool onoff)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -148,7 +148,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
int save_state_canfail (string state_name = "");
|
||||
void save_state (const string & state_name = "");
|
||||
void restore_state (string state_name = "");
|
||||
|
||||
static double gain_to_slider_position (ARDOUR::gain_t g);
|
||||
static ARDOUR::gain_t slider_position_to_gain (double pos);
|
||||
|
|
@ -176,12 +175,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
static sigc::signal<void> SuperRapidScreenUpdate;
|
||||
static sigc::signal<void,nframes_t, bool, nframes_t> Clock;
|
||||
|
||||
/* this is a helper function to centralize the (complex) logic for
|
||||
blinking rec-enable buttons.
|
||||
*/
|
||||
|
||||
void rec_enable_button_blink (bool onoff, ARDOUR::AudioDiskstream *, Gtk::Widget *w);
|
||||
|
||||
void name_io_setup (ARDOUR::AudioEngine&, string&, ARDOUR::IO& io, bool in);
|
||||
|
||||
static gint hide_and_quit (GdkEventAny *ev, ArdourDialog *);
|
||||
|
|
@ -285,10 +278,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void goto_editor_window ();
|
||||
void goto_mixer_window ();
|
||||
|
||||
Gtk::Table adjuster_table;
|
||||
Gtk::Frame adjuster_frame;
|
||||
Gtk::Fixed adjuster_base;
|
||||
|
||||
GlobalClickBox *online_control_button;
|
||||
vector<string> online_control_strings;
|
||||
|
||||
|
|
@ -298,9 +287,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
Gtk::ToggleButton preroll_button;
|
||||
Gtk::ToggleButton postroll_button;
|
||||
|
||||
Gtk::Table transport_table;
|
||||
Gtk::Table option_table;
|
||||
|
||||
int setup_windows ();
|
||||
void setup_transport ();
|
||||
void setup_clock ();
|
||||
|
|
@ -313,7 +299,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
void finish();
|
||||
int ask_about_saving_session (const string & why);
|
||||
int save_the_session;
|
||||
|
||||
/* periodic safety backup, to be precise */
|
||||
gint autosave_session();
|
||||
|
|
@ -351,7 +336,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
void manage_window (Gtk::Window&);
|
||||
|
||||
AudioClock big_clock;
|
||||
Gtk::Frame big_clock_frame;
|
||||
Gtk::Window* big_clock_window;
|
||||
|
||||
void update_transport_clocks (nframes_t pos);
|
||||
|
|
@ -682,9 +666,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
Gtk::MenuItem* jack_reconnect_item;
|
||||
Gtk::Menu* jack_bufsize_menu;
|
||||
|
||||
int make_session_clean ();
|
||||
bool filter_ardour_session_dirs (const Gtk::FileFilter::Info&);
|
||||
|
||||
Glib::RefPtr<Gtk::ActionGroup> common_actions;
|
||||
|
||||
void editor_realized ();
|
||||
|
|
|
|||
|
|
@ -732,8 +732,6 @@ class Editor : public PublicEditor
|
|||
vector<nframes_t> region_boundary_cache;
|
||||
void build_region_boundary_cache ();
|
||||
|
||||
Gtk::VBox trackview_vpacker;
|
||||
|
||||
Gtk::HBox top_hbox;
|
||||
Gtk::HBox bottom_hbox;
|
||||
|
||||
|
|
|
|||
|
|
@ -119,10 +119,6 @@ class RouteUI : public virtual AxisView
|
|||
|
||||
int set_color_from_route ();
|
||||
|
||||
sigc::connection blink_connection;
|
||||
|
||||
void rec_enable_button_blink (bool onoff, ARDOUR::AudioDiskstream *, Gtk::Widget *w);
|
||||
|
||||
void remove_this_route ();
|
||||
static gint idle_remove_this_route (RouteUI *);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,9 +47,7 @@ fastmeter.cc
|
|||
focus_entry.cc
|
||||
grouped_buttons.cc
|
||||
gtk_ui.cc
|
||||
hexentry.cc
|
||||
idle_adjustment.cc
|
||||
pathlist.cc
|
||||
pixfader.cc
|
||||
pixscroller.cc
|
||||
popup.cc
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ UI::UI (string namestr, int *argc, char ***argv)
|
|||
: AbstractUI<UIRequest> (namestr, true)
|
||||
{
|
||||
theMain = new Main (argc, argv);
|
||||
tips = new Tooltips;
|
||||
|
||||
_active = false;
|
||||
_auto_display_errors = true;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#include <gtkmm/style.h>
|
||||
#include <gtkmm/textbuffer.h>
|
||||
#include <gtkmm/main.h>
|
||||
#include <gtkmm/tooltips.h>
|
||||
#include <gdkmm/color.h>
|
||||
#include <pbd/abstract_ui.h>
|
||||
#include <pbd/ringbufferNPT.h>
|
||||
|
|
@ -153,7 +152,6 @@ class UI : public Receiver, public AbstractUI<UIRequest>
|
|||
static pthread_t gui_thread;
|
||||
bool _active;
|
||||
Gtk::Main *theMain;
|
||||
Gtk::Tooltips *tips;
|
||||
TextViewer *errors;
|
||||
Glib::RefPtr<Gtk::TextBuffer::Tag> error_ptag;
|
||||
Glib::RefPtr<Gtk::TextBuffer::Tag> error_mtag;
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 1999 Paul Barton-Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __gtkmm2ext_hexentry_h__
|
||||
#define __gtkmm2ext_hexentry_h__
|
||||
|
||||
#include <gtkmm.h>
|
||||
|
||||
namespace Gtkmm2ext {
|
||||
|
||||
class HexEntry : public Gtk::Entry
|
||||
|
||||
{
|
||||
public:
|
||||
/* Take a byte-level representation of a series of hexadecimal
|
||||
values and use them to set the displayed text of the entry.
|
||||
Eg. if hexbuf[0] = 0xff and hexbuf[1] = 0xa1 and buflen = 2,
|
||||
then the text will be set to "ff a1".
|
||||
*/
|
||||
|
||||
void set_hex (unsigned char *hexbuf, unsigned int buflen);
|
||||
|
||||
/* puts byte-level representation of current entry text
|
||||
into hexbuf, and returns number of bytes written there.
|
||||
|
||||
NOTE: this will release the existing memory pointed to
|
||||
by hexbuf if buflen indicates that it is not long enough
|
||||
to hold the new representation, and hexbuf is not zero.
|
||||
|
||||
If the returned length is zero, the contents of hexbuf
|
||||
are undefined.
|
||||
*/
|
||||
|
||||
unsigned int get_hex (unsigned char *hexbuf, size_t buflen);
|
||||
|
||||
private:
|
||||
bool on_key_press_event (GdkEventKey *);
|
||||
};
|
||||
|
||||
} /* namespace */
|
||||
|
||||
#endif /* __gtkmm2ext_hexentry_h__ */
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2006 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __gtkmm2ext_pathlist_h__
|
||||
#define __gtkmm2ext_pathlist_h__
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <gtkmm.h>
|
||||
|
||||
namespace Gtkmm2ext {
|
||||
|
||||
class PathList : public Gtk::VBox
|
||||
{
|
||||
public:
|
||||
PathList ();
|
||||
~PathList () {};
|
||||
|
||||
std::vector<std::string> get_paths ();
|
||||
void set_paths (std::vector<std::string> paths);
|
||||
|
||||
sigc::signal<void> PathsUpdated;
|
||||
|
||||
protected:
|
||||
Gtk::Button add_btn;
|
||||
Gtk::Button subtract_btn;
|
||||
|
||||
void add_btn_clicked ();
|
||||
void subtract_btn_clicked ();
|
||||
|
||||
private:
|
||||
struct PathColumns : public Gtk::TreeModel::ColumnRecord {
|
||||
PathColumns() { add (paths); }
|
||||
Gtk::TreeModelColumn<std::string> paths;
|
||||
};
|
||||
PathColumns path_columns;
|
||||
|
||||
Glib::RefPtr<Gtk::ListStore> _store;
|
||||
Gtk::TreeView _view;
|
||||
|
||||
void selection_changed ();
|
||||
};
|
||||
|
||||
} // namespace Gtkmm2ext
|
||||
|
||||
#endif // __gtkmm2ext_pathlist_h__
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2000 Paul Barton-Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h> /* for sprintf, sigh ... */
|
||||
#include <string>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gtkmm2ext/hexentry.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
bool
|
||||
HexEntry::on_key_press_event (GdkEventKey *ev)
|
||||
|
||||
{
|
||||
if ((ev->keyval >= GDK_a && ev->keyval <= GDK_f) ||
|
||||
(ev->keyval >= GDK_A && ev->keyval <= GDK_A) ||
|
||||
(ev->keyval >= GDK_0 && ev->keyval <= GDK_9) ||
|
||||
ev->keyval == GDK_space ||
|
||||
ev->keyval == GDK_Tab ||
|
||||
ev->keyval == GDK_Return ||
|
||||
ev->keyval == GDK_BackSpace ||
|
||||
ev->keyval == GDK_Delete) {
|
||||
return Gtk::Entry::on_key_press_event (ev);
|
||||
} else {
|
||||
gdk_beep ();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HexEntry::set_hex (unsigned char *msg, unsigned int len)
|
||||
|
||||
{
|
||||
/* create a textual representation of the MIDI message */
|
||||
|
||||
if (msg && len) {
|
||||
char *rep;
|
||||
|
||||
rep = new char[(len * 3) + 1];
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
sprintf (&rep[i*3], "%02x ", msg[i]);
|
||||
}
|
||||
rep[len * 3] = '\0';
|
||||
set_text (rep);
|
||||
delete [] rep;
|
||||
} else {
|
||||
set_text ("");
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int
|
||||
HexEntry::get_hex (unsigned char *hexbuf, size_t buflen)
|
||||
|
||||
{
|
||||
int fetched_len;
|
||||
char buf[3];
|
||||
string text = get_text();
|
||||
string::size_type length = text.length ();
|
||||
string::size_type offset;
|
||||
|
||||
fetched_len = 0;
|
||||
buf[2] = '\0';
|
||||
offset = 0;
|
||||
|
||||
while (1) {
|
||||
offset = text.find_first_of ("abcdef0123456789", offset);
|
||||
|
||||
if (offset == string::npos) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* grab two characters, but no more */
|
||||
|
||||
buf[0] = text[offset];
|
||||
|
||||
if (offset < length - 1) {
|
||||
buf[1] = text[offset+1];
|
||||
offset += 2;
|
||||
} else {
|
||||
buf[1] = '\0';
|
||||
offset += 1;
|
||||
}
|
||||
|
||||
hexbuf[fetched_len++] = (char) strtol (buf, 0, 16);
|
||||
}
|
||||
|
||||
return fetched_len;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2006 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include <gtkmm2ext/pathlist.h>
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
PathList::PathList ()
|
||||
:
|
||||
add_btn(_("+")),
|
||||
subtract_btn(_("-")),
|
||||
path_columns(),
|
||||
_store(Gtk::ListStore::create(path_columns)),
|
||||
_view(_store)
|
||||
{
|
||||
_view.append_column(_("Paths"), path_columns.paths);
|
||||
_view.set_size_request(-1, 100);
|
||||
_view.set_headers_visible (false);
|
||||
|
||||
Gtk::ScrolledWindow* scroll = manage(new Gtk::ScrolledWindow);
|
||||
scroll->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
|
||||
scroll->add(_view);
|
||||
|
||||
add (*scroll);
|
||||
|
||||
Gtk::HBox* btn_box = manage(new Gtk::HBox);
|
||||
btn_box->add(add_btn);
|
||||
btn_box->add(subtract_btn);
|
||||
|
||||
add (*btn_box);
|
||||
|
||||
add_btn.signal_clicked().connect (mem_fun(*this, &PathList::add_btn_clicked));
|
||||
subtract_btn.signal_clicked().connect (mem_fun(*this, &PathList::subtract_btn_clicked));
|
||||
_view.get_selection()->signal_changed().connect (mem_fun(*this, &PathList::selection_changed));
|
||||
}
|
||||
|
||||
vector<string>
|
||||
PathList::get_paths ()
|
||||
{
|
||||
vector<string> paths;
|
||||
|
||||
Gtk::TreeModel::Children children(_store->children());
|
||||
|
||||
for (Gtk::TreeIter iter = children.begin(); iter != children.end(); ++iter) {
|
||||
Gtk::ListStore::Row row = *iter;
|
||||
|
||||
paths.push_back(row[path_columns.paths]);
|
||||
}
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
void
|
||||
PathList::set_paths (vector<string> paths)
|
||||
{
|
||||
_store->clear();
|
||||
|
||||
for (vector<string>::iterator i = paths.begin(); i != paths.end(); ++i) {
|
||||
Gtk::ListStore::iterator iter = _store->append();
|
||||
Gtk::ListStore::Row row = *iter;
|
||||
row[path_columns.paths] = *i;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PathList::add_btn_clicked ()
|
||||
{
|
||||
Gtk::FileChooserDialog path_chooser (_("Path Chooser"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
|
||||
path_chooser.add_button (Gtk::Stock::ADD, Gtk::RESPONSE_OK);
|
||||
path_chooser.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||
|
||||
int result = path_chooser.run ();
|
||||
|
||||
if (result == Gtk::RESPONSE_OK) {
|
||||
string pathname = path_chooser.get_filename();
|
||||
|
||||
if (pathname.length ()) {
|
||||
Gtk::ListStore::iterator iter = _store->append ();
|
||||
Gtk::ListStore::Row row = *iter;
|
||||
row[path_columns.paths] = pathname;
|
||||
|
||||
PathsUpdated (); // EMIT_SIGNAL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PathList::subtract_btn_clicked ()
|
||||
{
|
||||
Gtk::ListStore::iterator iter = _view.get_selection()->get_selected();
|
||||
_store->erase (iter);
|
||||
|
||||
PathsUpdated (); // EMIT_SIGNAL
|
||||
}
|
||||
|
||||
void
|
||||
PathList::selection_changed ()
|
||||
{
|
||||
if (_view.get_selection()->count_selected_rows ()) {
|
||||
subtract_btn.set_sensitive (true);
|
||||
} else {
|
||||
subtract_btn.set_sensitive (false);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue