diff options
author | David Robillard <d@drobilla.net> | 2014-01-07 03:25:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-07 03:25:15 +0000 |
commit | d30907023903bc7b4a2de16d3fe5d7674861e394 (patch) | |
tree | 8395666227b585b7988361e541e689237b57bb97 /src/gui/App.cpp | |
parent | 9a030ad5599aa88c3034d44b63359c7469785eda (diff) | |
download | ingen-d30907023903bc7b4a2de16d3fe5d7674861e394.tar.gz ingen-d30907023903bc7b4a2de16d3fe5d7674861e394.tar.bz2 ingen-d30907023903bc7b4a2de16d3fe5d7674861e394.zip |
Remove unused plugin icon stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5295 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/App.cpp')
-rw-r--r-- | src/gui/App.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 5a04ebf6..357f4a4a 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -363,57 +363,6 @@ App::quit(Gtk::Window* dialog_parent) return quit; } -struct IconDestroyNotification { - IconDestroyNotification(App& a, pair<string, int> k) - : app(a) - , key(k) - {} - - App& app; - pair<string, int> key; -}; - -Glib::RefPtr<Gdk::Pixbuf> -App::icon_from_path(const string& path, int size) -{ - Glib::RefPtr<Gdk::Pixbuf> buf; - if (path.length() == 0) - return buf; - - Icons::iterator iter = _icons.find(make_pair(path, size)); - - if (iter != _icons.end()) { - // we need to reference manually since the RefPtr constructor doesn't do it - iter->second->reference(); - return Glib::RefPtr<Gdk::Pixbuf>(iter->second); - } - - try { - buf = Gdk::Pixbuf::create_from_file(path, size, size); - _icons.insert(make_pair(make_pair(path, size), buf.operator->())); - buf->add_destroy_notify_callback( - new IconDestroyNotification(*this, make_pair(path, size)), - &App::icon_destroyed); - } catch (const Glib::Error& e) { - log().warn(fmt("Error loading icon %1%: %2%\n") - % path % e.what()); - } - return buf; -} - -void* -App::icon_destroyed(void* data) -{ - IconDestroyNotification* note = (IconDestroyNotification*)data; - Icons::iterator iter = note->app._icons.find(note->key); - if (iter != note->app._icons.end()) - note->app._icons.erase(iter); - - delete note; // allocated in App::icon_from_path - - return NULL; -} - bool App::can_control(const Client::PortModel* port) const { |