[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-11 Thread Marko Lindqvist

Update of patch #2715 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-09 Thread Marko Lindqvist

Update of patch #2715 (project freeciv):

  Status: In Progress = Ready For Test 

___

Follow-up Comment #59:

- Removed parts handled in bug #18952
- fixed compilation errors and warnings when building against gtk3

(file #14491)
___

Additional Item Attachment:

File name: Gtk3Cairo_2715-2.diff.bz2  Size:22 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-08 Thread Gilles J. Seguin
On Mon, 2011-11-07 at 17:53 +0100, anonymous wrote:
 Follow-up Comment #50, patch #2715 (project freeciv):
 
 After a bit checking, I came up with that better solution - if client can
 change view, overview is invalidated on mapview scroll change.
 
 Implemented in this version.
 
 But I've got a silly question and a request.

why is it silly ?

 The question: how do I deselect a unit without canceling its orders ?

shift-v



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-08 Thread Marko Lindqvist

Follow-up Comment #58, patch #2715 (project freeciv):

Please read through CodingStyle document, and check final versions of your
patches, so I don't need to spend hours fixing simple style issues and obvious
oversights with your future patches.

- CodingStyle corrections
- Renamed some variables, so their names don not lie to future coders
- Removed unused code
- Removed all code related to pixcomm freeze/thaw. It only maintained value
of freeze counter, whic then was used for nothing

(file #14481)
___

Additional Item Attachment:

File name: Gtk3Cairo_2715.diff.bz2Size:23 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread anonymous

Follow-up Comment #50, patch #2715 (project freeciv):

After a bit checking, I came up with that better solution - if client can
change view, overview is invalidated on mapview scroll change.

Implemented in this version.

But I've got a silly question and a request.

The question: how do I deselect a unit without canceling its orders ?

The request: it would be nice, if the option of activating unit selection
dialog would be accessible while no unit is selected.

(file #14464)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:112 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread Matthias Pfafferodt

Follow-up Comment #51, patch #2715 (project freeciv):

 The question: how do I deselect a unit without canceling its
 orders ? 
I do not know - as long as you have units which could be moved the next one
is selected.
 
 The request: it would be nice, if the option of activating unit
 selection dialog would be accessible while no unit is selected.
go to Select  Unit selection dialog

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread anonymous

Follow-up Comment #52, patch #2715 (project freeciv):

Well, the problem is that menu is active only if a unit is selected,
otherwise whole menu is inaccessible - that was the reason behind the
request.

I'm a bit surprised, that the question didn't have a trivial answer.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread Marko Lindqvist

Follow-up Comment #53, patch #2715 (project freeciv):

 The other way around is also a no go, as there's no
 release_overview_window counterpart of get_overview_window.

Don't know if you are still interested with new developments you've done, but
I had moment earlier today to write patch #3029

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread David Lowe

Follow-up Comment #54, patch #2715 (project freeciv):

 The question: how do I deselect a unit without canceling its orders ?

If i remember correctly, you should be able to hit the space bar.  This will
go on to the next unit but not cancel what it is doing.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread anonymous

Follow-up Comment #55, patch #2715 (project freeciv):

Perhaps I'm not being explicit enough:
deselect as in after I select a unit, what do I need to do to have no unit
selected (short of disbanding the unit or ending the turn).

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread anonymous

Follow-up Comment #56, patch #2715 (project freeciv):

This version should be more or less final as far as gtk2 goes - for gtk3
there's obviously much more on schedule (still, much of it already works there
too).

As for patch #3029, I've got mixed feelings - that way would be more
consistent *across* clients, but the way I did it is more consistent *within*
the client (see for yourself).

(file #14480)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:112 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-07 Thread anonymous

Follow-up Comment #57, patch #2715 (project freeciv):

Actually, I misspoke - there seem to be one more change that could be
implemented, affected by this patch, though not strictly cairo related.

It's just an idea, as I have yet to try to implement it, but it seems that
both chatline and option dialog should be able to use GtkColorButton,
simplifying its handling a bit.

Am I missing something or should I go for it (though in a separate patch, I
think) ?

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-06 Thread Marko Lindqvist

Follow-up Comment #46, patch #2715 (project freeciv):

What dictates that background color of (gtk2) research dialog is now black? I
mean, it's ok to have it that way for now if it's working as designed, and not
unexplained bug.

I'd like to do some cleanup before we decide that this is final version of
the initial version :-)
I'm not starting yet in case you are working on new version of the patch -
merging our versions would then be probably hard. Just let me know when you're
finished with your current changes so I can take my turn.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-06 Thread anonymous

Follow-up Comment #47, patch #2715 (project freeciv):

It's what I said in comment #35 - I seem to be getting the clip region wrong
- simply commenting gdk_cairo_region call in science_diagram_update makes it
work as before, but it would be nice to get the clip right (I am working on
it, but today I had a completely different topic on schedule).

But still, the most outstanding issue is the overview leak, I wrote about in
comment #41. The catch is that overview doesn't give access to its store (at
least it seems that way), so I can't explicitly draw upon it in the expose
callback. The other way around is also a no go, as there's no
release_overview_window counterpart of get_overview_window.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-06 Thread anonymous

Follow-up Comment #48, patch #2715 (project freeciv):

Funny thing - actually the problem was that I didn't clip.

In this version, it's correctly clipped.

So, we're back to the overview problem - I think, that this must be solved on
your side.

(file #14461)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:111 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-06 Thread anonymous

Follow-up Comment #49, patch #2715 (project freeciv):

OK, I was wrong again - this version doesn't leak overview canvas.

But there's a major catch - to do the above, I needed to effectively disable
refresh_overview_from_canvas.

That in turn made triggering the overview redraw tricky - I've managed to
re-fix it for right click on overview/mapcanvas, but i.e. if I go into city
dialog and start switching between cities, overview isn't updated correctly -
seems I need to come up with a better solution.

(file #14462)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:112 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-05 Thread anonymous

Follow-up Comment #44, patch #2715 (project freeciv):

This version of the patch seems to have science_diagram working correctly in
gtk3 (slight (likely theming related) warnings aside).

As for gtk2, I'm beginning to think that I may simply be using incorrect clip
- simply cause ev-region might be referring to the widget's window, not the
bin_window.

If I won't get a better idea, you'll just have to comment the clip.

(file #14430)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:111 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-05 Thread anonymous

Follow-up Comment #45, patch #2715 (project freeciv):

Just a minor explanation: it's not that in gtk2 with that clip the lines
aren't drawn - the problem is that they're drawn black-on-black (at least ones
for already developed tech), which isn't exactly helpful.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-04 Thread anonymous

Follow-up Comment #42, patch #2715 (project freeciv):

OK, as the issue with server/client hang has been worked around (by reverting
two patches), attaching the counterpart of the recent api patch (posted in
patch #2997).

gtk3 part of gtkpixcomm drawing is sprinkled liberally with printf
statements, as I'm trying to figure out what got them broken.

Its gtk2 part should be more or less correct.

(file #14417)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:112 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-04 Thread anonymous

Follow-up Comment #43, patch #2715 (project freeciv):

I think I managed to get gtkpixcomms correctly in gtk3 - even simplified it
significantly.

Now, I either try to fix science_diagram_update problem (gtk3 is affected
too, but in a different way) or try to figure out why text doesn't show up in
the production selection combobox.

(file #14418)
___

Additional Item Attachment:

File name: cairo-drawing-svn4.patch   Size:111 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-03 Thread anonymous

Follow-up Comment #41, patch #2715 (project freeciv):

Minor comment about GdkWindow to cairo context move:
in one specific case there's a minor catch about it:
in case of get_overview_window, the context will leak, as each call creates a
new context.
I don't have a good idea how to go around it as refresh_overview_from_canvas
isn't client specific (and there's no release_overview_window).

Well, unless I'd simply implement get_overview_window as returning {NULL,
NULL} and forgo using refresh_overview_from_canvas in favor of doing it
correctly in the expose callback.

Cause for the time being get_overview_window is only used by
refresh_overview_from_canvas and the later only in that expose callback - but
*I* can make no guarantees about *you* starting to use it somewhere else.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-02 Thread Marko Lindqvist

Follow-up Comment #39, patch #2715 (project freeciv):

This no longer applies cleanly on top of trunk + patch #2997. Note that #2997
itself was changed from version that was submitted to this ticket earlier as
it didn't apply cleanly on latest unitselect.c

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-02 Thread anonymous

Follow-up Comment #40, patch #2715 (project freeciv):

Well, I'm having a little problem here - not with the patch itself, as even
unitselect.c changes weren't that extensive, but with the server.

I've checked out r20415, as it's the last before branching (and I think I'll
stick to the 2.4 branch for the time being) and once I try to start even gtk2
client (which obviously isn't affected by my patches), I get only as far as
the first dialog.

If I chose any of options that would start the local server, the client
hangs.

If I try to start the server itself, I'm only getting:
0: bind failed: Cannot assign requested address

This obviously means I can't test my own patch, so till somebody helps me
with that, any progress is likely to be halted.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-01 Thread anonymous

Follow-up Comment #34, patch #2715 (project freeciv):

OK, unless I'm missing something, this minor change in
gui-gtk-3.0/spaceshipdlg.c  will be the final change needed before I can begin
turning .drawable into .context - AFAICT even gtk2 will benefit a little from
making such change.

I already have a rough picture of how that should go, but details might need
work.

(file #14375)
___

Additional Item Attachment:

File name: cairo-drawing-svn2.patch   Size:108 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-01 Thread anonymous

Follow-up Comment #35, patch #2715 (project freeciv):

OK, I've made some progress.

After a trivial (a NULL check) change in themes.c, freeciv is not only able
to build with gtk3, but it starts with it and even seems to display overview
window correctly.

No more than that, however, as as it gets SIGABRT shortly after, can't even
display map window.

Now, I've made the change I was talking about - .drawable is now a cairo
context.

There's a little catch however - in science_diagram_update, if I put the
comment on 'gdk_cairo_region(cr, ev-region);' line whole window gets redrawn,
but it looks correctly; if there's no comment (so the context is properly
clipped), only the boxes are redrawn - the whole background is black. I need
to think about it - for the moment, putting the comment there will do.



(file #14384)
___

Additional Item Attachment:

File name: cairo-drawing-svn3.patch   Size:111 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-01 Thread Matthias Pfafferodt

Follow-up Comment #36, patch #2715 (project freeciv):

 One more little request - as I explained how to apply these two
 patches, could one of you tell how they work for you ? 
 Cause that they seem to work for me, doesn't mean I didn't miss
 something obvious - see the disclaimer in comment #6.
Could you list your setup? 

In comment #6 you state the patches are on top of a clean 2.3.0 tarball. Are
additional patches needed? Which gtk version? I have gtk 2.22 and since today
also gtk 3.0.0 available and would like to test it.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-01 Thread anonymous

Follow-up Comment #37, patch #2715 (project freeciv):

That was true for earlier patches, but since comment #17, those two are
against r20326 - as I said, first apply api, then cairo.

Also, this version of the patch works now with gtk3, though:
- I'm almost sure it leaks
- gtkpixcomms aren't drawn correctly (though if you i.e. blindly click on
citizens in city dialog, widget does receive the event)

gtk+-2.24.5 and gtk+-3.2.1

gtk 3 build isn't exactly implemented yet, I simply edited client/Makefile
and client/gui-gtk-3.0/Makefile.

The redraw of the science dialog isn't working correctly in gtk3 either, but
as soon as I figure out the problem with gtkpixcomms I'll try to take care of
that too. Good enough that this much already works.

(file #14386)
___

Additional Item Attachment:

File name: cairo-drawing-svn.patchSize:109 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-11-01 Thread Marko Lindqvist

Follow-up Comment #38, patch #2715 (project freeciv):

I assume you are aware of this document, but posting link just in case:
http://developer.gnome.org/gtk3/3.0/ch25s02.html#gtk-migrating-GtkStyleContext

Switching to use gtk3 should be separate patch anyway (IIRC there's already
one with the required configure stuff changes produced as by-product of
creating current configure stuff - or at least my harddisk contains that
patch. I'll check once I have more time.) We should get this initial cairo
patch soonish.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-31 Thread Marko Lindqvist

Follow-up Comment #30, patch #2715 (project freeciv):

 To be honest, if these two patches were properly split, thre
 might have been at least 4-5 of them:
 - one for ggz_id
 - one for not gdk drawing related deprecations
 - one for GSEAL
 - one for GDK_MULTIHEAD_SAFE
 - one for cairo drawing
 - one for initial work on gtk3

Yeah, actually there was several of these patches in various states of
development when you published your mega-patch. I'm probably going to just
close those tickets as duplicates once these ones have gone in. I think it
would now be more work to split these two patches than it's worth.
Please open new tickets for new developments in the future.

One downside of this patch that combines both cairo part and gtk3 work is
that it's not easy to use it to switch also gtk2-client to use cairo.

I'm concentrating to get patch #2997 part in first, and only then start to
look this one.

Oh yes, ggz_id was mentioned back there. I'm afraid I didn't read older ones
of the comments posted while I was away very carefully, but jumped straight to
latest version. :-(

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-31 Thread anonymous

Follow-up Comment #31, patch #2715 (project freeciv):

TBH, the real gtk3 client (not just gtk2-by-cairo) will require a bit of
reworking this patch.

While I haven't (yet) even tried to debug why does it crash upon start if
built against gtk3, I can make a good guess:
AFAICT, in gtk3 case, the context of draw signal (that replaced
expose-event) *must not* be destroyed (and obviously it's already clipped to
the widget size).

That's why I suspect .context would make a better element of canvas than
.window.
The obvious catch is all of the functions would need to be rechecked whether
or not they're called outside former expose-event. I think the lobotomy, I
mentioned in comment #9, should have help with that.

Now, that I think about it, perhaps I should simply reverse the logic and
check for .pixmap==NULL on canvas, instead of the other one.

BTW, a couple of changes in the patch is just a bit of noise, as I was trying
to silence some of the compiler warnings (IIRC, on -Wall) - mostly things like
signed-unsigned comparison.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-31 Thread anonymous

Follow-up Comment #32, patch #2715 (project freeciv):

One more little request - as I explained how to apply these two patches,
could one of you tell how they work for you ?
Cause that they seem to work for me, doesn't mean I didn't miss something
obvious - see the disclaimer in comment #6.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-31 Thread anonymous

Follow-up Comment #33, patch #2715 (project freeciv):

Yet another minor improvement of the patch - as pixmap_put_sprite was
duplicated and redundant in favor of canvas_put_sprite, switched mapview.c to
simply use canvas_put_sprite.

It seems it's just one of the many steps that could be made to further
simplify the drawing model.

(file #14369)
___

Additional Item Attachment:

File name: cairo-drawing-svn2.patch   Size:108 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-30 Thread Marko Lindqvist

Update of patch #2715 (project freeciv):

  Depends on: = patch #2997


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-30 Thread Marko Lindqvist

Update of patch #2715 (project freeciv):

 Planned Release:   2.4.0 = 2.4.0, 2.5.0   

___

Follow-up Comment #28:

One shouldn't do multiple things in one ticket. I've now opened separate
ticket, patch #2997 for handling that API cleanup part first (from which I
need to further split away one bugfix)

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-30 Thread anonymous

Follow-up Comment #29, patch #2715 (project freeciv):

Well, ggz_id problem was mentioned back in comment #6 already.

To be honest, if these two patches were properly split, thre might have been
at least 4-5 of them:
- one for ggz_id
- one for not gdk drawing related deprecations
- one for GSEAL
- one for GDK_MULTIHEAD_SAFE
- one for cairo drawing
- one for initial work on gtk3

Though, I feel not quite comfortable with subversion, only thing resembling
real work, that I've done with a version control system, was done with git.

Still, one more version of the cairo patch - changes mostly about re-refixing
of shadowed text (I do hope I got it right this time).


PS.: thanks for CCing me.

(file #14331)
___

Additional Item Attachment:

File name: cairo-drawing-svn2.patch   Size:109 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-29 Thread anonymous

Follow-up Comment #25, patch #2715 (project freeciv):

OK, few things of note:
- gtk_combo_box_text_new used in my patch means it requires gtk+-2.24 (well,
the eventual aim of this patch is gtk+-3 and there's no gtk_combo_box_new_text
there)

- r20328 solves the problem with Lua console dialog: now it's gets shown in
the chat notebook

Also, I wouldn't mind being CCed to this bug, so I wouldn't need to recheck
it manually.

I've reintroduced the minor change in gtkpixcomm.c that was present in the
patches before comment #17, but was missed in the later.

Retested if it builds with gtk3 - it does, but still crashes without showing
anything.

(file #14315)
___

Additional Item Attachment:

File name: cairo-drawing-svn2.patch   Size:109 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-29 Thread Marko Lindqvist

Follow-up Comment #26, patch #2715 (project freeciv):

 Also, I wouldn't mind being CCed to this bug, so I wouldn't need
 to recheck it manually.

I don't know if gna tracker even makes it possible to setup that for single
ticket (I don't see such field) and you have given no address to cc to; you're
just Anonymous. All comments from this tracker are cc:d to freeciv-dev mailing
list. Maybe you should join there if you plan to do more freeciv hacking.

I've had no chance to check your latest patch, but comments about previous:
- It didn't apply to trunk. Are you sure you are creating patches against
clean freeciv tree?
- Blocks commented out by #if 0 ... #endif should be removed completely as
soon as they are not needed for reference when developing patch - once patch
is considered ready for commit, they should be gone
- Compared to latest version of the patch I did, you have renamed some
variables containing cairo surfaces as pixmap - isn't that highly confusing
name for object that is not pixmap?

About increasing minimum required gtk2 version: there's no reason to try to
avoid it. Soon we have to start building against gtk-2.24 anyway and to fix
anything that's deprecated in our codebase by those standards. I actually have
separate patch just for increasing minimum requirement to 2.24. That separate
patch was created when it seemed that this one would take forever to get
finished, and I still probably am going to commit it before this one (like
committing it tonight and only checking latest version of this one)

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-29 Thread anonymous

Follow-up Comment #27, patch #2715 (project freeciv):

As I said in comment #17, patches apply *cleanly* against r20326 trunk -
first apply api patch, then cairo.

As for variable names, if I had to come up with new names, writing those
patches would likely take up to three times as long - I prefer to just reuse
those I already have.

The blocks were for my convenience - they made patch size smaller and till
comment #16 I was working against 2.3.0 tarball.

See https://bugs.gentoo.org/show_bug.cgi?id=372087#c1 for my contact info.


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-28 Thread Matthias Pfafferodt

Follow-up Comment #24, patch #2715 (project freeciv):

 and I had only 2.20 installed - found a new repo, installed the
 packages and it compiles now ...
the gtk2x client from trunk is working but this patch will push the limit to
2.4 (gtk_combo_box_new_with_model_and_entry() and
gtk_combo_box_set_entry_text_column()). With my current system I have only
2.22 (opensuse 11.3). But 12.1 will be available in November ...

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-27 Thread Matthias Pfafferodt

Follow-up Comment #22, patch #2715 (project freeciv):

 with minimum requirement of gtk2 2.22.0 
and I had only 2.20 installed - found a new repo, installed the packages and
it compiles now ...

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-27 Thread anonymous

Follow-up Comment #23, patch #2715 (project freeciv):

First, oops, I've accidentally made the text always shadowed - I've fixed it
now.

Second, I've made that change in pixmap_put_overlay_tile_draw, I've mentioned
earlier. I've also changed canvas_fog_sprite_area a bit.

The longer I look at it, the more sense it would make .drawable of a canvas
carry the cairo context instead of the drawable - that way clipping could be
done only once.


(file #14300)
___

Additional Item Attachment:

File name: cairo-drawing-svn2.patch   Size:109 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-26 Thread anonymous

Follow-up Comment #18, patch #2715 (project freeciv):

One important thing I forgot to mention: I'm not sure if I got button
blinking right, as I'm not sure what would be the easiest way of triggering
that.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-26 Thread Matthias Pfafferodt

Follow-up Comment #19, patch #2715 (project freeciv):

 Also, the only result of choosing Lua console in the menu is
 Gtk-CRITICAL **: IA__gtk_widget_realize: assertion
 `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)'
 failed, but that's regardless of my patches. 
OK, so the luaconsole is broken in gtk3; could you test the fix for bug
#18844? I'm not sure if this is related to this bug but at the moment I can't
really test gtk3 as I do not have it on my computer

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-26 Thread Marko Lindqvist

Follow-up Comment #20, patch #2715 (project freeciv):

 I can't really test gtk3 as I do not have it on my computer

What is your version of gtk2? As you remember gtk3-client is still
gtk2-program in reality, with minimum requirement of gtk2 2.22.0 (compiling
newer version of gtk should be quite trivial in most environments anyway, at
least if you are not taking that huge step requiring newer version from a lot
of dependencies also. I regularly use six different versions on my freeciv
development computer (gtk2  gtk3 provided by distribution, latest gtk2 
gtk3, our minimum gtk2 requirements for TRUNK  S2_3))


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-26 Thread anonymous

Follow-up Comment #21, patch #2715 (project freeciv):

Oh, something else I should have mentioned - the fog.

freeciv was a bit inconsistent in this regard - in one place it was using 0.5
brightness, in the other 0.65.

I've made it 0.65 in both, but it seems it's a bit too bright.
Should it be back to 0.5 (in both places) ?

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-25 Thread anonymous

Follow-up Comment #17, patch #2715 (project freeciv):

Due to your comment following patches are a bit rushed - among other, I
haven't checked it it still builds against gtk3.
Patches are against trunk, r20326.

I'm the guy from bug #18243 and bug #18607 (on that note: pretty please about
the later ?) Submission is anonymous only cause I don't like creating new
accounts that I'm nearly certain I'll forget about. The first bug has my info
on the referenced gnome and gentoo bugs. Just email me.

Somewhat in regard of the later bug: one of the blocks in those patches makes
the Close button quite large on the tabs, but without it, in vanilla freeciv
2.3.0 the icons in that button were noticeably cropped.

I've noticed something, that might have been bug #18844 so I've change
gtk_main_quit to client_quit in one place - I haven't checked, if it's still
needed after the patch in that bug.

Again, why is supported units pixcomm 3/2 times as high as present units ?

Obviously, there's still much cleanup to do, i.e. it seems
pixmap_put_overlay_tile_draw should always call pixmap_put_sprite and just
paint it again with CAIRO_OPERATOR_HSL_COLOR on 'if (fog)'.

Also, the only result of choosing Lua console in the menu is Gtk-CRITICAL
**: IA__gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) ||
GTK_IS_INVISIBLE (widget)' failed, but that's regardless of my patches.


(file #14248, file #14249)
___

Additional Item Attachment:

File name: api-cleanup-svn.patch  Size:46 KB
File name: cairo-drawing-svn.patchSize:109 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-24 Thread Marko Lindqvist

Follow-up Comment #16, patch #2715 (project freeciv):

Is there any real bugs remaining in current version? I would fix only those
in this ticket, and to leave any improvements to future tickets. It would be
nice to get cairo based drawing to gtk3-client in 2.4 already, and S2_4
branching 2-Nov is just a bit over week away.

I tried to apply latest version of the patch to TRUNK gtk3-client but there
was a lot of conflicts. Can you fix that?

I see you have submitted your versions as Anonymous. Do you want to be
credited that way, or by some other name?


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-23 Thread anonymous

Follow-up Comment #15, patch #2715 (project freeciv):

OK, what I thought was a bug in gtkpixcom, was actually an inconsistency in
sizes of supported and present units pixcomm heights. Is there a reason why
those are different ?

Anyway, a few more code shifts plus a few changes aimed at making things
*build* with gtk3, while not breaking gtk2.

Stress on 'build', as for the time being if built with gtk3, it crashes
shortly before displaying anything.
I think the reason for that is that in gtk3 the cairo context of draw
callbacks should *not* be destroyed.

For the moment, I'm thinking about how to avoid the code duplication (all
those 'if (!pcanvas-drawable)...else...' blocks), as it would make
restricting context creation easier.

Perhaps it's the context, that should be the other element of canvas struct,
not the GdkWindow ?

(file #14241, file #14242)
___

Additional Item Attachment:

File name: api-cleanup3.patch Size:104 KB
File name: cairo-drawing.patchSize:108 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-10-17 Thread anonymous

Follow-up Comment #14, patch #2715 (project freeciv):

Well, there's still a bit of cleanup to be done, but canvas are unified now -
there's only CANVAS_PIXMAP.

Dropping CANVAS_PIXBUF wasn't hard, CANVAS_PIXCOMM, on the other hand, was a
pain. Eventually, I've decided to simply reimplement alike to GtkImage, that
is it has now a private copy of the surface.

The memory footprint seems still lower.

There seems to be a little bug in size calculation of GtkPixcomm - I think I
could make a pretty good guess about the cause (probably in the next version
of the patch).

Other than that, reduced GdkColor usage - the new fields of color struct
mirror those of GdkRGBA (probably could be done better). Can't drop it
completely, as treeviews need it.


(file #14226)
___

Additional Item Attachment:

File name: cairo-drawing.new.patchSize:88 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-09-14 Thread anonymous

Follow-up Comment #13, patch #2715 (project freeciv):

No new patch this time, just a couple thoughts and explanations.

As you might noticed, as opposed to the upstream patch, I focused on drawing
first, unifying canvas later.
While gtk3-client is actually gtk2 on cairo ATM, I'm still trying to make
changes to ease later porting.

As such:
- there's no GdkDrawable, just GdkWindow
- slowly moving away from *any* use of GdkColor, if possible
(much can be done here - AFAIU, i.e. GtkTextView should be able to accept
colors as #rrggbb strings)
- no GdkColormap, if possible

As for GtkPixcomm, I'm thinking about turning it to a container of a
GtkEventBox containing GtkDrawingArea derivate with color and surface
properties (a bit like GtkImage, but cairo_surface instead of GdkPixbuf) -
that means it should carry private copies of those, so the originals can be
safely released after setting them.

GDK_MULTIHEAD_SAFE is just an additional topic - parts of it are obviously
correct, other are likely not.


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-09-06 Thread anonymous

Follow-up Comment #12, patch #2715 (project freeciv):

Well, I should have expected that - that corruption along shorelines came
from me being cargo cultist.

After a trivial adjustment, mask is drawn in the correct place, so the
corruption is gone.

Still working on the leaks.

Made a change to ai_level combobox, so that as in 2.3.0 first option is
initially selected at New game.
Changed pango rectangle from ink to logical, as i.e. very long technology
names in Science tab were slightly truncated.

On a semi-related note: it would seem that adding a helper function like
gtk_image_from_cairo_sprite would be useful.
It would simply:
{
pix = sprite_get_pixbuf(sprite);
gtk_image_set_pixbuf(image, pix);
g_object_unref(pix);
}

as it seems that for the moment those new pixbufs leak, if created by
gtk_image_new_from_pixbuf(sprite_set_pixbuf(sprite)).

This time I've checked that the patches actually apply (earlier one of them
had a typo, that prevented it).


(file #14045, file #14046)
___

Additional Item Attachment:

File name: api-cleanup2.patch Size:55 KB
File name: cairo-drawing.patchSize:77 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-09-03 Thread anonymous

Follow-up Comment #10, patch #2715 (project freeciv):

It will likely sound obnoxious, but a bit of googling gave me a solution of
the corruption problem - both the sprites in treeview and transparent cursors
look correctly,

It was just a matter of adding 5 short lines to surface_get_pixbuf (each one
a cairo call).

I will post it, once I get close to figuring out why exactly it worked.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-09-03 Thread anonymous

Follow-up Comment #11, patch #2715 (project freeciv):

OK, in the hindsight, it was painfully obvious (and - in a way - already
hinted at in comment 5).

It's actually just 4 lines.

When creating tmpsurf, between cairo_create and cairo_set_source_surface, put
following:
  cairo_save(cr);
  cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
  cairo_paint(cr);
  cairo_restore(cr);

That's all.

Now, talking about funny things:
for the moment, my patch leaks like crazy, but looking at 'ps -ly' right
after loading a rather large saved game (xsize,100,100;ysize,200,200):
original 2.3.0:
S  1001  2426  1626 17  80   0 165264 85986 poll_s pts/7   00:00:11
freeciv-gtk2
with my patch:
S  1001  2394  1626  4  80   0 105600 71072 poll_s pts/7   00:00:09
freeciv-gtk2

If I could plug the leak(s) and still retain such ratio, it would be a
significant improvement.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-09-02 Thread anonymous

Follow-up Comment #9, patch #2715 (project freeciv):

In an attempt to find out where things go wrong, I've lobotomized much of old
map redraw logic - I think I've managed to confine redraw to screen to the
expose callback, rest just queries areas for redraw.

I've also given GDK_MULTIHEAD_SAFE a shot - I think I've got most of that
right (though in one or two places, I think I was bit off target).

There was also the matter of colormaps - AFAICT, it can be safely dropped in
chatline and option dialog (gtk docs explicitly say color for textview tag
doesn't need to be allocated), I'm unsure about the lines in gui_stuff.c
though (still, went ahead with it).

Unfortunately, none of the above affected the main problem - corruption of
pixbuf backgrounds.

(file #14014)
___

Additional Item Attachment:

File name: cairo-drawing.patchSize:70 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-08-23 Thread anonymous

Follow-up Comment #8, patch #2715 (project freeciv):

I forgot to mention - I think I've dropped all of the GdkGC stuff 
- though selection rectangle was only done thanks to Company.

___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-08-12 Thread Marko Lindqvist

Follow-up Comment #5, patch #2715 (project freeciv):

Found out interesting facts about GtkPixcomm implementation. Actual drawing
when widget is exposed uses those data pointers that have been earlier passed
to gtk_pixcomm_fill() and gtk_pixcomm_copyto(). This means that GtkPixcomm
users must ensure that color structures or sprites are not freed as long as
GtkPixcomm is in use. This explains at least one bug in my earlier cairo
patches where local GdkColor structure was passed to gtk_pixcomm_fill() but
GtkPixcomm was drawn only after exiting that function.

Corrupted backgrounds in sprites (including animated cursors) seem to be
problem in drawing to gtk widgets. Everything in handling sprites and canvases
seem to work. Only when final draw from some partly transparent cairo surface
to gtk widget surface is made, extra stuff is left to those transparent
places. It looks like widget surfaces had some stuff on them initially and
that's visible in places we don't overdraw.
I actually did test version that had extra level of drawing. Our partly
transparent canvases were drawn on top of another filled canvas so that the
result had no transparent parts at all. That canvas is then drawn to gtk
widget. No corruption was visible with that version, and for a while I
actually considered using it as fallback solution for first canvas using
commit - but then I noticed that even cursors would need that and those really
need transparency.

Improvements in attached version since previous:
- Helpdialog always keeps color-structure for unit GtkPixcomm
- Moved surface initialization outside of the operations iteration when
GtkPixcomm exposed
- Common parts of sprite_get_pixbuf() and canvas_put_pixbuf() moved to
separate function surface_get_pixbuf()
- Completely removed some code that was already commented out in earlier
versions


Buglist:
- Unit sprites not shown at help dialog
- Wrong terrain pieces drawn to main map (mask handling problem?)
- gtk widgets and cursors displays mess where we don't overdraw with solid
color


(file #13849)
___

Additional Item Attachment:

File name: CairoTmp5.diff.bz2 Size:13 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-08-12 Thread anonymous

Follow-up Comment #6, patch #2715 (project freeciv):

Being a bit curious, I've decided to give this topic a shot.

But I've been toying with 2.3.0 tarball, not trunk.

First patch touches just about everything but gdk_draw_*.
On that note - trunk seems to have a bug in gui_main.c in regard of srv_id
used instead of ggz_id in one place.

Second (on top of first) tries for cairo drawing.

Caveats:
1. it's not complete yet - I still see gdk_draw_lines, gdk_draw_pixbuf and
gdk_draw_rectangle used somewhere
2. it just about doubles resources consumption (probably cause all sprites
are pixbufs)
3. city map view is broken - I haven't taken a shot at that
gtk_pixbuf_from_cairo_surface function yet

Other than than, I see no *obvious* graphical corruption, then again I
consider myself neither a real freeciv player nor a graphical quality expert.

(file #13853, file #13854)
___

Additional Item Attachment:

File name: api-cleanup.patch  Size:49 KB
File name: cairo-drawing.patchSize:36 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-08-05 Thread Marko Lindqvist

Follow-up Comment #4, patch #2715 (project freeciv):

- Implemented colorbox icons in chatline.c with cairo
- Corrected GdkColor conversion to colors used by cairo
- Use pango for text drawing, fixing font size bugs in process

Buglist:
- Unit sprites not shown at help dialog
- GtkPixcomm backgrounds often corrupted
- Wrong terrain pieces drawn to main map (mask handling problem?)
- Animated cursors a mess


(file #13747)
___

Additional Item Attachment:

File name: CairoTmp4.diff.bz2 Size:13 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-08-01 Thread Marko Lindqvist

Follow-up Comment #3, patch #2715 (project freeciv):

- Converting sprites/canvases to pixbufs should work on big endian machines
too
- Sprite mask handling
- Use cairo (indirectly through sprites and canvases) also in gtkpixcomm
operation OP_FILL
- Removed some dead code
- Function header for create_unit_pixcomm()
- Use canvas functionality instead of (duplicate) direct cairo implementation
of gtkpixcomm operation OP_COPY
- Unified sprite_scale() with citydialog scaling code (probably fixing bugs
in the process, other bugs make testing futile)


Buglist:
- Unit sprites not shown at help dialog
- GtkPixcomm backgrounds often corrupted
- Overview map does not work
- chatline.c has some drawing code that is not using cairo
- Wrong terrain pieces drawn to main map (mask handling problem?)
- Animated cursors a mess

(file #13724)
___

Additional Item Attachment:

File name: CairoTmp3.diff.bz2 Size:13 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-07-30 Thread Marko Lindqvist

Follow-up Comment #2, patch #2715 (project freeciv):

- Updated against current svn
- Scaling in city dialog works
- Map cavas shown also on city dialog's happiness tab
- Cleanup

Main problems remaining:
- No mask handling at all
- Unit sprites not shown at help0 dialog
- GtkPixcomm backgrounds often corrupted

(file #13696)
___

Additional Item Attachment:

File name: CairoTmp2.diff.bz2 Size:12 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-07-24 Thread Marko Lindqvist

Follow-up Comment #1, patch #2715 (project freeciv):

I compiles! Does not work at all correctly yet.

(file #13647)
___

Additional Item Attachment:

File name: CairoTmp.diff.bz2  Size:13 KB


___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #2715] Use cairo in gtk3-client

2011-06-15 Thread Marko Lindqvist

URL:
  http://gna.org/patch/?2715

 Summary: Use cairo in gtk3-client
 Project: Freeciv
Submitted by: cazfi
Submitted on: Wed 15 Jun 2011 04:53:43 PM EEST
Category: client-gtk-3.0
Priority: 5 - Normal
  Status: In Progress
 Privacy: Public
 Assigned to: cazfi
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.4.0

___

Details:

No patch yet, but creating ticket just to indicate that I'm working on this.

I'd like to split this to smaller pieces, but so far interdependencies are
just forcing to make patch bigger and bigger without even getting it to
compilable state.




___

Reply to this item at:

  http://gna.org/patch/?2715

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev