Commit 3fa5f868 authored by Danilo Galete's avatar Danilo Galete 💬
Browse files

Change project

parent 06ef35e2
......@@ -143,7 +143,7 @@ finance_controller_transactions_init (FinanceControllerTransactions *self)
void
finance_controller_transactions_startup (FinanceControllerTransactions *self)
{
for(int x = 0; x < 5; x++)
for(int x = 0; x < 50; x++)
{
//this is a test
GtkWidget *summary = finance_summary_child_new ();
......@@ -173,6 +173,12 @@ finance_controller_transactions_startup (FinanceControllerTransactions *self)
"amount",
G_BINDING_DEFAULT);
g_object_bind_property ((gpointer)summary,
"selected",
(gpointer)row,
"selected",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
finance_summary_child_set_color (FINANCE_SUMMARY_CHILD (summary),
color);
......
......@@ -69,6 +69,8 @@ on_check_button_toggled (GtkToggleButton *togglebutton,
{
FinanceTransactionRow *self = FINANCE_TRANSACTION_ROW (user_data);
(void)togglebutton;
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
}
......@@ -442,6 +444,8 @@ finance_transaction_row_set_selected (FinanceTransactionRow *self,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->check_button), selected);
gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer_check), selected);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
}
......
......@@ -18,8 +18,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <glib/gi18n.h>
#include "finance-summary-child.h"
#include "finance-enums.h"
......@@ -75,6 +73,15 @@ create_icon (FinanceSummaryChild *self)
g_clear_pointer (&surface, cairo_surface_destroy);
}
static void
on_check_button_toggled (GtkToggleButton *button,
gpointer user_data)
{
FinanceSummaryChild *self = FINANCE_SUMMARY_CHILD (user_data);
}
GtkWidget *
finance_summary_child_new (void)
{
......@@ -348,6 +355,9 @@ finance_summary_child_class_init (FinanceSummaryChildClass *klass)
gtk_widget_class_bind_template_child (widget_class, FinanceSummaryChild, label_payee_name);
gtk_widget_class_bind_template_child (widget_class, FinanceSummaryChild, label_payment);
gtk_widget_class_bind_template_child (widget_class, FinanceSummaryChild, label_repeat);
/* The CallBacks */
gtk_widget_class_bind_template_callback (widget_class, on_check_button_toggled);
}
static void
......
......@@ -9,7 +9,7 @@
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<child>
<!-- n-columns=2 n-rows=7 -->
<!-- n-columns=3 n-rows=7 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
......@@ -53,6 +53,7 @@
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
......@@ -67,7 +68,7 @@
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="width">2</property>
<property name="width">3</property>
</packing>
</child>
<child>
......@@ -82,7 +83,7 @@
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="width">2</property>
<property name="width">3</property>
</packing>
</child>
<child>
......@@ -97,7 +98,7 @@
<packing>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="width">2</property>
<property name="width">3</property>
</packing>
</child>
<child>
......@@ -112,7 +113,7 @@
<packing>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
<property name="width">2</property>
<property name="width">3</property>
</packing>
</child>
<child>
......@@ -141,6 +142,22 @@
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="check_button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="on_check_button_toggled" swapped="no"/>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
......
......@@ -19,6 +19,9 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="homogeneous">True</property>
<property name="column-spacing">5</property>
<property name="row-spacing">5</property>
<property name="max-children-per-line">100</property>
</object>
</child>
......
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