gaim/gaim

d41a8c02075e
Parents 21ea0906b1e7
Children 7008f346f3cc
Applying patch #1207204 to disable the drop-shadow hackery in the gtkblist
tooltips. You can re-enable them by compiling with -DWANT_DROP_SHADOW if it's
something that you're just in love with.

This is my first commit to Gaim. Yay!
  • +19 -14
    src/gtkblist.c
  • --- a/src/gtkblist.c Sat Jun 04 13:36:41 2005 -0400
    +++ b/src/gtkblist.c Sat Jun 04 19:48:32 2005 -0400
    @@ -57,8 +57,12 @@
    #include <gtk/gtk.h>
    #include <gdk/gdk.h>
    -#if (GTK_CHECK_VERSION(2,2,0) && !(defined(__APPLE__) && defined(__MACH__)))
    -#define WANT_DROP_SHADOW
    +/* if someone explicitly asked for drop shadows, we also need to make
    + sure that their environment can support it. If not, tough */
    +#ifdef WANT_DROP_SHADOW
    +# if !GTK_CHECK_VERSION(2,2,0) || (defined(__APPLE__) && defined(__MACH__))
    +# undef WANT_DROP_SHADOW
    +# endif
    #endif
    typedef struct
    @@ -130,16 +134,20 @@
    static void show_rename_group(GtkWidget *unused, GaimGroup *g);
    -static gboolean xcomposite_is_present();
    -
    struct _gaim_gtk_blist_node {
    GtkTreeRowReference *row;
    gboolean contact_expanded;
    };
    +
    #ifdef WANT_DROP_SHADOW
    /**************************** Weird drop shadow stuff *******************/
    -/* This is based on a patch for drop shadows in GTK menus available at http://www.xfce.org/gtkmenu-shadow/ */
    +/* This is based on a patch for drop shadows in GTK menus available at
    + http://www.xfce.org/gtkmenu-shadow/
    + */
    +
    +static gboolean xcomposite_is_present();
    +
    enum side {
    EAST_SIDE,
    @@ -182,7 +190,6 @@
    .941, .847, .698, .521, .215
    };
    -#ifdef WANT_DROP_SHADOW
    static gboolean xcomposite_is_present()
    {
    static gboolean result = FALSE;
    @@ -196,11 +203,10 @@
    result = TRUE;
    known = TRUE;
    }
    -#endif
    +#endif /* ifndef _WIN32 */
    return result;
    }
    -#endif /* WANT_DROP_SHADOW */
    static GdkPixbuf *
    get_pixbuf(GtkWidget *menu, int x, int y, int width, int height)
    @@ -213,8 +219,7 @@
    gint original_width = width;
    gint original_height = height;
    -#ifdef _WIN32
    -#if !GTK_CHECK_VERSION(2,4,8)
    +#if !GTK_CHECK_VERSION(2,4,8) && defined(_WIN32)
    /* XXX: Kill this entire block someday.
    *
    * 2004-08-22: This bug fix should land in GTK+ version 2.4.8:
    @@ -234,8 +239,7 @@
    x += (workarea->left);
    y += (workarea->top);
    g_free(workarea);
    -#endif
    -#endif
    +#endif /* if !GTK_CHECK_VERSION(2,4,8) && defined(_WIN32) */
    if (x < 0) {
    width += x;
    @@ -436,7 +440,8 @@
    }
    /**************** END WEIRD DROP SHADOW STUFF ***********************************/
    -#endif
    +#endif /* ifdef WANT_DROP_SHADOW */
    +
    static GSList *blist_prefs_callbacks = NULL;
    @@ -2255,7 +2260,7 @@
    gdk_window_set_user_data (gtkblist->south_shadow, gtkblist->tipwindow);
    gdk_window_set_back_pixmap (gtkblist->south_shadow, NULL, FALSE);
    }
    -#endif
    +#endif /* ifdef WANT_DROP_SHADOW */
    layout = gtk_widget_create_pango_layout (gtkblist->tipwindow, NULL);
    pango_layout_set_wrap(layout, PANGO_WRAP_WORD);