Re: Migrating from GTK+ 2.x to GTK+ 3

2017-04-12 Thread Sébastien Wilmet
Hi,

On Tue, Feb 14, 2017 at 12:25:32PM +, Rúben Rodrigues wrote:
> i'm new on Linux and gtk+. I'm trying to migrate an application make
> with gtk+2.0, and i'm following this tutorial
> https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html

There is also this guide that may be useful:
https://developer.gnome.org/Gnome3PortingGuide/

--
Sébastien
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: how to customise gtk-doc output

2017-04-12 Thread jcupitt
On 12 April 2017 at 13:23, Sébastien Wilmet  wrote:
> On Wed, Apr 05, 2017 at 10:24:00AM +0100, jcup...@gmail.com wrote:
>> I'd like to customise the gtk-doc output for my project: I'd like a
>> new header, and some tracker stuff in the footer.
>> xslt and the configure options to gtk-doc?
>
> I don't know how it is done on developer.gnome.org, but it should be
> implemented somewhere in
> https://git.gnome.org/browse/library-web/

Oh nice, I didn't find that, thanks! Yes, it seems they have some
fancy Python to reformat the pages.

I ended up doing something very simple. This line of Ruby:

template.at_css(".main-content").children = doc.at_css("body").children

Just takes everything inside  and drops it into a standard
github pages template, making (for example) this:

http://jcupitt.github.io/libvips/API/current/VipsImage.html

Reformatter here:

https://github.com/jcupitt/libvips/blob/gh-pages/gen-api.rb

John
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Moving to glade and GtkInspector

2017-04-12 Thread Alberto Ruiz
Hey Martin,

When I maintained gnome-calculator I ported a bunch of Widgets to use
GtkBuilder templates:
https://blogs.gnome.org/tvb/2013/04/09/announcing-composite-widget-templates/

This allowed me to massively reduce my codebase as I turned the UI into
content, I also used the chance to port many layouts from nested v/hboxes
to the newer GtkGrid. GtkBuilder templates are generally encouraged and we
even do so in Gtk+ itself.

While glade is not perfect, moving my handcrafted UI code to .ui files
certainly made my life easier as a maintainer.

2017-04-03 6:29 GMT+01:00 Martin Owens :

