Difference between revisions of "GTK2"

From GnuCash
Jump to: navigation, search
(Tutorials: fix links after adjusting blacklist)
(Update page to serve users of GTK2 with information from FAQ and Windows pages)
Line 1: Line 1:
The GnuCash 2.x series is using GTK2 for its GUI. With version 3.0, GnuCash has upgraded to the [[GTK3]] library.
+
GnuCash version 2 uses GTK2 for its GUI. With version 3.0, GnuCash has upgraded to the [[GTK3]] library.
==User==
 
TODO: Move sections from [[FAQ]].
 
  
==Developer==
+
GTK uses resource files to control the appearance of GnuCash. Resource file locations can be found at [[Configuration_Locations#GTK_CONFIG_HOME|GTK Configuration Home]] , while the filenames can be found at [[Configuration_Locations#In_GTK_CONFIG_HOME|Resource file names]]. It is important to note that the resource files are not created by default, and a user may need to create the appropriate files using a text editor.
This part collects informations to facilitate the first steps in improving the GnuCash GUI.
 
  
=== Where are the source files? ===
+
How a user changes the appearance of GnuCash varies by platform.  
The bad news: they are spread over the whole source tree - each module has its own files. But they have the suffix <tt>.glade</tt> and reside usually in a directory <tt>gtkbuilder</tt> below a directory containing <tt>gnome</tt> in its name.
 
  
They are xml files and you can work on them with <tt>glade3</tt>.
+
Windows users can use the ''Select Theme'' tool installed with GnuCash. This can be further modified by manually editing the appropriate resource file as identified at [[Configuration_Locations#In_GTK_CONFIG_HOME|Resource file names]]. Note that manual edits can get overwritten by subsequent use of the ''Select Theme'' tool.
  
=== Tutorials ===
+
Linux and MacOS users can edit the resource files using a text editor.
:[https://developer.gnome.org/gtk-tutorial/stable/ gtk-tutorial]
+
 
:Relations glade - gazpacho - stetic - libglade: http://tadeboro.blogspot.com/2009/07/glade-gazpacho-stetic-libglade.html
+
A sample GTK resource file for GTK2 is available.
:glade >=3.6 tutorial: http://tadeboro.blogspot.com/2009/09/glade3-tutorial-1-introduction.html
+
 
 +
Here is an example for a resource file:
 +
 
 +
<tt><syntaxhighlight lang="c">gtk-toolbar-style = GTK_TOOLBAR_ICONS</syntaxhighlight></tt>
 +
 
 +
This sets how the toolbar items should be displayed. The possible values are:
 +
:;GTK_TOOLBAR_ICONS: icons only
 +
:;GTK_TOOLBAR_TEXT: text only
 +
:;GTK_TOOLBAR_BOTH: icons and text below
 +
:;GTK_TOOBLAR_BOTH_HORIZ: icons and text aside
  
----
 
 
[[Category:GTK]]
 
[[Category:GTK]]

Revision as of 15:37, 14 October 2018

GnuCash version 2 uses GTK2 for its GUI. With version 3.0, GnuCash has upgraded to the GTK3 library.

GTK uses resource files to control the appearance of GnuCash. Resource file locations can be found at GTK Configuration Home , while the filenames can be found at Resource file names. It is important to note that the resource files are not created by default, and a user may need to create the appropriate files using a text editor.

How a user changes the appearance of GnuCash varies by platform.

Windows users can use the Select Theme tool installed with GnuCash. This can be further modified by manually editing the appropriate resource file as identified at Resource file names. Note that manual edits can get overwritten by subsequent use of the Select Theme tool.

Linux and MacOS users can edit the resource files using a text editor.

A sample GTK resource file for GTK2 is available.

Here is an example for a resource file:

gtk-toolbar-style = GTK_TOOLBAR_ICONS

This sets how the toolbar items should be displayed. The possible values are:

GTK_TOOLBAR_ICONS
icons only
GTK_TOOLBAR_TEXT
text only
GTK_TOOLBAR_BOTH
icons and text below
GTK_TOOBLAR_BOTH_HORIZ
icons and text aside