mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 19:07:39 +00:00
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.
This commit is contained in:
parent
62a327a0ae
commit
f1f848c5f3
5 changed files with 6 additions and 31 deletions
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue