Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 422316 - [GTK3] No "icon" in TreeViewer for threads in "Debug" view
Summary: [GTK3] No "icon" in TreeViewer for threads in "Debug" view
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 4.4 RC1   Edit
Assignee: Sravan Kumar Lakkimsetti CLA
QA Contact: Arun Thondapu CLA
URL:
Whiteboard:
Keywords:
: 430590 434883 (view as bug list)
Depends on:
Blocks: 340067
  Show dependency tree
 
Reported: 2013-11-22 04:03 EST by Mickael Istria CLA
Modified: 2014-05-23 10:25 EDT (History)
7 users (show)

See Also:
arunkumar.thondapu: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2013-11-22 04:03:31 EST
Using Eclipse 4.4.M3, and Ubuntu 12.04 with
$ dpgk -s libgtk-3.0
[...]
Architecture: amd64
Source: gtk+3.0
Version: 3.4.2-0ubuntu0.5
Replaces: libgtk3.0-0
Provides: gtk3-binver-3.0.0
[...]

I noticed that the "Debug" view don't show icons for the items of treeViewer when looking at thread. It used to work with 4.4.M2
Not sure if it's a wrong SWT implementation over GTK3, or a wrong usage of SWT in JFace or Debug view.
Comment 1 Mickael Istria CLA 2013-11-22 04:05:39 EST
Same things happens in the "Variable" view during debug.
Comment 2 Mickael Istria CLA 2013-11-22 11:30:36 EST
Some other places are also missing icons: Java EE perspective button, the "Jaa Task" and "Java Breakpoints" in the "Markers" view.
I'm wondering whether there could be a file format that is not supported for icons by GTK3.
Comment 3 Michael Rennie CLA 2014-03-18 21:36:30 EDT
*** Bug 430590 has been marked as a duplicate of this bug. ***
Comment 4 Marc Khouzam CLA 2014-04-01 13:29:54 EDT
This is also happening on my Ubuntu machine also running GTK 3.4.2.
I have no icons in the tree of the Debug view, nor the Expressions, Variables, Breakpoints or Registers (used by CDT) views.  Icons do display in the tree for views like Search or Problems.

If I change perspective from Debug to Java and then come back to Debug, the Debug view, and only the Debug view, now displays the icons in its tree.

All this happens when using JDT or when using CDT.

If I turn off GTK3 before starting eclipse using SWT_GTK3=0, all icons seem to display properly.
Comment 5 Marc Khouzam CLA 2014-04-01 13:30:44 EDT
(In reply to Marc Khouzam from comment #4)
> This is also happening on my Ubuntu machine also running GTK 3.4.2.

I'm using the latest I-build: I20140325-0830
Comment 6 Marc-André Laperle CLA 2014-04-01 13:57:48 EDT
Eclise 4.4 I20140325-0830
GTK 3.8.6-0ubuntu3.1 (Ubuntu 13.10)

I'm seeing a slightly different behavior. At first, the icons are not visible in the Debug view and Breakpoints view. When I select anything in those views, the icons appear. With GTK2 the icons are always displayed properly.
Comment 7 Alexander Kurtakov CLA 2014-05-02 04:53:09 EDT
A workaround pushed to master.
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a43c04c97ceffe2b12039d4c052d72e59a0568dd

Let's keep the bug open for investigating what the proper fix is.
Comment 8 Sravan Kumar Lakkimsetti CLA 2014-05-05 05:37:44 EDT
the root cause of this issue is

When we set the icon we do not have a direct way to force the cell renderers to recalculate the positions based on the size. To do this in GTK 2 we reset the widget style information. 

When we come to GTK3 the calls for setting the widget style have been deprecated. since this is no longer used in GTK3. So we need to provide a default size while creating the cell renderer. This is used for calculating the cell positions.

The fix is to set a default icon size during the pixbuf cell renderer creation

-Sravan
Comment 9 Sravan Kumar Lakkimsetti CLA 2014-05-09 07:34:31 EDT
(In reply to Alexander Kurtakov from comment #7)
> A workaround pushed to master.
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=a43c04c97ceffe2b12039d4c052d72e59a0568dd
> 
> Let's keep the bug open for investigating what the proper fix is.

Hi Alex,

The root cause of the problem is the way we force the cell renderes to recalculate the positions. In Gtk2 we do this to by resetting the widget style information. But in case of GTK3 the widget style api have been deprecated. So we have removed the code to recalculate the cell renders. So initially the cell renderes are not initialized with any icon information so they get calculated using size 0. This is the reason I set a default icon size.

I believe this would be a proper fix. can we resolve this?

Thanks
Sravan
Comment 10 Alexander Kurtakov CLA 2014-05-09 07:36:48 EDT
Hi Sravan,
Yes doing it now.
Comment 11 Arun Thondapu CLA 2014-05-14 13:23:46 EDT
*** Bug 434883 has been marked as a duplicate of this bug. ***