new enter_display_mode() function

This commit is contained in:
Søren Sandmann Pedersen
2009-02-21 04:07:07 -05:00
parent b3893d6c75
commit 18da1cd0be

View File

@ -285,6 +285,8 @@ set_busy (GtkWidget *widget,
if (cursor)
gdk_cursor_unref (cursor);
gdk_display_flush (gdk_display_get_default());
}
static void
@ -632,16 +634,8 @@ fill_lists (Application *app)
}
static void
ensure_profile (Application *app)
enter_display_mode (Application *app)
{
if (app->profile)
return;
app->profile = collector_create_profile (app->collector);
collector_stop (app->collector);
collector_reset (app->collector);
app->state = DISPLAYING;
update_sensitivity (app);
@ -658,6 +652,20 @@ ensure_profile (Application *app)
app->inhibit_forced_redraw = FALSE;
}
static void
ensure_profile (Application *app)
{
if (app->profile)
return;
app->profile = collector_create_profile (app->collector);
collector_stop (app->collector);
collector_reset (app->collector);
enter_display_mode (app);
}
static void
on_about_activated (GtkWidget *widget, gpointer data)
{
@ -817,24 +825,16 @@ set_loaded_profile (Application *app,
g_return_if_fail (name != NULL);
g_return_if_fail (profile != NULL);
set_busy (app->main_window, TRUE);
collector_stop (app->collector);
delete_data (app);
app->state = DISPLAYING;
app->profile = profile;
app->profile_from_file = TRUE;
fill_lists (app);
set_application_title (app, name);
update_sensitivity (app);
collector_stop (app->collector);
set_busy (app->main_window, FALSE);
enter_display_mode (app);
}
static void
@ -1663,14 +1663,17 @@ load_file (gpointer data)
profile = profile_load (filename, &err);
set_busy (app->main_window, FALSE);
if (profile)
{
set_loaded_profile (app, filename, profile);
gdk_window_process_all_updates ();
set_busy (app->main_window, FALSE);
}
else
{
set_busy (app->main_window, FALSE);
show_could_not_open (app, filename, err);
g_error_free (err);
}