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 540691 - Improvement of GladeSignalEditor
Improvement of GladeSignalEditor
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: anjuta integration
git master
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks: 542412
 
 
Reported: 2008-06-28 22:02 UTC by Pavel Kostyuchenko
Modified: 2009-01-20 22:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (58.11 KB, patch)
2008-06-28 22:02 UTC, Pavel Kostyuchenko
none Details | Review
Patch for the previous patch (385 bytes, patch)
2008-06-30 14:04 UTC, Pavel Kostyuchenko
none Details | Review
Bugfix (4.30 KB, patch)
2008-07-07 14:25 UTC, Pavel Kostyuchenko
none Details | Review
I forgot about glade-window.c (966 bytes, patch)
2008-07-10 18:14 UTC, Pavel Kostyuchenko
none Details | Review
Improving GladeSignalEditor, second try (61.95 KB, patch)
2009-01-13 21:57 UTC, Pavel Kostyuchenko
none Details | Review
Improving GladeSignalEditor, third try (65.14 KB, patch)
2009-01-19 23:12 UTC, Pavel Kostyuchenko
none Details | Review

Description Pavel Kostyuchenko 2008-06-28 22:02:12 UTC
I thought that it would be nice to have an more extensible signal editor for better integration with anjuta. This patch should do that. There is a little problem with creating the custom signal editor from anjuta, but I think a new glade_editor_set_signal_editor function performs that tolerably.
Also, a bug in rows removal has been fixed.
Comment 1 Pavel Kostyuchenko 2008-06-28 22:02:42 UTC
Created attachment 113585 [details] [review]
Patch
Comment 2 Pavel Kostyuchenko 2008-06-30 14:04:15 UTC
Created attachment 113700 [details] [review]
Patch for the previous patch

I found that I removed is_void_user_data call without providing an equivalent. Fixed by this patch.
Comment 3 Johannes Schmid 2008-07-06 20:58:52 UTC
Could you give some more information about what this patch changes and what the benefit is?

Thanks!
Comment 4 Tristan Van Berkom 2008-07-07 05:17:18 UTC
Im not against the idea of allowing custom derived editor widgets
per se, Im not sure how they would integrate with the treeview...
but I think if there are things that are lacking in the editor,
we would rather see it implemented in glade.

care to attach a patch just for the bug you fixed ?

Note: The signal editor widget is admittedly a mess, and needs
work (gtkbuilder specific support for possible builder features
such as string int and enum user datas etc, the string boldness
and italicness is also broken...).
Comment 5 Pavel Kostyuchenko 2008-07-07 14:25:11 UTC
Created attachment 114122 [details] [review]
Bugfix

Is it what you asked for?
Comment 6 Pavel Kostyuchenko 2008-07-07 14:56:49 UTC
I want to create own signal editor in anjuta because I need to set new construction-only properties, like column, renderer and completion store. Those properties and new signals, that I can connect to in anjuta, allow me to perform different operations with source code. As far as glade's signal editor uses only model I think it's ok to modify columns and renderers.
I can't see any problems with gtkbuilder specific support. I noticed that at least boldness doesn't work, but I thought it's not a significant bug.
Summary of my changes:
- signal editor became a gobject class
- new signals added and old handlers became default handlers for those signals
- new construction-only properties
- fixed bug when removing a row
- some other little changes.
Comment 7 Pavel Kostyuchenko 2008-07-10 18:14:40 UTC
Created attachment 114341 [details] [review]
I forgot about glade-window.c
Comment 8 Tristan Van Berkom 2008-08-09 15:07:56 UTC
oops marked wrong bug sorry
Comment 9 Pavel Kostyuchenko 2009-01-13 21:57:52 UTC
Created attachment 126380 [details] [review]
Improving GladeSignalEditor, second try

This patch does the same as previous one (I mean three obsoleted patches) plus boldness and italicness fixed.
The only purpose of creating custom signal editor is setting contruction-only properties for creating custom completion stores (e.g it can be filled with project symbols) and column renderers (e.g. highlighting symbols).
Unfortunately I know nothing about int and enum user datas, though possibility of custom userdata completion store was made "for symmetry".
Comment 10 Tristan Van Berkom 2009-01-15 23:51:24 UTC
Unfortunately this patch wont work well for your purposes, simply 
because the signal editor gets instantiated in more places - 
there is a signal editor in the treeview/menu editor, and also the 
"edit separately" context menu item allows you to spawn an editor 
for a single widget at will.

I already plan to split out the frontend editors from the core, so
my solution will probably be to use a factory interface recognized by the
core and implemented by frontend gtk+ specific implementation lib; where you
could more easily implement the signal editor creating code.

If you want we can integrate something like your patch here - to
get the features in gnome 2.26, I will probably end up switching the
api after - but your patch should take custom editors 
(gladeui/glade-base-editor.c particularly) and independantly created 
editors into account.

Suggestion: maybe add something like glade_app_set_signal_editor_type();
and a GladeApp::signal-editor-created signal, that passes the newly created
editor as an argument (to let the frontend connect the signals)... that
could work until we have a proper "editor widget factory" in place.

Comment 11 Pavel Kostyuchenko 2009-01-17 04:45:36 UTC
For now I need four things:
- being able to create a custom handler completion store;
- receive a signal about creating a new handler for creating a handler stub;
- receive row-activate signal for the same.
- to know what signal editor and its row is active, so the handler stub can be created after entering the handler into the signal editor.
I don't know how much will the new editor differs from the current one (and my patch does slight changes to its functionality), but anyway I'm going to complete the solution without that new editor and I hope there will not be many problems while migrating to the new api.
Comment 12 Tristan Van Berkom 2009-01-17 05:01:22 UTC
these requirements are fairly straightforward, and I guess pretty
portable (i.e. an iface would generally have the same 
properties/signals).

Also, if and when I manage the whole refactoring/split, I hope
to offer the same editor widgets as seemlessly as possible,
maybe in a gtk+ specific frontend lib, or directly implemented
from the base gtk+ catalog (i.e. old editors implement new interfaces
and just integrate with the core a little differently) - I also
hope to offer a more project based api which may result in the
loss of the whole "active project" idea, which can be buggy
when trying to handle multiple projects and copy/paste otherwise.
if it poses real changes I'll include updating the anjuta plugin
as part of the task and offer to do the porting work myself.
Comment 13 Pavel Kostyuchenko 2009-01-19 23:12:47 UTC
Created attachment 126805 [details] [review]
Improving GladeSignalEditor, third try

I've made a new signal GladeApp::signal-editor-created for setting up every signal editor, but the first (main) signal editor is created too early (in the glade_app_init()), so I kept glade_editor_set_signal_editor() for recreating it.
Comment 14 Juan Pablo Ugarte 2009-01-20 22:25:28 UTC
Patch commited in trunk