Re: Changing the icon in GtkMessageDialog



Le dimanche 23 janvier 2005 �1:17 -0800, Pramod Patangay a �it :
> Hi,
> 
> I would like to use GtkMessageDialog but how can I
> change the default icon that appears on the dialog
> using Stock items. I'd like to change the icon for
> GTK_MESSAGE_INFO type to use say
> GTK_STOCK_DIALOG_ERROR, how can I achieve this?
> 
> Thanks

You can use:

gtk_message_dialog_new          (GtkWindow *parent,
                                             GtkDialogFlags flags,
                                             GtkMessageType type,
                                             GtkButtonsType buttons,
                                             const gchar *message_format,
                                             ...);

GtkMessageType is one of:
typedef enum
{
  GTK_MESSAGE_INFO,
  GTK_MESSAGE_WARNING,
  GTK_MESSAGE_QUESTION,
  GTK_MESSAGE_ERROR
} GtkMessageType;

If you want still another icon, build the equivalent from GtkDialog

Regards,
Jean




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