gaim/gaim

8a072059984e
Parents aab80d5731fa
Children 79fd3b4b4844
Changed a call to gtk_rc_get_style to be checked and double checked because
gtk isn't working right. I can't get the new version to segfault on sign on,
with or without a ~/.gtkrc file. In committing the patch to use
gtk_rc_get_style, i failed to consider the fact that gtk often doesn't work
the way I would expect but instead works in ways I would describe as broken.
I humblely appologize for failing to sufficiently test that patch before
committing it and promise to try to do better in the future. Hopefully this
fixes things.
  • +5 -0
    ChangeLog
  • +7 -4
    src/buddy.c
  • --- a/ChangeLog Mon Oct 14 18:32:08 2002 -0400
    +++ b/ChangeLog Sat Oct 19 15:41:46 2002 -0400
    @@ -1,5 +1,10 @@
    Gaim: The Pimpin' Penguin IM Clone thats good for the soul!
    +version 0.59.6
    + * Fixed a segfault introduced in 0.59.5 when gtk
    + fails to read the ~/.gtkrc or reads it but fails
    + to create a style from it.
    +
    version 0.59.5 (10/14/2002):
    * Fixed a Yahoo! segfault (Thanks, Craig Metz)
    --- a/src/buddy.c Mon Oct 14 18:32:08 2002 -0400
    +++ b/src/buddy.c Sat Oct 19 15:41:46 2002 -0400
    @@ -2200,7 +2200,7 @@
    time_t t;
    int ihrs, imin;
    struct buddy *b;
    - GtkStyle *style;
    + GtkStyle *style = NULL;
    char infotip[2048];
    char warn[256];
    @@ -2231,10 +2231,13 @@
    if (blist_options & OPT_BLIST_SHOW_IDLETIME)
    gtk_widget_show(bs->idle);
    - style = gtk_style_copy( gtk_rc_get_style(bs->label) );
    - for (i = 0; i < 5; i++)
    - style->fg[i] = bs->idle->style->fg[i];
    + if(gtk_rc_get_style(bs->label))
    + style = gtk_style_copy( gtk_rc_get_style(bs->label) );
    + if(!style)
    + style = gtk_style_new();
    if ((blist_options & OPT_BLIST_GREY_IDLERS) && (b->idle)) {
    + for (i = 0; i < 5; i++)
    + style->fg[i] = bs->idle->style->fg[i];
    style->fg[GTK_STATE_NORMAL].red =
    (style->fg[GTK_STATE_NORMAL].red / 2) + (style->base[GTK_STATE_NORMAL].red / 2);
    style->fg[GTK_STATE_NORMAL].green =