Implement delete call with context menu on longpress

* src/ui/call-record-row.ui: Add menu, GtkPopover. Surround existing
  elements with GtkEventBox to capture longpress/rightclicks
* src/calls-call-record-row.c: Provide functions emiting "call-delete"
  signal, add widgets from ui file
* src/calls-record.c: Add "call-delete" signal
* src/calls-history-box.c: Add callback for "call-delete" signal
* src/calls-record-store.c: Add callback for "call-delete" signal
* src/util.c: Add convenience function calls_find_in_store for finding
  items in ListModel
* src/util.h: Add declaration of calls_find_in_store
This commit is contained in:
Evangelos Ribeiro Tzaras
2020-06-08 15:09:57 +02:00
parent b15c2876da
commit 4bf5cd5232
7 changed files with 330 additions and 77 deletions

View File

@@ -55,6 +55,12 @@ enum {
};
static GParamSpec *props[PROP_LAST_PROP];
enum {
SIGNAL_CALL_DELETE,
SIGNAL_LAST_SIGNAL,
};
static guint signals [SIGNAL_LAST_SIGNAL];
static void
get_property (GObject *object,
@@ -167,6 +173,15 @@ calls_call_record_class_init (CallsCallRecordClass *klass)
object_class->get_property = get_property;
object_class->set_property = set_property;
signals[SIGNAL_CALL_DELETE] =
g_signal_new ("call-delete",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
0,
NULL, NULL, NULL,
G_TYPE_NONE,
0, NULL);
gom_resource_class_set_table (resource_class, "calls");