[Vala] Newbie need help



Hi all,
i tryed to do this. (Ubuntu 18, libvala-0.40)

var gicon = GLib.ContentType.get_icon("text/x-vala");
var resourceIcon = IconTheme.get_default().lookup_by_gicon(gicon, 16, IconLookupFlags.FORCE_SIZE).load_icon();

But i get a lot of warnings ???

warning: ‘gtk_icon_info_free’ is deprecated: Use 'g_object_unref' instead [-Wdeprecated-declarations]
     resourceIcon = IconTheme.get_default().lookup_by_gicon(gicon, 16, 
IconLookupFlags.FORCE_SIZE).load_icon();
   ^ ~~~~~~~~~~~~~~~~~~
...
/usr/include/gtk-3.0/gtk/gtkicontheme.h:284:23: note: declared here
 void                 
 gtk_icon_info_free               
(GtkIconInfo  *icon_info);
                      
 ^~~~~~~~~~~~~~~~~~
...
warning: ‘gtk_icon_info_free’ is deprecated: Use 'g_object_unref' instead [-Wdeprecated-declarations]
      retVal = IconTheme.get_default().lookup_by_gicon(gicon, 16, 
IconLookupFlags.FORCE_SIZE).load_icon();
    ^ ~~~~~~~~~~~~~~~~~~
...
/usr/include/gtk-3.0/gtk/gtkicontheme.h:284:23: note: declared here
 void                 
 gtk_icon_info_free               
(GtkIconInfo  *icon_info);
                      
 ^~~~~~~~~~~~~~~~~~





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