| 36 #include "util.h" |
36 #include "util.h" |
| 37 #include "core.h" |
37 #include "core.h" |
| 38 |
38 |
| 39 #include "gtkblist.h" |
39 #include "gtkblist.h" |
| 40 #include "gtkdialogs.h" |
40 #include "gtkdialogs.h" |
| 41 #include "gtkimhtml.h" |
|
| 42 #include "gtkimhtmltoolbar.h" |
|
| 43 #include "gtklog.h" |
41 #include "gtklog.h" |
| 44 #include "gtkutils.h" |
42 #include "gtkutils.h" |
| |
43 #include "gtkwebview.h" |
| 45 #include "pidginstock.h" |
44 #include "pidginstock.h" |
| |
45 |
| |
46 |
| 46 |
47 |
| 47 static GList *dialogwindows = NULL; |
48 static GList *dialogwindows = NULL; |
| 48 |
49 |
| 49 static GtkWidget *about = NULL; |
50 static GtkWidget *about = NULL; |
| 50 |
51 |
| 441 tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); |
442 tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); |
| 442 atk_object_set_description(obj, tmp); |
443 atk_object_set_description(obj, tmp); |
| 443 g_free(tmp); |
444 g_free(tmp); |
| 444 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
445 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
| 445 |
446 |
| 446 frame = pidgin_create_imhtml(FALSE, &text, NULL, NULL); |
447 scrolled_window = gtk_scrolled_window_new (NULL, NULL); |
| 447 gtk_imhtml_set_format_functions(GTK_IMHTML(text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY); |
448 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN); |
| 448 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
449 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
| |
450 |
| |
451 web_view = gtk_webview_new (); |
| |
452 gtk_container_add (GTK_CONTAINER (scrolled_window), web_view); |
| |
453 |
| |
454 gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0); |
| 449 |
455 |
| 450 str = g_string_sized_new(4096); |
456 str = g_string_sized_new(4096); |
| 451 |
457 |
| 452 g_string_append_printf(str, |
458 g_string_append_printf(str, |
| 453 "<CENTER><FONT SIZE=\"4\"><B>%s %s</B></FONT></CENTER><BR>(libpurple %s)<BR>%s<BR><BR>", PIDGIN_NAME, DISPLAY_VERSION, purple_core_get_version(), REVISION); |
459 "<CENTER><FONT SIZE=\"4\"><B>%s %s</B></FONT></CENTER><BR>(libpurple %s)<BR>%s<BR><BR>", PIDGIN_NAME, DISPLAY_VERSION, purple_core_get_version(), REVISION); |
| 696 #endif |
702 #endif |
| 697 #endif |
703 #endif |
| 698 |
704 |
| 699 /* End of not to be translated section */ |
705 /* End of not to be translated section */ |
| 700 |
706 |
| 701 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
707 webkit_web_view_load_html_string (WEBKIT_WEB_VIEW(web_view), str->str, ""); |
| 702 g_string_free(str, TRUE); |
708 g_string_free(str, TRUE); |
| 703 |
709 |
| 704 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
|
| 705 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
|
| 706 |
710 |
| 707 /* Close Button */ |
711 /* Close Button */ |
| 708 button = pidgin_dialog_add_button(GTK_DIALOG(about), GTK_STOCK_CLOSE, |
712 button = pidgin_dialog_add_button(GTK_DIALOG(about), GTK_STOCK_CLOSE, |
| 709 G_CALLBACK(destroy_about), about); |
713 G_CALLBACK(destroy_about), about); |
| 710 |
714 |