mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add a per-account "hidden" flag, and update the accounts page and the
account quickfill to respect this flag. Also flip the "hide zero balance" flag to a "show zero balance" flag for symmetry. Implements 87077. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13785 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e1fdd98f98
commit
39fad14808
11
ChangeLog
11
ChangeLog
@ -1,5 +1,16 @@
|
||||
2006-04-14 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/register/ledger-core/split-register-load.c:
|
||||
* src/gnome-utils/gnc-tree-view-account.[ch]:
|
||||
* src/gnome-utils/dialog-account.c:
|
||||
* src/gnome/gnc-plugin-page-account-tree.c:
|
||||
* src/gnome/glade/account.glade:
|
||||
* src/gnome/gnc-plugin-page-budget.c:
|
||||
* src/engine/Account.[ch]: Add a per-account "hidden" flag, and
|
||||
update the accounts page and the account quickfill to respect this
|
||||
flag. Also flip the "hide zero balance" flag to a "show zero
|
||||
balance" flag for symmetry. Implements 87077.
|
||||
|
||||
* src/gnome/gnc-plugin-page-account-tree.c: Allow the account tree
|
||||
view callback to run in addition the the page callback. Fixes
|
||||
303995.
|
||||
|
@ -1960,6 +1960,45 @@ xaccAccountGetDescendantPlaceholder (const Account *acc)
|
||||
/********************************************************************\
|
||||
\********************************************************************/
|
||||
|
||||
gboolean
|
||||
xaccAccountGetHidden (const Account *acc)
|
||||
{
|
||||
char *str;
|
||||
if (!acc) return FALSE;
|
||||
|
||||
str = kvp_frame_get_string(acc->inst.kvp_data, "hidden");
|
||||
return (str && !strcmp(str, "true"));
|
||||
}
|
||||
|
||||
void
|
||||
xaccAccountSetHidden (Account *acc, gboolean val)
|
||||
{
|
||||
if (!acc) return;
|
||||
|
||||
kvp_frame_set_string (acc->inst.kvp_data, "hidden",
|
||||
val ? "true" : NULL);
|
||||
mark_account (acc);
|
||||
xaccAccountCommitEdit (acc);
|
||||
}
|
||||
|
||||
gboolean
|
||||
xaccAccountIsHidden (const Account *acc)
|
||||
{
|
||||
if (!acc)
|
||||
return FALSE;
|
||||
if (xaccAccountGetHidden(acc))
|
||||
return TRUE;
|
||||
|
||||
while ((acc = xaccAccountGetParentAccount(acc)) != NULL) {
|
||||
if (xaccAccountGetHidden(acc))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
\********************************************************************/
|
||||
|
||||
gboolean
|
||||
xaccAccountHasAncestor (const Account *acc, const Account * ancestor)
|
||||
{
|
||||
|
@ -673,9 +673,21 @@ typedef enum
|
||||
/** @name Account Placeholder flag
|
||||
@{
|
||||
*/
|
||||
/** DOCUMENT ME! */
|
||||
|
||||
/** Get the "placeholder" flag for an account. If this flag is set
|
||||
* then the account may not be modified by the user.
|
||||
*
|
||||
* @param acc The account whose flag should be retrieved.
|
||||
*
|
||||
* @return The current state of the account's "placeholder" flag. */
|
||||
gboolean xaccAccountGetPlaceholder (const Account *account);
|
||||
/** DOCUMENT ME! */
|
||||
|
||||
/** Set the "placeholder" flag for an account. If this flag is set
|
||||
* then the account may not be modified by the user.
|
||||
*
|
||||
* @param acc The account whose flag should be retrieved.
|
||||
*
|
||||
* @param val The new state for the account's "placeholder" flag. */
|
||||
void xaccAccountSetPlaceholder (Account *account, gboolean option);
|
||||
|
||||
/** Returns PLACEHOLDER_NONE if account is NULL or neither account nor
|
||||
@ -686,6 +698,39 @@ void xaccAccountSetPlaceholder (Account *account, gboolean option);
|
||||
GNCPlaceholderType xaccAccountGetDescendantPlaceholder(const Account *account);
|
||||
/** @} */
|
||||
|
||||
/** @name Account Hidden flag
|
||||
@{
|
||||
*/
|
||||
|
||||
/** Get the "hidden" flag for an account. If this flag is set then
|
||||
* the account (and any children) will be hidden from the user unless
|
||||
* they explicitly ask to see them.
|
||||
*
|
||||
* @param acc The account whose flag should be retrieved.
|
||||
*
|
||||
* @return The current state of the account's "hidden" flag. */
|
||||
gboolean xaccAccountGetHidden (const Account *acc);
|
||||
|
||||
/** Set the "hidden" flag for an account. If this flag is set then
|
||||
* the account (and any children) will be hidden from the user unless
|
||||
* they explicitly ask to see them.
|
||||
*
|
||||
* @param acc The account whose flag should be retrieved.
|
||||
*
|
||||
* @param val The new state for the account's "hidden" flag. */
|
||||
void xaccAccountSetHidden (Account *acc, gboolean val);
|
||||
|
||||
/** Should this account be "hidden". If this flag is set for this
|
||||
* account (or any parent account) then the account should be hidden
|
||||
* from the user unless they explicitly ask to see it. This function
|
||||
* is different from the xaccAccountGetHidden() function because it
|
||||
* checks the flag in parent accounts in addition to this account.
|
||||
*
|
||||
* @param acc The account whose flag should be retrieved.
|
||||
*
|
||||
* @return Whether or not this account should be "hidden". */
|
||||
gboolean xaccAccountIsHidden (const Account *acc);
|
||||
/** @} */
|
||||
|
||||
/** @name Account Tax related getters/setters
|
||||
@{
|
||||
|
@ -101,6 +101,7 @@ typedef struct _AccountWindow
|
||||
|
||||
GtkWidget * tax_related_button;
|
||||
GtkWidget * placeholder_button;
|
||||
GtkWidget * hidden_button;
|
||||
|
||||
gint component_id;
|
||||
} AccountWindow;
|
||||
@ -180,7 +181,7 @@ gnc_account_to_ui(AccountWindow *aw)
|
||||
Account *account;
|
||||
gnc_commodity * commodity;
|
||||
const char *string;
|
||||
gboolean tax_related, placeholder, nonstd_scu;
|
||||
gboolean flag, nonstd_scu;
|
||||
gint index;
|
||||
|
||||
ENTER("%p", aw);
|
||||
@ -221,13 +222,17 @@ gnc_account_to_ui(AccountWindow *aw)
|
||||
|
||||
gtk_text_buffer_set_text (aw->notes_text_buffer, string, strlen(string));
|
||||
|
||||
tax_related = xaccAccountGetTaxRelated (account);
|
||||
flag = xaccAccountGetTaxRelated (account);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->tax_related_button),
|
||||
tax_related);
|
||||
flag);
|
||||
|
||||
placeholder = xaccAccountGetPlaceholder (account);
|
||||
flag = xaccAccountGetPlaceholder (account);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->placeholder_button),
|
||||
placeholder);
|
||||
flag);
|
||||
|
||||
flag = xaccAccountGetHidden (account);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->hidden_button),
|
||||
flag);
|
||||
|
||||
gtk_tree_view_collapse_all (aw->parent_tree);
|
||||
gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT(aw->parent_tree), account);
|
||||
@ -295,7 +300,7 @@ gnc_ui_to_account(AccountWindow *aw)
|
||||
Account *parent_account;
|
||||
const char *old_string;
|
||||
const char *string;
|
||||
gboolean tax_related, placeholder;
|
||||
gboolean flag;
|
||||
gnc_numeric balance;
|
||||
gboolean use_equity, nonstd;
|
||||
time_t date;
|
||||
@ -353,13 +358,17 @@ gnc_ui_to_account(AccountWindow *aw)
|
||||
if (safe_strcmp (string, old_string) != 0)
|
||||
xaccAccountSetNotes (account, string);
|
||||
|
||||
tax_related =
|
||||
flag =
|
||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->tax_related_button));
|
||||
xaccAccountSetTaxRelated (account, tax_related);
|
||||
xaccAccountSetTaxRelated (account, flag);
|
||||
|
||||
placeholder =
|
||||
flag =
|
||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->placeholder_button));
|
||||
xaccAccountSetPlaceholder (account, placeholder);
|
||||
xaccAccountSetPlaceholder (account, flag);
|
||||
|
||||
flag =
|
||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->hidden_button));
|
||||
xaccAccountSetHidden (account, flag);
|
||||
|
||||
parent_account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree));
|
||||
if (parent_account == aw->top_level_account)
|
||||
@ -1288,6 +1297,7 @@ gnc_account_window_create(AccountWindow *aw)
|
||||
|
||||
aw->tax_related_button = glade_xml_get_widget (xml, "tax_related_button");
|
||||
aw->placeholder_button = glade_xml_get_widget (xml, "placeholder_button");
|
||||
aw->hidden_button = glade_xml_get_widget (xml, "hidden_button");
|
||||
|
||||
box = glade_xml_get_widget (xml, "opening_balance_box");
|
||||
amount = gnc_amount_edit_new ();
|
||||
|
@ -1613,7 +1613,12 @@ gnc_plugin_page_account_tree_filter_accounts (Account *account,
|
||||
|
||||
ENTER("account %p:%s", account, xaccAccountGetName(account));
|
||||
|
||||
if (fd->hide_zero_total) {
|
||||
if (!fd->show_hidden && xaccAccountIsHidden (account)) {
|
||||
LEAVE(" hide: hidden");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!fd->show_zero_total) {
|
||||
total = xaccAccountGetBalanceInCurrency (account, NULL, TRUE);
|
||||
if (gnc_numeric_zero_p(total)) {
|
||||
LEAVE(" hide: zero balance");
|
||||
@ -1627,22 +1632,40 @@ gnc_plugin_page_account_tree_filter_accounts (Account *account,
|
||||
return result;
|
||||
}
|
||||
|
||||
/** The "hide zero totals" button in the Filter dialog changed state.
|
||||
/** The "show hidden" button in the Filter dialog changed state.
|
||||
* Update the page to reflect these changes.
|
||||
*
|
||||
* @param button The GtkCheckButton that was toggled.
|
||||
*
|
||||
* @param fd A pointer to the account filter dialog struct. */
|
||||
void
|
||||
gppat_filter_hide_zero_toggled_cb (GtkToggleButton *button,
|
||||
gppat_filter_show_hidden_toggled_cb (GtkToggleButton *button,
|
||||
AccountFilterDialog *fd)
|
||||
{
|
||||
g_return_if_fail(GTK_IS_TOGGLE_BUTTON(button));
|
||||
|
||||
ENTER("button %p", button);
|
||||
fd->show_hidden = gtk_toggle_button_get_active(button);
|
||||
gnc_tree_view_account_refilter(fd->tree_view);
|
||||
LEAVE("show_hidden %d", fd->show_hidden);
|
||||
}
|
||||
|
||||
/** The "show zero totals" button in the Filter dialog changed state.
|
||||
* Update the page to reflect these changes.
|
||||
*
|
||||
* @param button The GtkCheckButton that was toggled.
|
||||
*
|
||||
* @param fd A pointer to the account filter dialog struct. */
|
||||
void
|
||||
gppat_filter_show_zero_toggled_cb (GtkToggleButton *button,
|
||||
AccountFilterDialog *fd)
|
||||
{
|
||||
g_return_if_fail(GTK_IS_TOGGLE_BUTTON(button));
|
||||
|
||||
ENTER("button %p", button);
|
||||
fd->hide_zero_total = gtk_toggle_button_get_active(button);
|
||||
fd->show_zero_total = gtk_toggle_button_get_active(button);
|
||||
gnc_tree_view_account_refilter(fd->tree_view);
|
||||
LEAVE("hide_zero %d", fd->hide_zero_total);
|
||||
LEAVE("show_zero %d", fd->show_zero_total);
|
||||
}
|
||||
|
||||
/** The "clear all account types" button in the Filter dialog was
|
||||
@ -1779,7 +1802,8 @@ gppat_filter_response_cb (GtkWidget *dialog,
|
||||
|
||||
if (response != GTK_RESPONSE_OK) {
|
||||
fd->visible_types = fd->original_visible_types;
|
||||
fd->hide_zero_total = fd->original_hide_zero_total;
|
||||
fd->show_hidden = fd->original_show_hidden;
|
||||
fd->show_zero_total = fd->original_show_zero_total;
|
||||
gnc_tree_view_account_refilter(fd->tree_view);
|
||||
}
|
||||
|
||||
@ -1823,12 +1847,16 @@ account_filter_dialog_create(AccountFilterDialog *fd, GncPluginPage *page)
|
||||
|
||||
/* Remember current state */
|
||||
fd->original_visible_types = fd->visible_types;
|
||||
fd->original_hide_zero_total = fd->hide_zero_total;
|
||||
fd->original_show_hidden = fd->show_hidden;
|
||||
fd->original_show_zero_total = fd->show_zero_total;
|
||||
|
||||
/* Update the dialog widgets for the current state */
|
||||
button = glade_xml_get_widget (xml, "hide_zero");
|
||||
button = glade_xml_get_widget (xml, "show_hidden");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
|
||||
fd->hide_zero_total);
|
||||
fd->show_hidden);
|
||||
button = glade_xml_get_widget (xml, "show_zero");
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
|
||||
fd->show_zero_total);
|
||||
|
||||
/* Set up the tree view and model */
|
||||
view = GTK_TREE_VIEW(glade_xml_get_widget (xml, FILTER_TREE_VIEW));
|
||||
@ -1864,7 +1892,8 @@ account_filter_dialog_create(AccountFilterDialog *fd, GncPluginPage *page)
|
||||
#define ACCT_COUNT "Number of Open Accounts"
|
||||
#define ACCT_OPEN "Open Account %d"
|
||||
#define ACCT_SELECTED "Selected Account"
|
||||
#define HIDE_ZERO "Hide Zero Total"
|
||||
#define SHOW_HIDDEN "Show Hidden"
|
||||
#define SHOW_ZERO "Show Zero Total"
|
||||
#define ACCT_TYPES "Account Types"
|
||||
|
||||
typedef struct foo {
|
||||
@ -1955,8 +1984,10 @@ gnc_tree_view_account_save(GncTreeViewAccount *view,
|
||||
|
||||
g_key_file_set_integer(key_file, group_name, ACCT_TYPES,
|
||||
fd->visible_types);
|
||||
g_key_file_set_boolean(key_file, group_name, HIDE_ZERO,
|
||||
fd->hide_zero_total);
|
||||
g_key_file_set_boolean(key_file, group_name, SHOW_HIDDEN,
|
||||
fd->show_hidden);
|
||||
g_key_file_set_boolean(key_file, group_name, SHOW_ZERO,
|
||||
fd->show_zero_total);
|
||||
|
||||
bar.key_file = key_file;
|
||||
bar.group_name = group_name;
|
||||
@ -2021,18 +2052,28 @@ gnc_tree_view_account_restore(GncTreeViewAccount *view,
|
||||
GError *error = NULL;
|
||||
gchar *key, *value;
|
||||
gint i, count;
|
||||
gboolean hide;
|
||||
gboolean show;
|
||||
|
||||
/* Filter information. Ignore missing keys. */
|
||||
hide = g_key_file_get_boolean(key_file, group_name, HIDE_ZERO, &error);
|
||||
show = g_key_file_get_boolean(key_file, group_name, SHOW_HIDDEN, &error);
|
||||
if (error) {
|
||||
g_warning("error reading group %s key %s: %s",
|
||||
group_name, HIDE_ZERO, error->message);
|
||||
group_name, SHOW_HIDDEN, error->message);
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
hide = FALSE;
|
||||
show = TRUE;
|
||||
}
|
||||
fd->hide_zero_total = hide;
|
||||
fd->show_hidden = show;
|
||||
|
||||
show = g_key_file_get_boolean(key_file, group_name, SHOW_ZERO, &error);
|
||||
if (error) {
|
||||
g_warning("error reading group %s key %s: %s",
|
||||
group_name, SHOW_ZERO, error->message);
|
||||
g_error_free(error);
|
||||
error = NULL;
|
||||
show = TRUE;
|
||||
}
|
||||
fd->show_zero_total = show;
|
||||
|
||||
i = g_key_file_get_integer(key_file, group_name, ACCT_TYPES, &error);
|
||||
if (error) {
|
||||
|
@ -78,8 +78,10 @@ typedef struct {
|
||||
GncTreeViewAccount *tree_view;
|
||||
guint32 visible_types;
|
||||
guint32 original_visible_types;
|
||||
gboolean hide_zero_total;
|
||||
gboolean original_hide_zero_total;
|
||||
gboolean show_hidden;
|
||||
gboolean original_show_hidden;
|
||||
gboolean show_zero_total;
|
||||
gboolean original_show_zero_total;
|
||||
} AccountFilterDialog;
|
||||
|
||||
void account_filter_dialog_create(AccountFilterDialog *fd,
|
||||
@ -89,7 +91,9 @@ gboolean gnc_plugin_page_account_tree_filter_accounts (Account *account,
|
||||
gpointer user_data);
|
||||
|
||||
/* "Filter By" dialog callbacks */
|
||||
void gppat_filter_hide_zero_toggled_cb (GtkToggleButton *togglebutton,
|
||||
void gppat_filter_show_hidden_toggled_cb (GtkToggleButton *togglebutton,
|
||||
AccountFilterDialog *fd);
|
||||
void gppat_filter_show_zero_toggled_cb (GtkToggleButton *togglebutton,
|
||||
AccountFilterDialog *fd);
|
||||
void gppat_filter_clear_all_cb (GtkWidget *button, AccountFilterDialog *fd);
|
||||
void gppat_filter_select_all_cb (GtkWidget *button, AccountFilterDialog *fd);
|
||||
|
@ -187,28 +187,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
@ -234,27 +212,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="code_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
@ -280,27 +237,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="description_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="commodity_label">
|
||||
<property name="visible">True</property>
|
||||
@ -370,6 +306,161 @@
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">No_tes:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">notes_text</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="tax_related_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Ta_x related</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="placeholder_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">This account is present solely as a placeholder in the hierarchy. Transactions may not be posted to this account, only to sub-accounts of this account.</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Placeholde_r</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="bottom_attach">8</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="hidden_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">H_idden</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="name_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="code_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="description_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkOptionMenu" id="account_scu">
|
||||
<property name="visible">True</property>
|
||||
@ -494,76 +585,6 @@
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">No_tes:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">notes_text</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="placeholder_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">This account is present solely as a placeholder in the hierarchy. Transactions may not be posted to this account, only to sub-accounts of this account.</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Placeholde_r</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="bottom_attach">8</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="tax_related_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Ta_x related</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -3092,18 +3113,17 @@ EUR</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="hide_zero">
|
||||
<widget class="GtkCheckButton" id="show_hidden">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Hide accounts which have a zero total value.</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Hide _zero totals</property>
|
||||
<property name="label" translatable="yes">Show _hidden accounts</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="gppat_filter_hide_zero_toggled_cb" last_modification_time="Fri, 30 Dec 2005 01:58:04 GMT"/>
|
||||
<signal name="toggled" handler="gppat_filter_show_hidden_toggled_cb" last_modification_time="Sat, 15 Apr 2006 02:28:03 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
@ -3113,7 +3133,24 @@ EUR</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
<widget class="GtkCheckButton" id="show_zero">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Hide accounts which have a zero total value.</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Show _zero total accounts</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="gppat_filter_show_zero_toggled_cb" last_modification_time="Sat, 15 Apr 2006 02:27:08 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
@ -3129,7 +3166,7 @@ EUR</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="Balance">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Balances</property>
|
||||
<property name="label" translatable="yes">Other</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -323,7 +323,8 @@ gnc_plugin_page_account_tree_init (GncPluginPageAccountTree *plugin_page)
|
||||
|
||||
/* Visisble types */
|
||||
priv->fd.visible_types = -1; /* Start with all types */
|
||||
priv->fd.hide_zero_total = FALSE;
|
||||
priv->fd.show_hidden = FALSE;
|
||||
priv->fd.show_zero_total = TRUE;
|
||||
|
||||
LEAVE("page %p, priv %p, action group %p",
|
||||
plugin_page, priv, action_group);
|
||||
|
@ -294,7 +294,8 @@ gnc_plugin_page_budget_init (GncPluginPageBudget *plugin_page)
|
||||
|
||||
/* Visisble types */
|
||||
priv->fd.visible_types = -1; /* Start with all types */
|
||||
priv->fd.hide_zero_total = FALSE;
|
||||
priv->fd.show_hidden = TRUE;
|
||||
priv->fd.show_zero_total = TRUE;
|
||||
|
||||
priv->sigFigs = 1;
|
||||
recurrenceSet(&priv->r, 1, PERIOD_MONTH, NULL);
|
||||
|
@ -556,6 +556,8 @@ gnc_split_register_load (SplitRegister *reg, GList * slist,
|
||||
static gboolean
|
||||
skip_cb (Account *account, gpointer x)
|
||||
{
|
||||
if (xaccAccountIsHidden(account))
|
||||
return TRUE;
|
||||
return xaccAccountGetPlaceholder (account);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user