| 33 #include "request.h" |
33 #include "request.h" |
| 34 #include "pidgintooltip.h" |
34 #include "pidgintooltip.h" |
| 35 |
35 |
| 36 #include <string.h> |
36 #include <string.h> |
| 37 |
37 |
| |
38 #include "gtk3compat.h" |
| |
39 |
| 38 #define PIDGIN_RESPONSE_CONFIGURE 98121 |
40 #define PIDGIN_RESPONSE_CONFIGURE 98121 |
| 39 |
41 |
| 40 static void plugin_toggled_stage_two(PurplePlugin *plug, GtkTreeModel *model, |
42 static void plugin_toggled_stage_two(PurplePlugin *plug, GtkTreeModel *model, |
| 41 GtkTreeIter *iter, gboolean unload); |
43 GtkTreeIter *iter, gboolean unload); |
| 42 |
44 |
| 560 |
562 |
| 561 static gboolean |
563 static gboolean |
| 562 pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, cairo_t *cr, gpointer data) |
564 pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, cairo_t *cr, gpointer data) |
| 563 { |
565 { |
| 564 PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin"); |
566 PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin"); |
| |
567 #if GTK_CHECK_VERSION(3,0,0) |
| 565 gtk_paint_layout(gtk_widget_get_style(tipwindow), cr, GTK_STATE_NORMAL, FALSE, |
568 gtk_paint_layout(gtk_widget_get_style(tipwindow), cr, GTK_STATE_NORMAL, FALSE, |
| 566 tipwindow, "tooltip", |
569 tipwindow, "tooltip", |
| 567 6, 6, layout); |
570 6, 6, layout); |
| 568 |
571 #else |
| |
572 gtk_paint_layout(tipwindow->style, tipwindow->window, GTK_STATE_NORMAL, FALSE, |
| |
573 NULL, tipwindow, "tooltip", |
| |
574 6, 6, layout); |
| |
575 #endif |
| 569 return TRUE; |
576 return TRUE; |
| 570 } |
577 } |
| 571 |
578 |
| 572 static gboolean |
579 static gboolean |
| 573 pidgin_plugins_create_tooltip(GtkWidget *tipwindow, GtkTreePath *path, |
580 pidgin_plugins_create_tooltip(GtkWidget *tipwindow, GtkTreePath *path, |
| 786 expander = gtk_expander_new(_("<b>Plugin Details</b>")); |
793 expander = gtk_expander_new(_("<b>Plugin Details</b>")); |
| 787 gtk_expander_set_use_markup(GTK_EXPANDER(expander), TRUE); |
794 gtk_expander_set_use_markup(GTK_EXPANDER(expander), TRUE); |
| 788 gtk_widget_set_sensitive(expander, FALSE); |
795 gtk_widget_set_sensitive(expander, FALSE); |
| 789 gtk_container_add(GTK_CONTAINER(expander), create_details()); |
796 gtk_container_add(GTK_CONTAINER(expander), create_details()); |
| 790 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(plugin_dialog))), |
797 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(plugin_dialog))), |
| 791 expander, FALSE, FALSE, 0); |
798 expander, FALSE, FALSE, 0); |
| 792 |
799 |
| 793 |
800 |
| 794 g_signal_connect (G_OBJECT (sel), "changed", G_CALLBACK (prefs_plugin_sel), NULL); |
801 g_signal_connect (G_OBJECT (sel), "changed", G_CALLBACK (prefs_plugin_sel), NULL); |
| 795 g_signal_connect(G_OBJECT(plugin_dialog), "response", G_CALLBACK(plugin_dialog_response_cb), sel); |
802 g_signal_connect(G_OBJECT(plugin_dialog), "response", G_CALLBACK(plugin_dialog_response_cb), sel); |
| 796 gtk_window_set_default_size(GTK_WINDOW(plugin_dialog), 430, 530); |
803 gtk_window_set_default_size(GTK_WINDOW(plugin_dialog), 430, 530); |