gparted/include
Luca Bacci c602170faa modern-gtk2: Delay construction of Gtk::TreeModel* objects (!17)
C++ initialises static member variables before main() is called.
Therefore the static members of:
    struct Slots
    {
        static Gtk::TreeModelColumn<Glib::ustring> text;
        static Gtk::TreeModelColumn<bool> sensitive;
    private:
        static Gtk::TreeModel::ColumnRecord record_;
    };
are constructed before Gtk::Main() is called in main().  However the
Gtkmm documentation specifically says that they must be constructed
afterwards [1].

Resolve this by using the Construct On First Use Idiom [2] to delay
initialisation until the slots are first used.  Normally this idiom uses
static local objects, however it is being applied to class static
objects here because the objects are accessed in many methods.  The
downside of this approach is that the objects are never destructed,
which memory analysers like Valgrind could see as a memory leak, but
that is actually deliberate.  That leak can be removed once we can use
C++11 and std::unique_ptr.

[1] gtkmm: Gtk::TreeModelColumnRecord Class Reference
    https://developer.gnome.org/gtkmm/2.24/classGtk_1_1TreeModelColumnRecord.html#details

    "Neither TreeModel::ColumnRecord nor the TreeModelColumns contain
    any real data - they merely describe what C++ type is stored in
    which column of a TreeModel, and save you from having to repeat that
    type information in several places.

    Thus TreeModel::ColumnRecord can be made a singleton (as long as you
    make sure it's instantiated after Gtk::Main), even when creating
    multiple models from it.
    "

[2] C++ FAQ / How do I prevent the "static initialization order
    problem"?
    https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use

Closes !17 - Gtk2 modernisation
2018-11-12 21:50:42 +00:00
..
BlockSpecial.h Pre-populate BlockSpecial cache while reading /proc/partitions (#767842) 2016-08-06 09:47:58 -06:00
CopyBlocks.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DMRaid.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Device.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DialogFeatures.h Move struct FS and FS_Limits into FileSystem.h 2018-01-28 10:09:35 -07:00
DialogManageFlags.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DialogPasswordEntry.h Clear previous LUKS unlock failure error before next attempt (#795617) 2018-06-19 10:54:48 -06:00
Dialog_Base_Partition.h modern-gtk2: Use OptionComboBox class for alignment combobox (!17) 2018-11-12 21:50:42 +00:00
Dialog_Disklabel.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_FileSystem_Label.h Simplify from Gtk::Table to HBox in FileSystem Label dialog 2018-06-18 10:15:33 -06:00
Dialog_Partition_Copy.h Move struct FS and FS_Limits into FileSystem.h 2018-01-28 10:09:35 -07:00
Dialog_Partition_Info.h Provide virtual Partition::get_filesystem_partition() method (#774818) 2017-01-14 08:49:58 -07:00
Dialog_Partition_Name.h Simplify from Gtk::Table to HBox in Partition Name dialog 2018-06-18 10:15:33 -06:00
Dialog_Partition_New.h modern-gtk2: Rename callback after OptionComboBox class switch (!17) 2018-11-12 21:50:42 +00:00
Dialog_Partition_Resize_Move.h Move struct FS and FS_Limits into FileSystem.h 2018-01-28 10:09:35 -07:00
Dialog_Progress.h Rename OperationDetailStatus STATUS_N_A to STATUS_WARNING 2017-11-26 10:53:52 -07:00
Dialog_Rescue_Data.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DrawingAreaVisualDisk.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
FS_Info.h Make sure that FS_Info cache is loaded for all named paths (#787181) 2017-09-12 19:10:20 +01:00
FileSystem.h Separate unknown file system type from unsupported actions (!13) 2018-09-17 15:36:09 +00:00
Frame_Resizer_Base.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Frame_Resizer_Extended.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
GParted_Core.h Refactor get_filesystem_object() 2018-09-17 15:36:09 +00:00
HBoxOperations.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
LUKS_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
LVM2_PV_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Makefile.am modern-gtk2: Introduce OptionComboBox class (!17) 2018-11-12 21:50:42 +00:00
Mount_Info.h Add and set read-only mount flag in the Partition object (#10) 2018-09-20 16:30:15 +00:00
Operation.h Create and use general find_extended_partition() function 2017-01-14 08:49:58 -07:00
OperationChangeUUID.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCheck.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCopy.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCreate.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationDelete.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationDetail.h Rename OperationDetailStatus STATUS_N_A to STATUS_WARNING 2017-11-26 10:53:52 -07:00
OperationFormat.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationLabelFileSystem.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationNamePartition.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationResizeMove.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OptionComboBox.h modern-gtk2: Delay construction of Gtk::TreeModel* objects (!17) 2018-11-12 21:50:42 +00:00
Partition.h Add and set read-only mount flag in the Partition object (#10) 2018-09-20 16:30:15 +00:00
PartitionLUKS.h Rename enum FILESYSTEM to FSType 2018-01-28 10:09:35 -07:00
PartitionVector.h Create and use general find_extended_partition() function 2017-01-14 08:49:58 -07:00
PasswordRAMStore.h Change to insert or replace PasswordRAMStore::store() interface (#795617) 2018-04-30 09:10:48 -06:00
PipeCapture.h Further improve speed of PipeCapture for non-watched output (#777973) 2017-06-02 11:47:35 -06:00
Proc_Partitions_Info.h Switch to a static interface for Proc_Partitions_Info 2016-08-06 09:47:58 -06:00
ProgressBar.h Write a generic progress bar class (#760709) 2016-02-12 09:09:56 -07:00
SWRaid_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
TreeView_Detail.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Utils.h Recognise APFS (Apple File System) (#23) 2018-11-12 20:39:55 +00:00
Win_GParted.h modern-gtk2: Use Gtk::Widget::set_tooltip_text() (!17) 2018-11-12 21:50:42 +00:00
btrfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
exfat.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
ext2.h Remove checks for e4fsprogs commands (#794253) 2018-03-26 10:16:45 -06:00
f2fs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
fat16.h Rework scope of fat16:: and ntfs::Change_UUID_Warning vectors 2018-06-18 14:47:17 -06:00
hfs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
hfsplus.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
i18n.h Make include guards unique (#539297) 2013-06-05 10:57:39 -06:00
jfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
linux_swap.h Make get_custom_text() and get_generic_text() return by reference 2018-06-18 10:15:33 -06:00
luks.h Make get_custom_text() and get_generic_text() return by reference 2018-06-18 10:15:33 -06:00
lvm2_pv.h Make get_custom_text() and get_generic_text() return by reference 2018-06-18 10:15:33 -06:00
minix.h Add support for minix file system (!12) 2018-08-24 20:22:08 +01:00
nilfs2.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
ntfs.h Rework scope of fat16:: and ntfs::Change_UUID_Warning vectors 2018-06-18 14:47:17 -06:00
reiser4.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
reiserfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
udf.h Set dynamic UDF file system size limits (#787204) 2018-01-28 10:09:35 -07:00
xfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00