Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: turn_done_button (PR#1596)
Home

[Freeciv-Dev] Re: turn_done_button (PR#1596)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: turn_done_button (PR#1596)
From: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Date: Tue, 18 Jun 2002 18:40:01 -0700 (PDT)

On Tue, 18 Jun 2002 d00-mki@xxxxxxxxxxx wrote:

> Full_Name: Magnus Kinnander
> Version: 1.12.4
> Distribution: Built from source
> Client: Gtk+
> OS: Solaris 5.8
> Submission from: (NULL) (130.237.226.31)
>
>
> This bug has previously been reported as #1467 but erroneously
> placed in non-bugs (and no followups reported to freeciv-dev).

The original post was flagged as non-bug because that was what it was.
See below. I e-mailed the response to the bugs mailing-list in the 9th of
June. Messages sent there are always duplicated to freeciv-dev.

> The bug is in client/gui-gtk/gui_main.c  at line 573 :
>
> gtk_widget_set_style(turn_done_button,
>                        gtk_style_copy(turn_done_button->style));
>
> There really is a bug in this bugfix (sorry vasco) in that this
> line sets the style to the default style instead of the style
> set by rc-files.

In case you (like some people have hinted on ocasion) think i have some
sort of personal attachment to this fix (or whatever piece of code you
are thinking at the moment) let it be know here that i wasn't
even the person who produced or even commited the original bugfix in this
particular case.
About source code in general: i care about results. I am very critic
regarding some ways of programming. I don't have special preferences
for me or anyone else.

It depends on interpretation if there is a bug in the old bugfix or not.
Was it perfect? No. But it fixed the original bug. It introduced no great
annoyances.
Which is better, a widget with default style, or the whole window blinking?

Your original post suggested removing that line. That would be even worse
than the old behaviour as it would reintroduce the same bug.

--------------------------------------------------------------------------------

> The line should read :
>
> gtk_widget_set_style(turn_done_button,
>                       gtk_style_copy(
>                               gtk_rc_get_style(turn_done_button)));
>
>
> Optionally with a call to add to the ref count of the style.
>
> Prototype:
> void gtk_rc_style_ref(GtkRcStyle *rc_style);

There is no need to do that. The ref count of the GtkStyle returned by
gtk_style_copy() is 1. See gtkstyle.c in the GTK+ source code.

> I sincerely hope no one is offended by this repetion of an
> earlier bug report.(The bug still remains :)  )

I am not offended by this repetition since you thought no one noticed
your post. At best i read my email once a day. Don't expect real-time
response from me via e-mail.

You have provided us an alternative and better fix to the original bug.
Excellent! It will be commited to CVS today!

There was no need for all this anxiety on your part. It would have saved
you worry and to me it would have saved me from some needless typing in
this e-mail! :-)

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: turn_done_button (PR#1596), Vasco Alexandre Da Silva Costa <=