[gtkmm] Demo: IconTheme: Don't use deprecated builtin-icon API.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Demo: IconTheme: Don't use deprecated builtin-icon API.
- Date: Tue, 30 Jun 2015 09:34:42 +0000 (UTC)
commit c4e1b11ff91574812614d441bc5c6f8c8c183464
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Jun 30 11:31:55 2015 +0200
Demo: IconTheme: Don't use deprecated builtin-icon API.
By the way, there is now a separate icon browser in gtk+'s demos/.
Maybe we should create a version of that instead. I think this C++
code never corresponded to anything in the GTK+ demo.
demos/gtk-demo/example_icontheme.cc | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/example_icontheme.cc b/demos/gtk-demo/example_icontheme.cc
index a2df468..7421ec0 100644
--- a/demos/gtk-demo/example_icontheme.cc
+++ b/demos/gtk-demo/example_icontheme.cc
@@ -179,17 +179,14 @@ Glib::RefPtr<Gtk::TreeModel> Example_IconTheme::create_model()
}
}
- Gtk::IconInfo icon_info = m_IconTheme->lookup_icon(*iconiter, minsize, Gtk::ICON_LOOKUP_USE_BUILTIN);
+ Gtk::IconInfo icon_info = m_IconTheme->lookup_icon(*iconiter, minsize);
// Populate icon column.
if (icon_info)
{
try
{
- if (icon_info.get_filename().empty())
- row[m_columns.icon] = icon_info.get_builtin_pixbuf();
- else
- row[m_columns.icon] = icon_info.load_icon();
+ row[m_columns.icon] = icon_info.load_icon();
}
catch (const Gdk::PixbufError& err)
{
@@ -269,7 +266,7 @@ void Example_IconTheme::on_selection_changed()
std::max_element(sizes.begin(), sizes.end());
const int maxsize = (sizeiter != sizes.end() && *sizeiter > 48) ? *sizeiter : 48;
- m_Image.set(m_IconTheme->load_icon(icon_name, maxsize, Gtk::ICON_LOOKUP_USE_BUILTIN));
+ m_Image.set(m_IconTheme->load_icon(icon_name, maxsize));
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]