Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 388953 - Use gtk_render_frame instead of gtk_paint_flat_box for GTK+ 3 and higher
Summary: Use gtk_render_frame instead of gtk_paint_flat_box for GTK+ 3 and higher
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.3 M3   Edit
Assignee: Alexander Kurtakov CLA
QA Contact:
URL:
Whiteboard: gtk3test
Keywords:
Depends on:
Blocks: 340067
  Show dependency tree
 
Reported: 2012-09-06 10:38 EDT by Anatoly Spektor CLA
Modified: 2012-10-08 15:38 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anatoly Spektor CLA 2012-09-06 10:38:50 EDT
This patch omits use of deprecated gtk_paint_flat_box () method and uses GTK+3 API method instead:

http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=gtk3_render_flat_box
Comment 1 Silenio Quarti CLA 2012-10-01 11:05:34 EDT
This patch leaks the cairo context in Widget.gtk_render_flat_box().
Comment 2 Anatoly Spektor CLA 2012-10-04 13:56:19 EDT
(In reply to comment #1)
> This patch leaks the cairo context in Widget.gtk_render_flat_box().

Thank you for pointing that out Silenio!

 Here is revised 64-bit version of the patch:

http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=gtk3_render_flat_box_64
Comment 3 Alexander Kurtakov CLA 2012-10-04 15:33:17 EDT
Looks good. GTK3 only change, pushed to master. http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=3fdc19a025bdb1d1c9714427e7323556f1c5dd33
Comment 4 Arun Thondapu CLA 2012-10-08 13:55:14 EDT
Not sure if I'm missing something here but shouldn't the line of code
OS.gtk_render_frame (context, cairo, context, y, width, height);
really be OS.gtk_render_frame (context, cairo, x, y, width, height);
Comment 5 Alexander Kurtakov CLA 2012-10-08 15:38:39 EDT
Thanks for spotting it Arun. Fixed in http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=772eba60342f660557d66c688c0f5931749c4e89 . 
It's really hard to check something that can't be run for now.