Commit cc5404c1 authored by Danilo Galete's avatar Danilo Galete 💬
Browse files

Project change

parent 10e446ca
/* finance-controller-transactions.c
/* finance-transaction-view-controller.c
*
* Copyright 2021 Danilo Fernandes Galete <galetedanilo@gmail.com>
*
......@@ -18,19 +18,19 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include "finance-controller-transactions.h"
#include "finance-transaction-view-controller.h"
struct _FinanceControllerTransactions
struct _FinanceTransactionViewController
{
GObject parent_instance;
/* The Objects */
GObject *pane;
GObject *view_transactions;
GObject *view;
};
G_DEFINE_TYPE (FinanceControllerTransactions, finance_controller_transactions, G_TYPE_OBJECT)
G_DEFINE_TYPE (FinanceTransactionViewController, finance_transaction_view_controller, G_TYPE_OBJECT)
enum {
PROP_0,
......@@ -42,23 +42,23 @@ enum {
static GParamSpec *properties [N_PROPS] = { NULL, };
static void
finance_controller_transactions_finalize (GObject *object)
finance_transaction_view_controller_finalize (GObject *object)
{
FinanceControllerTransactions *self = (FinanceControllerTransactions *)object;
FinanceTransactionViewController *self = (FinanceTransactionViewController *)object;
g_clear_object (&self->pane);
g_clear_object (&self->view_transactions);
g_clear_object (&self->view);
G_OBJECT_CLASS (finance_controller_transactions_parent_class)->finalize (object);
G_OBJECT_CLASS (finance_transaction_view_controller_parent_class)->finalize (object);
}
static void
finance_controller_transactions_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
finance_transaction_view_controller_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
FinanceControllerTransactions *self = FINANCE_CONTROLLER_TRANSACTIONS (object);
FinanceTransactionViewController *self = FINANCE_TRANSACTION_VIEW_CONTROLLER (object);
switch (prop_id)
{
......@@ -67,7 +67,7 @@ finance_controller_transactions_get_property (GObject *object,
break;
case PROP_VIEW:
g_value_set_object (value, self->view_transactions);
g_value_set_object (value, self->view);
break;
default:
......@@ -76,12 +76,12 @@ finance_controller_transactions_get_property (GObject *object,
}
static void
finance_controller_transactions_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
finance_transaction_view_controller_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
FinanceControllerTransactions *self = FINANCE_CONTROLLER_TRANSACTIONS (object);
FinanceTransactionViewController *self = FINANCE_TRANSACTION_VIEW_CONTROLLER (object);
switch (prop_id)
{
......@@ -91,8 +91,8 @@ finance_controller_transactions_set_property (GObject *object,
break;
case PROP_VIEW:
g_assert (self->view_transactions == NULL);
self->view_transactions = g_value_dup_object (value);
g_assert (self->view == NULL);
self->view = g_value_dup_object (value);
break;
default:
......@@ -101,16 +101,16 @@ finance_controller_transactions_set_property (GObject *object,
}
static void
finance_controller_transactions_class_init (FinanceControllerTransactionsClass *klass)
finance_transaction_view_controller_class_init (FinanceTransactionViewControllerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = finance_controller_transactions_finalize;
object_class->get_property = finance_controller_transactions_get_property;
object_class->set_property = finance_controller_transactions_set_property;
object_class->finalize = finance_transaction_view_controller_finalize;
object_class->get_property = finance_transaction_view_controller_get_property;
object_class->set_property = finance_transaction_view_controller_set_property;
/**
* FinanceControllerTransaction::pane:
* FinanceTransactionViewController::pane:
*
* Sets pane
*/
......@@ -121,7 +121,7 @@ finance_controller_transactions_class_init (FinanceControllerTransactionsClass *
G_PARAM_READWRITE);
/**
* FinanceControllerTransaction::view:
* FinancerTransactionViewControlle::view:
*
* Sets view
*/
......@@ -135,9 +135,9 @@ finance_controller_transactions_class_init (FinanceControllerTransactionsClass *
}
static void
finance_controller_transactions_init (FinanceControllerTransactions *self)
finance_transaction_view_controller_init (FinanceTransactionViewController *self)
{
//self->child = g_ptr_array_new
}
void
......
......@@ -27,7 +27,6 @@
#include "finance-summary-child.h"
#include "finance-transaction-row.h"
#include "finance-view.h"
#include "finance-utils.h"
G_BEGIN_DECLS
......@@ -35,7 +34,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (FinanceTransactionViewController, finance_transaction_view_controller, FINANCE, TRANSACTION_VIEW_CONTROLLER, GObject)
void finance_transaction_view_transaction_startup (FinanceTransactionViewTransaction *self);
void finance_transaction_view_controller_start (FinanceTransactionViewController *self);
G_END_DECLS
......
sources += files(
'finance-controller-transactions.c',
'finance-transaction-view-controller.c',
)
/* finance-transaction-entity.h
*
* Copyright 2021 Danilo Fernandes Galete <galetedanilo@gmail.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef __FINANCE_TRANSACTION_ENTITY_H__
#define __FINANCE_TRANSACTION_ENTITY_H__
#include <glib-object.h>
G_BEGIN_DECLS
#define FINANCE_TYPE_TRANSACTION_ENTITY (finance_transaction_entity_get_type())
G_DECLARE_FINAL_TYPE (FinanceTransactionEntity, finance_transaction_entity, FINANCE, TRANSACTION_ENTITY, GObject)
FinanceTransactionEntity * finance_transaction_entity_new (void);
gdouble finance_transaction_entity_get_amount (FinanceTransactionEntity *self);
void finance_transaction_entity_set_amount (FinanceTransactionEntity *self,
gdouble amount);
const gchar * finance_transaction_entity_get_category (FinanceTransactionEntity *self);
void finance_transaction_entity_set_category (FinanceTransactionEntity *self,
const gchar *category);
GDateTime * finance_transaction_entity_get_date (FinanceTransactionEntity *self);
void finance_transaction_entity_set_date (FinanceTransactionEntity *self,
GDateTime *date);
gint finance_transaction_entity_get_frequency (FinanceTransactionEntity *self);
void finance_transaction_entity_set_frequency (FinanceTransactionEntity *self,
gint frequency);
GDateTime * finance_transaction_entity_get_frequency_date (FinanceTransactionEntity *self);
void finance_transaction_entity_set_frequency_date (FinanceTransactionEntity *self,
GDateTime *date);
gint finance_transaction_entity_get_frequency_number (FinanceTransactionEntity *self);
void finance_transaction_entity_set_frequency_number (FinanceTransactionEntity *self,
gint frequency_number);
GdkRGBA * finance_transaction_entity_get_icon_color (FinanceTransactionEntity *self);
void finance_transaction_entity_set_icon_color (FinanceTransactionEntity *self,
const GdkRGBA *color);
const gchar * finance_transaction_entity_get_icon_name (FinanceTransactionEntity *self);
void finance_transaction_entity_set_icon_name (FinanceTransactionEntity *self,
const gchar *name);
const gchar * finance_transaction_entity_get_icon_text (FinanceTransactionEntity *self);
void finance_transaction_entity_set_icon_text (FinanceTransactionEntity *self,
const gchar *text);
const gchar * finance_transaction_entity_get_name (FinanceTransactionEntity *self);
void finance_transaction_entity_set_name (FinanceTransactionEntity *self,
const gchar *name);
const gchar * finance_transaction_entity_get_notes (FinanceTransactionEntity *self);
void finance_transaction_entity_set_notes (FinanceTransactionEntity *self,
const gchar *notes);
const gchar * finance_transaction_entity_get_payee_name (FinanceTransactionEntity *self);
void finance_transaction_entity_set_payee_name (FinanceTransactionEntity *self,
const gchar *payee_name);
gint finance_transaction_entity_get_payment (FinanceTransactionEntity *self);
void finance_transaction_entity_set_payment (FinanceTransactionEntity *self,
gint payment);
const gchar * finance_transaction_entity_get_payment_information (FinanceTransactionEntity *self);
void finance_transaction_entity_set_payment_information (FinanceTransactionEntity *self,
const gchar *information);
gint finance_transaction_entity_get_repeat (FinanceTransactionEntity *self);
void finance_transaction_entity_set_repeat (FinanceTransactionEntity *self,
gint repeat);
gint finance_transaction_entity_get_type (FinanceTransactionEntity *self);
void finance_transaction_entity_set_type (FinanceTransactionEntity *self,
gint type);
G_END_DECLS
#endif /* __FINANCE_TRANSACTION_ENTITY_H__ */
This diff is collapsed.
/* finance-transaction-data.h
*
* Copyright 2021 galetedanilo <galetedanilo@gmail.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef __FINANCE_TRANSACTION_DATA_H__
#define __FINANCE_TRANSACTION_DATA_H__
#include <glib-object.h>
G_BEGIN_DECLS
#define FINANCE_TYPE_TRANSACTION_DATA (finance_transaction_data_get_type ())
G_DECLARE_FINAL_TYPE (FinanceTransactionData, finance_transaction_data, FINANCE, TRANSACTION_DATA, G_TYPE_OBJECT)
FinanceTransactionData * finance_transaction_data_new (void);
const gchar * finance_transaction_data_get_amount (FinanceTransactionData *self);
void finance_transaction_data_set_amount (FinanceTransactionData *self,
const gchar *amount);
gint finance_transaction_data_get_category (FinanceTransactionData *self);
void finance_transaction_data_set_category (FinanceTransactionData *self,
gint category);
const gchar * finance_transaction_data_get_date (FinanceTransactionData *self);
void finance_transaction_data_set_date (FinanceTransactionData *self,
const gchar *date);
gint finance_transaction_data_get_frequency (FinanceTransactionData *self);
void finance_transaction_data_set_frequency (FinanceTransactionData *self,
gint frequency);
const gchar * finance_transaction_data_get_frequency_date (FinanceTransactionData *self);
void finance_transaction_data_set_frequency_date (FinanceTransactionData *self,
const gchar *date);
gint finance_transaction_data_get_frequency_number (FinanceTransactionData *self);
void finance_transaction_data_set_frequency_number (FinanceTransactionData *self,
gint frequency_number);
GdkRGBA * finance_transaction_data_get_icon_color (FinanceTransactionData *self);
void finance_transaction_data_set_icon_color (FinanceTransactionData *self,
const GdkRGBA *color);
const gchar * finance_transaction_data_get_icon_name (FinanceTransactionData *self);
void finance_transaction_data_set_icon_name (FinanceTransactionData *self,
const gchar *name);
const gchar * finance_transaction_data_get_icon_text (FinanceTransactionData *self);
void finance_transaction_data_set_icon_text (FinanceTransactionData *self,
const gchar *text);
const gchar * finance_transaction_data_get_name (FinanceTransactionData *self);
void finance_transaction_data_set_name (FinanceTransactionData *self,
const gchar *name);
const gchar * finance_transaction_data_get_notes (FinanceTransactionData *self);
void finance_transaction_data_set_notes (FinanceTransactionData *self,
const gchar *notes);
const gchar * finance_transaction_data_get_payee_name (FinanceTransactionData *self);
void finance_transaction_data_set_payee_name (FinanceTransactionData *self,
const gchar *payee_name);
gint finance_transaction_data_get_payment (FinanceTransactionData *self);
void finance_transaction_data_set_payment (FinanceTransactionData *self,
gint payment);
const gchar * finance_transaction_data_get_payment_information (FinanceTransactionData *self);
void finance_transaction_data_set_payment_information (FinanceTransactionData *self,
const gchar *information);
gint finance_transaction_data_get_repeat (FinanceTransactionData *self);
void finance_transaction_data_set_repeat (FinanceTransactionData *self,
gint repeat);
gint finance_transaction_data_get_type (FinanceTransactionData *self);
void finance_transaction_data_set_type (FinanceTransactionData *self,
gint type);
G_END_DECLS
#endif /* __FINANCE_TRANSACTION_DATA_H__ */
/* finance-graphic-data-object.c
*
* Copyright 2021 galetedanilo <galetedanilo@gmail.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include "finance-graphic-data-object.h"
G_DEFINE_INTERFACE (FinanceGraphicDataObject, finance_graphic_data_object, G_TYPE_OBJECT)
static void
finance_graphic_data_object_default_init (FinanceGraphicDataObjectInterface *iface)
{
(void)iface;
}
void
finance_graphic_data_object_has_changed (FinanceGraphicDataObject *object)
{
g_return_if_fail (FINANCE_IS_GRAPHIC_DATA_OBJECT (object));
g_return_if_fail (FINANCE_GRAPHIC_DATA_OBJECT_GET_IFACE (object)->has_changed);
FINANCE_GRAPHIC_DATA_OBJECT_GET_IFACE (object)->has_changed (object);
}
/* finance-graphic-data-object.h
*
* Copyright 2021 galetedanilo <galetedanilo@gmail.com>
*
* This program 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 3 of the License, or
* (at your option) any later version.
*
* This program 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/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef __FINANCE_GRAPHIC_DATA_OBJECT_H__
#define __FINANCE_GRAPHIC_DATA_OBJECT_H__
#include <glib-object.h>
G_BEGIN_DECLS
#define FINANCE_TYPE_GRAPHIC_DATA_OBJECT (finance_graphic_data_object_get_type ())
G_DECLARE_INTERFACE (FinanceGraphicDataObject, finance_graphic_data_object, FINANCE, GRAPHIC_DATA_OBJECT, GObject)
struct _FinanceGraphicDataObjectInterface
{
GTypeInterface parent;
gboolean (*has_changed) (FinanceGraphicDataObject *object);
};
void finance_graphic_data_object_has_changed (FinanceGraphicDataObject *object);
G_END_DECLS
#endif /* __FINANCE_GRAPHIC_DATA_OBJECT_H__ */
......@@ -22,7 +22,7 @@
#include <gtk/gtk.h>
#include <handy.h>
#include "finance-controller-transactions.h"
#include "finance-transaction-view-controller.h"
#include "finance-left-panel.h"
#include "finance-transaction-editor.h"
#include "finance-transaction-view.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment