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
|
/* Variables */
..
GtkWidget* Signature = NULL;
gchar* SignConverti = NULL;
GtkWidget *p_Bottom_box = NULL;
...
/* Creation des conteneurs*/
...
p_Bottom_box = gtk_vbox_new (FALSE, 0);
/*Création de la signature*/
SignConverti = g_locale_to_utf8("<span face=\"Verdana\" foreground=\"#39b500\" size=\"large\">By Toto</span>\n", -1, NULL, NULL, NULL);
Signature=gtk_label_new(SignConverti); /* Application de la convertion à notre label*/
g_free(SignConverti); /* Libération de la mémoire*/
gtk_label_set_use_markup(GTK_LABEL(Signature), TRUE); /* On dit que l'on utilise les balises pango*/
gtk_label_set_justify(GTK_LABEL(Signature), GTK_JUSTIFY_CENTER); /* On centre notre texte*/
gtk_box_pack_start (GTK_BOX (p_Bottom_box), Signature, TRUE, TRUE, 5);
...
gtk_widget_show_all(MainWindow);
gtk_main();
return EXIT_SUCCESS; |
Partager