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 695972 - gdl_dock_object_set_stock_id does not update gdl-icon
gdl_dock_object_set_stock_id does not update gdl-icon
Status: RESOLVED FIXED
Product: gdl
Classification: Other
Component: general
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-16 17:13 UTC by Dominique Lasserre
Modified: 2013-04-13 09:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dock-object: emit notify signal in setters (5.22 KB, patch)
2013-03-17 04:52 UTC, Evan Nemerson
accepted-commit_after_freeze Details | Review

Description Dominique Lasserre 2013-03-16 17:13:57 UTC
The latest gdl-3.0-vapi change introduce the regression that the gdl-icon does not update when stock_id is changed.

Current (not working):
public void get_stock_id (string stock_id);
public void set_stock_id (string stock_id);
public string stock_id { get; set construct; }

Will result in e.g.:
-> gdl_dock_object_set_stock_id ((GdlDockObject*) _tmp0_, GTK_STOCK_NEW);

Old (works):
[NoAccessorMethod]
public string stock_id { owned get; set construct; }

Will result in e.g.:
-> g_object_set ((GdlDockObject*) _tmp0_, "stock-id", GTK_STOCK_NEW, NULL);


To reproduce this issue one can use the gdl-example and change the stock-id of one DockItem after initialization: https://live.gnome.org/Vala/GdlSample

I guess the same issue exists with DockObject.pixbuf_icon.
Comment 1 Evan Nemerson 2013-03-17 04:52:32 UTC
Created attachment 239052 [details] [review]
dock-object: emit notify signal in setters

I think it would be better to resolve this by fixing gdl, which is what this patch does.

To work around this in Vala you can do foo.set ("stock-id", Gtk.Stock.NEW)
Comment 2 Dominique Lasserre 2013-03-17 12:28:18 UTC
Thank you! I can confirm both the gdl patch and also the Vala workaround works.
Comment 3 Sébastien Granjoux 2013-03-21 22:07:07 UTC
Review of attachment 239052 [details] [review]:

Thank you very much for your patch. GDL is part of GNOME which is currently in hard freeze period so I think it's better to commit this in the master branch after the release of the version 3.8 beginning of next week.
Comment 4 Sébastien Granjoux 2013-04-13 09:46:58 UTC
I have just committed your patch. Thank.