[Patch/gtk3] Make Gtk3 dialog header bars configurable



Hi all,

Gtk3 3.12.0 introduced the GTK_DIALOG_USE_HEADER_BAR dialogue flag which looks, well, confusing at best if 
Balsa is used in environments like xfce.

The attached patch implements a simple way to disable the header bars by inspecting an environment variable.  
IMO, this is a better approach than passing a config item downstream to all libbalsa dialogues...

Basically, a new function libbalsa_dialog_flags() is added to libbalsa.c (or simply expanded to 0 for older 
Gtk versions than 3.12.0).  When being called for the first time, the function checks if the environment 
variable BALSA_DIALOG_HEADERBAR exists and is set to 0.  Only in this case, the header bars are disabled.  
The function call replaces the macro BALSA_DIALOG_FLAGS.

Note that I had to implement the same code in src/ab-main.c, as otherwise the linker tries to drag in a bunch 
of additional libraries for balsa-ab.

Opinions?

Best,
Albrecht.

Attachment: header-bars.diff
Description: Text Data

Attachment: pgpVHg5mcc5Kc.pgp
Description: PGP signature



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