Пример #1
0
/* Clean up the compiling stuff and notify the user that compiling has finished.
 All compiler tool chains must call this function at the end!! This function is
 called from a child process watch, so the GDK lock is not held and must be
 acquired for any GUI calls. */
static void
finish_compiling(gboolean success, CompilerData *data)
{
    I7_STORY_USE_PRIVATE(data->story, priv);

    /* Display status message */
    gdk_threads_enter();
    i7_document_remove_status_message(I7_DOCUMENT(data->story), COMPILE_OPERATIONS);
    i7_document_flash_status_message(I7_DOCUMENT(data->story),
                                     success? _("Compiling succeeded.") : _("Compiling failed."),
                                     COMPILE_OPERATIONS);

    /* Switch the Results tab to the Report page */
    html_load_file(WEBKIT_WEB_VIEW(data->story->panel[LEFT]->results_tabs[I7_RESULTS_TAB_REPORT]), data->results_file);
    html_load_file(WEBKIT_WEB_VIEW(data->story->panel[RIGHT]->results_tabs[I7_RESULTS_TAB_REPORT]), data->results_file);
    g_signal_connect(data->story->panel[LEFT]->results_tabs[I7_RESULTS_TAB_REPORT], "notify::load-status", G_CALLBACK(on_load_status_finished_reload), NULL);
    g_signal_connect(data->story->panel[RIGHT]->results_tabs[I7_RESULTS_TAB_REPORT], "notify::load-status", G_CALLBACK(on_load_status_finished_reload), NULL);
    i7_story_show_tab(data->story, I7_PANE_RESULTS, I7_RESULTS_TAB_REPORT);

    gtk_action_group_set_sensitive(priv->compile_action_group, TRUE);
    gdk_threads_leave();

    /* Store the compiler output filename (the I7Story now owns the reference) */
    priv->compiler_output_file = data->output_file;

    /* Free the compiler data object */
    g_object_unref(data->input_file);
    g_object_unref(data->builddir_file);
    g_clear_object(&data->results_file);
    g_slice_free(CompilerData, data);

    /* Update */
    gdk_threads_enter();
    while(gtk_events_pending())
        gtk_main_iteration();
    gdk_threads_leave();
}
Пример #2
0
/* View->Show Headings */
void
action_show_headings(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_SOURCE, I7_SOURCE_VIEW_TAB_CONTENTS);
}
Пример #3
0
/* View->Show Index->World */
void
action_show_world(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_WORLD);
}
Пример #4
0
/* View->Show Index->Scenes */
void
action_show_scenes(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_SCENES);
}
Пример #5
0
/* View->Show Index->Rules */
void
action_show_rules(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_RULES);
}
Пример #6
0
/* View->Show Index->Phrasebook */
void
action_show_phrasebook(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_PHRASEBOOK);
}
Пример #7
0
/* View->Show Index->Kinds */
void
action_show_kinds(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_KINDS);
}
Пример #8
0
/* View->Show Index->Contents */
void
action_show_contents(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_CONTENTS);
}
Пример #9
0
/* View->Show Index->Actions */
void
action_show_actions(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_ACTIONS);
}
Пример #10
0
/* View->Show Index->Home */
void
action_show_home(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_INDEX, I7_INDEX_TAB_WELCOME);
}
Пример #11
0
/* View->Show Tab->Source */
void
action_show_source(GtkAction *action, I7Story *story)
{
	i7_story_show_tab(story, I7_PANE_SOURCE, I7_SOURCE_VIEW_TAB_SOURCE);
}