After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 597365 - Use accessor functions instead direct access (use GSEAL GnomeGoal)
Use accessor functions instead direct access (use GSEAL GnomeGoal)
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: core application
git master
Other Linux
: Normal normal
: ---
Assigned To: Naba Kumar
Anjuta maintainers
Depends on: 593671
Blocks: 585391
 
 
Reported: 2009-10-04 23:58 UTC by Javier Jardón (IRC: jjardon)
Modified: 2010-06-02 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use accessor functions instead direct access (88.84 KB, patch)
2009-10-05 00:06 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
Use accessor functions instead direct accessv. Second patch (3.17 KB, patch)
2010-02-10 21:53 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Use accessor functions instead direct accessv. Final patch (10.42 KB, patch)
2010-04-29 12:43 UTC, Javier Jardón (IRC: jjardon)
none Details | Review

Description Javier Jardón (IRC: jjardon) 2009-10-04 23:58:20 UTC
GTK+ 2.17.10 is now the required version
I've used all the GTK+ 2.18.1 api available, still missing:

GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
GTK_WIDGET_REALIZED (widget)
GTK_WIDGET_MAPPED (widget)  See bug #69872
Comment 1 Javier Jardón (IRC: jjardon) 2009-10-05 00:06:37 UTC
Created attachment 144754 [details] [review]
Use accessor functions instead direct access
Comment 2 Johannes Schmid 2009-11-23 16:50:03 UTC
Review of attachment 144754 [details] [review]:

Thanks!
Comment 3 Johannes Schmid 2009-11-23 16:51:33 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 4 Javier Jardón (IRC: jjardon) 2009-11-23 23:13:13 UTC
Hello Johannes,

thank you for apply the patch, but I've reopened this bug because there still are some pending symbols. There is not a replacement API for them (2.19.0 here). Still missing:

GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
GTK_WIDGET_REALIZED (widget)
GTK_WIDGET_MAPPED (widget)  See bug #69872
Comment 5 Javier Jardón (IRC: jjardon) 2010-02-10 21:53:57 UTC
Created attachment 153482 [details] [review]
Use accessor functions instead direct accessv. Second patch

The only remaining function are:

GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);

but this is really a bug because you should never need to use this

See mith coment here: https://bugzilla.gnome.org/show_bug.cgi?id=593601#c4
and ebassi one here: https://bugzilla.gnome.org/show_bug.cgi?id=69872#c27
Comment 6 Sébastien Granjoux 2010-02-11 18:53:21 UTC
(In reply to comment #5)
> GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
> but this is really a bug because you should never need to use this
> See mith coment here: https://bugzilla.gnome.org/show_bug.cgi?id=593601#c4
> and ebassi one here: https://bugzilla.gnome.org/show_bug.cgi?id=69872#c27

Well, why not. But what is right solution to replace GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS) ?
Comment 7 Naba Kumar 2010-03-14 15:58:45 UTC
(In reply to comment #5)
> 
> The only remaining function are:
> 
> GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
> 
> but this is really a bug because you should never need to use this
> 
> See mith coment here: https://bugzilla.gnome.org/show_bug.cgi?id=593601#c4
> and ebassi one here: https://bugzilla.gnome.org/show_bug.cgi?id=69872#c27

Hi Javier, do you have any working solution for this in Anjuta?
Comment 8 Javier Jardón (IRC: jjardon) 2010-04-11 19:41:32 UTC
The question is, why do you need to use the GtkTreeView hack [1] in your code?

[1] http://git.gnome.org/browse/gtk+/tree/gtk/gtktreeview.c#n10264
Comment 9 Sébastien Granjoux 2010-04-12 11:49:20 UTC
(In reply to comment #8)
> The question is, why do you need to use the GtkTreeView hack [1] in your code?
> [1] http://git.gnome.org/browse/gtk+/tree/gtk/gtktreeview.c#n10264

It's used in the debugger view memory windows. You can get it by starting the debugger and then selecting View->Memory.

In the context menu item, you can select Go to Address that will display a small entry box allowing you to enter just an address. To enter the address, I move the focus to this entry box so the user can type directly the new address. But if I don't use the GtkTreeView hack, the cursor doesn't appear which is very confusing.

This address entry box is similar to the entry box that you get in the file selector by example. I'm quite sure that when I have seen this behavior, I have looked how it's done in Gtk+ and find the GtkTreeView hack.

Is there a better way to do it now ?
Comment 10 Emmanuele Bassi (:ebassi) 2010-04-12 13:22:48 UTC
(In reply to comment #9)
> Is there a better way to do it now ?

not right now, and as I said here:

  https://bugzilla.gnome.org/show_bug.cgi?id=69872#c27

we need public API to allow people to implement this kind of functionality in a consistent and gtk+-like way without using internal details and flags like GTK_HAS_FOCUS.
Comment 11 André Klapper 2010-04-21 18:10:38 UTC
Apart from GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS):
Can the last patch in comment 5 get a review/commit?
Comment 12 Javier Jardón (IRC: jjardon) 2010-04-29 12:43:49 UTC
Created attachment 159868 [details] [review]
Use accessor functions instead direct accessv. Final patch

All the remaining accessor fixed in this patch.

I'd suggest you to add -GSEAL_ENABLED flag in your configure.ac to not use direct access again.
Comment 13 Javier Jardón (IRC: jjardon) 2010-05-22 16:18:15 UTC
ping -> It's the latest patch ;)
Comment 14 Sébastien Granjoux 2010-05-22 17:35:08 UTC
(In reply to comment #13)
> ping -> It's the latest patch ;)

Yes, I see thanks you very much for all your work.

I have not applied it yet because I don't expect any problem with it and it will not change anything for users or developers so I'm rather working on other parts. Or is there a reason for applying it as soon as possible ?
Comment 15 André Klapper 2010-05-22 17:46:50 UTC
Cleaning the to-do list for GNOME 3, and being able to compile anjuta with gtk 2.90?
Comment 16 Johannes Schmid 2010-05-22 18:23:59 UTC
Well, that's no priority for now (as we have a patch anyway that can be easily applied). And in bumping the gtk+ version it makes development for some people much more tricky.

(Yeah, anjuta uses some gtk+ 2.19 specific call somewhere but that's rather easy to patch out for now.)

Give us one or two month and be sure that the patch will be applied in time.
Comment 17 Johannes Schmid 2010-06-01 20:54:42 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 18 Johannes Schmid 2010-06-02 11:39:07 UTC
@Javier: Thanks for pushing the patch correctly. I guess I was too tired yesterday and fucked things up.