How to query the GTK3 theme currently in use on Linux, enable dark mode and display missing icons in Gnucash

To view the current GTK3 theme in use on the XFCE desktop environment that is pre-installed in distributions like Linux Mint or Xubuntu, open a terminal window and enter the following comment: $ gtk-query-settings theme <enter> Upon enter, it displays the following: gtk-theme-name: "Mint-Y-Dark-Orange" gtk-icon-theme-name: "Mint-Y-Dark-Orange" ! gtk-fallback-icon-theme: NULL gtk-key-theme-name: NULL gtk-cursor-theme-name: "Bibata-Modern-Ice" gtk-cursor-theme-size: 24 … Continue reading How to query the GTK3 theme currently in use on Linux, enable dark mode and display missing icons in Gnucash

How to open multiple buffers in JEdit like in GEdit or Mousepad

Many of us use a text editor to edit program code. The simplest and clean edit is GEdit on the Gnome desktop. However, if you are not on the Gnome desktop, you may miss it. You can use JEdit which is much more powerful, however, by default, it does not open multiple programs alongside each … Continue reading How to open multiple buffers in JEdit like in GEdit or Mousepad

Use Code::Blocks with wxWidgets

# yum install gcc-c++ # yum install wxGTK-devel.x86_64 # yum install codeblocks codeblocks-contrib You will also get the GUI builder wxSmith. # cd /usr/include # ln -sv wx-2.8/wx wx # Now run the default project it opens If you get fatal error: wx/setup.h: No such file or directory, add the line: `wx-config --cflags` in Settings … Continue reading Use Code::Blocks with wxWidgets

Projects in Anjuta

Create new Project Copy your src and include files onto it. Then refresh the left panel. Select Project Name Right Click → Properties Compiler Settings Compiler Flags /include/mysql Linker Flags /usr/lib/mysql/libmysqlclient.so In all programs cinlude mysql as # include Project → Properties → Packages Addressbook, remove libglade. We are not using it.

Install and setup GTK+ and MySQL in Windows

Install Dev C++ (devcpp) Install gtk-dev-2.8.6.DevPak Install mysql.devPak Install mysql gtk_win32_devel_2.8.6_rc3.exe gtk-2.8.6-runtime.exe mysql-4.0.14b-win-noinstall.zip In Dev C++, do the following steps: Add all of Dev_cpp/ lib to Project->ProjectOptions Add libmysql-lib to above also Copy MySQLLib.dll into windows/system32 and this gets rid of the mysql DLL runtime error. Remove files not recognized during build such as ../lib/jpeg-bcc.lib. … Continue reading Install and setup GTK+ and MySQL in Windows

Using sscanf for dates in C

Sscanf with following does NOT WORK void change_date_format(char *date_vlaue, char *fmt) { char day[2], month[2], year[4]; sscanf (date_value “%2s/%2s/%4s”, day, month, year); } Always use the following method: void change_date_format(char *date_value, char *fmt) { int day, month, year; sscanf (date_value, “%2d/%2d/%4d”, day, month, year); sprintf (date_value, “%02d/%02d/%04d”, month, day, year); }