What am I doing wrong?
- Date: Sun, 16 Aug 2015 01:42:39 -0400
- From: Igor Korot <ikorot01@xxxxxxxxx>
- Subject: What am I doing wrong?
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?
gtk-list mailing list