[opensuse-factory] GtkSourceView - It is possible to change buffers in TextView and continue Word-Completion?
All, I have been wrestling with this issue for a month (not continually, but as time and curiosity permit). I have posted to the gtk-app list (see thread: "Howto register/unregister words completion provider on buffer changein textview?"), but so far there has been no solution. So I thought I would take a stab on factory and see if there were any GTK wizards here. The basic background is have built a single-document interface editor (similar to gedit/kwrite) in gtk and use gtksourceview for word-completion (it works fine). (e.g. http://download.opensuse.org/repositories/home:/drankinatty/openSUSE_Leap_15...) I have now branched tha project to create a multi-document interface editor similar to kate, the basic layout being: +===================================================+ |menu | +------------+--------------------------------------+ | file_a | | | file_b | | | file_c | TextView | | | with | | | WordCompletion | | | | | | | | | | | | | +------------+--------------------------------------+ Here completion works fine for the first buffer bound to the completion object, and for additional buffers activated in split windows on the right, but with a multi-document interface, I need to be able to change the buffer visible any given textview and change the buffer used as the source of the word-completion (which the gtksourceview functions to either register/unregisters words used for completion or add/remove the completion providers seemed tailor made for) However, there seems to be a private binding created at the time the completion object and provider are first created binding the original buffer to the completion object that I have not found a way to alter. I have boiled it down to a simple question: "Is it possible to change the buffer shown in a TextView (using gtksourceview) and have word-completion continue to work within that TextView?" The reason I ask is that it appears the completion is indelibly bound to the original buffer when word-completion is first activated. There does not seemto be a way to: gtk_source_completion_remove_provider /* removing and unreffing all */ and then after gtk_text_view_set_buffer (view, newbuf); gtk_source_completion_add_provider and have word-completion function. Similarly, there seems to be no way to retain the same completion provider (so remove/add is unnecessary) and simply: gtk_source_completion_words_unregister (prov_words, oldbuf); and then to update the words in the provider: gtk_source_completion_words_register (prov_words, newbuf); In all cases, the exact same behavior is observed. When the buffer is changed and all GtkSourceCompletionWords providers removed and a new provider created, words registered and added with the new buffer in the textview, word completion is non functional, no popup, no nothing. However if I go through the same process again and change the buffer shown in the textview from newbuf to original, remove all providers, creating a new provider, registering words (in the exact same order), then Walah! completion is magically working again. I've looked at the source code for GtkSourceView and unfortunately, most of it is bewildering, but it does appear there is a binding between the original buffer and the GtkSourceCompletion for the textview and the original buffer in the textview whencompletion is first activated. Is this right?? And, if it is, doesn't that effectively prevent changing buffers in a sourceview and having completion continue to function? And if that is the case, is this a gtksourceview bug or a feature? The code is currently written using GtkSourceView 2.11.2, but 3.23.2 and 4.0.2 seem identical in this regard. If nobody knows, is there a GtkSourceView specific list I can follow up on? It just doesn't seem right that I would need to destroy the entire textview widget just to keep completion working with a new buffer. Sorry of the long post, but I was hoping to avoid having to pull the GtkSourceView source completely apart to find out whether changing a buffer with word-completion is possible. Any help or links or other list suggestions greatly appreciated. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Mittwoch, 7. November 2018 08:44:28 CET David C. Rankin wrote:
All,
I have been wrestling with this issue for a month (not continually, but as time and curiosity permit). I have posted to the gtk-app list (see thread: "Howto register/unregister words completion provider on buffer changein textview?"), but so far there has been no solution. So I thought I would take a stab on factory and see if there were any GTK wizards here.
This is completely off topic for this list. Regards, Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019
On 11/07/2018 04:54 AM, Stefan Brüns wrote:
On Mittwoch, 7. November 2018 08:44:28 CET David C. Rankin wrote:
All,
I have been wrestling with this issue for a month (not continually, but as time and curiosity permit). I have posted to the gtk-app list (see thread: "Howto register/unregister words completion provider on buffer changein textview?"), but so far there has been no solution. So I thought I would take a stab on factory and see if there were any GTK wizards here. This is completely off topic for this list.
Regards,
Stefan
Then where is the right place for help developing packages for opensuse? -- David C. Rankin, J.D.,P.E.
In general, factory is the right place to discuss developments for openSUSE.
Your question sounds more packaging related. Those questions are better placed in opensuse-packaging@o.o
Schöne Grüße
Axel
--
Written from cell phone - excuses for typos
Am 8. November 2018 09:26:58 MEZ schrieb "David C. Rankin"
On Mittwoch, 7. November 2018 08:44:28 CET David C. Rankin wrote:
All,
I have been wrestling with this issue for a month (not continually, but as time and curiosity permit). I have posted to the gtk-app list (see
On 11/07/2018 04:54 AM, Stefan Brüns wrote: thread:
"Howto register/unregister words completion provider on buffer changein textview?"), but so far there has been no solution. So I thought I would take a stab on factory and see if there were any GTK wizards here. This is completely off topic for this list.
Regards,
Stefan
Then where is the right place for help developing packages for opensuse? -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Donnerstag, 8. November 2018 14:34:49 CET Axel Braun wrote:
In general, factory is the right place to discuss developments for openSUSE.
Your question sounds more packaging related. Those questions are better placed in opensuse-packaging@o.o Schöne Grüße Axel
It is not, by far. Somewhere in the overly verbose and lengthy message David states he has problems developing an application using GtkSourceView. He does not state a single issue related to the packaging of GtkSourceView or any other Gtk packages in openSUSE. David, please ask in the various Gtk support channels (Mailinglists, IRC, Forums, ...). If you get no answer, try to ask specific questions. Regards, Stefan -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/11/2018 09.26, David C. Rankin wrote:
On 11/07/2018 04:54 AM, Stefan Brüns wrote:
On Mittwoch, 7. November 2018 08:44:28 CET David C. Rankin wrote:
All,
I have been wrestling with this issue for a month (not continually, but as time and curiosity permit). I have posted to the gtk-app list (see thread: "Howto register/unregister words completion provider on buffer changein textview?"), but so far there has been no solution. So I thought I would take a stab on factory and see if there were any GTK wizards here. This is completely off topic for this list.
Regards,
Stefan
Then where is the right place for help developing packages for opensuse?
opensuse-programming, but has absolutely no traffic. - -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas)) -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCW+RkEwAKCRC1MxgcbY1H 1TTMAJ4sLYHLRXiCe/jf5mXqeeZJTpVErgCfZYZEiAr4CcHdnQDzfRmY9UMCcv0= =I4XR -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 11/08/2018 10:28 AM, Carlos E. R. wrote:
opensuse-programming, but has absolutely no traffic.
Thanks Carlos, after the fragmentation of the mailing lists, it's unclear where development questions need to be asked. After the original general/factory split, this was the place, but apparently now that's not right either. Since the general response from the suse folks has been "go F.. yourself", I won't waste my time further. -- David C. Rankin, J.D.,P.E.
* David C. Rankin
On 11/08/2018 10:28 AM, Carlos E. R. wrote:
opensuse-programming, but has absolutely no traffic.
Thanks Carlos, after the fragmentation of the mailing lists, it's unclear where development questions need to be asked. After the original general/factory split, this was the place, but apparently now that's not right either.
Since the general response from the suse folks has been "go F.. yourself", I won't waste my time further.
your choice, but your understanding is incorrect. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Op donderdag 8 november 2018 22:28:45 CET schreef David C. Rankin:
On 11/08/2018 10:28 AM, Carlos E. R. wrote:
opensuse-programming, but has absolutely no traffic.
Thanks Carlos, after the fragmentation of the mailing lists, it's unclear where development questions need to be asked. After the original general/factory split, this was the place, but apparently now that's not right either.
Since the general response from the suse folks has been "go F.. yourself", I won't waste my time further. That's an outright accusation you have no proof for. IMNSHO an apology to the suse folks ( who were'nt in this thread at all ) is in place.
-- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (7)
-
Axel Braun
-
Brüns, Stefan
-
Carlos E. R.
-
David C. Rankin
-
Knurpht-openSUSE
-
Patrick Shanahan
-
Stefan Brüns