Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 385069 - Use gtk_widget_get_sensitive instead of GTK_WIDGET_SENSITIVE
Summary: Use gtk_widget_get_sensitive instead of GTK_WIDGET_SENSITIVE
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 M2   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 340067
  Show dependency tree
 
Reported: 2012-07-13 11:53 EDT by Anatoly Spektor CLA
Modified: 2013-05-24 09:34 EDT (History)
1 user (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-07-13 11:53:33 EDT
Build Identifier: I20120503-1800

This patch omits use of deprecated GTK_WIDGET_SENSITIVE and uses gtk_wdget_get_sensitive() instead:

http://fedorapeople.org/gitweb?p=aspektor/public_git/eclipse.platform.swt.git;a=commit;h=1b0efec7f406bf0ecdc0990ae0b3b3d5b035d6d3

Reproducible: Always
Comment 1 Silenio Quarti CLA 2012-08-01 14:01:06 EDT
Please add a Widget.gtk_wdget_get_sensitive() helper function (the same way I added for bug#384651). Fix formating too.
Comment 2 Anatoly Spektor CLA 2012-08-01 14:10:33 EDT
Sure will do.
Comment 3 Anatoly Spektor CLA 2012-08-01 15:03:46 EDT
I added helper as you asked. Here is revised patch:

http://fedorapeople.org/gitweb?p=aspektor/public_git/eclipse.platform.swt.git;a=commit;h=c6784de40a2520f536e0cfbfa87c5cc7ab34a35c
Comment 5 Silenio Quarti CLA 2012-08-02 10:02:35 EDT
Arun noticed a couple of problems in the last patch. Thanks for catching this one.

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit?id=4449b03691165bfcd4a87794623b19eba32810cf
Comment 6 Anatoly Spektor CLA 2012-08-03 15:39:07 EDT
Question regarding G_SEAL warning on GTK_WIDGET_SENSITIVE.

When I try to compile with #define G_SEAL_ENABLE I see :

os.c: In function ‘Java_org_eclipse_swt_internal_gtk_OS__1GTK_1WIDGET_1SENSITIVE’:
os.c:1670:17: error: ‘GtkObject’ has no member named ‘flags’


 "GtkObject flags" are deprecated in 2,22 but after patch applied GTK_WIDGET_SENSITIVE is not used much anymore, thus I can assume, that my patch should  remove this warning too, but I still see it. 

  So questions are:

  Why GTK_WIDGET_SENSITIVE warning still persist if WIDGET_SENSITIVE is not used anymore ? (not only sensitive but "mapped" "flags" "has_default" too)

 Should there still be another implementation of GtkObject flags, to remove warning ?

If not, how can warning be removed ?

Thanks in advance,

Anatoly
Comment 7 Anatoly Spektor CLA 2012-08-03 16:16:59 EDT
(In reply to comment #6)
> Question regarding G_SEAL warning on GTK_WIDGET_SENSITIVE.
> 
> When I try to compile with #define G_SEAL_ENABLE I see :
> 
> os.c: In function
> ‘Java_org_eclipse_swt_internal_gtk_OS__1GTK_1WIDGET_1SENSITIVE’:
> os.c:1670:17: error: ‘GtkObject’ has no member named ‘flags’
> 
> 
>  "GtkObject flags" are deprecated in 2,22 but after patch applied
> GTK_WIDGET_SENSITIVE is not used much anymore, thus I can assume, that my
> patch should  remove this warning too, but I still see it. 
> 
>   So questions are:
> 
>   Why GTK_WIDGET_SENSITIVE warning still persist if WIDGET_SENSITIVE is not
> used anymore ? (not only sensitive but "mapped" "flags" "has_default" too)
> 
>  Should there still be another implementation of GtkObject flags, to remove
> warning ?
> 
> If not, how can warning be removed ?
> 
> Thanks in advance,
> 
> Anatoly


Found answer myself:

If I #define both:

#define GSEAL_ENABLE
#define GTK_DISABLE_DEPRECATED

these warnings disappear.

Regards,

Anatoly