diff --git a/src/doc/sx.rst b/src/doc/sx.rst index 75bb02c91c..e797aaae41 100644 --- a/src/doc/sx.rst +++ b/src/doc/sx.rst @@ -110,33 +110,35 @@ TODO - [ ] model-ize - (check_consistent, especially...) + - Notes:: -GncSxEditModel* gnc_sx_edit_model_new(SchedXaction *sx); + GncSxEditModel* gnc_sx_edit_model_new(SchedXaction *sx); -gnc_sxed_check_changed( GncSxEditorDialog *sxed ) -gnc_sxed_check_consistent( GncSxEditorDialog *sxed ) -gnc_sxed_save_sx( GncSxEditorDialog *sxed ) + gnc_sxed_check_changed( GncSxEditorDialog *sxed ) + gnc_sxed_check_consistent( GncSxEditorDialog *sxed ) + gnc_sxed_save_sx( GncSxEditorDialog *sxed ) - -gchar* gnc_sx_edit_model_get_name(GncSxEditModel *mdl); -void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name); + gchar* gnc_sx_edit_model_get_name(GncSxEditModel *mdl); + void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name); - gnc_dense_cal - - [x] {0, 1, 2, 3, 4, 6, 12} month selection for dense calendar - - - [x] conf-save value + - [ ] eliminate the XXX FIXME "cannot find tag [1]" messages. - [ ] code cleanup - [x] min-size - - [x] start-of-week := {sun,mon} (via locale) - [ ] change number-of-month properties to display-named properties (width, length) - [ ] gconf setting for dense-cal font-size reduction - [?] better transient/floating window - [/] (re-format file) - ! [x] font handling: gdk -> pango + - [x] start-of-week := {sun,mon} (via locale) + - [x] {0, 1, 2, 3, 4, 6, 12} month selection for dense calendar + + - [x] conf-save value + - [x] set_model(GncTemporalInstancesModel *mdl) - [x] new interface creation. @@ -228,6 +230,7 @@ void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name); spinning... it is run because the changed(?) signal handler is too slow - [ ] support nth-weekday Recurrence period. + - [x] Freq=none doesn't work:: * 17:00:29 CRIT recurrenceListNextInstance: assertion `rlist && ref && next && g_date_valid(ref)' failed @@ -237,16 +240,16 @@ void gnc_sx_edit_model_set_name(GncSxEditModel *mdl, gchar *new_name); - [ ] "reminder" instances should show number of days until due - [ ] "Find unfinished" button; count; sensitize Ok as function of unfinished. - - [ ] text changes [tw20070614]_ - - - [ ] "Sx, Instance, Variable" -> "Transaction" - - [ ] "Instance State" -> "Status" - - [ ] "Variable Value" -> "Value" - - [ ] bold SX names [tw20070614]_ - [ ] checkbox/option to show/hide Reminders [tw20070614]_ - [ ] filter/remove SXes that don't have any instances in the list [tw20070614-2]_ - [ ] remove tree expand controls, except for non-to-create instances with variables [tw200070614-2]_ + - [x] text changes [tw20070614]_ + + - "Sx, Instance, Variable" -> "Transaction" + - "Instance State" -> "Status" + - "Variable Value" -> "Value" + - ! [x] save/restore dialog window size - [x] remove split pane - [x] "auto" scrollbars diff --git a/src/gnome/dialog-sx-since-last-run.c b/src/gnome/dialog-sx-since-last-run.c index d1f52b69d4..456a8ffe92 100644 --- a/src/gnome/dialog-sx-since-last-run.c +++ b/src/gnome/dialog-sx-since-last-run.c @@ -359,14 +359,13 @@ gnc_sx_slr_tree_model_adapter_init(GTypeInstance *instance, gpointer klass) g_signal_connect(adapter->real, "rows-reordered", G_CALLBACK(gsslrtma_proxy_rows_reordered), adapter); } -/* @@fixme: i18n. **/ /* @@fixme: non-staticize. **/ static char* gnc_sx_instance_state_names[] = { - ("Ignored"), - ("Postponed"), - ("To-Create"), - ("Reminder"), - ("Created"), + "Ignored", + "Postponed", + "To-Create", + "Reminder", + "Created", NULL }; @@ -375,6 +374,17 @@ static GtkTreeModel* _singleton_slr_state_model = NULL; GtkTreeModel* gnc_sx_get_slr_state_model(void) { + // This lists exists only to have translatable versions of the strings above. + char* _i18n_gnc_sx_instance_state_names[] = { + _("Ignored"), + _("Postponed"), + _("To-Create"), + _("Reminder"), + _("Created"), + NULL + }; + if (_i18n_gnc_sx_instance_state_names == NULL) { ; } + if (_singleton_slr_state_model == NULL) { int i; @@ -386,7 +396,7 @@ gnc_sx_get_slr_state_model(void) gtk_list_store_insert_with_values(GTK_LIST_STORE(_singleton_slr_state_model), &iter, SX_INSTANCE_STATE_MAX_STATE + 1, - 0, gnc_sx_instance_state_names[i], -1); + 0, _(gnc_sx_instance_state_names[i]), -1); } } return _singleton_slr_state_model; @@ -426,7 +436,6 @@ gsslrtma_populate_tree_store(GncSxSlrTreeModelAdapter *model) FreqSpec *fs; GString *frequency_str; char last_occur_date_buf[MAX_DATE_LENGTH+1]; - char next_occur_date_buf[MAX_DATE_LENGTH+1]; frequency_str = g_string_sized_new(32); fs = xaccSchedXactionGetFreqSpec(instances->sx); @@ -436,7 +445,7 @@ gsslrtma_populate_tree_store(GncSxSlrTreeModelAdapter *model) GDate *last_occur = xaccSchedXactionGetLastOccurDate(instances->sx); if (last_occur == NULL || !g_date_valid(last_occur)) { - g_stpcpy(last_occur_date_buf, "never"); + g_stpcpy(last_occur_date_buf, _("never")); } else { @@ -446,8 +455,6 @@ gsslrtma_populate_tree_store(GncSxSlrTreeModelAdapter *model) } } - qof_print_gdate(next_occur_date_buf, MAX_DATE_LENGTH, &instances->next_instance_date); - if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(model->real), &sx_tree_iter, NULL, ++instances_index)) { gtk_tree_store_append(model->real, &sx_tree_iter, NULL); @@ -480,7 +487,7 @@ gsslrtma_populate_tree_store(GncSxSlrTreeModelAdapter *model) } gtk_tree_store_set(model->real, &inst_tree_iter, SLR_MODEL_COL_NAME, instance_date_buf, - SLR_MODEL_COL_INSTANCE_STATE, gnc_sx_instance_state_names[inst->state], + SLR_MODEL_COL_INSTANCE_STATE, _(gnc_sx_instance_state_names[inst->state]), SLR_MODEL_COL_VARAIBLE_VALUE, NULL, SLR_MODEL_COL_INSTANCE_VISIBILITY, TRUE, SLR_MODEL_COL_VARIABLE_VISIBILITY, FALSE, @@ -508,7 +515,7 @@ gsslrtma_populate_tree_store(GncSxSlrTreeModelAdapter *model) } else { - tmp_str = g_string_new("(need value)"); + tmp_str = g_string_new(_("(need value)")); } if (!gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(model->real), @@ -829,7 +836,7 @@ instance_state_changed_cb(GtkCellRendererText *cell, for (i = 0; i < SX_INSTANCE_STATE_CREATED; i++) { - if (strcmp(value, gnc_sx_instance_state_names[i]) == 0) + if (strcmp(value, _(gnc_sx_instance_state_names[i])) == 0) break; } if (i == SX_INSTANCE_STATE_CREATED) @@ -926,7 +933,7 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr gtk_tree_view_set_model(dialog->instance_view, GTK_TREE_MODEL(dialog->editing_model)); renderer = gtk_cell_renderer_text_new(); - col = gtk_tree_view_column_new_with_attributes("SX, Instance, Variable", renderer, + col = gtk_tree_view_column_new_with_attributes(_("Transaction"), renderer, "text", SLR_MODEL_COL_NAME, NULL); gtk_tree_view_append_column(dialog->instance_view, col); @@ -942,7 +949,7 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr "edited", G_CALLBACK(instance_state_changed_cb), dialog); - col = gtk_tree_view_column_new_with_attributes("Instance State", renderer, + col = gtk_tree_view_column_new_with_attributes(_("Status"), renderer, "text", SLR_MODEL_COL_INSTANCE_STATE, "visible", SLR_MODEL_COL_INSTANCE_VISIBILITY, // you might think only "sensitive" is required to @@ -961,7 +968,7 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr "edited", G_CALLBACK(variable_value_changed_cb), dialog); - col = gtk_tree_view_column_new_with_attributes("Variable Value", renderer, + col = gtk_tree_view_column_new_with_attributes(_("Value"), renderer, "text", SLR_MODEL_COL_VARAIBLE_VALUE, "visible", SLR_MODEL_COL_VARIABLE_VISIBILITY, NULL);