Commit f1f848c5 authored by Julian Sparber's avatar Julian Sparber Committed by Julian Sparber
Browse files

CallHistory: Don't pass the CallsNewCallBox to the CallsHistory

Since we now have a "dial" action we can uses it also in the History,
this way we don't need to pass arond the NewCallBox.
parent 62a327a0
Pipeline #293061 passed with stages
in 12 minutes and 19 seconds
......@@ -54,8 +54,6 @@ struct _CallsCallRecordRow
CallsContacts *contacts;
CallsBestMatch *contact;
CallsNewCallBox *new_call;
};
G_DEFINE_TYPE (CallsCallRecordRow, calls_call_record_row, GTK_TYPE_LIST_BOX_ROW)
......@@ -461,11 +459,6 @@ set_property (GObject *object,
CALLS_CONTACTS (g_value_get_object (value)));
break;
case PROP_NEW_CALL:
g_set_object (&self->new_call,
CALLS_NEW_CALL_BOX (g_value_get_object (value)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -534,8 +527,6 @@ dispose (GObject *object)
{
CallsCallRecordRow *self = CALLS_CALL_RECORD_ROW (object);
g_clear_object (&self->new_call);
g_clear_object (&self->contact);
g_clear_object (&self->contacts);
......@@ -601,13 +592,11 @@ calls_call_record_row_init (CallsCallRecordRow *self)
CallsCallRecordRow *
calls_call_record_row_new (CallsCallRecord *record,
CallsContacts *contacts,
CallsNewCallBox *new_call)
CallsContacts *contacts)
{
return g_object_new (CALLS_TYPE_CALL_RECORD_ROW,
"record", record,
"contacts", contacts,
"new-call", new_call,
NULL);
}
......
......@@ -39,8 +39,7 @@ G_DECLARE_FINAL_TYPE (CallsCallRecordRow, calls_call_record_row,
CALLS, CALL_RECORD_ROW, GtkListBoxRow)
CallsCallRecordRow *calls_call_record_row_new (CallsCallRecord *record,
CallsContacts *contacts,
CallsNewCallBox *new_call);
CallsContacts *contacts);
CallsCallRecord * calls_call_record_row_get_record (CallsCallRecordRow *self);
G_END_DECLS
......
......@@ -44,8 +44,6 @@ struct _CallsHistoryBox
gulong model_changed_handler_id;
CallsContacts *contacts;
CallsNewCallBox *new_call;
};
G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, GTK_TYPE_STACK);
......@@ -111,8 +109,7 @@ create_row_cb (CallsCallRecord *record,
CallsHistoryBox *self)
{
return GTK_WIDGET (calls_call_record_row_new (record,
self->contacts,
self->new_call));
self->contacts));
}
......@@ -136,11 +133,6 @@ set_property (GObject *object,
CALLS_CONTACTS (g_value_get_object (value)));
break;
case PROP_NEW_CALL:
g_set_object (&self->new_call,
CALLS_NEW_CALL_BOX (g_value_get_object (value)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
......@@ -182,7 +174,6 @@ dispose (GObject *object)
{
CallsHistoryBox *self = CALLS_HISTORY_BOX (object);
g_clear_object (&self->new_call);
g_clear_object (&self->contacts);
g_clear_object (&self->model);
......@@ -238,12 +229,10 @@ calls_history_box_init (CallsHistoryBox *self)
CallsHistoryBox *
calls_history_box_new (GListModel *model,
CallsContacts *contacts,
CallsNewCallBox *new_call)
CallsContacts *contacts)
{
return g_object_new (CALLS_TYPE_HISTORY_BOX,
"model", model,
"contacts", contacts,
"new-call", new_call,
NULL);
}
......@@ -40,8 +40,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, GtkStack);
CallsHistoryBox * calls_history_box_new (GListModel *model,
CallsContacts *contacts,
CallsNewCallBox *new_call);
CallsContacts *contacts);
G_END_DECLS
......
......@@ -233,8 +233,7 @@ constructed (GObject *object)
// Add call records
history = calls_history_box_new (self->record_store,
self->contacts,
self->new_call);
self->contacts);
widget = GTK_WIDGET (history);
gtk_stack_add_titled (self->main_stack, widget,
"recent", _("Recent"));
......
  • Andrea Veri @averi

    mentioned in merge request !106 (merged)

    By Julian Sparber on 2020-03-30T09:36:53 (imported from GitLab)

    ·

    mentioned in merge request !106 (merged)

    By Julian Sparber on 2020-03-30T09:36:53 (imported from GitLab)

    Toggle commit list
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