From 75a661c06a2d367dc89b19cf39012905516f1c01 Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Mon, 3 May 2010 15:13:22 +0000
Subject: Revert deprecated macroses and enable gtk deprecated symbols check only in maintainer mode #1899
diff --git a/configure.ac b/configure.ac
index f32dd32..348528c 100644
a
|
b
|
else |
49 | 49 | and install the icon theme]) |
50 | 50 | fi |
51 | 51 | |
| 52 | AS_IF([test x"${USE_MAINTAINER_MODE}" = xyes], [ |
| 53 | CFLAGS="${CFLAGS} -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED" |
| 54 | ]) |
| 55 | |
52 | 56 | AC_OUTPUT([ |
53 | 57 | Makefile |
54 | 58 | cursor/Makefile |
diff --git a/gtk/engine/Makefile.am b/gtk/engine/Makefile.am
index eb720ff..cc8138d 100644
a
|
b
|
|
1 | | INCLUDES = \ |
2 | | -DGTK_DISABLE_DEPRECATED \ |
3 | | -DGDK_DISABLE_DEPRECATED \ |
4 | | -DG_DISABLE_DEPRECATED \ |
| 1 | AM_CFLAGS = \ |
5 | 2 | $(ENGINE_CFLAGS) $(WARN_CFLAGS) |
6 | 3 | |
7 | 4 | enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines |
diff --git a/gtk/engine/sugar-info.c b/gtk/engine/sugar-info.c
index 8d7832f..b4bf9c5 100644
a
|
b
|
sugar_fill_range_info (SugarRangeInfo *range_info, gboolean trough) |
71 | 71 | gdouble line_width = info->rc_style->line_width; |
72 | 72 | |
73 | 73 | if (info->widget) { |
74 | | range_info->focused = gtk_widget_has_focus (info->widget); |
| 74 | range_info->focused = GTK_WIDGET_HAS_FOCUS (info->widget); |
75 | 75 | } else { |
76 | 76 | /* Fall back to unfocused and orientation from the width/height. */ |
77 | 77 | range_info->focused = FALSE; |
diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c
index 88a80a4..b81fe69 100644
a
|
b
|
sugar_style_draw_box (GtkStyle *style, |
415 | 415 | sugar_draw_button (cr, &info); |
416 | 416 | |
417 | 417 | /* Spinbutton focus hack. */ |
418 | | if (widget && gtk_widget_has_focus (widget)) { |
| 418 | if (widget && GTK_WIDGET_HAS_FOCUS (widget)) { |
419 | 419 | /* Draw a focus for the spinbutton */ |
420 | 420 | sugar_style_draw_focus (style, window, GTK_STATE_NORMAL, area, widget, detail, x, y, width, height); |
421 | 421 | } |
… |
… |
sugar_style_draw_box (GtkStyle *style, |
444 | 444 | |
445 | 445 | sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height); |
446 | 446 | |
447 | | if (widget && !gtk_widget_is_sensitive (widget)) |
| 447 | if (widget && !GTK_WIDGET_IS_SENSITIVE (widget)) |
448 | 448 | info.state = GTK_STATE_INSENSITIVE; |
449 | 449 | |
450 | 450 | /* Needed because the trough and bar are cached in a buffer inside GtkProgress. */ |
… |
… |
sugar_style_draw_box (GtkStyle *style, |
458 | 458 | |
459 | 459 | sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height); |
460 | 460 | |
461 | | if (widget && !gtk_widget_is_sensitive (widget)) |
| 461 | if (widget && !GTK_WIDGET_IS_SENSITIVE (widget)) |
462 | 462 | info.state = GTK_STATE_INSENSITIVE; |
463 | 463 | |
464 | 464 | if (widget && GTK_IS_PROGRESS_BAR (widget)) { |
… |
… |
sugar_style_draw_flat_box (GtkStyle *style, |
585 | 585 | { |
586 | 586 | /* Hack to change the entries background when it has the focus. */ |
587 | 587 | if (DETAIL ("entry_bg")) { |
588 | | if (widget && gtk_widget_has_focus (widget)) { |
| 588 | if (widget && GTK_WIDGET_HAS_FOCUS (widget)) { |
589 | 589 | state_type = GTK_STATE_ACTIVE; |
590 | 590 | } |
591 | 591 | } else if (DETAIL ("radiobutton") || DETAIL ("checkbutton")) { |
… |
… |
sugar_style_draw_shadow (GtkStyle *style, |
638 | 638 | /* XXX: This fakes an ACTIVE state for the focused entry. |
639 | 639 | * Getting this changed in GTK+ with a style property would be cleaner |
640 | 640 | * as that also works for the font colors. (see also draw_flat_box) */ |
641 | | if (widget && gtk_widget_has_focus (widget)) { |
| 641 | if (widget && GTK_WIDGET_HAS_FOCUS (widget)) { |
642 | 642 | info.state = GTK_STATE_ACTIVE; |
643 | 643 | } |
644 | | if (widget && !gtk_widget_is_sensitive (widget)) { |
| 644 | if (widget && !GTK_WIDGET_IS_SENSITIVE (widget)) { |
645 | 645 | info.state = GTK_STATE_INSENSITIVE; |
646 | 646 | } |
647 | 647 | |