~ubuntu-branches/ubuntu/quantal/gtkmm3.0/quantal

« back to all changes in this revision

Viewing changes to gtk/gtkmm/icontheme.cc

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 09:25:06 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20120928092506-9h63ais5o750a8sk
Tags: 3.5.13-0ubuntu1
* New upstream release
* debian/control:
  - Bump build-depends on libglibmm-2.4-dev, libgtk-3-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
std::vector<int> IconTheme::get_icon_sizes(const Glib::ustring& icon_name) const
49
49
{
50
50
  int* pArrayInts = gtk_icon_theme_get_icon_sizes(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str());
51
 
  
 
51
 
52
52
  //pArrayInts is null-terminated.
53
53
  return Glib::ArrayHandler<int>::array_to_vector(pArrayInts, Glib::OWNERSHIP_SHALLOW);
54
54
}
55
 
  
 
55
 
56
56
std::vector<Glib::ustring> IconTheme::list_icons() const
57
57
{
58
58
  return Glib::ListHandler<Glib::ustring>::list_to_vector(gtk_icon_theme_list_icons(const_cast<GtkIconTheme*>(gobj()), 0 /* means all icons according to the C documentation. */ ), Glib::OWNERSHIP_SHALLOW);
260
260
{
261
261
 
262
262
  Glib::RefPtr<IconTheme> retvalue = Glib::wrap(gtk_icon_theme_get_default());
263
 
 
264
263
  if(retvalue)
265
264
    retvalue->reference(); //The function does not do a ref for us
266
265
  return retvalue;
271
270
{
272
271
 
273
272
  Glib::RefPtr<IconTheme> retvalue = Glib::wrap(gtk_icon_theme_get_for_screen(Glib::unwrap(screen)));
274
 
 
275
273
  if(retvalue)
276
274
    retvalue->reference(); //The function does not do a ref for us
277
275
  return retvalue;
280
278
 
281
279
void IconTheme::set_screen(const Glib::RefPtr<Gdk::Screen>& screen)
282
280
{
283
 
  gtk_icon_theme_set_screen(gobj(), Glib::unwrap(screen)); 
 
281
  gtk_icon_theme_set_screen(gobj(), Glib::unwrap(screen));
284
282
}
285
283
 
286
284
void IconTheme::append_search_path(const Glib::ustring& path)
287
285
{
288
 
  gtk_icon_theme_append_search_path(gobj(), path.c_str()); 
 
286
  gtk_icon_theme_append_search_path(gobj(), path.c_str());
289
287
}
290
288
 
291
289
void IconTheme::prepend_search_path(const Glib::ustring& path)
292
290
{
293
 
  gtk_icon_theme_prepend_search_path(gobj(), path.c_str()); 
 
291
  gtk_icon_theme_prepend_search_path(gobj(), path.c_str());
294
292
}
295
293
 
296
294
void IconTheme::set_custom_theme(const Glib::ustring& theme_name)
297
295
{
298
 
  gtk_icon_theme_set_custom_theme(gobj(), theme_name.c_str()); 
 
296
  gtk_icon_theme_set_custom_theme(gobj(), theme_name.c_str());
299
297
}
300
298
 
301
299
bool IconTheme::has_icon(const Glib::ustring& icon_name) const
324
322
  Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_theme_load_icon(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str(), size, ((GtkIconLookupFlags)(flags)), &(gerror)));
325
323
  if(gerror)
326
324
    ::Glib::Error::throw_exception(gerror);
327
 
 
328
325
  return retvalue;
329
 
 
330
326
}
331
327
 
332
328
std::vector<Glib::ustring> IconTheme::list_icons(const Glib::ustring& context) const
351
347
 
352
348
void IconTheme::add_builtin_icon(const Glib::ustring& icon_name, int size, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
353
349
{
354
 
gtk_icon_theme_add_builtin_icon(icon_name.c_str(), size, Glib::unwrap(pixbuf));
 
350
  gtk_icon_theme_add_builtin_icon(icon_name.c_str(), size, Glib::unwrap(pixbuf));
355
351
}
356
352
 
357
353