Re: [RFC] Renaming the GtkSourceView namespace from GtkSource to Gsv
On 10/20/2016 08:05 AM, Georges Basile Stavracas Neto wrote: > My personal opinion is that it's a good move, even though it'll create > some pain. Since the API itself won't change behavior-wise, adapting the > code to the new change will be simple enough (a Search and Replace > throughout the codebase will be enough, I think). A script will be provided for C code, based on: https://github.com/swilmet/gnome-c-utils (to keep a good indentation/alignment of the code, assuming the code aligns function parameters on the opening parenthesis). For other languages, a sed s/GtkSource/Gsv/ should be enough. In Vala it's different because Vala has changed GtkSource.[...] to Gtk.Source[...]. So for example in Vala, GtkSourceView becomes Gtk.SourceView. And if there is "using Gtk;" at the top of a file, then what needs to be searched/replaced is "Source", which can result to more false positives. Anyway, an intermediary release/tarball will be provided, with the only change being the namespace change (and maybe also removing the deprecated API). Still using GTK+ 3. So that app developers can adapt their code to the new Gsv namespace, and be able to compile/test the code before porting to GTK+ 4 and GtkSourceView 4. On Thu, Oct 20, 2016 at 12:12:54PM -0700, Christian Hergert wrote: > It will certainly make it easier for me to stay within my ideal line width > for some of the longer named functions. I don't mind a change to Gsv, that's > what I think/type already when talking about the project. Yes having shorter code is another advantage, though not the most important to my eyes. When using GObject-based APIs, it is not rare to end up with lines of 120 columns, even if there is only one indentation level, with only one function parameter at the end of the line. This happens e.g. when chaining-up to the parent vfunc. But 120 columns is still OK IMHO. Of course 200 columns would be more problematic. -- Sébastien ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [RFC] Renaming the GtkSourceView namespace from GtkSource to Gsv
On 10/20/2016 08:05 AM, Georges Basile Stavracas Neto wrote: My personal opinion is that it's a good move, even though it'll create some pain. Since the API itself won't change behavior-wise, adapting the code to the new change will be simple enough (a Search and Replace throughout the codebase will be enough, I think). It will certainly make it easier for me to stay within my ideal line width for some of the longer named functions. I don't mind a change to Gsv, that's what I think/type already when talking about the project. -- Christian ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [RFC] Renaming the GtkSourceView namespace from GtkSource to Gsv
My personal opinion is that it's a good move, even though it'll create some pain. Since the API itself won't change behavior-wise, adapting the code to the new change will be simple enough (a Search and Replace throughout the codebase will be enough, I think). Em qui, 20 de out de 2016 às 09:22, Sébastien Wilmetescreveu: > Hi, > > For GtkSourceView 3.90, there is a plan to rename the namespace from > GtkSource to Gsv: > https://bugzilla.gnome.org/show_bug.cgi?id=755752 > > Because the current namespace (GtkSource, or gtk_source in lowercase) > conflicts with the GTK+ one. > > But I have never heard complaints from GTK+ developers. > > So the question is: does it worth the big API churn? Or do you think it > is OK to continue using the GtkSource namespace? > > Another element to take into account: GtkSourceView doesn't show the > good example, although it is a widespread library, so external > developers might create other libraries that also conflict with the Gtk > namespace. Example: GtkSpell. > > PS: it is not me who created GtkSourceView, I started contributing much > later, so the namespace conflict isn't my fault, I prefer to clarify. > > -- > Sébastien > ___ > gtk-devel-list mailing list > gtk-devel-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-devel-list > ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
[RFC] Renaming the GtkSourceView namespace from GtkSource to Gsv
Hi, For GtkSourceView 3.90, there is a plan to rename the namespace from GtkSource to Gsv: https://bugzilla.gnome.org/show_bug.cgi?id=755752 Because the current namespace (GtkSource, or gtk_source in lowercase) conflicts with the GTK+ one. But I have never heard complaints from GTK+ developers. So the question is: does it worth the big API churn? Or do you think it is OK to continue using the GtkSource namespace? Another element to take into account: GtkSourceView doesn't show the good example, although it is a widespread library, so external developers might create other libraries that also conflict with the Gtk namespace. Example: GtkSpell. PS: it is not me who created GtkSourceView, I started contributing much later, so the namespace conflict isn't my fault, I prefer to clarify. -- Sébastien ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list