...
 
Commits (42)
......@@ -90,6 +90,8 @@ homebank_SOURCES = \
rep_vehicle.h \
ui-account.c \
ui-account.h \
ui-adv-budget.c \
ui-adv-budget.h \
ui-archive.c \
ui-archive.h \
ui-assign.c \
......
......@@ -115,13 +115,14 @@ am_homebank_OBJECTS = dsp_account.$(OBJEXT) dsp_mainwindow.$(OBJEXT) \
list_upcoming.$(OBJEXT) rep_balance.$(OBJEXT) \
rep_budget.$(OBJEXT) rep_stats.$(OBJEXT) rep_time.$(OBJEXT) \
rep_vehicle.$(OBJEXT) ui-account.$(OBJEXT) \
ui-archive.$(OBJEXT) ui-assign.$(OBJEXT) \
ui-assist-import.$(OBJEXT) ui-assist-start.$(OBJEXT) \
ui-budget.$(OBJEXT) ui-category.$(OBJEXT) \
ui-currency.$(OBJEXT) ui-dialogs.$(OBJEXT) ui-filter.$(OBJEXT) \
ui-hbfile.$(OBJEXT) ui-payee.$(OBJEXT) ui-pref.$(OBJEXT) \
ui-split.$(OBJEXT) ui-transaction.$(OBJEXT) \
ui-txn-multi.$(OBJEXT) ui-widgets.$(OBJEXT)
ui-adv-budget.$(OBJEXT) ui-archive.$(OBJEXT) \
ui-assign.$(OBJEXT) ui-assist-import.$(OBJEXT) \
ui-assist-start.$(OBJEXT) ui-budget.$(OBJEXT) \
ui-category.$(OBJEXT) ui-currency.$(OBJEXT) \
ui-dialogs.$(OBJEXT) ui-filter.$(OBJEXT) ui-hbfile.$(OBJEXT) \
ui-payee.$(OBJEXT) ui-pref.$(OBJEXT) ui-split.$(OBJEXT) \
ui-transaction.$(OBJEXT) ui-txn-multi.$(OBJEXT) \
ui-widgets.$(OBJEXT)
homebank_OBJECTS = $(am_homebank_OBJECTS)
am__DEPENDENCIES_1 =
homebank_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
......@@ -391,6 +392,8 @@ homebank_SOURCES = \
rep_vehicle.h \
ui-account.c \
ui-account.h \
ui-adv-budget.c \
ui-adv-budget.h \
ui-archive.c \
ui-archive.h \
ui-assign.c \
......@@ -557,6 +560,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rep_time.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rep_vehicle.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-account.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-adv-budget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-archive.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-assign.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-assist-import.Po@am__quote@
......
......@@ -36,6 +36,7 @@
#include "ui-archive.h"
#include "ui-assign.h"
#include "ui-budget.h"
#include "ui-adv-budget.h"
#include "ui-pref.h"
#include "ui-hbfile.h"
#include "ui-transaction.h"
......@@ -95,6 +96,7 @@ static void ui_mainwindow_action_defpayee(void);
static void ui_mainwindow_action_defcategory(void);
static void ui_mainwindow_action_defarchive(void);
static void ui_mainwindow_action_defbudget(void);
static void ui_mainwindow_action_defadvancedbudget(void);
static void ui_mainwindow_action_defassign(void);
static void ui_mainwindow_action_preferences(void);
......@@ -216,6 +218,7 @@ static GtkActionEntry entries[] = {
{ "Category" , ICONNAME_HB_CATEGORY , N_("Categories...") , NULL, N_("Configure the categories"), G_CALLBACK (ui_mainwindow_action_defcategory) },
{ "Archive" , ICONNAME_HB_ARCHIVE , N_("Scheduled/Template...") , NULL, N_("Configure the scheduled/template transactions"), G_CALLBACK (ui_mainwindow_action_defarchive) },
{ "Budget" , ICONNAME_HB_BUDGET , N_("Budget...") , NULL, N_("Configure the budget"), G_CALLBACK (ui_mainwindow_action_defbudget) },
{ "AdvancedBudget", ICONNAME_HB_BUDGET , N_("Advanced Budget...") , NULL, N_("Configure the budget"), G_CALLBACK (ui_mainwindow_action_defadvancedbudget) },
{ "Assign" , ICONNAME_HB_ASSIGN , N_("Assignments..."), NULL, N_("Configure the automatic assignments"), G_CALLBACK (ui_mainwindow_action_defassign) },
/* TxnMenu */
......@@ -309,6 +312,7 @@ static const gchar *ui_info =
" <menuitem action='Category'/>"
" <menuitem action='Archive'/>"
" <menuitem action='Budget'/>"
" <menuitem action='AdvancedBudget'/>"
" <menuitem action='Assign'/>"
" <menuitem action='Currency'/>"
" </menu>"
......@@ -683,6 +687,12 @@ static void ui_mainwindow_action_defbudget(void)
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_TITLE+UF_SENSITIVE));
}
static void ui_mainwindow_action_defadvancedbudget(void)
{
ui_adv_bud_manage_dialog();
ui_mainwindow_update(GLOBALS->mainwindow, GINT_TO_POINTER(UF_TITLE+UF_SENSITIVE));
}
static void ui_mainwindow_action_defassign(void)
{
......
This diff is collapsed.
/* HomeBank -- Free, easy, personal accounting for everyone.
* Copyright (C) 2018-2019 Adrien Dorsaz <adrien@adorsaz.ch>
*
* This file is part of HomeBank.
*
* HomeBank is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HomeBank is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __HOMEBANK_ADVBUDGET_H__
#define __HOMEBANK_ADVBUDGET_H__
struct adv_bud_data
{
GtkWidget *dialog;
// Number of changes to notify globally
gint change;
// Tree view with budget
GtkWidget *TV_budget;
GtkTreeViewColumn *TVC_category;
GtkTreeViewColumn *TVC_category_with_force;
GtkTreeSelection *TV_selection;
// Radio buttons of view mode
GtkWidget *RA_mode;
// Tool bar
GtkWidget *BT_category_add, *BT_category_delete, *BT_category_merge, *BT_expand, *BT_collapse;
// Should the tree be collapsed
gboolean TV_isexpanded;
// Add Dialog
GtkWidget *COMBO_add_parent, *EN_add_name, *BT_apply;
// Merge Dialog
GtkWidget *COMBO_merge_target, *CHECK_merge_delete;
// Search
GtkWidget *EN_search;
GtkUIManager *ui;
};
typedef struct adv_bud_data adv_bud_data_t;
GtkWidget *ui_adv_bud_manage_dialog(void);
#endif