app: keep the statusbar progress from drawing over the right docks
In a blocking operation we don't give the main loop time to lay out the statusbar correctly after showing the progress bar. Force a size on the progress bar using gtk_widget_size_allocate(). This sucks.
This commit is contained in:
@ -414,7 +414,8 @@ gimp_statusbar_progress_start (GimpProgress *progress,
|
||||
|
||||
if (! statusbar->progress_active)
|
||||
{
|
||||
GtkWidget *bar = statusbar->progressbar;
|
||||
GtkWidget *bar = statusbar->progressbar;
|
||||
GtkAllocation allocation;
|
||||
|
||||
statusbar->progress_active = TRUE;
|
||||
statusbar->progress_value = 0.0;
|
||||
@ -437,13 +438,18 @@ gimp_statusbar_progress_start (GimpProgress *progress,
|
||||
gtk_widget_show (statusbar->cancel_button);
|
||||
}
|
||||
|
||||
gtk_widget_get_allocation (statusbar->label, &allocation);
|
||||
|
||||
gtk_widget_show (statusbar->progressbar);
|
||||
gtk_widget_hide (statusbar->label);
|
||||
|
||||
/* This call is needed so that the progress bar is drawn in the
|
||||
* correct place. Probably due a bug in GTK+.
|
||||
/* This shit is needed so that the progress bar is drawn in the
|
||||
* correct place in the cases where we suck completely and run
|
||||
* an operation that blocks the GUI and doesn't let the main
|
||||
* loop run.
|
||||
*/
|
||||
gtk_container_resize_children (GTK_CONTAINER (statusbar));
|
||||
gtk_widget_size_allocate (statusbar->progressbar, &allocation);
|
||||
|
||||
if (! gtk_widget_get_visible (GTK_WIDGET (statusbar)))
|
||||
{
|
||||
|
Reference in New Issue
Block a user