- m_dialogStyle = style;
-
- int text_pos_x = 15;
-
- if (m_dialogStyle & wxICON_MASK)
- text_pos_x += 80;
-
- wxSize message_size( wxSplitMessage2( message, this, text_pos_x ) );
-
- if (m_dialogStyle & wxICON_MASK)
+ GtkWindow * const parent = m_parent ? GTK_WINDOW(m_parent->m_widget) : NULL;
+
+#if wxUSE_LIBHILDON
+ const char *stockIcon;
+ if ( m_dialogStyle & wxICON_ERROR )
+ stockIcon = "qgn_note_gene_syserror";
+ else if ( m_dialogStyle & wxICON_EXCLAMATION )
+ stockIcon = "qgn_note_gene_syswarning";
+ else if ( m_dialogStyle & wxICON_INFORMATION )
+ stockIcon = "qgn_note_info";
+ else if ( m_dialogStyle & wxICON_QUESTION )
+ stockIcon = "qgn_note_confirm";
+ else
+ stockIcon = "";
+
+ // there is no generic note creation function in public API so we have no
+ // choice but to use g_object_new() directly
+ m_widget = (GtkWidget *)g_object_new
+ (
+ HILDON_TYPE_NOTE,
+ "note_type", HILDON_NOTE_CONFIRMATION_BUTTON_TYPE,
+ "description", (const char *)GetFullMessage().utf8_str(),
+ "icon", stockIcon,
+ NULL
+ );
+#else // !wxUSE_LIBHILDON
+ GtkMessageType type = GTK_MESSAGE_ERROR;
+ GtkButtonsType buttons = GTK_BUTTONS_OK;
+
+ if (m_dialogStyle & wxYES_NO)