Web lists-archives.com

Re: WHere is the icons




Hi,

On Tue, Aug 11, 2015 at 7:52 PM, Allin Cottrell <cottrell@xxxxxxx> wrote:
> On Wed, 12 Aug 2015, Daniel Kasak wrote:
>
>> On Wed, Aug 12, 2015 at 7:15 AM, Igor Korot <ikorot01@xxxxxxxxx> wrote:
>>
>>> Daniel,
>>>
>>> On Tue, Aug 11, 2015 at 2:09 AM, Daniel Kasak <d.j.kasak.dk@xxxxxxxxx>
>>> wrote:
>>>>
>>>> I posted on this topic a little while back ( a month or 2 from memory ).
>>>
>>> The
>>>>
>>>> icon theme you're using has to have icons of the same name that you're
>>>> trying to use. If you're using a 'default' ( eg adwaita ) icon theme in
>>>> conjunction with icon names that used to work a couple of years ago,
>>>
>>> you're
>>>>
>>>> likely to have issues. Either choose an older icon theme, or migrate to
>>>
>>> the
>>>>
>>>> new 'best practices'.
>>>
>>>
>>> Problem is I am not running under GNOME. I have KDE4 installed on my
>>> machine and
>>> I'm trying to port the GTK2 app to work with GTK3.
>>>
>>
>> I don't use KDE, but I recommend using Gnome, at least until you're on top
>> of these issues. Read up on the ways of setting your icon theme if you're
>> not going to use Gnome. I don't use Gnome either, by the way ( and so I
>> know what it's like to get gtk+ to play nicely outside it ).
>
>
> I'm a big enthusiast for Gtk in general but this is one reason why I prefer
> Gtk 2 for cross-platform usage (though I'm mostly OK with Gtk 3 on
> gnome-aware Linux). As of version 2, Gtk used to be completely
> gnome-independent.

I came up with the following code:

[code]
#if GTK_CHECK_VERSION( 3, 10, 0 )
    if( !gtk_check_version( 3, 10, 0 ) )
    {
        GtkIconTheme *theme = gtk_icon_theme_get_default();
        GError *error = NULL;
        GdkPixbuf *pixbuf = gtk_icon_theme_load_icon( theme,
"document-save", GTK_ICON_SIZE_BUTTON,
GTK_ICON_LOOKUP_GENERIC_FALLBACK, &error );
        if( !pixbuf )
        {
            g_warning( "Couldn't find the icon" );
            g_error_free( error );
        }
        else
        {
            image = gtk_image_new_from_pixbuf( pixbuf );
            g_object_unref( pixbuf );
        }
//        continuebtn = gtk_assert_dialog_add_button( dlg,
"_Continue", "yes", GTK_ASSERT_DIALOG_CONTINUE);
    }
    else
#endif
    {
        wxGCC_WARNING_SUPPRESS(deprecated-declarations);
        continuebtn = gtk_assert_dialog_add_button (dlg, "_Continue",
GTK_STOCK_YES, GTK_ASSERT_DIALOG_CONTINUE);
    wxGCC_WARNING_RESTORE();
    }
[/code]

Now this code for 2.x is using GTK_STOCK_YES.
Is there a named icon I can use instead. Or even more: is there a list
of named icons I can check along with the actual icons?

Thank you.

>
> Allin Cottrell
>
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list