Gtk Icontheme list_icons not behaving as advertised



Hey,

According to the docs when calling the icontheme list_icons method you
can supply a string argument which should restrict the list of returned
icons to those which match the argument. However when I supply anything
other than null to the function no icons are returned. 

I am having the problem in a Gtk-sharp application but I tested it in
python also and found the same behavior which led me to believe I either
am not understanding it correctly or its not yet implemented in Gtk.

Mono Example:
string[] icons = Gnome.IconTheme.Default.ListIcons("emblem");

foreach(string i in icons) {
Console.WriteLine(i);
}

returns no icons

Python Example

import gtk
theme = gtk.icon_theme_get_default()
test = theme.list_icons("emblem")

returns no icons 

It doesnt seem to respect the argument. The only way I can successfully
filter the icon theme is to do the following

string[] icons = Gnome.IconTheme.Default.ListIcons(null);
foreach(string i in icons) {
if (i.IndexOf("emblem") != -1) {
Console.WriteLine(i);
}
}

Also if I print the path of the returned icons they seem to be coming
from a mixture of the gnome theme and the Tango theme (which is my
selected icon theme)

Whats going on?

John






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]