Icon from stock/set with dialog_size and anothers size dont work



GtkWidget* create_icon(char *icon_name) {
    char c[128];
    
    GtkIconFactory *icon_factory;
    icon_factory = gtk_icon_factory_new();
    
    GtkWidget *icon;
    GtkIconSource *icon_source;
    GtkIconSet *icon_set;
    icon_set = gtk_icon_set_new();
    icon_source = gtk_icon_source_new();
    strcpy(c,file_path(icon_name));
    gtk_icon_source_set_filename(icon_source,c);
    gtk_icon_set_add_source(icon_set,icon_source);
    //icon = gtk_image_new_from_icon_set(icon_set,GTK_ICON_SIZE_DIALOG);
    
    gtk_icon_factory_add(icon_factory,icon_name,icon_set);
    gtk_icon_factory_add_default(icon_factory);
    
    icon = gtk_image_new_from_stock(icon_name,GTK_ICON_SIZE_DIALOG);
    
    return icon;
}

and every create with a toolbar_small size...

somebody know how to do it work?
tks a lot


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