summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2008-04-16 00:38:09 +0000
committerTim Mayberry <mojofunk@gmail.com>2008-04-16 00:38:09 +0000
commit656524c23e7ddf07d98c4b87a44a8a18d0f3c4a6 (patch)
tree29c135121eb46888e4745847279360324f3084b3 /libs/gtkmm2ext
parentda91ac66864edc77ed64ab6d2ecfc5b0f5778812 (diff)
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
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/SConscript2
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc1
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtk_ui.h2
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/hexentry.h58
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/pathlist.h63
-rw-r--r--libs/gtkmm2ext/hexentry.cc111
-rw-r--r--libs/gtkmm2ext/pathlist.cc124
7 files changed, 0 insertions, 361 deletions
diff --git a/libs/gtkmm2ext/SConscript b/libs/gtkmm2ext/SConscript
index ddeabdccdd..8c5d926493 100644
--- a/libs/gtkmm2ext/SConscript
+++ b/libs/gtkmm2ext/SConscript
@@ -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
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 31239e79df..cf75e59e8b 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.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;
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
index dbc6e6d611..e114693aee 100644
--- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
+++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
@@ -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;
diff --git a/libs/gtkmm2ext/gtkmm2ext/hexentry.h b/libs/gtkmm2ext/gtkmm2ext/hexentry.h
deleted file mode 100644
index 410f54274e..0000000000
--- a/libs/gtkmm2ext/gtkmm2ext/hexentry.h
+++ /dev/null
@@ -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__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/pathlist.h b/libs/gtkmm2ext/gtkmm2ext/pathlist.h
deleted file mode 100644
index f4a5973d5a..0000000000
--- a/libs/gtkmm2ext/gtkmm2ext/pathlist.h
+++ /dev/null
@@ -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__
diff --git a/libs/gtkmm2ext/hexentry.cc b/libs/gtkmm2ext/hexentry.cc
deleted file mode 100644
index 9862cac435..0000000000
--- a/libs/gtkmm2ext/hexentry.cc
+++ /dev/null
@@ -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;
-}
-
-
diff --git a/libs/gtkmm2ext/pathlist.cc b/libs/gtkmm2ext/pathlist.cc
deleted file mode 100644
index 7b3448ed5f..0000000000
--- a/libs/gtkmm2ext/pathlist.cc
+++ /dev/null
@@ -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);
- }
-}