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
...@@ -54,8 +54,6 @@ struct _CallsCallRecordRow ...@@ -54,8 +54,6 @@ struct _CallsCallRecordRow
CallsContacts *contacts; CallsContacts *contacts;
CallsBestMatch *contact; CallsBestMatch *contact;
CallsNewCallBox *new_call;
}; };
G_DEFINE_TYPE (CallsCallRecordRow, calls_call_record_row, GTK_TYPE_LIST_BOX_ROW) G_DEFINE_TYPE (CallsCallRecordRow, calls_call_record_row, GTK_TYPE_LIST_BOX_ROW)
...@@ -461,11 +459,6 @@ set_property (GObject *object, ...@@ -461,11 +459,6 @@ set_property (GObject *object,
CALLS_CONTACTS (g_value_get_object (value))); CALLS_CONTACTS (g_value_get_object (value)));
break; break;
case PROP_NEW_CALL:
g_set_object (&self->new_call,
CALLS_NEW_CALL_BOX (g_value_get_object (value)));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break; break;
...@@ -534,8 +527,6 @@ dispose (GObject *object) ...@@ -534,8 +527,6 @@ dispose (GObject *object)
{ {
CallsCallRecordRow *self = CALLS_CALL_RECORD_ROW (object); CallsCallRecordRow *self = CALLS_CALL_RECORD_ROW (object);
g_clear_object (&self->new_call);
g_clear_object (&self->contact); g_clear_object (&self->contact);
g_clear_object (&self->contacts); g_clear_object (&self->contacts);
...@@ -601,13 +592,11 @@ calls_call_record_row_init (CallsCallRecordRow *self) ...@@ -601,13 +592,11 @@ calls_call_record_row_init (CallsCallRecordRow *self)
CallsCallRecordRow * CallsCallRecordRow *
calls_call_record_row_new (CallsCallRecord *record, calls_call_record_row_new (CallsCallRecord *record,
CallsContacts *contacts, CallsContacts *contacts)
CallsNewCallBox *new_call)
{ {
return g_object_new (CALLS_TYPE_CALL_RECORD_ROW, return g_object_new (CALLS_TYPE_CALL_RECORD_ROW,
"record", record, "record", record,
"contacts", contacts, "contacts", contacts,
"new-call", new_call,
NULL); NULL);
} }
......
...@@ -39,8 +39,7 @@ G_DECLARE_FINAL_TYPE (CallsCallRecordRow, calls_call_record_row, ...@@ -39,8 +39,7 @@ G_DECLARE_FINAL_TYPE (CallsCallRecordRow, calls_call_record_row,
CALLS, CALL_RECORD_ROW, GtkListBoxRow) CALLS, CALL_RECORD_ROW, GtkListBoxRow)
CallsCallRecordRow *calls_call_record_row_new (CallsCallRecord *record, CallsCallRecordRow *calls_call_record_row_new (CallsCallRecord *record,
CallsContacts *contacts, CallsContacts *contacts);
CallsNewCallBox *new_call);
CallsCallRecord * calls_call_record_row_get_record (CallsCallRecordRow *self); CallsCallRecord * calls_call_record_row_get_record (CallsCallRecordRow *self);
G_END_DECLS G_END_DECLS
......
...@@ -44,8 +44,6 @@ struct _CallsHistoryBox ...@@ -44,8 +44,6 @@ struct _CallsHistoryBox
gulong model_changed_handler_id; gulong model_changed_handler_id;
CallsContacts *contacts; CallsContacts *contacts;
CallsNewCallBox *new_call;
}; };
G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, GTK_TYPE_STACK); G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, GTK_TYPE_STACK);
...@@ -111,8 +109,7 @@ create_row_cb (CallsCallRecord *record, ...@@ -111,8 +109,7 @@ create_row_cb (CallsCallRecord *record,
CallsHistoryBox *self) CallsHistoryBox *self)
{ {
return GTK_WIDGET (calls_call_record_row_new (record, return GTK_WIDGET (calls_call_record_row_new (record,
self->contacts, self->contacts));
self->new_call));
} }
...@@ -136,11 +133,6 @@ set_property (GObject *object, ...@@ -136,11 +133,6 @@ set_property (GObject *object,
CALLS_CONTACTS (g_value_get_object (value))); CALLS_CONTACTS (g_value_get_object (value)));
break; break;
case PROP_NEW_CALL:
g_set_object (&self->new_call,
CALLS_NEW_CALL_BOX (g_value_get_object (value)));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break; break;
...@@ -182,7 +174,6 @@ dispose (GObject *object) ...@@ -182,7 +174,6 @@ dispose (GObject *object)
{ {
CallsHistoryBox *self = CALLS_HISTORY_BOX (object); CallsHistoryBox *self = CALLS_HISTORY_BOX (object);
g_clear_object (&self->new_call);
g_clear_object (&self->contacts); g_clear_object (&self->contacts);
g_clear_object (&self->model); g_clear_object (&self->model);
...@@ -238,12 +229,10 @@ calls_history_box_init (CallsHistoryBox *self) ...@@ -238,12 +229,10 @@ calls_history_box_init (CallsHistoryBox *self)
CallsHistoryBox * CallsHistoryBox *
calls_history_box_new (GListModel *model, calls_history_box_new (GListModel *model,
CallsContacts *contacts, CallsContacts *contacts)
CallsNewCallBox *new_call)
{ {
return g_object_new (CALLS_TYPE_HISTORY_BOX, return g_object_new (CALLS_TYPE_HISTORY_BOX,
"model", model, "model", model,
"contacts", contacts, "contacts", contacts,
"new-call", new_call,
NULL); NULL);
} }
...@@ -40,8 +40,7 @@ G_BEGIN_DECLS ...@@ -40,8 +40,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, GtkStack); G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, GtkStack);
CallsHistoryBox * calls_history_box_new (GListModel *model, CallsHistoryBox * calls_history_box_new (GListModel *model,
CallsContacts *contacts, CallsContacts *contacts);
CallsNewCallBox *new_call);
G_END_DECLS G_END_DECLS
......
...@@ -233,8 +233,7 @@ constructed (GObject *object) ...@@ -233,8 +233,7 @@ constructed (GObject *object)
// Add call records // Add call records
history = calls_history_box_new (self->record_store, history = calls_history_box_new (self->record_store,
self->contacts, self->contacts);
self->new_call);
widget = GTK_WIDGET (history); widget = GTK_WIDGET (history);
gtk_stack_add_titled (self->main_stack, widget, gtk_stack_add_titled (self->main_stack, widget,
"recent", _("Recent")); "recent", _("Recent"));
......
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