/****************************************************************************** * Name * on_show_commentary_activate * * Synopsis * #include "gui/main_menu.h" * * void on_show_commentary_activate(GtkMenuItem * menuitem, gpointer user_data) * * Description * toggle commentary window *** we need to change the name of this * function because there no longer an upper_workbook * * Return value * void */ G_MODULE_EXPORT void on_show_commentary_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { gui_show_hide_comms(gtk_check_menu_item_get_active(menuitem)); redisplay_to_realign(); }
/****************************************************************************** * Name * gui_recompute_shows * * Synopsis * #include "tabbed_browser.h" * * void gui_recompute_shows(void) * * Description * a new set of text/preview/comm/dict showings has been selected. * re-align the displayed world with that. * * Return value * void */ void gui_recompute_shows(gboolean flush) { if (stop_refresh) return; stop_refresh = TRUE; if (flush) main_flush_widgets_content(); if (cur_passage_tab) gui_reassign_strdup(&settings.currentverse, cur_passage_tab->text_commentary_key); gui_show_hide_preview(settings.showpreview); gui_show_hide_texts(settings.showtexts); gui_show_hide_dicts(settings.showdicts); gui_show_hide_comms(settings.showcomms); gui_set_bible_comm_layout(); sync_windows(); stop_refresh = FALSE; }
void frontend_display(const char *tabs) { GdkScreen *screen = gdk_screen_get_default(); gint screen_width = gdk_screen_get_width(screen); gint screen_height = gdk_screen_get_height(screen); XI_print(("%s\n", "Displaying Xiphos")); gui_show_main_window(); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets.viewtexts_item), settings.showtexts); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets.viewcomms_item), settings.showcomms); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets.viewdicts_item), settings.showdicts); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets.viewpreview_item), settings.showpreview); gui_show_hide_preview(settings.showpreview); gui_show_hide_texts(settings.showtexts); gui_show_hide_dicts(settings.showdicts); gui_show_hide_comms(settings.showcomms); /* * a little paranoia: * clamp geometry values to a reasonable bound. * sometimes xiphos gets insane reconfig events as it dies, * especially if it's due to just shutting linux down. */ if (settings.app_x < 0) settings.app_x = 0; if (settings.app_x > (screen_width - 100)) settings.app_x = screen_width - 100; if (settings.app_y < 0) settings.app_y = 0; if (settings.app_y > (screen_height - 100)) settings.app_y = screen_height - 100; if (settings.maximized) gtk_window_maximize(GTK_WINDOW(widgets.app)); gtk_window_move(GTK_WINDOW(widgets.app), settings.app_x, settings.app_y); /* gecko needs the widgets to be visible before writing */ sync_windows(); // setup passage notebook // if (settings.browsing) { gui_notebook_main_setup(settings.browsing, tabs); /* } else { url = g_strdup_printf("sword://%s/%s",settings.DictWindowModule, settings.dictkey); main_url_handler(url); g_free(url); gtk_widget_realize(widgets.html_book); url = g_strdup_printf("sword://%s/%d",settings.book_mod, settings.book_offset); main_url_handler(url); g_free(url); settings.addhistoryitem = FALSE; url = g_strdup_printf("sword://%s/%s",settings.MainWindowModule, settings.currentverse); main_url_handler(url); g_free(url); } */ /* must be set after tab stuff is done */ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets.parallel_tab_item), settings.showparatab); g_signal_connect(G_OBJECT(widgets.parallel_tab_item), "toggled", G_CALLBACK(gui_parallel_tab_activate), NULL); gui_show_previewer_in_sidebar(settings.show_previewer_in_sidebar); /* open saved windows as needed */ if (settings.display_parallel) on_undockInt_activate(NULL); if (settings.display_modmgr) gui_open_mod_mgr(); if (settings.display_advsearch) main_open_search_dialog(); if (settings.display_prefs) gui_setup_preferences_dialog(); if (settings.showdevotional) main_display_devotional(); else main_init_previewer(); gtk_widget_grab_focus(sidebar.module_list); XI_print(("%s\n\n", "done")); }