mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Change source files dialog-options.* for spaces and tabs
This commit is contained in:
parent
f93f850f17
commit
e588695502
@ -142,10 +142,11 @@ typedef struct
|
||||
GtkWidget *gain_loss_account_table;
|
||||
GtkWidget *default_gain_loss_account_text;
|
||||
GNCOption *option;
|
||||
Account *prior_gain_loss_account;
|
||||
gnc_commodity *retrieved_book_currency;
|
||||
|
||||
SCM retrieved_policy_scm;
|
||||
SCM retrieved_gain_loss_acct_guid_scm;
|
||||
Account *prior_gain_loss_account;
|
||||
|
||||
} currency_accounting_data;
|
||||
|
||||
@ -224,7 +225,6 @@ gnc_options_dialog_changed_internal (GtkWidget *widget, gboolean sensitive)
|
||||
else
|
||||
gtk_button_set_label (button, _("_Close"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
@ -246,14 +246,13 @@ gnc_option_changed_widget_cb(GtkWidget *widget, GNCOption *option)
|
||||
void
|
||||
gnc_option_changed_option_cb (GtkWidget *dummy, GNCOption *option)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gnc_option_get_gtk_widget (option);
|
||||
GtkWidget *widget = gnc_option_get_gtk_widget (option);
|
||||
gnc_option_changed_widget_cb (widget, option);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_date_option_set_select_method(GNCOption *option, gboolean use_absolute,
|
||||
gnc_date_option_set_select_method (GNCOption *option,
|
||||
gboolean use_absolute,
|
||||
gboolean set_buttons)
|
||||
{
|
||||
GList* widget_list;
|
||||
@ -274,20 +273,16 @@ gnc_date_option_set_select_method(GNCOption *option, gboolean use_absolute,
|
||||
gtk_widget_set_sensitive (ab_widget, TRUE);
|
||||
gtk_widget_set_sensitive (rel_widget, FALSE);
|
||||
if (set_buttons)
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(ab_button), TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (rel_widget, TRUE);
|
||||
gtk_widget_set_sensitive (ab_widget, FALSE);
|
||||
if (set_buttons)
|
||||
{
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(rel_button), TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_rd_option_ab_set_cb (GtkWidget *widget, gpointer *raw_option)
|
||||
@ -348,9 +343,7 @@ static void
|
||||
gnc_image_option_selection_changed_cb (GtkFileChooser *chooser,
|
||||
GNCOption *option)
|
||||
{
|
||||
gchar *filename;
|
||||
|
||||
filename = gtk_file_chooser_get_preview_filename(chooser);
|
||||
gchar *filename = gtk_file_chooser_get_preview_filename (chooser);
|
||||
if (!filename)
|
||||
return;
|
||||
g_object_set_data_full (G_OBJECT(chooser), LAST_SELECTION, filename, g_free);
|
||||
@ -405,14 +398,10 @@ gnc_option_set_ui_value_internal (GNCOption *option, gboolean use_default)
|
||||
{
|
||||
bad_value = option_def->set_value (option, use_default, widget, value);
|
||||
if (bad_value)
|
||||
{
|
||||
PERR("bad value\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PERR("Unknown type. Ignoring.\n");
|
||||
}
|
||||
|
||||
free (type);
|
||||
}
|
||||
@ -439,14 +428,11 @@ gnc_option_get_ui_value_internal (GNCOption *option)
|
||||
type = gnc_option_type (option);
|
||||
|
||||
option_def = gnc_options_ui_get_option (type);
|
||||
|
||||
if (option_def && option_def->get_value)
|
||||
{
|
||||
result = option_def->get_value (option, widget);
|
||||
}
|
||||
else
|
||||
{
|
||||
PERR("Unknown type for refresh. Ignoring.\n");
|
||||
}
|
||||
|
||||
free (type);
|
||||
|
||||
@ -572,7 +558,8 @@ gnc_gain_loss_account_view_filter (Account *account, gpointer data)
|
||||
|
||||
/* gain/loss accts must be in book-currency; if a book currency has been
|
||||
specified in the widget, use it to filter */
|
||||
if (gtk_combo_box_get_active (GTK_COMBO_BOX(book_currency_data->book_currency_widget)) != -1)
|
||||
if (gtk_combo_box_get_active (GTK_COMBO_BOX(
|
||||
book_currency_data->book_currency_widget)) != -1)
|
||||
commodity = gnc_currency_edit_get_currency (
|
||||
GNC_CURRENCY_EDIT(
|
||||
book_currency_data->book_currency_widget));
|
||||
@ -825,7 +812,6 @@ gnc_set_default_gain_loss_account_widget(gnc_commodity *commodity)
|
||||
NULL);
|
||||
gtk_grid_attach (GTK_GRID(book_currency_data->gain_loss_account_table),
|
||||
book_currency_data->default_gain_loss_account_widget, 0, 1, 2, 1);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -910,7 +896,8 @@ gnc_option_changed_gain_loss_account_widget_cb (GtkTreeSelection *selection,
|
||||
}
|
||||
|
||||
void
|
||||
gnc_option_changed_gain_loss_account_del_button_widget_cb (GtkButton *button, gpointer data)
|
||||
gnc_option_changed_gain_loss_account_del_button_widget_cb (GtkButton *button,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeSelection *selection = NULL;
|
||||
GtkWidget *option_widget =
|
||||
@ -1094,10 +1081,8 @@ gnc_option_create_date_widget (GNCOption *option)
|
||||
return box;
|
||||
}
|
||||
else /* can't happen */
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
gnc_option_create_budget_widget (GNCOption *option)
|
||||
@ -1162,7 +1147,6 @@ gnc_option_create_multichoice_widget(GNCOption *option)
|
||||
g_signal_connect (G_OBJECT(widget), "changed",
|
||||
G_CALLBACK(gnc_option_multichoice_cb), option);
|
||||
}
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
@ -1211,7 +1195,6 @@ gnc_option_create_radiobutton_widget(char *name, GNCOption *option)
|
||||
if (tip)
|
||||
free (tip);
|
||||
}
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
@ -1339,8 +1322,7 @@ gnc_option_create_currency_accounting_widget (char *name, GNCOption *option)
|
||||
|
||||
gtk_grid_attach (GTK_GRID(policy_table), widget_label, 0, 1, 1, 1);
|
||||
|
||||
g_signal_connect(G_OBJECT(
|
||||
book_currency_data->default_cost_policy_widget),
|
||||
g_signal_connect (G_OBJECT(book_currency_data->default_cost_policy_widget),
|
||||
"changed",
|
||||
G_CALLBACK(gnc_option_multichoice_cb), option);
|
||||
|
||||
@ -1361,7 +1343,8 @@ gnc_option_create_currency_accounting_widget (char *name, GNCOption *option)
|
||||
gtk_widget_set_tooltip_text (book_currency_data->gain_loss_account_table,
|
||||
tip && *tip ? _(tip) : "");
|
||||
|
||||
gtk_grid_attach (GTK_GRID(book_currency_data->gain_loss_account_table), widget_label, 0, 0, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID(book_currency_data->gain_loss_account_table),
|
||||
widget_label, 0, 0, 1, 1);
|
||||
|
||||
widget_label = NULL;
|
||||
gtk_box_pack_start (GTK_BOX (book_currency_data->book_currency_vbox),
|
||||
@ -1393,10 +1376,7 @@ static void
|
||||
gnc_option_account_cb (GtkTreeSelection *selection, gpointer data)
|
||||
{
|
||||
GNCOption *option = data;
|
||||
GtkTreeView *tree_view;
|
||||
|
||||
tree_view = gtk_tree_selection_get_tree_view(selection);
|
||||
|
||||
GtkTreeView *tree_view = gtk_tree_selection_get_tree_view (selection);
|
||||
gnc_option_changed_widget_cb (GTK_WIDGET(tree_view), option);
|
||||
}
|
||||
|
||||
@ -1580,9 +1560,7 @@ static void
|
||||
gnc_option_list_changed_cb (GtkTreeSelection *selection,
|
||||
GNCOption *option)
|
||||
{
|
||||
GtkTreeView *view;
|
||||
|
||||
view = gtk_tree_selection_get_tree_view(selection);
|
||||
GtkTreeView *view = gtk_tree_selection_get_tree_view (selection);
|
||||
gnc_option_changed_widget_cb (GTK_WIDGET(view), option);
|
||||
}
|
||||
|
||||
@ -1763,7 +1741,7 @@ gnc_option_set_ui_widget(GNCOption *option, GtkGrid *page_box, gint grid_row)
|
||||
}
|
||||
|
||||
/* attach the name label to the first column of the grid and align to the end
|
||||
* if option is a check button, do not add a label as we are using the biult
|
||||
* if option is a check button, do not add a label as we are using the built
|
||||
* in one */
|
||||
if (!GTK_IS_CHECK_BUTTON(value))
|
||||
gtk_grid_attach (GTK_GRID(page_box), GTK_WIDGET(name_label),
|
||||
@ -1860,7 +1838,8 @@ gnc_options_dialog_append_page(GNCOptionWin * propertybox,
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER(options_box), 0);
|
||||
gtk_container_add (GTK_CONTAINER(options_scrolled_win), GTK_WIDGET(options_box));
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(options_scrolled_win), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(options_scrolled_win),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
/* Create all the options */
|
||||
num_options = gnc_option_section_num_options (section);
|
||||
@ -2112,7 +2091,9 @@ gnc_options_dialog_destroy_cb (GtkWidget *object, GNCOptionWin *win)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_options_dialog_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
gnc_options_dialog_window_key_press_cb (GtkWidget *widget,
|
||||
GdkEventKey *event,
|
||||
gpointer data)
|
||||
{
|
||||
GNCOptionWin *win = data;
|
||||
|
||||
@ -2280,7 +2261,8 @@ gnc_options_dialog_new_modal(gboolean modal, gchar *title,
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes (_("Page"), renderer,
|
||||
"text", PAGE_NAME, NULL);
|
||||
"text", PAGE_NAME,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (view, column);
|
||||
|
||||
gtk_tree_view_column_set_alignment (column, 0.5);
|
||||
@ -3021,7 +3003,6 @@ gnc_rd_option_p_set_cb(GtkWidget *widget, gpointer *raw_option)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
gnc_option_set_ui_widget_plot_size (GNCOption *option, GtkGrid *page_box,
|
||||
GtkLabel *name_label, char *documentation,
|
||||
@ -3317,10 +3298,8 @@ gnc_option_set_ui_value_date (GNCOption *option, gboolean use_default,
|
||||
gnc_combott_set_active (GNC_COMBOTT(rel_date_widget), index);
|
||||
}
|
||||
else
|
||||
{
|
||||
bad_value = TRUE;
|
||||
}
|
||||
}
|
||||
else if (g_strcmp0 (symbol_str, "absolute") == 0)
|
||||
{
|
||||
time64 time;
|
||||
@ -3344,23 +3323,17 @@ gnc_option_set_ui_value_date (GNCOption *option, gboolean use_default,
|
||||
gnc_date_edit_set_time (GNC_DATE_EDIT(ab_widget), time);
|
||||
}
|
||||
else
|
||||
{
|
||||
bad_value = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bad_value = TRUE;
|
||||
}
|
||||
|
||||
if (symbol_str)
|
||||
free (symbol_str);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bad_value = TRUE;
|
||||
}
|
||||
|
||||
if (date_option_type)
|
||||
free (date_option_type);
|
||||
@ -3378,7 +3351,6 @@ gnc_option_set_ui_value_account_list (GNCOption *option, gboolean use_default,
|
||||
|
||||
gnc_tree_view_account_set_selected_accounts (GNC_TREE_VIEW_ACCOUNT(widget),
|
||||
list, TRUE);
|
||||
|
||||
g_list_free (list);
|
||||
return FALSE;
|
||||
}
|
||||
@ -3533,8 +3505,10 @@ gnc_option_set_ui_value_pixmap (GNCOption *option, gboolean use_default,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean gnc_option_set_ui_value_budget(
|
||||
GNCOption *option, gboolean use_default, GtkWidget *widget, SCM value)
|
||||
static gboolean gnc_option_set_ui_value_budget (GNCOption *option,
|
||||
gboolean use_default,
|
||||
GtkWidget *widget,
|
||||
SCM value)
|
||||
{
|
||||
GncBudget *bgt;
|
||||
|
||||
@ -3555,8 +3529,6 @@ static gboolean gnc_option_set_ui_value_budget(
|
||||
gtk_combo_box_set_active_iter (cb, &iter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//FIXME: Unimplemented.
|
||||
return FALSE;
|
||||
}
|
||||
@ -3974,7 +3946,6 @@ gnc_option_get_ui_value_list (GNCOption *option, GtkWidget *widget)
|
||||
if (selected)
|
||||
result = scm_cons (gnc_option_permissible_value (option, row), result);
|
||||
}
|
||||
|
||||
return (scm_reverse (result));
|
||||
}
|
||||
|
||||
@ -4097,8 +4068,8 @@ gnc_option_get_ui_value_plot_size (GNCOption *option, GtkWidget *widget)
|
||||
}
|
||||
|
||||
static SCM
|
||||
gnc_option_get_ui_value_currency_accounting (
|
||||
GNCOption *option, GtkWidget *widget)
|
||||
gnc_option_get_ui_value_currency_accounting (GNCOption *option,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
gpointer _index;
|
||||
int index;
|
||||
|
Loading…
Reference in New Issue
Block a user