1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
void OnUpdate3(GtkButton *button, gpointer user_data)
{
gchar *sText = NULL;
MainWindow *pApp;
GtkWidget *pAbout;
GtkWidget *pAbout2;
/* Recuperation de data */
pApp = (MainWindow*) user_data;
/* Recuperation du texte contenu dans le GtkEntry */
sText = gtk_entry_get_text(GTK_ENTRY(pApp->pEntry));
printf("%s\n", sText);
printf("%s -> %s\n", pApp->P_Mot_francais, pApp->P_Mot_anglais);
if (strcmp(sText, pApp->P_Mot_anglais) == 0) // Si strcmp renvoie 0 (chaînes identiques)
{
OnAboutBtn(pApp->pButton2, pApp->pWindow);
}
else /* An espresso */
{
OnAboutBtn2(pApp->pButton2, pApp->pWindow);
}
} |
Partager