> Hi Gtk Devs,
>
> I'm brining this up in devel mailing list because it might not be
> possible to do well enough, but I'm interested in raising the question
> of moving projects from widget code to glade ui files.
>
> I work on Inkscape. The next version of Inkscape (0.93) will be Gtk3
> and Gtk2 is now removed from our codebase. But we're still generating
> all of our widget trees in-code and is kinda hurts redesigning our
> dialogs.
>
> Is it worth moving to glade for parts of a large gtk3 app, does it help
> with css adjustments at all and would it be an acceptable patch to make
> the gtkinspector dump out our existing widget trees (it would be really
> nice to have it generate glade xml, but that's just silly right). At
> least getting the data out of the inspector and into a python script
> for generating the xml would be a start.
>
> Any ideas, or thoughts?
>
> Thanks for your help, Best Regards, Martin Owens
> ___
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
>



-- 
Cheers,
Alberto Ruiz
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Moving to glade and GtkInspector

2017-04-12 Thread Sébastien Wilmet
Hi,

On Mon, Apr 03, 2017 at 01:29:01AM -0400, Martin Owens wrote:
> I'm brining this up in devel mailing list because it might not be
> possible to do well enough, but I'm interested in raising the question
> of moving projects from widget code to glade ui files.
> 
> I work on Inkscape. The next version of Inkscape (0.93) will be Gtk3
> and Gtk2 is now removed from our codebase. But we're still generating
> all of our widget trees in-code and is kinda hurts redesigning our
> dialogs.
> 
> Is it worth moving to glade for parts of a large gtk3 app, does it help
> with css adjustments at all and would it be an acceptable patch to make
> the gtkinspector dump out our existing widget trees (it would be really
> nice to have it generate glade xml, but that's just silly right). At
> least getting the data out of the inspector and into a python script
> for generating the xml would be a start.
> 
> Any ideas, or thoughts?

Glade is not well maintained, some developers prefer to edit the XML
files directly, which is not really convenient.

At least by writing C/C++ code, you have compilation warnings when using
deprecated functions. Personally I prefer writing code instead of using
GtkBuilder, but that's just my preference. With code it's easy to write
re-usable functions, in XML files it is not possible.

--
Sébastien
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Migrating from GTK+ 2.x to GTK+ 3

2017-04-12 Thread Emmanuele Bassi
On 14 February 2017 at 12:25, Rúben Rodrigues  wrote:

> Hi,It gives me this error:
> 
> I'm sorry for this basic questions for you but i don't see tutorials that
> explains more detailed to understand..
>
>

> i'm new on Linux and gtk+. I'm trying to migrate an application make with
> gtk+2.0, and i'm following this tutorial https://developer.gnome.org/
> gtk3/stable/gtk-migrating-2-to-3.html
>
> But i have some doubts, like where i could do this
>
>   make CFLAGS+="-DGTK_DISABLE_SINGLE_INCLUDES"
>
> I'm using Eclipse to compile the files..
> If i make this code:
>
>  make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
>
>
>
Please, don't use screenshots when describing issues.

You're using an external library — GtkExtra — and that library still
references widgets like GtkCTree which have been long since deprecated in
GTK+ 2, and removed from GTK+ 3 (GtkCTree and GtkCList are GTK+ 1.2 widgets
which were deprecated when GtkTreeView was added in GTK+ 2.0, 17 years
ago). It seems you have a widget that uses the GtkDirTree widget from
GtkExtra; that widget inherits from GtkCTree.

You will need to rewrite the widget — either using GtkListBox or
GtkTreeView.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Moving to glade and GtkInspector

2017-04-12 Thread Martin Owens
Hi Gtk Devs,

I'm brining this up in devel mailing list because it might not be
possible to do well enough, but I'm interested in raising the question
of moving projects from widget code to glade ui files.

I work on Inkscape. The next version of Inkscape (0.93) will be Gtk3
and Gtk2 is now removed from our codebase. But we're still generating
all of our widget trees in-code and is kinda hurts redesigning our
dialogs.

Is it worth moving to glade for parts of a large gtk3 app, does it help
with css adjustments at all and would it be an acceptable patch to make
the gtkinspector dump out our existing widget trees (it would be really
nice to have it generate glade xml, but that's just silly right). At
least getting the data out of the inspector and into a python script
for generating the xml would be a start.

Any ideas, or thoughts?

Thanks for your help, Best Regards, Martin Owens
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


gdk-pixbuf - JPEG comments patch

2017-04-12 Thread Pawel
Hi,

I'm looking for someone who can commit my small patch to official repository.
The patch it's a partial solution for this:
https://bugzilla.gnome.org/show_bug.cgi?id=143608

Originally I've made the change as a pull request on GitHub:
https://github.com/GNOME/gdk-pixbuf/pull/2/commits/1cede25038a2b43da0361265ed36dbb2a94ceabd

The official way to submit patches is too complicated ( in bureaucratic way ).

BTW. I can't subscribe to the list because my address is banned. Don't know why 
- I've never subscribed to any gnome lists before.

Best Regards
Pawel


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Custom GtkHeaderBar

2017-04-12 Thread Takao Fujiwara

I could resolve this issue to call this.get_style_context().remove_class("csd") 
after set_titlebar(header) is called.
But not sure why I have to remove "csd" class while it's a custom header.

Fujiwara


On 04/11/17 21:33, Takao Fujiwara-san wrote:

I'd like to create a custom GtkHeaderBar in GTK 3.22.

If I use GtkBox as the header, it can draw the background color.
If I use a class inherited from GtkBox, it draws the transparent color.

Seems GtkBox uses rgba from ".titlebar:not(headerbar)" of gtk-contained.css:1736 but the 
inherited class uses "window.csd > .titlebar:not(headerbar)"
of gtk-contained.css:2041 from Inspector.

How can I set the non-transparent color in the inherited class?
The following is the test code.

public class CustomHeader : Gtk.Box {
public CustomHeader(Gtk.Orientation orientation,
int spacing) {
GLib.Object(
orientation : orientation,
spacing : spacing
);
}
}

public class TestWindow : Gtk.Window {
public TestWindow() {
GLib.Object(
type : Gtk.WindowType.TOPLEVEL
);

#if USE_HBOX
var header = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
#else
var header = new CustomHeader(Gtk.Orientation.HORIZONTAL, 0);
#endif
header.set_css_name("headerbar");
var vvbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
header.pack_start(vvbox, true, true, 0);
var label = new Gtk.Label("Title");
label.get_style_context().add_class("title");
vvbox.pack_start(label, true, false, 0);
var sub_label = new Gtk.Label("Subtitle");
sub_label.get_style_context().add_class("subtitle");
vvbox.pack_start(sub_label, true, false, 0);
set_titlebar(header);
var vbox = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
add(vbox);
var llabel = new Gtk.Label("test");
vbox.pack_start(llabel, true, true, 0);
}

public static int main (string[] args) {
Gtk.init (ref args);

var window = new TestWindow();
window.show_all();

Gtk.main();
return 0;
}
}
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list