Skip to content

Commit 076871c

Browse files
committed
another progress polish
1 parent 9fe0872 commit 076871c

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

src/imagewindow.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,6 @@ image_window_bestfit( ImageWindow *win )
262262
}
263263
}
264264

265-
static void
266-
image_window_preeval( VipsImage *image,
267-
VipsProgress *progress, ImageWindow *win )
268-
{
269-
gtk_action_bar_set_revealed( GTK_ACTION_BAR( win->progress_bar ),
270-
TRUE );
271-
}
272-
273265
typedef struct _EvalUpdate {
274266
ImageWindow *win;
275267
int eta;
@@ -285,6 +277,11 @@ image_window_eval_idle( void *user_data )
285277
char str[256];
286278
VipsBuf buf = VIPS_BUF_STATIC( str );
287279

280+
// you'd think we could do this in preeval, but it doesn't always seem to
281+
// fire for some reason
282+
gtk_action_bar_set_revealed( GTK_ACTION_BAR( win->progress_bar ),
283+
TRUE );
284+
288285
vips_buf_appendf( &buf, "%d%% complete, %d seconds to go",
289286
update->percent, update->eta );
290287
gtk_progress_bar_set_text( GTK_PROGRESS_BAR( win->progress ),
@@ -1465,8 +1462,6 @@ image_window_set_tile_source( ImageWindow *win, TileSource *tile_source )
14651462
"tile-cache", win->tile_cache,
14661463
NULL );
14671464

1468-
g_signal_connect_object( win->tile_source, "preeval",
1469-
G_CALLBACK( image_window_preeval ), win, 0 );
14701465
g_signal_connect_object( win->tile_source, "eval",
14711466
G_CALLBACK( image_window_eval ), win, 0 );
14721467
g_signal_connect_object( win->tile_source, "posteval",

src/saveoptions.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,6 @@ save_options_error_response( GtkWidget *button, int response,
8181
save_options_error_hide( options );
8282
}
8383

84-
static void
85-
save_options_preeval( VipsImage *image,
86-
VipsProgress *progress, SaveOptions *options )
87-
{
88-
gtk_action_bar_set_revealed( GTK_ACTION_BAR( options->progress_bar ),
89-
TRUE );
90-
}
91-
9284
static void
9385
save_options_eval( VipsImage *image,
9486
VipsProgress *progress, SaveOptions *options )
@@ -110,6 +102,11 @@ save_options_eval( VipsImage *image,
110102
return;
111103
options->last_progress_time = time_now;
112104

105+
// you'd think we could do this in preeval, but it doesn't always seem to
106+
// fire for some reason
107+
gtk_action_bar_set_revealed( GTK_ACTION_BAR( options->progress_bar ),
108+
TRUE );
109+
113110
vips_buf_appendf( &buf, "%d%% complete, %d seconds to go",
114111
progress->percent, progress->eta );
115112
gtk_progress_bar_set_text( GTK_PROGRESS_BAR( options->progress ),
@@ -526,8 +523,6 @@ save_options_new( GtkWindow *parent_window,
526523

527524
if( options->image ) {
528525
vips_image_set_progress( options->image, TRUE );
529-
g_signal_connect_object( options->image, "preeval",
530-
G_CALLBACK( save_options_preeval ), options, 0 );
531526
g_signal_connect_object( options->image, "eval",
532527
G_CALLBACK( save_options_eval ), options, 0 );
533528
g_signal_connect_object( options->image, "posteval",

0 commit comments

Comments
 (0)