| 35 #include "util.h" |
35 #include "util.h" |
| 36 #include "core.h" |
36 #include "core.h" |
| 37 |
37 |
| 38 #include "gtkblist.h" |
38 #include "gtkblist.h" |
| 39 #include "gtkdialogs.h" |
39 #include "gtkdialogs.h" |
| 40 #include "gtkimhtml.h" |
|
| 41 #include "gtkimhtmltoolbar.h" |
|
| 42 #include "gtklog.h" |
40 #include "gtklog.h" |
| 43 #include "gtkutils.h" |
41 #include "gtkutils.h" |
| |
42 #include "gtkwebview.h" |
| 44 #include "pidginstock.h" |
43 #include "pidginstock.h" |
| |
44 |
| |
45 |
| 45 |
46 |
| 46 static GList *dialogwindows = NULL; |
47 static GList *dialogwindows = NULL; |
| 47 |
48 |
| 48 static GtkWidget *about = NULL; |
49 static GtkWidget *about = NULL; |
| 49 |
50 |
| 437 tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); |
438 tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); |
| 438 atk_object_set_description(obj, tmp); |
439 atk_object_set_description(obj, tmp); |
| 439 g_free(tmp); |
440 g_free(tmp); |
| 440 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
441 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
| 441 |
442 |
| 442 frame = pidgin_create_imhtml(FALSE, &text, NULL, NULL); |
443 scrolled_window = gtk_scrolled_window_new (NULL, NULL); |
| 443 gtk_imhtml_set_format_functions(GTK_IMHTML(text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY); |
444 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN); |
| 444 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
445 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
| |
446 |
| |
447 web_view = gtk_webview_new (); |
| |
448 gtk_container_add (GTK_CONTAINER (scrolled_window), web_view); |
| |
449 |
| |
450 gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0); |
| 445 |
451 |
| 446 str = g_string_sized_new(4096); |
452 str = g_string_sized_new(4096); |
| 447 |
453 |
| 448 g_string_append_printf(str, |
454 g_string_append_printf(str, |
| 449 "<CENTER><FONT SIZE=\"4\"><B>%s %s</B></FONT></CENTER><BR>(libpurple %s)<BR><BR>", PIDGIN_NAME, DISPLAY_VERSION, purple_core_get_version()); |
455 "<CENTER><FONT SIZE=\"4\"><B>%s %s</B></FONT></CENTER><BR>(libpurple %s)<BR><BR>", PIDGIN_NAME, DISPLAY_VERSION, purple_core_get_version()); |
| 680 #endif |
686 #endif |
| 681 #endif |
687 #endif |
| 682 |
688 |
| 683 /* End of not to be translated section */ |
689 /* End of not to be translated section */ |
| 684 |
690 |
| 685 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
691 webkit_web_view_load_html_string (WEBKIT_WEB_VIEW(web_view), str->str, ""); |
| 686 g_string_free(str, TRUE); |
692 g_string_free(str, TRUE); |
| 687 |
693 |
| 688 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
|
| 689 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
|
| 690 |
694 |
| 691 /* Close Button */ |
695 /* Close Button */ |
| 692 button = pidgin_dialog_add_button(GTK_DIALOG(about), GTK_STOCK_CLOSE, |
696 button = pidgin_dialog_add_button(GTK_DIALOG(about), GTK_STOCK_CLOSE, |
| 693 G_CALLBACK(destroy_about), about); |
697 G_CALLBACK(destroy_about), about); |
| 694 |
698 |