/** * Create a new sx list page based on the information saved during a previous * instantiation of gnucash. * @param window The window where this page should be installed. * @param key_file A pointer to the GKeyFile data structure where the * page information should be read. * @param group_name The group name to use when restoring data. **/ static GncPluginPage * gnc_plugin_page_sx_list_recreate_page (GtkWidget *window, GKeyFile *key_file, const gchar *group_name) { GncPluginPageSxList *page; GncPluginPageSxListPrivate *priv; g_return_val_if_fail(key_file, NULL); g_return_val_if_fail(group_name, NULL); /* Create the new page. */ page = GNC_PLUGIN_PAGE_SX_LIST(gnc_plugin_page_sx_list_new()); priv = GNC_PLUGIN_PAGE_SX_LIST_GET_PRIVATE(page); /* Install it now so we can them manipulate the created widget */ gnc_main_window_open_page(GNC_MAIN_WINDOW(window), GNC_PLUGIN_PAGE(page)); { GError *err = NULL; gint num_months = g_key_file_get_integer(key_file, group_name, "dense_cal_num_months", &err); if (err == NULL) gnc_dense_cal_set_num_months(priv->gdcal, num_months); else g_error_free(err); } { GError *err = NULL; gint paned_position = g_key_file_get_integer(key_file, group_name, "paned_position", &err); if (err == NULL) gtk_paned_set_position(GTK_PANED(priv->widget), paned_position); else g_error_free(err); } return GNC_PLUGIN_PAGE(page); }
static void gnc_main_window_cmd_actions_scheduled_transaction_editor (GtkAction *action, GncMainWindowActionData *data) { GncPluginPage *page = gnc_plugin_page_sx_list_new(); gnc_main_window_open_page(NULL, page); }