U++ Forum - RDF feed
type: channel
description: Main place for discussions about U++ cross platform development framework.
items: MILESTONE: gtk3 replaces gtk2 as default linux backend
items: Re: MILESTONE: gtk3 replaces gtk2 as default linux backend

MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: I have reached an important milestone, commiting gtk3 branch (which I have been developing for the last couple of month) into U++ trunk. This replaces gtk2 as our backend (BTW, small explanation here for future references: U++ is still 'emulated' GUI, with its own set of widgets; we are using gtk just as interface to host system, basically only top-level windows and events. The reason for using gtk3 as backend is mostly for improved integration). With this backend I have also taken slightly different path for chameleon - we are now using only several basic 'looks' from gtk3 (namely shape of basic buttons, check/option boxes, menu looks, scrollbars, standard font and GUI colors) and generate rest (e.g. comboboxes) as "synthetic" GUI based on these. That should fix many small visual glitches that have plagued U++ in the past, especially with some exotic theming. Plus, unlike gtk2, gtk3 has support for UHD mode, so looks much better on my LCD Minimal version required for gtk3 is 3.8 - that accidentally coincides in historic timeline with C++11 support availability; for now however at least 3.22 (~2017) is required for full chameleon support. I also plan to develop some nice new default clean theme to replace that old XP look which was our fallback look for more than 10 years... that will probably be the theme for pre-3.22 gtk3 and definitely for plain X11. It will take a month or two to mature this, please test & report problems...
creator: mirek
date: 2020-01-10T09:38:07-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Great, thank you!
creator: koldo
date: 2020-01-10T09:49:14-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hello Mirek, This is great news, thank you! I'll have the chance to start testing the new backend -mainly with terminal ctrl- extensively, from the next week on. I'll report any problems I encounter. Best regards, Oblivion.
creator: Oblivion
date: 2020-01-10T10:05:55-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi! Thanks Mirek! This was great progress! In order to make it compile the libgtk-3-dev needs to be installed. As a consequence, the build requirements on page https://www.ultimatepp.org/www$uppweb$uppx11$en-us.html need to be updated accordingly, e.g.: sudo apt-get install libgtk-3-dev Best regards, Tom
creator: Tom1
date: 2020-01-10T12:28:49-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hello. mirek wrote on Fri, 10 January 2020 09:38 please test & report problems... I briefly tested examples/AddressBook application (based on 13848 svn revision) for GTK 3.22.30 on FreeBSD 10.4 and Fluxbox 1.3.7 window manager. Default Adwaita theme. Contents of "~/.config/gtk-3.0/settings.ini" file: [Settings] gtk-font-name=Tahoma 10 gtk-button-images=1 gtk-menu-images=1 Looks like, there are issues with vertical scrollbar for ArrayCtrl, which is somehow blurred. The Option widget on Search tab looks different (probably doesn't have background image), especially for disabled item. The "File" item in menubar have different colors and possible issues after mouse hovering on it, compared to other GTK 3 applications. Some screenshots for gtk3-demo-application: and gtk3-widget-factory application for possible comparison: Screenshot for Mozilla Firefox v62.0.3, just to show how vertical scrollbar may look like:
creator: Sender Ghost
date: 2020-01-10T12:33:16-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Some screenshots for TheIDE on GTK 3.22.30: The "Configuration flags" dialog (for ".NOGTK GUI" main package configuration): The "Package organizer" dialog on GTK 3.22.30: and on GTK 2.24.32: Edit (2020.01.20): New screenshots for 13851 svn revision: The search tab for examples/AddressBook application: TheIDE's "Package organizer" dialog: The upptst/TestChStyle application: Standard: Classic: Host:
creator: Sender Ghost
date: 2020-01-10T13:45:33-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi, IDE build: - Ubuntu 18.04 - clang (clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)) There is a problem with the StaticText and the Option in the Layout edit. Text is not displayed. But it is correct when the application is executed. See attached screenshot. BR, Radek
creator: coolman
date: 2020-01-11T11:48:40-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: coolman wrote on Sat, 11 January 2020 12:48 Hi, IDE build: - Ubuntu 18.04 - clang (clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)) There is a problem with the StaticText and the Option in the Layout edit. Text is not displayed. But it is correct when the application is executed. See attached screenshot. BR, Radek Hopefully fixed. Also scrollbars should be nicer in more themes. Mirek
creator: mirek
date: 2020-01-11T17:08:44-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: mirek wrote on Sat, 11 January 2020 18:08 coolman wrote on Sat, 11 January 2020 12:48 Hi, IDE build: - Ubuntu 18.04 - clang (clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)) There is a problem with the StaticText and the Option in the Layout edit. Text is not displayed. But it is correct when the application is executed. See attached screenshot. BR, Radek Hopefully fixed. Also scrollbars should be nicer in more themes. Hi, Scrollbars are better. But StaticText and Option still have the same problem. Text is not displayed in the Layout editor. I also found that Label and LabelBox have the same problem. BR, Radek
creator: coolman
date: 2020-01-11T18:39:15-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: coolman wrote on Sat, 11 January 2020 19:39 Scrollbars are better. But StaticText and Option still have the same problem. Text is not displayed in the Layout editor. I also found that Label and LabelBox have the same problem. Sorry, forgot to commit. Should be fine now, rev 13681. Mirek
creator: mirek
date: 2020-01-11T19:52:54-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hello Mirek, While compiling new version I see a lot of warnings that should be eliminated: In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp: In function 'void Upp::_DBG_Ungrab()': /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:24:37: warning: 'void gdk_pointer_ungrab(guint32)' is deprecated: Use 'gdk_device_ungrab' instead [-Wdeprecated-declarations] 24 | gdk_pointer_ungrab(GDK_CURRENT_TIME); | ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:50, from /usr/include/gtk-3.0/gtk/gtk.h:30, from /home/klugier/upp/uppsrc/CtrlCore/Gtk.h:12, from /home/klugier/upp/uppsrc/CtrlCore/CtrlCore.h:49, from /home/klugier/upp/uppsrc/CtrlCore/SystemDraw.cpp:1, from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:3: /usr/include/gtk-3.0/gdk/gdkmain.h:100:15: note: declared here 100 | void gdk_pointer_ungrab (guint32 time_); | ^~~~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:24:37: warning: 'void gdk_pointer_ungrab(guint32)' is deprecated: Use 'gdk_device_ungrab' instead [-Wdeprecated-declarations] 24 | gdk_pointer_ungrab(GDK_CURRENT_TIME); | ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:50, from /usr/include/gtk-3.0/gtk/gtk.h:30, from /home/klugier/upp/uppsrc/CtrlCore/Gtk.h:12, from /home/klugier/upp/uppsrc/CtrlCore/CtrlCore.h:49, from /home/klugier/upp/uppsrc/CtrlCore/SystemDraw.cpp:1, from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:3: /usr/include/gtk-3.0/gdk/gdkmain.h:100:15: note: declared here 100 | void gdk_pointer_ungrab (guint32 time_); | ^~~~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp: In static member function 'static void Upp::Ctrl::PanicMsgBox(const char*, const char*)': /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:30:…
creator: Klugier
date: 2020-01-11T20:26:14-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: mirek wrote on Sat, 11 January 2020 20:52 coolman wrote on Sat, 11 January 2020 19:39 Scrollbars are better. But StaticText and Option still have the same problem. Text is not displayed in the Layout editor. I also found that Label and LabelBox have the same problem. Sorry, forgot to commit. Should be fine now, rev 13681. Mirek Hi, it is OK now, thank you. Radek
creator: coolman
date: 2020-01-12T07:19:08-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Klugier wrote on Sat, 11 January 2020 21:26 Hello Mirek, While compiling new version I see a lot of warnings that should be eliminated: Well, most important warnings of those are about gtk3 more or less dropping support for multithreading - if remember some history of U++, we were at phase where the only thread eligible to do GUI was the main thread, then we went to some limited possibility to do things from other threads. If other thread was to do something in GUI, you had to PostCallback. Interestingly, gtk just went in the exactly opposite direction - doing some GUI stuff from other threads is now deprecated and dropped in gtk4 and the recommend approach is to use their's PostCallback equivalent. Now I have some ideas how to deal with it, but it will take some time. (Plus of course there are some easier warnings to fixe, 'todo'). Quote: Moreover, the tooltip text is not visible on Manjaro KDE. I also agree that there is a problem with the scrollbars - they are not emulated ideally. Can you post tooltip screenshot? If not, can you describe colors? Scrollbars I can fix. Would be nice to know which engine is that though... Mirek
creator: mirek
date: 2020-01-12T12:36:31-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Klugier wrote on Sat, 11 January 2020 21:26 Moreover, the tooltip text is not visible on Manjaro KDE. I also agree that there is a problem with the scrollbars - they are not emulated ideally. What about now?
creator: mirek
date: 2020-01-12T12:53:06-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Sender Ghost wrote on Fri, 10 January 2020 13:33 Hello. I briefly tested examples/AddressBook application (based on 13848 svn revision) for GTK 3.22.30 on FreeBSD 10.4 and Fluxbox 1.3.7 window manager. Default Adwaita theme. I believe that with possible exception of scrollbars width, these should be now fixed. Mirek
creator: mirek
date: 2020-01-12T14:03:44-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: mirek wrote on Sun, 12 January 2020 14:03 I believe that with possible exception of scrollbars width, these should be now fixed. Yes, the menubar and scrollbars looks much better now, if compare to other GTK 3 applications. Thanks. New screenshots for 13869 svn revision: TheIDE: TheIDE's "Package organizer": examples/AddressBook: upptst/TestChStyle: - Standard: - Classic: - Host: There is a difference (marked with red rectangle) between OptionBox of TestChStyle and checkbutton of gtk3-widget-factory. The ✔ mark of OptionBox looks more blurry compared to checkbutton.
creator: Sender Ghost
date: 2020-01-12T16:58:29-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Please review GLCtrl. Now Reference/OpenGL compiling fails with these errors: - GtkGLCtrl.cpp:46:39: error: 'GdkDrawable' was not declared in this scope - GtkGLCtrl.cpp:46:13: error: 'gdk_x11_drawable_get_xid' was not declared in this scope - GtkGLCtrl.cpp:49:15: error: 'gdk_x11_drawable_get_xdisplay' was not declared in this scope
creator: koldo
date: 2020-01-13T07:26:22-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: koldo wrote on Mon, 13 January 2020 08:26 Please review GLCtrl. Now Reference/OpenGL compiling fails with these errors: - GtkGLCtrl.cpp:46:39: error: 'GdkDrawable' was not declared in this scope - GtkGLCtrl.cpp:46:13: error: 'gdk_x11_drawable_get_xid' was not declared in this scope - GtkGLCtrl.cpp:49:15: error: 'gdk_x11_drawable_get_xdisplay' was not declared in this scope Should be now fixed. Mirek
creator: mirek
date: 2020-01-13T14:19:16-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Thank you. It compiles and runs perfectly.
creator: koldo
date: 2020-01-13T21:11:26-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi, My OpenGL (GLCtrl) based applications now crash on startup. I did a full rebuild, but still the result is this: tom@tom-LM-WMV:~/upp.out/program52/CLANG.Gui.Shared$ ./GLModeler (GLModeler:5955): Gtk-ERROR **: 10:07:31.280: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped) tom@tom-LM-WMV:~/upp.out/program52/CLANG.Gui.Shared$ Here's the backtrace: /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 g_log_writer_default () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 g_log_structured_array () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 g_log_structured_standard () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 g_option_context_parse () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 gtk_parse_args () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 gtk_init_check () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 gtk_init () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 Upp::InitGtkApp (argc=1, argv=0x7fffffffe448, envptr=0x7fffffffe458) at /home/tom/upp.src/uppsrc/CtrlCore/GtkApp.cpp:74 main (argc=1, argv=0x7fffffffe448, envptr=0x7fffffffe458) at /mnt/hgfs/program52/GLModeler/GLModeler.cpp:3 Am I doing something wrong here? (I have not changed anything in my code and it used to work on Linux. It still works on Windows.) Best regards, Tom
creator: Tom1
date: 2020-01-14T08:21:56-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Tom1 wrote on Tue, 14 January 2020 09:21 Hi, My OpenGL (GLCtrl) based applications now crash on startup. I did a full rebuild, but still the result is this: tom@tom-LM-WMV:~/upp.out/program52/CLANG.Gui.Shared$ ./GLModeler (GLModeler:5955): Gtk-ERROR **: 10:07:31.280: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped) tom@tom-LM-WMV:~/upp.out/program52/CLANG.Gui.Shared$ Here's the backtrace: /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 g_log_writer_default () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 g_log_structured_array () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 g_log_structured_standard () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 g_option_context_parse () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 gtk_parse_args () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 gtk_init_check () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 gtk_init () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 Upp::InitGtkApp (argc=1, argv=0x7fffffffe448, envptr=0x7fffffffe458) at /home/tom/upp.src/uppsrc/CtrlCore/GtkApp.cpp:74 main (argc=1, argv=0x7fffffffe448, envptr=0x7fffffffe458) at /mnt/hgfs/program52/GLModeler/GLModeler.cpp:3 Am I doing something wrong here? (I have not changed anything in my code and it used to work on Linux. It still works on Windows.) Best regards, Tom Can you retry now? I have removed dependency on gtkglext, which we are not using anyway. If it still does not work, do non-GL examples work for you? Mirek
creator: mirek
date: 2020-01-14T10:36:09-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: mirek wrote on Tue, 14 January 2020 12:36 ... Can you retry now? I have removed dependency on gtkglext, which we are not using anyway. If it still does not work, do non-GL examples work for you? Mirek Thanks Mirek! Now it works again. Best regards, Tom
creator: Tom1
date: 2020-01-14T10:51:46-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: In my case not only GLCtrl but BEMRosetta compiles and works perfectly. Could you include a testcase?
creator: koldo
date: 2020-01-15T07:58:09-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi Koldo, It seems (based on the message ID) that you are responding to my message about the GLCtrl issue ( https://www.ultimatepp.org/forums/index.php?t=msg&th=108 94&goto=52930&#msg_52930 ). I do not think it needs any further investigation or testcase as Mirek already solved it. But thank you anyway! Best regards, Tom
creator: Tom1
date: 2020-01-15T09:23:17-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi For linux and BSD, gtk-2.0 is still in umk config (on U++ debian server). Example: Makefile.in and uMakefile.in files from last snapshot contain "/usr/include/gtk-2.0" and more gtk-2.0 references.
creator: amrein
date: 2020-01-15T10:38:33-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: While fixing warnings, I have encountered a little problem: It looks like whole trayicon API was deprecated in gtk3, they simply consider the whole thing "not modern". What should I do here? Remove TrayIcon from U++/gtk3? Ignore warnings? Or perhaps provide X11 based code? Mirek
creator: mirek
date: 2020-01-15T16:20:24-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: I would ignore those warnings for now personally. Some apps use it in other desktop environment (like KDE) while running in background. Music players for instance.
creator: amrein
date: 2020-01-15T16:50:29-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Some posts about it: https://www.omgubuntu.co.uk/2017/09/will-you-miss-gnome-lega cy-tray https://stackoverflow.com/questions/41917903/gtk-3-statusico n-replacement
creator: koldo
date: 2020-01-15T17:03:44-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: This sounds like lot of fun. I guess dropping support for status icons in Gtk is legitimate option, as that's how the Gnome authors envision it and how they want it. But as a KDE user, I would prefer if there were still APIs and tools in U++ to handle status icons normally. But U++ is GTK3 based now, so ... I don't know. Maybe the X11 without GTK branch only to keep them supported and GTK3 branch to ignore any U++ API calls? Seems quite awkward situation to me, I definitely like existence of status icons in the task bar in my desktop environment, and if some app is overusing it, I can uninstall the particular app. But I don't understand Gnome design decisions for many years, so this is just another one, I simply think completely differently about my computer "desk".
creator: mr_ped
date: 2020-01-16T10:05:44-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: mr_ped wrote on Thu, 16 January 2020 11:05 This sounds like lot of fun. I guess dropping support for status icons in Gtk is legitimate option, as that's how the Gnome authors envision it and how they want it. But as a KDE user, I would prefer if there were still APIs and tools in U++ to handle status icons normally. But U++ is GTK3 based now, so ... I don't know. Maybe the X11 without GTK branch only to keep them supported and GTK3 branch to ignore any U++ API calls? Seems quite awkward situation to me, I definitely like existence of status icons in the task bar in my desktop environment, and if some app is overusing it, I can uninstall the particular app. But I don't understand Gnome design decisions for many years, so this is just another one, I simply think completely differently about my computer "desk". No worries, I have kept it with warnings disabled. Perhaps in future, if they decide to drop it, I can switch to X11 implementation, which is possible even with gtk3 backend. For now, problem solved. (And yes, it is idiotic decision on gtk3 part. If they present it as multi-platform toolkit, they should care about more than Gnome). Mirek
creator: mirek
date: 2020-01-16T10:18:20-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hello Mirek, Apps that are compiled now and TheIDE itself have unusual (swapped) location of buttons OK and Cancel in standard dialogs. In old gtk2 versions in file ChGtk.cpp: SwapOKCancel_Write(!Qt); Now there is nothing like this. Best regards, Victor
creator: pvictor
date: 2020-01-17T11:25:58-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Sender Ghost wrote on Sun, 12 January 2020 16:58 There is a difference (marked with red rectangle) between OptionBox of TestChStyle and checkbutton of gtk3-widget-factory. The ✔ mark of OptionBox looks more blurry compared to checkbutton. Checked for 13910 svn revision. The ✔ mark of OptionBox is not blurry as before, but the the size of its background image is smaller, if compare to checkbutton of gtk3-widget-factory.
creator: Sender Ghost
date: 2020-01-17T23:42:37-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Sender Ghost wrote on Sat, 18 January 2020 00:42 Sender Ghost wrote on Sun, 12 January 2020 16:58 There is a difference (marked with red rectangle) between OptionBox of TestChStyle and checkbutton of gtk3-widget-factory. The ✔ mark of OptionBox looks more blurry compared to checkbutton. Checked for 13910 svn revision. The ✔ mark of OptionBox is not blurry as before, but the the size of its background image is smaller, if compare to checkbutton of gtk3-widget-factory. Cannot solve this without breaking other things. Mirek
creator: mirek
date: 2020-01-18T09:17:04-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: pvictor wrote on Fri, 17 January 2020 12:25 Hello Mirek, Apps that are compiled now and TheIDE itself have unusual (swapped) location of buttons OK and Cancel in standard dialogs. In old gtk2 versions in file ChGtk.cpp: SwapOKCancel_Write(!Qt); Now there is nothing like this. Best regards, Victor Thanks, fixed. (I have retained the logic that in KDE it is not swapped). Mirek
creator: mirek
date: 2020-01-18T09:31:53-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: I have three issues to report. 1. First, there are still references to gtk-2.0 in several files in svn. The easier way to find them: 'grep -R --exclude-dir=.svn gtk-2.0 .' 2. Secondly, there is a typo in trunk/uppsrc/CtrlCore/CtrlCore.upp. xdmpc should be xdmcp I guess 3. Thirdly, I would like to understand this new strategy: Extract of trunk/uppsrc/CtrlCore/CtrlCore.upp: pkg_config(LINUX | FREEBSD) "freetype2 x11 xinerama xrender xft xdmpc fontconfig xcb xext"; pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify"; So now U++ can be compiled with GTK dependencies only (GTK+libnotify) or GTK+X11 dependencies and we need pkg-config to compile CtrlCore? "xinerama xrender xft xdmcp fontconfig xcb xext" are now mandatory for GTK+X11? I need to understand this because current domake script is broken as: * umk on debian server doesn't use '((INCLUDES))' anymore in ~/.upp/theide/GCCMK.bm * exported Makefiles use pkg-config when using CtrlCore because of trunk/uppsrc/CtrlCore/CtrlCore.upp recent changes * U++ won't compile if pkg-config is not there because of missing default includes * Previously we only needed gtk3 x11 and libnotify Extract of Makefile.in in new tarball snapshots: CINC = -I./ `pkg-config --cflags freetype2` `pkg-config --cflags x11` `pkg-config --cflags fontconfig` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags libpng` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmpc` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify` ... $(OutDir_plugin_bmp)BmpReg.o \ $(OutDir_plugin_bmp)bmp.a \ $(OutDir_RichText)RichText.a \ `pkg-config --libs freetype2` \ `pkg-config --libs x11` \ `pkg-config --libs fontconfig` \ `pkg-config --libs xcb` \ `pkg-config --libs expat` \ `pkg-config --libs libpng` \ `pkg-config --libs xinerama` \ `pkg-config --libs xrender` \ `pkg-config --libs xft` \ `pkg-config --libs xdmpc` \ `pkg-config --libs xext` \ `pk…
creator: amrein
date: 2020-01-20T13:53:58-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: I will fix 1 and 2 ASAP. 3: It is work in progress, however the idea is to depend on pkg-config, with basically empty INCLUDE/LIB paths. Do you know about any system that supports gtk-3 or C++11 and does not have pkg-config? Mirek
creator: mirek
date: 2020-01-20T14:01:57-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: All POSIX OS have pkg-config in their repository. You must install pkg-config manually (using the distro package manager) as it's not installed by default when you install other devel packages. If so, this dependency need to be added in docs. The main idea of using pkg-config is to have dynamic cflags and libs on any POSIX OS I guess. So for me, the best strategy would be to add LDLIBS in Makefile using pkg-config (after CINC and at link time): CINC = -I./ `pkg-config --cflags freetype2` `pkg-config --cflags x11` `pkg-config --cflags fontconfig` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags libpng` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmpc` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify` LDLIBS = `pkg-config --libs freetype2` `pkg-config --libs x11` `pkg-config --libs fontconfig` `pkg-config --libs xcb` `pkg-config --libs expat` `pkg-config --libs libpng` `pkg-config --libs xinerama` `pkg-config --libs xrender` `pkg-config --libs xft` `pkg-config --libs xdmpc` `pkg-config --libs xext` `pkg-config --libs gtk+-3.0` `pkg-config --libs libnotify` -lbz2 -lpthread -ldl -lrt -lz ... $(OutDir_plugin_bmp)BmpReg.o \ $(OutDir_plugin_bmp)bmp.a \ $(OutDir_RichText)RichText.a \ $(LDLIBS) -Wl,--end-group That way, it easier for external script like domake to change Makefiles configuration dynamically using its own CINC and LDLIBS. Note: It would be even more fun to use Flags to switch Makefile from one configuration to another but my investigation in this area showed several flows because of POSIX gmake differences between OS.
creator: amrein
date: 2020-01-20T19:51:34-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: amrein wrote on Mon, 20 January 2020 20:51 You must install pkg-config manually (using the distro package manager) as it's not installed by default when you install other devel packages. I do not think this is correct. I believe it really is present always - I mean like "bash level" kind of presence... Which makes sense, as its infrastructure is precursor to packaging systems....
creator: mirek
date: 2020-01-20T20:53:22-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Example on Fedora: $ lsb_release -sir Fedora 31 $ rpm -q --whatrequires pkg-config no package requires pkg-config $ rpm -qa | grep devel | wc -l 114 So on a full Fedora installation with all U++ dependencies installed and much more... not a single package requires pkg-config. So no, you need to manually install pkg-config on most POSIX OS. It's not more complicated than installing other U++ build dependencies.
creator: amrein
date: 2020-01-21T09:32:52-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hello amrein, IIRC, Fedora uses the pkgconf package for some time (circa F26?), which in turn uses the pkgconf-pkg-config package to replace pkg-config links. Can you check that? Packages list requiring the pkg-conf-pkg-config package is long (see "Required by" section) https://fedora.pkgs.org/31/fedora-x86_64/pkgconf-pkg-config- 1.6.3-2.fc31.x86_64.rpm.html Best regards, Oblivion.
creator: Oblivion
date: 2020-01-21T10:07:00-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Well, rpm tells that there is no package requiring pkgconf-pkg-config or pkg-config or even pkgconf. But when I try to remove one of them, it gives me a long list of dependencies. In previous Redhat based distro (a few years ago) I had to install pkg-config manually. This has changed apparently. edit: Those packages require /usr/bin/pkg-config directly or pkgconfig (pkgconfig is not a package but a virtual dependency). This explain this.
creator: amrein
date: 2020-01-21T10:59:34-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: After some discussion with Mirek, I proposed patch for possible minimal set of pkg-config dependencies in uppsrc/CtrlCore and uppsrc/Draw packages: https://www.ultimatepp.org/redmine/issues/2007 I tested build on FreeBSD 10.4 (for examples/AddressBook and reference/ConsoleDraw packages, but also for uppsrc/ide, etc.) for GUI and "GUI X11" main package configurations. Please test for other platforms, if interested.
creator: Sender Ghost
date: 2020-01-21T12:14:30-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi Sender Ghost, If U++ uses GTK3 only, x11 or libnotify are not required. Previous U++ release required libnotify-devel. x11-devel is installed because GTK3 devel package ask for it. So if I'm not wrong, this part of the patch is incorrect: -pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify"; +pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 x11"; and should be replaced by -pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify"; +pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 libnotify";
creator: amrein
date: 2020-01-21T21:19:39-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Hi, Amrein. amrein wrote on Tue, 21 January 2020 21:19 If U++ uses GTK3 only, x11 or libnotify are not required. <..> So if I'm not wrong, this part of the patch is incorrect: <..> and should be replaced by -pkg_config((LINUX | FREEBSD) !X11) "gtk+-3.0 libnotify"; +pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 libnotify"; If use pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0 libnotify"; or pkg_config(POSIX !X11 (!OSX | OSX11)) "gtk+-3.0"; in uppsrc/CtrlCore package to build examples/AddressBook for GUI main package configuration, then there is following linker error: Linking... /usr/bin/ld: undefined reference to symbol `XFlush' (try adding -lX11) //usr/local/lib/libX11.so.6: could not read symbols: Bad value c++: error: linker command failed with exit code 1 (use -v to see invocation) The XFlush function is used in GetProperty function in uppsrc/CtrlCore/GtkX11Util.cpp file for GUI_GTK define. This is why !X11 (GTK 3) case requires x11 pkg-config dependency (at least on FreeBSD, where other specified pkg-config dependencies didn't include x11 implicitly). % ldd -a ./AddressBook | sed 's/ (.*)$// ; s|^/.*/||' | head -27 AddressBook: libgtk-3.so.0 => /usr/local/lib/libgtk-3.so.0 libgdk-3.so.0 => /usr/local/lib/libgdk-3.so.0 libpangocairo-1.0.so.0 => /usr/local/lib/libpangocairo-1.0.so.0 libpango-1.0.so.0 => /usr/local/lib/libpango-1.0.so.0 libatk-1.0.so.0 => /usr/local/lib/libatk-1.0.so.0 libcairo-gobject.so.2 => /usr/local/lib/libcairo-gobject.so.2 libcairo.so.2 => /usr/local/lib/libcairo.so.2 libthr.so.3 => /lib/libthr.so.3 libgdk_pixbuf-2.0.so.0 => /usr/local/lib/libgdk_pixbuf-2.0.so.0 libgio-2.0.so.0 => /usr/local/lib/libgio-2.0.so.0 libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 libintl.so.8 => /usr/local/lib/libintl.so.8 libX11.so.6 => /usr/local/lib/libX11.so.6 libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 libpng16.so.16 => /usr/local…
creator: Sender Ghost
date: 2020-01-21T23:05:27-00:00

Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
type: item
description: Dependencies issues on BSD fix + finer dependencies fix. So your patch looks Ok in fact LOL. I will test this further on different distros after your patch been applied + introduction of LDLIBS in Makefile.in and uMakefile.in.
creator: amrein
date: 2020-01-23T19:28:50-00:00