Main place for discussions about U++ cross platform development framework.
MILESTONE: gtk3 replaces gtk2 as default linux backend
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...
Re: MILESTONE: gtk3 replaces gtk2 as default linux backend
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.
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
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:
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:
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
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
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
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
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:28: warning: 'gboolean gdk_pointer_is_grabbed()' is deprecated: Use 'gdk_display_device_is_grabbed' instead [-Wdeprecated-declarations] 30 | if(gdk_pointer_is_grabbed()) | ^ 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:104:15: note: declared here 104 | gboolean gdk_pointer_is_grabbed (void); | ^~~~~~~~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:30:28: warning: 'gboolean gdk_pointer_is_grabbed()' is deprecated: Use 'gdk_display_device_is_grabbed' instead [-Wdeprecated-declarations] 30 | if(gdk_pointer_is_grabbed()) | ^ 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:104:15: note: declared here 104 | gboolean gdk_pointer_is_grabbed (void); | ^~~~~~~~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:31:33: warning: 'void gdk_pointer_ungrab(guint32)' is deprecated: Use 'gdk_device_ungrab' instead [-Wdeprecated-declarations] 31 | gdk_pointer_ungrab(CurrentTime); | ^ 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:31:33: warning: 'void gdk_pointer_ungrab(guint32)' is deprecated: Use 'gdk_device_ungrab' instead [-Wdeprecated-declarations] 31 | gdk_pointer_ungrab(CurrentTime); | ^ 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 function 'void Upp::InitGtkApp(int, char**, const char**)': /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:70:61: warning: 'void gdk_threads_set_lock_functions(GCallback, GCallback)' is deprecated [-Wdeprecated-declarations] 70 | gdk_threads_set_lock_functions(EnterGuiMutex, LeaveGuiMutex); | ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:61, 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/gdkthreads.h:50:10: note: declared here 50 | void gdk_threads_set_lock_functions (GCallback enter_fn, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:70:61: warning: 'void gdk_threads_set_lock_functions(GCallback, GCallback)' is deprecated [-Wdeprecated-declarations] 70 | gdk_threads_set_lock_functions(EnterGuiMutex, LeaveGuiMutex); | ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:61, 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/gdkthreads.h:50:10: note: declared here 50 | void gdk_threads_set_lock_functions (GCallback enter_fn, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:71:19: warning: 'void gdk_threads_init()' is deprecated [-Wdeprecated-declarations] 71 | gdk_threads_init(); | ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:61, 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/gdkthreads.h:44:10: note: declared here 44 | void gdk_threads_init (void); | ^~~~~~~~~~~~~~~~ In file included from /home/klugier/upp.out/CtrlCore/GCC.Blitz.Gui.Mt.Shared/$blitz.cpp:522: /home/klugier/upp/uppsrc/CtrlCore/GtkApp.cpp:71:19: warning: 'void gdk_threads_init()' is deprecated [-Wdeprecated-declarations] 71 | gdk_threads_init(); | ^ In file included from /usr/include/gtk-3.0/gdk/gdk.h:61, 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/gdkthreads.h:44:10: note: declared here 44 | void gdk_threads_init (void); | ^~~~~~~~~~~~~~~~ CtrlCore: 61 file(s) built in (0:05.19), 85 msecs / file, duration = 12061 msecs, parallelization 61% ide: 64 file(s) built in (0:34.03), 531 msecs / file, duration = 39637 msecs, parallelization 24% Linking... /home/klugier/upp/theide (13145136 B) linked in (0:00.95) 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. Sincerely, Klugier
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
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
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?
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
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.
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
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
Thank you. It compiles and runs perfectly.
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
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
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
In my case not only GLCtrl but BEMRosetta compiles and works perfectly. Could you include a testcase?
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
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.
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
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.
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
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".
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
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
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.
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
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
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` \ `pkg-config --libs gtk+-3.0` \ `pkg-config --libs libnotify` \ -lbz2 \ -lpthread \ -ldl \ -lrt \ -lz -Wl,--end-group
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
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.
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....
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.
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.
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.
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.
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";
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/lib/libpng16.so.16 libz.so.6 => /lib/libz.so.6 librt.so.1 => /usr/lib/librt.so.1 libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 libc++.so.1 => /usr/lib/libc++.so.1 libcxxrt.so.1 => /lib/libcxxrt.so.1 libm.so.5 => /lib/libm.so.5 libgcc_s.so.1 => /lib/libgcc_s.so.1 libc.so.7 => /lib/libc.so.7 libgtk-3.so.0: Some example of pkg-config output for libnotify and x11 on FreeBSD 10.4: % pkg-config -cflags -libs libnotify -I/usr/local/include -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -pthread -L/usr/local/lib -lnotify -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl % pkg-config -cflags -libs x11 -I/usr/local/include -D_THREAD_SAFE -pthread -L/usr/local/lib -lX11 Edit: But after build test for reference/TrayIcon package, there was following linker error: <..>/CtrlLib/CLANG.Gui.Shared/CtrlLib.a(TrayIconGtk.o): In function `Upp::TrayIcon::Message(int, char const*, char const*, int)': <..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x1b): undefined reference to `notify_is_initted' <..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x27): undefined reference to `notify_init' <..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x59): undefined reference to `notify_notification_new' <..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x6b): undefined reference to `notify_notification_set_timeout' <..>/upp/uppsrc/CtrlLib/TrayIconGtk.cpp:(.text._ZN3Upp8TrayIcon7MessageEiPKcS2_i+0x77): undefined reference to `notify_notification_show' c++: error: linker command failed with exit code 1 (use -v to see invocation) where mentioned functions are used in TrayIcon::Message method in uppsrc/CtrlLib/TrayIconGtk.cpp file. This may mean, that libnotify package dependency is required for some cases in uppsrc/CtrlLib package. Possible to add following check for uppsrc/CtrlLib package: pkg_config(POSIX !X11 (!OSX | OSX11)) libnotify; Example of ldd output for TrayIcon and AddressBook executables for this case, which library dependencies are the same: Click to expand % ldd -a ./TrayIcon | sed 's/ (.*)$// ; s|^/.*/||' | head -28 TrayIcon: libnotify.so.4 => /usr/local/lib/libnotify.so.4 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 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 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/lib/libpng16.so.16 libz.so.6 => /lib/libz.so.6 librt.so.1 => /usr/lib/librt.so.1 libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 libc++.so.1 => /usr/lib/libc++.so.1 libcxxrt.so.1 => /lib/libcxxrt.so.1 libm.so.5 => /lib/libm.so.5 libgcc_s.so.1 => /lib/libgcc_s.so.1 libc.so.7 => /lib/libc.so.7 libnotify.so.4: % ldd -a ./AddressBook | sed 's/ (.*)$// ; s|^/.*/||' | head -28 AddressBook: libnotify.so.4 => /usr/local/lib/libnotify.so.4 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 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 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/lib/libpng16.so.16 libz.so.6 => /lib/libz.so.6 librt.so.1 => /usr/lib/librt.so.1 libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 libc++.so.1 => /usr/lib/libc++.so.1 libcxxrt.so.1 => /lib/libcxxrt.so.1 libm.so.5 => /lib/libm.so.5 libgcc_s.so.1 => /lib/libgcc_s.so.1 libc.so.7 => /lib/libc.so.7 libnotify.so.4: Thanks for your attention.
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.