gparted/include
Mike Fleetwood 7ea22f1190 Make GParted exit when closed before the initial load completes (#771816)
If the GParted main window is closed before the initial device load
completed gpartedbin never exits.  The main window closes but the
process sits there idle forever.  Subsequently running GParted reports
this error:
    # gparted
    The process gpartedbin is already running.
    Only one gpartedbin process is permitted.

If the user is running GParted from a desktop menu they will never see
this error so they will never know why GParted won't start any more.

More technically, it is if the main window is closed before the
Win_GParted::on_show() callback completes.

I assume the Gtk main loop doesn't setup the normal quit handling until
the on_show() callback finishes drawing the main window for the first
time.  Following this hint [1], move the initial device load from the
on_show() callback to immediately after it completes by using a run once
idle callback setup in on_show().

This looks exactly the same to the user except now gpartedbin exits when
the main window is closed during the initial device load.  Note that
GParted finished the device load before exiting.  This is exactly the
same as happens when exiting during subsequent device refreshes.

[1] How to know when a Gtk Window is fully shown?
    http://stackoverflow.com/questions/14663212/how-to-know-when-a-gtk-window-is-fully-shown

    "If you want to know when your main window appears the first time,
    it is far easier (and saner) add a g_idle_add after your show_all
    call."

Bug 771816 - GParted never exits if the main window is closed before the
             initial device load completes
2016-10-05 11:28:36 -06:00
..
.cvsignore added *.swp some modifications to pass 'make distcheck' minor cleanups 2005-11-25 12:59:47 +00:00
BlockSpecial.h Pre-populate BlockSpecial cache while reading /proc/partitions (#767842) 2016-08-06 09:47:58 -06:00
Copy_Blocks.h Use a single progress bar for the internal block copy operation (#762367) 2016-02-23 10:41:20 -07:00
DMRaid.h Remove unimplemented prototype DMRaid::partition_is_mounted_by_path() 2016-08-06 09:47:58 -06:00
Device.h Rename Device::add_path() to set_path() (#767842) 2016-08-06 09:47:58 -06:00
DialogFeatures.h Make the File System Support dialog resizable (#342682) 2014-01-27 10:54:48 -07:00
DialogManageFlags.h Stop copying selected partition object in Manage Flags dialog (#750168) 2015-06-10 10:44:33 -06:00
Dialog_Base_Partition.h Remove unnecessary sector_size parameter from Get_New_Partition methods 2016-01-26 10:11:35 -07:00
Dialog_Disklabel.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Dialog_FileSystem_Label.h Rename class to Dialog_FileSystem_Label (#741424) 2015-02-01 10:08:23 -07:00
Dialog_Partition_Copy.h Remove unnecessary sector_size parameter from Get_New_Partition methods 2016-01-26 10:11:35 -07:00
Dialog_Partition_Info.h Add encryption section into the Information dialog (#760080) 2016-01-29 13:41:41 -07:00
Dialog_Partition_Name.h Make support of naming for other partition table types possible (#746214) 2015-03-25 10:02:42 -06:00
Dialog_Partition_New.h Remove unnecessary sector_size parameter from Get_New_Partition methods 2016-01-26 10:11:35 -07:00
Dialog_Partition_Resize_Move.h Use pointer to Partition in Dialog_Base_Partition and derived classes (#759726) 2016-01-26 10:11:35 -07:00
Dialog_Progress.h Change OperationDetail to not store complex objects in STL containers (#729139) 2014-05-18 10:07:45 -06:00
Dialog_Rescue_Data.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
DrawingAreaVisualDisk.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
FS_Info.h Switch to static class interface for FS_Info 2016-08-06 09:47:58 -06:00
FileSystem.h Replace 32-bit member variable "index" with wider local variables (#764658) 2016-04-07 09:56:00 -06: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 Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
GParted_Core.h Remove left behind typedef GParted_Core::MountMapping 2016-09-14 09:48:33 -06:00
HBoxOperations.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
LUKS_Info.h Use BlockSpecial in LUKS_Info module cache (#767842) 2016-08-06 09:47:58 -06:00
LVM2_PV_Info.h Create BlockSpecial class and use in LVM2_PV_Info (#767842) 2016-08-06 09:47:58 -06:00
Makefile.am Split mount_info and fstab_info maps into separate Mount_Info module 2016-08-06 09:47:58 -06:00
Mount_Info.h Split mount_info and fstab_info maps into separate Mount_Info module 2016-08-06 09:47:58 -06:00
Operation.h Use pointers to Partitions in Operation classes (#759726) 2016-01-26 10:11:35 -07:00
OperationChangeUUID.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationCheck.h Prevent assert failure from OperationCheck::get_partition_new() (#767233) 2016-06-05 13:14:34 -06:00
OperationCopy.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationCreate.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationDelete.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationDetail.h Remove unused OperationDetail members (#760709) 2016-02-12 09:09:57 -07:00
OperationFormat.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationLabelFileSystem.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationNamePartition.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
OperationResizeMove.h Add virtual qualifier to derived Operation class destructors 2016-01-26 10:11:36 -07:00
Partition.h Rename Partition::add_path() to set_path() (#767842) 2016-08-06 09:47:58 -06:00
PartitionLUKS.h Display messages for encrypted file systems (#760080) 2016-01-29 13:41:41 -07:00
PartitionVector.h Replace all Partition object copy assignment (#759726) 2016-01-26 10:11:35 -07:00
PipeCapture.h Prevent cross thread write after free in _OnReadable() (#731752) 2014-07-06 10:22:40 -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 Use BlockSpecial in SWRaid_Info module cache (#767842) 2016-08-06 09:47:58 -06:00
TreeView_Detail.h Remove remaining vestiges of coloured text from the partition list 2016-10-05 10:53:21 -06:00
Utils.h Recognise GRUB2 core.img (#766989) 2016-06-15 12:45:05 -06:00
Win_GParted.h Make GParted exit when closed before the initial load completes (#771816) 2016-10-05 11:28:36 -06:00
btrfs.h Use BlockSpecial objects in btrfs member cache (#767842) 2016-08-06 09:47:58 -06:00
exfat.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
ext2.h Only enable ext4 64bit feature when required (#766910) 2016-06-05 09:40:11 -06:00
f2fs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
fat16.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
hfs.h Remove remaining use of retired vol_id 2016-08-06 09:47:58 -06:00
hfsplus.h Remove remaining use of retired vol_id 2016-08-06 09:47:58 -06:00
i18n.h Make include guards unique (#539297) 2013-06-05 10:57:39 -06:00
jfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
linux_swap.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
luks.h Populate LUKS partition usage (#760080) 2016-01-29 13:41:40 -07:00
lvm2_pv.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
nilfs2.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
ntfs.h Display progress of NTFS file system specific copy operation (#762366) 2016-02-23 10:02:03 -07:00
reiser4.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
reiserfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
ufs.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
xfs.h Display progress of XFS file system specific copy operation (#760709) 2016-02-12 09:09:57 -07:00