Mercurial > pidgin.yaz
diff pidgin/plugins/pidginrc.c @ 30137:4e7a9940627e
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
for a few things that aren't in GTK+ releases yet.
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Tue, 13 Apr 2010 23:22:31 +0000 |
| parents | d5fe33c3a765 |
| children |
line wrap: on
line diff
--- a/pidgin/plugins/pidginrc.c Tue Apr 13 22:29:02 2010 +0000 +++ b/pidgin/plugins/pidginrc.c Tue Apr 13 23:22:31 2010 +0000 @@ -242,7 +242,12 @@ if (response == GTK_RESPONSE_OK) { GdkColor color; gchar colorstr[8]; +#if GTK_CHECK_VERSION(2,14,0) + GtkWidget *colorsel = + gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(color_dialog)); +#else GtkWidget *colorsel = GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel; +#endif gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color); @@ -273,7 +278,13 @@ if (pref != NULL && strcmp(pref, "")) { if (gdk_color_parse(pref, &color)) { +#if GTK_CHECK_VERSION(2,14,0) + gtk_color_selection_set_current_color(GTK_COLOR_SELECTION( + gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(color_dialog))), + &color); +#else gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &color); +#endif } } @@ -327,7 +338,7 @@ pref = purple_prefs_get_string(prefpath); if (pref != NULL && strcmp(pref, "")) { - gtk_font_selection_set_font_name(GTK_FONT_SELECTION(GTK_FONT_SELECTION_DIALOG(font_dialog)->fontsel), pref); + gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog), pref); } gtk_window_present(GTK_WINDOW(font_dialog));
