GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
assistant-csv-account-import.c File Reference

CSV Import Assistant. More...

#include "config.h"
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "dialog-utils.h"
#include "gnc-ui.h"
#include "gnc-uri-utils.h"
#include "gnc-ui-util.h"
#include "gnc-component-manager.h"
#include "assistant-utils.h"
#include "assistant-csv-account-import.h"
#include "csv-account-import.h"

Go to the source code of this file.

Macros

#define GNC_PREFS_GROUP   "dialogs.import.csv"
 
#define ASSISTANT_CSV_IMPORT_CM_CLASS   "assistant-csv-account-import"
 
#define CREATE_COLUMN(description, column_id)
 

Functions

void csv_import_assistant_prepare (GtkAssistant *assistant, GtkWidget *page, gpointer user_data)
 
void csv_import_assistant_finish (GtkAssistant *gtkassistant, gpointer user_data)
 
void csv_import_assistant_cancel (GtkAssistant *gtkassistant, gpointer user_data)
 
void csv_import_assistant_close (GtkAssistant *gtkassistant, gpointer user_data)
 
void csv_import_assistant_start_page_prepare (GtkAssistant *gtkassistant, gpointer user_data)
 
void csv_import_assistant_account_page_prepare (GtkAssistant *gtkassistant, gpointer user_data)
 
void csv_import_assistant_file_page_prepare (GtkAssistant *assistant, gpointer user_data)
 
void csv_import_assistant_finish_page_prepare (GtkAssistant *assistant, gpointer user_data)
 
void csv_import_assistant_summary_page_prepare (GtkAssistant *assistant, gpointer user_data)
 
void csv_import_sep_cb (GtkWidget *radio, gpointer user_data)
 
void csv_import_hrows_cb (GtkWidget *spin, gpointer user_data)
 
void csv_import_file_chooser_confirm_cb (GtkWidget *button, CsvImportInfo *info)
 
void gnc_file_csv_account_import (void)
 

Detailed Description

CSV Import Assistant.

Author
Copyright (c) 2012 Robert Fewell

Definition in file assistant-csv-account-import.c.

Macro Definition Documentation

#define CREATE_COLUMN (   description,
  column_id 
)
Value:
renderer = gtk_cell_renderer_text_new (); \
mnemonic_desc = mnemonic_escape (_(description)); \
column = gtk_tree_view_column_new_with_attributes (mnemonic_desc, renderer, "text", column_id, NULL); \
gtk_tree_view_column_add_attribute (column, renderer, "background", ROW_COLOR); \
gtk_tree_view_column_set_resizable (column, TRUE); \
gtk_tree_view_append_column (GTK_TREE_VIEW(info->tree_view), column); \
g_free (mnemonic_desc);

Function Documentation

void gnc_file_csv_account_import ( void  )

The gnc_file_csv_account_import() will let the user import accounts from a delimited file.

Definition at line 686 of file assistant-csv-account-import.c.

687 {
688  CsvImportInfo *info;
689 
690  info = g_new0 (CsvImportInfo, 1);
691 
692  /* In order to trigger a book options display on the creation of a new book,
693  * we need to detect when we are dealing with a new book. */
694  info->new_book = gnc_is_new_book();
695 
696  csv_import_assistant_create (info);
697 
698  gnc_register_gui_component (ASSISTANT_CSV_IMPORT_CM_CLASS,
699  NULL, csv_import_close_handler,
700  info);
701 
702  gtk_widget_show_all (info->window);
703 
704  gnc_window_adjust_for_screen (GTK_WINDOW(info->window));
705 }