//{ "ImportQIF" , ICONNAME_HB_FILE_IMPORT , N_("QIF file...") , NULL, N_("Open the import assistant"), G_CALLBACK (ui_mainwindow_action_import) },
//{ "ImportOFX" , ICONNAME_HB_FILE_IMPORT , N_("OFX/QFX file...") , NULL, N_("Open the import assistant"), G_CALLBACK (ui_mainwindow_action_import) },
//{ "ImportCSV" , ICONNAME_HB_FILE_IMPORT , N_("CSV file...") , NULL, N_("Open the import assistant"), G_CALLBACK (ui_mainwindow_action_import) },
-
+
{ "ExportQIF" , ICONNAME_HB_FILE_EXPORT , N_("Export as QIF...") , NULL, N_("Export all account in a QIF file"), G_CALLBACK (ui_mainwindow_action_export) },
/* EditMenu */
title = g_strdup_printf (
_("Revert unsaved changes to file '%s'?"), basename);
- secondtext =
+ secondtext =
_("- Changes made to the file will be permanently lost\n"
"- File will be reloaded from the last save (.xhb~)");
if( result == GTK_RESPONSE_OK )
{
DB( g_print(" - should revert\n") );
-
+
hbfile_change_filepath(hb_filename_new_with_extension(GLOBALS->xhb_filepath, "xhb~"));
ui_mainwindow_open_internal(widget, NULL);
hbfile_change_filepath(hb_filename_new_with_extension(GLOBALS->xhb_filepath, "xhb"));
gpointer data)
{
DB( g_print("activate url %s\n", link) );
-
+
homebank_util_url_show (link);
}
gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ());
-
+
dialog = gtk_about_dialog_new();
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(GLOBALS->mainwindow));
gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
-
+
gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG(dialog), g_get_application_name ());
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), version);
gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), copyright);
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), _("Free, easy, personal accounting for everyone"));
gtk_about_dialog_set_license_type (GTK_ABOUT_DIALOG(dialog), GTK_LICENSE_GPL_2_0);
-
+
//gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(dialog), );
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://homebank.free.fr");
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog), "Visit the HomeBank website");
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pixbuf);
g_object_unref (pixbuf);
}
-
+
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(dialog), artists);
//gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog), );
gtk_widget_destroy (dialog);
g_free(version);
-
+
}
title = _("Are you sure you want to anonymize the file?");
- secondtext =
+ secondtext =
_("Proceeding will anonymize any text, \n"
"like 'account x', 'payee y', 'memo z', ...");
//#1707201
//if( result == GTK_RESPONSE_CANCEL )
- // return;
+ // return;
if( result == GTK_RESPONSE_OK )
{
hbfile_anonymize();
// top spending
gtk_chart_show_minor(GTK_CHART(data->RE_pie), GLOBALS->minor);
-
+
ui_hub_spending_update(data->window, data);
}
static void ui_mainwindow_action_trendtime(void)
{
struct hbfile_data *data = g_object_get_data(G_OBJECT(GLOBALS->mainwindow), "inst_data");
-
+
ui_reptime_window_new(data->acc != NULL ? data->acc->key : 0);
}
NULL);
content_area = gtk_dialog_get_content_area(GTK_DIALOG (dialog));
-
+
mainvbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (content_area), mainvbox, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER(mainvbox), SPACING_MEDIUM);
widget = gtk_button_new_with_mnemonic(_("Read HomeBank _Manual"));
gtk_box_pack_start (GTK_BOX (mainvbox), widget, FALSE, FALSE, 0);
g_signal_connect (widget, "clicked", G_CALLBACK (ui_mainwindow_action_help_welcome1), dialog);
-
+
widget = gtk_button_new_with_mnemonic(_("Configure _preferences"));
gtk_box_pack_start (GTK_BOX (mainvbox), widget, FALSE, FALSE, 0);
g_signal_connect (widget, "clicked", G_CALLBACK (ui_mainwindow_action_help_welcome2), dialog);
-
+
widget = gtk_button_new_with_mnemonic(_("Create a _new file"));
gtk_box_pack_start (GTK_BOX (mainvbox), widget, FALSE, FALSE, 0);
g_signal_connect (widget, "clicked", G_CALLBACK (ui_mainwindow_action_help_welcome3), dialog);
gtk_tree_store_clear(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_acc))));
gtk_list_store_clear(GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_upc))));
gtk_list_store_clear(GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(data->LV_top))));
-
+
data->showall = FALSE;
ui_hub_account_setup(data);
-
+
hbfile_cleanup(file_clear);
hbfile_setup(file_clear);
if( PREFS->heritdate == FALSE ) //fix: 318733
ope->date = GLOBALS->today;
-
+
da_transaction_set_default_template(ope);
}
DB( g_print(" - added 1 transaction to %d\n", ope->kacc) );
ui_hub_account_populate(GLOBALS->mainwindow, NULL);
-
+
count++;
//todo: still usefull ? store last date
date = ope->date;
basename = g_path_get_basename(filepath);
secondtext = g_strdup_printf (
- _("Your are about to open the backup file '%s'.\n\nAre you sure you want to do this ?"), basename);
+ _("Your are about to open the backup file '%s'.\n\nAre you sure you want to do this ?"), basename);
result = ui_dialog_msg_confirm_alert(
GTK_WINDOW(GLOBALS->mainwindow),
_("Open the backup file ?"),
secondtext,
_("_Open backup")
- );
+ );
g_free(secondtext);
g_free(basename);
if( result == GTK_RESPONSE_OK )
retval = TRUE;
-
+
return retval;
}
g_free(filename);
return;
}
- }
+ }
hbfile_change_filepath(filename);
ui_mainwindow_open_internal(widget, NULL);
GLOBALS->xhb_timemodified = hbfile_file_get_time_modified(GLOBALS->xhb_filepath);
hbfile_file_hasrevert(GLOBALS->xhb_filepath);
-
+
if(PREFS->appendscheduled)
scheduled_post_all_pending();
ui_hub_scheduled_populate(GLOBALS->mainwindow, NULL);
ui_hub_spending_populate(GLOBALS->mainwindow, NULL);
ui_hub_transaction_populate(data);
-
+
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_TITLE+UF_SENSITIVE+UF_VISUAL));
}
_("If you save it, all the external changes could be lost. Save it anyway?"),
_("S_ave Anyway")
);
-
+
if( result != GTK_RESPONSE_OK )
return;
}
#else
data->wintitle = g_strdup_printf("%s%s - %s - " PROGNAME, changed, basename, GLOBALS->owner);
#endif
-
+
gtk_window_set_title (GTK_WINDOW (gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), data->wintitle);
g_free(basename);
gtk_widget_hide(GTK_WIDGET(data->GR_top));
-
+
DB( g_print(" - show upcoming=%d\n", PREFS->wal_upcoming) );
if(PREFS->wal_upcoming)
gtk_widget_show(GTK_WIDGET(data->GR_upc));
if(PREFS->pnl_list_tab)
g_free(PREFS->pnl_list_tab);
PREFS->pnl_list_tab = g_strdup(gtk_stack_get_visible_child_name(GTK_STACK(data->stack)));
-
+
//todo
if(ui_dialog_msg_savechanges(widget, NULL) == FALSE)
{
g_free(data->wintitle);
da_flt_free(data->filter);
g_free(user_data);
-
+
gtk_main_quit();
}
gchar *newseldata;
gint n_uris, filetype, slen;
GError *error = NULL;
-
+
if (info != TARGET_URI_LIST)
return;
newseldata[slen] = 0;
//DB( g_print(" - seldata ='%s'\n", gtk_selection_data_get_data(selection_data) ) );
//DB( g_print(" - newseldata ='%s'\n", newseldata ) );
-
+
uris = g_uri_list_extract_uris (newseldata);
n_uris = g_strv_length(uris);
DB( g_print(" - dragged %d files (len=%d)\n", n_uris, slen ) );
//single file: check for xhb
if(n_uris == 1)
- {
+ {
filetype = hb_filename_type_get_by_extension(*uris);
DB( g_print(" - filetype is homebank (%d)\n", filetype) );
//collect known filetype to import
DB( g_print(" - collect %d files\n", n_uris) );
-
+
gchar **paths = g_new (gchar *, n_uris + 1);
slen = 0;
for (str = uris; *str; str++)
DB( g_print(" - append %d '%s'\n", slen, path ) );
paths[slen++] = path;
}
- }
+ }
}
paths[slen] = NULL;
{
ui_import_assistant_new( paths );
}
-
-
+
+
end_drop:
g_strfreev (uris);
}
gtk_label_set_markup (GTK_LABEL(label), "Unstable Development Version");
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
#endif
-
+
/* Add the main area */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
//gtk_container_set_border_width (GTK_CONTAINER(vbox), SPACING_MEDIUM);
gtk_stack_sidebar_set_stack (GTK_STACK_SIDEBAR (sidebar), GTK_STACK (stack));
data->stack = stack;
gtk_box_pack_start (GTK_BOX (box), stack, TRUE, TRUE, 0);
-
+
page = ui_hub_scheduled_create(data);
gtk_stack_add_titled (GTK_STACK (stack), page, "sched", _("Scheduled"));
//gtk_paned_pack2 (GTK_PANED(vpaned), widget, TRUE, FALSE);
page = ui_hub_transaction_create(data, HUB_TXN_TYPE_REMIND);
gtk_stack_add_titled (GTK_STACK (stack), page, "remin", _("Remind"));
-
+
//setup, init and show window
wg = &PREFS->wal_wg;
if( PREFS->pnl_list_tab != NULL )
gtk_stack_set_visible_child_name (GTK_STACK(data->stack), PREFS->pnl_list_tab);
-
+
//todo: move this elsewhere
DB( g_print(" - setup stuff\n") );
"prf-interface",
"prf-locale",
"prf-columns",
-//"prf-display",
+//"prf-display",
"prf-import",
"prf-report",
"prf-backup",
static LangName languagenames[] =
{
-// af ar ast be bg ca cs cy da de el en_AU en_CA en_GB es et eu fa fi fr ga gl he hr hu id is it
+// af ar ast be bg ca cs cy da de el en_AU en_CA en_GB es et eu fa fi fr ga gl he hr hu id is it
//ja ka ko lt lv ms nb nds nl oc pl pt_BR pt pt_PT ro ru si sk sl sr sv tr uk vi zh_CN zh_TW
-
+
{ "aa", "Afar" },
{ "ab", "Abkhazian" },
{ "ae", "Avestan" },
//keep system laguage on top
if(code1 == NULL) name1 = NULL;
if(code2 == NULL) name2 = NULL;
-
+
retval = hb_string_utf8_compare(name1, name2);
g_free(name2);
g_warning(" locale name not found '%s'", locale);
lang = locale;
}
-
+
}
return lang;
model = gtk_combo_box_get_model(GTK_COMBO_BOX(combobox));
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter,
+ gtk_list_store_set (GTK_LIST_STORE(model), &iter,
0, NULL,
1, _("System Language"),
-1);
{
const gchar *lang;
gchar *label;
-
+
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
lang = ui_language_combobox_get_name(dirname);
label = g_strdup_printf ("%s [%s]", lang, dirname);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter,
+ gtk_list_store_set (GTK_LIST_STORE(model), &iter,
0, dirname,
1, label,
-1);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), renderer, "text", 1, NULL);
gtk_combo_box_set_id_column( GTK_COMBO_BOX(combobox), 0);
-
+
g_object_unref(store);
if(label)
ui_language_combobox_populate(combobox);
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), 0);
-
+
return combobox;
}
cur.frac_digits = gtk_spin_button_get_value(GTK_SPIN_BUTTON(data->NB_euro_fracdigits));
da_cur_initformat (&cur);
-
+
DB( g_print("fmt: %s\n", cur.format) );
g_ascii_formatd(formatd_buf, sizeof (formatd_buf), cur.format, HB_NUMBER_SAMPLE);
EuroParams *euro;
gchar *buf;
gint active;
-
+
DB( g_print("\n[ui-pref] eurosetcurrency\n") );
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
-
+
active = ui_euro_combobox_id_to_active(country);
euro = &euro_params[active];
buf = g_strdup_printf("%s - %s", euro->iso, euro->name);
data = g_object_get_data(G_OBJECT(gtk_widget_get_ancestor(widget, GTK_TYPE_WINDOW)), "inst_data");
gtk_widget_queue_draw (data->DA_colors);
-
+
}
{
PREFS->language = g_strdup(lang);
}
-
+
PREFS->toolbar_style = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_toolbar));
//PREFS->image_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(data->NB_image_size));
PREFS->grid_lines = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_gridlines));
//list_txn_colpref_get(GTK_TREE_VIEW(data->LV_opecolumns), PREFS->lst_ope_columns);
- // transaction
+ // transaction
PREFS->date_range_txn = hbtk_combo_box_get_active_id(GTK_COMBO_BOX_TEXT(data->CY_daterange_txn));
PREFS->date_future_nbdays = gtk_spin_button_get_value(GTK_SPIN_BUTTON(data->ST_datefuture_nbdays));
PREFS->hidereconciled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->CM_hide_reconciled));
PREFS->dtex_qifswap = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->CM_dtex_qifswap));
ui_gtk_entry_replace_text(data->ST_path_import, &PREFS->path_import);
ui_gtk_entry_replace_text(data->ST_path_export, &PREFS->path_export);
- PREFS->dtex_csvsep = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_dtex_csvsep));
+ PREFS->dtex_csvsep = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_dtex_csvsep));
// report
PREFS->date_range_rep = hbtk_combo_box_get_active_id(GTK_COMBO_BOX_TEXT(data->CY_daterange_rep));
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("General options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
label = make_label_widget(_("Date order:"));
//----------------------------------------- l, r, t, b
widget = gtk_check_button_new_with_mnemonic (_("Sentence _case memo/payee"));
data->CM_dtex_ucfirst = widget;
gtk_grid_attach (GTK_GRID (group_grid), widget, 1, row, 2, 1);
-
+
// group :: OFX/QFX options
group_grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("OFX/QFX options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
label = make_label_widget(_("OFX _Name:"));
//----------------------------------------- l, r, t, b
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("QIF options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
widget = gtk_check_button_new_with_mnemonic (_("_Import memos"));
data->CM_dtex_qifmemo = widget;
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("CSV options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
index = gtk_combo_box_get_active(GTK_COMBO_BOX(data->CY_color_scheme));
colorscheme_init(&scheme, index);
-
+
gtk_widget_get_size_request (widget, &w, &h);
x = y = 0;
for(i=0;i<scheme.nb_cols;i++)
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Initial filter"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
label = make_label_widget(_("_Range:"));
//----------------------------------------- l, r, t, b
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Charts options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
label = make_label_widget(_("Color scheme:"));
//----------------------------------------- l, r, t, b
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Statistics options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
widget = gtk_check_button_new_with_mnemonic (_("Show by _amount"));
data->CM_stat_byamount = widget;
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Budget options"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
widget = gtk_check_button_new_with_mnemonic (_("Show _details"));
data->CM_budg_showdetail = widget;
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("General"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Currency"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 4, 1);
//gtk_grid_attach (GTK_GRID (group_grid), data->CY_option[FILTER_DATE], 1, 2, row, row+1);
gtk_grid_attach (GTK_GRID (group_grid), widget, 3, row, 1, 1);
-
+
// group :: Exchange rate
group_grid = gtk_grid_new ();
data->GRP_rate = group_grid;
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Format"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_container_add (GTK_CONTAINER (expander), group_grid);
-
+
row = 0;
label = make_label_widget(_("_Symbol:"));
gtk_grid_attach (GTK_GRID (group_grid), label, 1, row, 1, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("User interface"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
widget = gtk_image_new_from_icon_name (ICONNAME_INFO, GTK_ICON_SIZE_BUTTON);
gtk_grid_attach (GTK_GRID (group_grid), widget, 3, row, 1, 1);
-
+
gtk_widget_set_tooltip_text(widget,
_("%a locale's abbreviated weekday name.\n"
"%A locale's full weekday name. \n"
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Measurement units"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Transaction window"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
//----------------------------------------- l, r, t, b
gtk_grid_attach (GTK_GRID (group_grid), label, 1, row, 1, 1);
widget = make_numeric(NULL, 0, 366);
-
+
data->ST_datefuture_nbdays = widget;
gtk_grid_attach (GTK_GRID (group_grid), widget, 2, row, 1, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Multiple add"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Memo autocomplete"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Column list"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("General"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Amount colors"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, SPACING_SMALL);
data->GR_colors = hbox;
gtk_grid_attach (GTK_GRID (group_grid), hbox, 2, row, 1, 1);
-
+
widget = gtk_color_button_new ();
data->CP_exp_color = widget;
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
-
+
label = make_label_widget(_("_Income:"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Backup"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("HomeBank files"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Exchange files"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
-
+
row = 1;
label = make_label_widget(_("_Import:"));
//----------------------------------------- l, r, t, b
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Program start"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
gtk_grid_set_row_spacing (GTK_GRID (group_grid), SPACING_SMALL);
gtk_grid_set_column_spacing (GTK_GRID (group_grid), SPACING_MEDIUM);
gtk_grid_attach (GTK_GRID (content_grid), group_grid, 0, crow++, 1, 1);
-
+
label = make_label_group(_("Main window reports"));
gtk_grid_attach (GTK_GRID (group_grid), label, 0, 0, 3, 1);
homebank_pref_setdefault();
defpref_set(data);
}
-
+
}
NULL);
data.window = window;
-
+
//store our window private data
g_object_set_data(G_OBJECT(window), "inst_data", (gpointer)&data);
//left part
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, SPACING_SMALL);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
-
+
//list
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN);
#else
GtkCssProvider *provider;
provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider,
+ gtk_css_provider_load_from_data (provider,
"#hbebox { color: @theme_selected_fg_color; background-color: @theme_selected_bg_color; }"
, -1, NULL);
gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER(provider), G_MAXUINT);
-
+
// gtk_style_context_set_state(context, GTK_STATE_FLAG_SELECTED);
#endif
g_signal_connect (data.CM_bak_is_automatic, "toggled", G_CALLBACK (defpref_backuptoggle), NULL);
-
+
//path selector
g_signal_connect (data.BT_path_hbfile, "pressed", G_CALLBACK (defpref_pathselect), GINT_TO_POINTER(PRF_PATH_WALLET));
g_signal_connect (data.BT_path_import, "pressed", G_CALLBACK (defpref_pathselect), GINT_TO_POINTER(PRF_PATH_IMPORT));
g_signal_connect (data.CY_colors, "changed", G_CALLBACK (defpref_colorpreset), NULL);
-
+
g_signal_connect (gtk_tree_view_get_selection(GTK_TREE_VIEW(data.LV_page)), "changed", G_CALLBACK (defpref_selection), notebook);
g_signal_connect (data.CM_euro_enable, "toggled", G_CALLBACK (defpref_eurotoggle), NULL);
gtk_window_resize(GTK_WINDOW(window), 640, 256);
- //select first row
+ //select initial row
GtkTreePath *path = gtk_tree_path_new_from_indices(initial_selection, -1);
-
gtk_tree_selection_select_path (gtk_tree_view_get_selection(GTK_TREE_VIEW(data.LV_page)), path);
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_BALANCE+UF_VISUAL));
DB( g_print("old='%s' new='%s'\n", old_lang, PREFS->language) );
-
+
if(g_ascii_strncasecmp(old_lang == NULL ? "" : old_lang, PREFS->language == NULL ? "" : PREFS->language, -1) != 0)
{
ui_dialog_msg_infoerror(GTK_WINDOW(window), GTK_MESSAGE_INFO,
_("Info"),
_("You will have to restart HomeBank\nfor the language change to take effect.")
);
-
+
}
g_free(old_lang);
defpref_reset (window, NULL);
break;
}
-
+
// cleanup and destroy
//defhbfile_cleanup(&data, result);
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
gboolean fixed;
- // get toggled iter
+ // get toggled iter
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, COLUMN_VISIBLE, &fixed, -1);
gint i, id;
DB( g_print("[lst_txn-colpref] store column order \n") );
-
+
model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview));
valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter);
i = 0;
gboolean visible;
DB( g_print("eval %d, %s\n", i, list_txn_column_label[i]) );
-
+
if(i <= LST_DSPOPE_DATE) // status, date always displayed
continue;
//[i-1] here because lst_ope_columns[] do not store MODEL_TXN_POINTER
- id = ABS(PREFS->lst_ope_columns[i-1]);
+ id = ABS(PREFS->lst_ope_columns[i-1]);
if(id == 0) id = i; //if we pass here, new column or weird into pref file
visible = (PREFS->lst_ope_columns[i-1] > 0) ? TRUE : FALSE;
-
+
DB( g_print(" - pos=%2d, id=%2d - %d '%s'\n", i, id, visible, list_txn_column_label[id]) );
gtk_list_store_append (store, &iter);
COLUMN_NAME, _(list_txn_column_label[id]),
COLUMN_ID , id,
-1);
-
+
}
//treeview
g_signal_connect (renderer, "toggled",
G_CALLBACK (list_txn_colpref_toggled_cell_data_function), store);
-
+
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (_("Column"),
renderer,