| 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 |
| 438 tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); |
439 tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL); |
| 439 atk_object_set_description(obj, tmp); |
440 atk_object_set_description(obj, tmp); |
| 440 g_free(tmp); |
441 g_free(tmp); |
| 441 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
442 gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); |
| 442 |
443 |
| 443 frame = pidgin_create_imhtml(FALSE, &text, NULL, NULL); |
444 scrolled_window = gtk_scrolled_window_new (NULL, NULL); |
| 444 gtk_imhtml_set_format_functions(GTK_IMHTML(text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY); |
445 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN); |
| 445 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
446 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
| |
447 |
| |
448 web_view = gtk_webview_new (); |
| |
449 gtk_container_add (GTK_CONTAINER (scrolled_window), web_view); |
| |
450 |
| |
451 gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0); |
| 446 |
452 |
| 447 str = g_string_sized_new(4096); |
453 str = g_string_sized_new(4096); |
| 448 |
454 |
| 449 g_string_append_printf(str, |
455 g_string_append_printf(str, |
| 450 "<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); |
456 "<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); |
| 681 #endif |
687 #endif |
| 682 #endif |
688 #endif |
| 683 |
689 |
| 684 /* End of not to be translated section */ |
690 /* End of not to be translated section */ |
| 685 |
691 |
| 686 gtk_imhtml_append_text(GTK_IMHTML(text), str->str, GTK_IMHTML_NO_SCROLL); |
692 webkit_web_view_load_html_string (WEBKIT_WEB_VIEW(web_view), str->str, ""); |
| 687 g_string_free(str, TRUE); |
693 g_string_free(str, TRUE); |
| 688 |
694 |
| 689 gtk_text_buffer_get_start_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
|
| 690 gtk_text_buffer_place_cursor(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)), &iter); |
|
| 691 |
695 |
| 692 /* Close Button */ |
696 /* Close Button */ |
| 693 button = pidgin_dialog_add_button(GTK_DIALOG(about), GTK_STOCK_CLOSE, |
697 button = pidgin_dialog_add_button(GTK_DIALOG(about), GTK_STOCK_CLOSE, |
| 694 G_CALLBACK(destroy_about), about); |
698 G_CALLBACK(destroy_about), about); |
| 695 |
699 |