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

Change: project

parent c841af98
......@@ -143,7 +143,7 @@ finance_transaction_view_controller_init (FinanceTransactionViewController *self
void
finance_transaction_view_controller_startup (FinanceTransactionViewController *self)
{
for(int x = 0; x < 50; x++)
for(int x = 0; x < 1; x++)
{
//this is a test
GtkWidget *summary = finance_summary_child_new ();
......@@ -151,9 +151,9 @@ finance_transaction_view_controller_startup (FinanceTransactionViewController *s
GdkRGBA *color = finance_utils_random_rgba_color ();
g_object_bind_property ((gpointer)summary,
"icon",
"icon-text",
(gpointer)row,
"icon",
"icon-text",
G_BINDING_DEFAULT);
g_object_bind_property ((gpointer)summary,
"color",
......
......@@ -397,6 +397,19 @@ finance_transaction_editor_class_init (FinanceTransactionEditorClass *klass)
0.0,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
* FinanceTransactionEditor::category:
*
* The transaction category
*/
properties[PROP_CATEGORY] = g_param_spec_int ("category",
"Category",
"The transaction category",
0,
G_MAXINT,
0,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
* FinanceTransactionEditor::date:
*
......@@ -428,7 +441,7 @@ finance_transaction_editor_class_init (FinanceTransactionEditorClass *klass)
properties[PROP_FREQUENCY_DATE] = g_param_spec_boxed ("frequency-date",
"Fequency date",
"The date of the financial transaction frequency",
NULL,
G_TYPE_DATE_TIME,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
......@@ -667,6 +680,38 @@ finance_transaction_editor_set_amount (FinanceTransactionEditor *self,
* @self: #FinanceTransactionEditor
*
* Returns the category id
*
* Returns: a gint
*
* Since: 1.0
*/
gint
finance_transaction_editor_get_category (FinanceTransactionEditor *self)
{
g_return_val_if_fail (FINANCE_IS_TRANSACTION_EDITOR (self), -1);
return gtk_combo_box_get_active (GTK_COMBO_BOX (self->combo_category));
}
/**
* finance_transaction_editor_set_category:
* @self: #FinanceTransactionEditor
* @index_: a #gint to set it to
*
* Set the category
*
* Since: 1.0
*/
void
finance_transaction_editor_set_category (FinanceTransactionEditor *self,
gint index_)
{
g_return_if_fail (FINANCE_IS_TRANSACTION_EDITOR (self));
gtk_combo_box_set_active (GTK_COMBO_BOX (self->combo_category), index_);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CATEGORY]);
}
/**
* finance_transaction_editor_get_date:
......@@ -877,7 +922,7 @@ finance_transaction_editor_set_icon_color (FinanceTransactionEditor *self,
* Since: 1.0
*/
const gchar *
finance_transaction_editor_get_icon (FinanceTransactionEditor *self)
finance_transaction_editor_get_icon_text (FinanceTransactionEditor *self)
{
g_return_val_if_fail (FINANCE_IS_TRANSACTION_EDITOR (self), NULL);
......
......@@ -194,10 +194,10 @@ finance_window_init (FinanceWindow *self)
self->settings = g_settings_new ("org.gnome.finance");
self->controller_transactions = g_object_new (FINANCE_TYPE_TRANSACTION_VIEW_CONTROLLER,
"pane", self->left_panel,
"view", self->transaction_view,
NULL);
//self->controller_transactions = g_object_new (FINANCE_TYPE_TRANSACTION_VIEW_CONTROLLER,
// "pane", self->left_panel,
// "view", self->transaction_view,
// NULL);
finance_transaction_view_controller_startup (self->controller_transactions);
//finance_transaction_view_controller_startup (self->controller_transactions);
}
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