[gtk-engines] Do not use gdk_drawable_get_size, it's been removed from GTK+
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-engines] Do not use gdk_drawable_get_size, it's been removed from GTK+
- Date: Sat, 9 Oct 2010 12:03:20 +0000 (UTC)
commit c2d59c8a183f4c53572bf16c0877a10aa109d811
Author: Xan Lopez <xan gnome org>
Date: Sat Oct 9 21:02:47 2010 +0900
Do not use gdk_drawable_get_size, it's been removed from GTK+
Use gdk_window_get_{width,height} instead.
engines/clearlooks/src/clearlooks_style.c | 5 ++---
engines/support/general-support.h | 10 ++++------
2 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/engines/clearlooks/src/clearlooks_style.c b/engines/clearlooks/src/clearlooks_style.c
index a5929ea..c836651 100644
--- a/engines/clearlooks/src/clearlooks_style.c
+++ b/engines/clearlooks/src/clearlooks_style.c
@@ -857,9 +857,8 @@ clearlooks_style_draw_box (DRAW_ARGS)
*/
progress.max_size_known = TRUE;
- gdk_drawable_get_size (gtk_widget_get_window (widget),
- &progress.max_size.width,
- &progress.max_size.height);
+ progress.max_size.width = gdk_window_get_width (gtk_widget_get_window (widget));
+ progress.max_size.height = gdk_window_get_height (gtk_widget_get_window (widget));
/* Now, one more thing needs to be done. If interior-focus
* is off, then the entry may be a bit smaller. */
diff --git a/engines/support/general-support.h b/engines/support/general-support.h
index 42e898b..1c86a5f 100644
--- a/engines/support/general-support.h
+++ b/engines/support/general-support.h
@@ -46,12 +46,10 @@
g_return_if_fail (width >= -1); \
g_return_if_fail (height >= -1); \
\
- if ((width == -1) && (height == -1)) \
- gdk_drawable_get_size (window, &width, &height); \
- else if (width == -1) \
- gdk_drawable_get_size (window, &width, NULL); \
- else if (height == -1) \
- gdk_drawable_get_size (window, NULL, &height);
+ if (width == -1) \
+ width = gdk_window_get_width (window); \
+ if (height == -1) \
+ height = gdk_window_get_height (window);
#define GE_EXPORT G_MODULE_EXPORT
#define GE_INTERNAL G_GNUC_INTERNAL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]