From 58f812484c9c70add8e74f0447e56780fda560d0 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Wed, 1 Mar 2006 21:50:52 +0000 Subject: [PATCH] added FIXME force processing of all pending Gtk::Main events after * src/Dialog_Base_Partition.cc, src/FrameVisualDisk.cc: added FIXME * src/Win_GParted.cc: force processing of all pending Gtk::Main events after Refresh_Visual. This fixes an issue with incorrect displayed Visual Partition Display. --- ChangeLog | 8 ++++++++ src/Dialog_Base_Partition.cc | 2 +- src/FrameVisualDisk.cc | 5 +++-- src/Win_GParted.cc | 7 +++++-- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 275a15b9..204fa95a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-01 Bart Hakvoort + + * src/Dialog_Base_Partition.cc, + src/FrameVisualDisk.cc: added FIXME + * src/Win_GParted.cc: force processing of all pending Gtk::Main events + after Refresh_Visual. This fixes an issue with incorrect displayed + Visual Partition Display. + 2006-03-01 Bart Hakvoort * include/Frame_Resizer_Base.h, diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc index ffc82d65..e11384b5 100644 --- a/src/Dialog_Base_Partition.cc +++ b/src/Dialog_Base_Partition.cc @@ -23,7 +23,7 @@ namespace GParted Dialog_Base_Partition::Dialog_Base_Partition( ) { this ->set_has_separator( false ) ; - +//FIXME: somehow the 'off by a few' MiB's warning disappeared. I need to display it whenever the round to cylinders isn't checked. frame_resizer_base = NULL; GRIP = false ; this ->fixed_start = false ; diff --git a/src/FrameVisualDisk.cc b/src/FrameVisualDisk.cc index e1f2ce81..d25b59e7 100644 --- a/src/FrameVisualDisk.cc +++ b/src/FrameVisualDisk.cc @@ -23,7 +23,7 @@ namespace GParted { -//FIXME: left border of extended partition seems to be 1px bigger than it's rightborder.. + FrameVisualDisk::FrameVisualDisk() { this ->set_border_width( 5 ) ; @@ -334,7 +334,7 @@ void FrameVisualDisk::drawingarea_on_realize() bool FrameVisualDisk::drawingarea_on_expose( GdkEventExpose * event ) { draw_partitions( visual_partitions ) ; - + return true ; } @@ -374,6 +374,7 @@ void FrameVisualDisk::on_resize( Gtk::Allocation & allocation ) while ( TOTAL <= 0 && MIN_SIZE > 0 ) ; //due to rounding a few px may be lost (max. 2), lets add these to the last partition. + //FIXME: instead of adding all leftover px to the last partition we should spread them over all partitions if ( allocation .get_width() > calced && visual_partitions .size() ) visual_partitions .back() .length += ( allocation .get_width() - calced ) ; diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 96f708a7..a456cf9d 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -572,7 +572,7 @@ void Win_GParted::Add_Operation( OperationType operationtype, const Partition & treeview_operations .set_cursor( static_cast( static_cast( *iter ) ) ) ; } -void Win_GParted::Refresh_Visual( ) +void Win_GParted::Refresh_Visual() { std::vector partitions = devices[ current_device ] .partitions ; liststore_operations ->clear(); @@ -633,7 +633,10 @@ void Win_GParted::Refresh_Visual( ) //no partition can be selected after a refresh.. selected_partition .Reset() ; - set_valid_operations() ; + set_valid_operations() ; + + while ( Gtk::Main::events_pending() ) + Gtk::Main::iteration() ; } bool Win_GParted::Quit_Check_Operations()