...
 
Commits (65)
......@@ -100,6 +100,8 @@ homebank_SOURCES = \
ui-assist-start.h \
ui-budget.c \
ui-budget.h \
ui-budget-tabview.c \
ui-budget-tabview.h \
ui-category.c \
ui-category.h \
ui-currency.c \
......
......@@ -117,11 +117,12 @@ am_homebank_OBJECTS = dsp_account.$(OBJEXT) dsp_mainwindow.$(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-budget.$(OBJEXT) ui-budget-tabview.$(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)
......@@ -401,6 +402,8 @@ homebank_SOURCES = \
ui-assist-start.h \
ui-budget.c \
ui-budget.h \
ui-budget-tabview.c \
ui-budget-tabview.h \
ui-category.c \
ui-category.h \
ui-currency.c \
......@@ -561,6 +564,7 @@ distclean-compile:
@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@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-assist-start.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-budget-tabview.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-budget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-category.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui-currency.Po@am__quote@
......
......@@ -36,6 +36,7 @@
#include "ui-archive.h"
#include "ui-assign.h"
#include "ui-budget.h"
#include "ui-budget-tabview.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_defbudget_tabview(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) },
{ "BudgetTabview", ICONNAME_HB_BUDGET , N_("Budget (tab view)...") , NULL, N_("View the budget"), G_CALLBACK (ui_mainwindow_action_defbudget_tabview) },
{ "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='BudgetTabview'/>"
" <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_defbudget_tabview(void)
{
ui_bud_tabview_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 __HB_BUD_TABVIEW_H__
#define __HB_BUD_TABVIEW_H__
#define HB_BUD_TABVIEW_EDIT_ENABLE 0
struct ui_bud_tabview_data
{
GtkWidget *dialog;
// Number of changes to notify globally
gint change;
// Tree view with budget
GtkWidget *TV_budget;
GtkTreeViewColumn *TVC_category;
GtkTreeSelection *TV_selection;
// Radio buttons of view mode
GtkWidget *RA_mode;
// Tool bar
#if HB_BUD_TABVIEW_EDIT_ENABLE
GtkWidget *BT_category_add, *BT_category_delete, *BT_category_merge;
GtkWidget *BT_category_reset, *BT_category_force_monitoring;
gulong HID_category_monitoring_toggle;
#endif
GtkWidget *BT_expand, *BT_collapse;
// Should the tree be collapsed
gboolean TV_is_expanded;
#if HB_BUD_TABVIEW_EDIT_ENABLE
// Add Dialog
GtkWidget *COMBO_add_parent, *EN_add_name, *BT_apply;
// Merge Dialog
GtkWidget *COMBO_merge_target, *CHECK_merge_delete;
guint32 MERGE_source_category_key;
#endif
// Search
GtkWidget *EN_search;
GtkUIManager *ui;
};
typedef struct ui_bud_tabview_data ui_bud_tabview_data_t;
GtkWidget *ui_bud_tabview_manage_dialog(void);
#endif