From 2745b08d34f1bbb130abdd01e008c4f81c91efb9 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Wed, 29 Sep 2010 17:36:22 +0200 Subject: New upstream version 0.17 --- gtksecentry/Makefile.in | 2 -- gtksecentry/gtksecentry.c | 13 ++++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'gtksecentry') diff --git a/gtksecentry/Makefile.in b/gtksecentry/Makefile.in index f6ce2dc..56746df 100644 --- a/gtksecentry/Makefile.in +++ b/gtksecentry/Makefile.in @@ -130,8 +130,6 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ -GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ -GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ GMODULE_CFLAGS = @GMODULE_CFLAGS@ GMODULE_LIBS = @GMODULE_LIBS@ GMOFILES = @GMOFILES@ diff --git a/gtksecentry/gtksecentry.c b/gtksecentry/gtksecentry.c index 177eab8..f68f094 100644 --- a/gtksecentry/gtksecentry.c +++ b/gtksecentry/gtksecentry.c @@ -2317,7 +2317,11 @@ gtk_secure_entry_draw_text(GtkSecureEntry * entry) g_utf8_offset_to_pointer(text, start_pos) - text; gint end_index = g_utf8_offset_to_pointer(text, end_pos) - text; +#if GTK_CHECK_VERSION(2, 90, 5) + cairo_region_t *clip_region = cairo_region_create(); +#else GdkRegion *clip_region = gdk_region_new(); +#endif GdkGC *text_gc; GdkGC *selection_gc; @@ -2350,15 +2354,22 @@ gtk_secure_entry_draw_text(GtkSecureEntry * entry) gdk_draw_rectangle(entry->text_area, selection_gc, TRUE, rect.x, rect.y, rect.width, rect.height); - +#if GTK_CHECK_VERSION(2, 90, 5) + cairo_region_union_rectangle (clip_region, &rect); +#else gdk_region_union_with_rect(clip_region, &rect); +#endif } gdk_gc_set_clip_region(text_gc, clip_region); gdk_draw_layout(entry->text_area, text_gc, x, y, layout); gdk_gc_set_clip_region(text_gc, NULL); +#if GTK_CHECK_VERSION(2, 90, 5) + cairo_region_destroy(clip_region); +#else gdk_region_destroy(clip_region); +#endif g_free(ranges); } } -- cgit