Ticket #1899: 0001-Revert-deprecated-macroses-and-enable-gtk-deprecated.patch

File 0001-Revert-deprecated-macroses-and-enable-gtk-deprecated.patch, 4.1 KB (added by alsroot, 14 years ago)
  • configure.ac

    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 
    4949                 and install the icon theme])
    5050fi
    5151
     52AS_IF([test x"${USE_MAINTAINER_MODE}" = xyes], [
     53    CFLAGS="${CFLAGS} -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
     54])
     55
    5256AC_OUTPUT([
    5357Makefile
    5458cursor/Makefile
  • gtk/engine/Makefile.am

    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 \
     1AM_CFLAGS = \
    52        $(ENGINE_CFLAGS) $(WARN_CFLAGS)
    63
    74enginedir = $(libdir)/gtk-2.0/$(GTK_VERSION)/engines
  • gtk/engine/sugar-info.c

    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) 
    7171    gdouble line_width = info->rc_style->line_width;
    7272
    7373    if (info->widget) {
    74         range_info->focused = gtk_widget_has_focus (info->widget);
     74        range_info->focused = GTK_WIDGET_HAS_FOCUS (info->widget);
    7575    } else {
    7676        /* Fall back to unfocused and orientation from the width/height. */
    7777        range_info->focused = FALSE;
  • gtk/engine/sugar-style.c

    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, 
    415415        sugar_draw_button (cr, &info);
    416416
    417417        /* Spinbutton focus hack. */
    418         if (widget && gtk_widget_has_focus (widget)) {
     418        if (widget && GTK_WIDGET_HAS_FOCUS (widget)) {
    419419            /* Draw a focus for the spinbutton */
    420420            sugar_style_draw_focus (style, window, GTK_STATE_NORMAL, area, widget, detail, x, y, width, height);
    421421        }
    sugar_style_draw_box (GtkStyle *style, 
    444444
    445445            sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height);
    446446           
    447             if (widget && !gtk_widget_is_sensitive (widget))
     447            if (widget && !GTK_WIDGET_IS_SENSITIVE (widget))
    448448                info.state = GTK_STATE_INSENSITIVE;
    449449
    450450            /* Needed because the trough and bar are cached in a buffer inside GtkProgress. */
    sugar_style_draw_box (GtkStyle *style, 
    458458
    459459            sugar_fill_generic_info (&info, style, state_type, shadow_type, widget, detail, x, y, width, height);
    460460           
    461             if (widget && !gtk_widget_is_sensitive (widget))
     461            if (widget && !GTK_WIDGET_IS_SENSITIVE (widget))
    462462                info.state = GTK_STATE_INSENSITIVE;
    463463           
    464464            if (widget && GTK_IS_PROGRESS_BAR (widget)) {
    sugar_style_draw_flat_box (GtkStyle *style, 
    585585{
    586586    /* Hack to change the entries background when it has the focus. */
    587587    if (DETAIL ("entry_bg")) {
    588         if (widget && gtk_widget_has_focus (widget)) {
     588        if (widget && GTK_WIDGET_HAS_FOCUS (widget)) {
    589589            state_type = GTK_STATE_ACTIVE;
    590590        }
    591591    } else if (DETAIL ("radiobutton") || DETAIL ("checkbutton")) {
    sugar_style_draw_shadow (GtkStyle *style, 
    638638        /* XXX: This fakes an ACTIVE state for the focused entry.
    639639         *      Getting this changed in GTK+ with a style property would be cleaner
    640640         *      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)) {
    642642            info.state = GTK_STATE_ACTIVE;
    643643        }
    644         if (widget && !gtk_widget_is_sensitive (widget)) {
     644        if (widget && !GTK_WIDGET_IS_SENSITIVE (widget)) {
    645645            info.state = GTK_STATE_INSENSITIVE;
    646646        }
    647647