diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-09-29 17:36:24 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-09-29 17:36:24 +0200 |
commit | 2545ecb8fec0f2064daaee85d65710db2366bfbb (patch) | |
tree | c118423a73b3059caf009e25d3e4b081bc85186c /gtksecentry | |
parent | Document changes and release 0.16-4 (diff) | |
parent | New upstream version 0.17 (diff) | |
download | krb5-auth-dialog-2545ecb8fec0f2064daaee85d65710db2366bfbb.tar.gz krb5-auth-dialog-2545ecb8fec0f2064daaee85d65710db2366bfbb.tar.bz2 krb5-auth-dialog-2545ecb8fec0f2064daaee85d65710db2366bfbb.zip |
Merge commit 'upstream/0.17' into experimental
Diffstat (limited to 'gtksecentry')
-rw-r--r-- | gtksecentry/Makefile.in | 2 | ||||
-rw-r--r-- | gtksecentry/gtksecentry.c | 13 |
2 files changed, 12 insertions, 3 deletions
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); } } |