What am I doing wrong?

Hi, ALL,
I'm trying to port GTK+2 app to GTK+3.

In GTK+2 I have following code:
        continuebtn = gtk_assert_dialog_add_button (dlg, "_Continue",

I'm trying to rewrite it as follows:

        continuebtn = gtk_button_new_with_mnemonic( "_Continue" );
        GtkWidget *image = gtk_image_new_from_icon_name(
"emblem-default", GTK_ICON_SIZE_DIALOG );
        gtk_button_set_image( GTK_BUTTON( continuebtn ), image );
        gtk_dialog_add_action_widget (GTK_DIALOG (dlg), continuebtn,

However the image is not displayed on the button.
I can't call gtk_window_set_icon_name() as GtkButton is not GtkWindow
and I'm getting a compiler error.

So how do I make a button display my named icon?

Thank you.

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