Re: Migrate to gtk3.0



On 10 March 2017 at 15:11, Rúben Rodrigues <ruben_gr live com pt> wrote:
Hi,

i'm trying to migrate from gtk2.0 to gtk3.0 and i'm following gnome
tutorial
https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html#id-1.6.3.3

When i put

make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"

to don't use deprecated symbols I get this  errors:

/opt/x-tools/rootfs/rpi/usr/include/gtkextra-3.0/gtkextra/gtkdirtree.h:54:3:
error: unknown type name ‘GtkCTree’
    GtkCTree ctree;
    ^
/opt/x-tools/rootfs/rpi/usr/include/gtkextra-3.0/gtkextra/gtkdirtree.h:73:3:
error: unknown type name ‘GtkCTreeClass’
    GtkCTreeClass parent_class;

I put CFLAGS in Eclipse, Project proprieties -> Cross GCC Compiler ->
Preprocessor -> Defined Symbols (-D)

->GTK_DISABLE_SINGLE_INCLUDES

->GTK_DISABLE_DEPRECATED

->GDK_DISABLE_DEPRECATED

I can't use gtkextra-3.0 for gtk3 ??

If GtkExtra is using GtkCTree I would contend that you should not be
using GtkExtra at all. The library looks like a collection of widgets
for GTK+ 1.2.

As far as I know, GtkExtra does not have a GTK+ 3.0 compatible version.

Which component of GtkExtra are you using? Outside of GtkPlot, 99% of
that library is redundant with the GTK+ 2.x API itself:

  - GtkIconList: replaced by GtkIconView in GTK+ 2.x and by GtkFlowBox
in GTK+ 3.x, and the idea of using XPM in 2017 is terrible
  - GtkDirTree, GtkFileList: replaced by GtkFileChooserWidget
  - GtkIconFileSelection: I struggle very hard to figure out a case
that is not relevant outside of 1997 style UIs, but a GtkIconView is
perfectly enough
  - GtkComboBox: part of GTK+ itself
  - GtkColorCombo: replaced by GtkColorChooser
  - GtkCheckItem: I don't even want to know

The library itself is a staggering namespace violation of GTK's own
API namespace, but I guess it's too late to fix that.

Looking at the code it even seems somebody is still maintaining this
library! Maybe you could just extract the GtkPlot code and include it
into your own application. Of course, that can only happen if the
license of your application is licensed under the LGPL v2.1 or GPL v2
or later licenses.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]