mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
Merge branch 'ui-updates' into 'master'
UI updates Closes #35 and #55 See merge request Librem5/calls!48
This commit is contained in:
commit
eaba235e0b
18 changed files with 765 additions and 228 deletions
17
data/new-call-symbolic.svg
Normal file
17
data/new-call-symbolic.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" id="svg4542" version="1.1" viewBox="0 0 4.2333332 4.2333332" height="16" width="16">
|
||||
<defs id="defs4536"/>
|
||||
<metadata id="metadata4539">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g transform="translate(0,-292.76667)" id="layer1">
|
||||
<path id="path13805" d="m 3.7124547,293.29678 c 0.1412992,0 0.2562986,0.11297 0.2562986,0.2563 v 0.0165 c 0,1.74963 -1.424292,3.16672 -3.17498208,3.16672 h -0.01 c -0.14419918,0 -0.25629855,-0.118 -0.25629855,-0.26458 v -0.26459 -0.52916 c 0,-0.14658 0.11799934,-0.26459 0.26449851,-0.26459 H 1.3211682 c 0.1465992,0 0.2645985,0.11801 0.2645985,0.26459 v 0.12402 c 0.6764962,-0.23915 1.2077932,-0.77043 1.4468919,-1.44693 H 2.9086593 c -0.1465992,0 -0.2645985,-0.118 -0.2645985,-0.26458 v -0.52917 c 0,-0.14657 0.1179993,-0.26457 0.2645985,-0.26457 h 0.2645985 0.2645985 0.2562985 0.01 0.01 z" style="opacity:1;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.17638887"/>
|
||||
<path style="color:#bebebe;display:inline;overflow:visible;visibility:visible;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:0.17638887;marker:none" d="m 0.79367122,292.76757 v 0.79374 H -2.429749e-5 v 0.52917 H 0.79367122 v 0.79375 H 1.3228682 v -0.79375 h 0.7936955 v -0.52917 H 1.3228682 v -0.79374 z" id="path13807"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -33,6 +33,7 @@ struct _CallsDummyCall
|
|||
{
|
||||
GObject parent_instance;
|
||||
gchar *number;
|
||||
gboolean inbound;
|
||||
CallsCallState state;
|
||||
};
|
||||
|
||||
|
@ -48,6 +49,8 @@ G_DEFINE_TYPE_WITH_CODE (CallsDummyCall, calls_dummy_call, G_TYPE_OBJECT,
|
|||
enum {
|
||||
PROP_0,
|
||||
PROP_NUMBER,
|
||||
PROP_INBOUND_CONSTRUCTOR,
|
||||
PROP_INBOUND,
|
||||
PROP_LAST_PROP,
|
||||
};
|
||||
static GParamSpec *props[PROP_LAST_PROP];
|
||||
|
@ -135,16 +138,45 @@ tone_stop (CallsCall *call, gchar key)
|
|||
g_info ("Beep end (%c)", (int)key);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
outbound_timeout_cb (CallsDummyCall *self)
|
||||
{
|
||||
switch (self->state)
|
||||
{
|
||||
case CALLS_CALL_STATE_DIALING:
|
||||
change_state (CALLS_CALL (self), self,
|
||||
CALLS_CALL_STATE_ALERTING);
|
||||
g_timeout_add_seconds
|
||||
(3, (GSourceFunc)outbound_timeout_cb, self);
|
||||
break;
|
||||
|
||||
case CALLS_CALL_STATE_ALERTING:
|
||||
change_state (CALLS_CALL (self), self,
|
||||
CALLS_CALL_STATE_ACTIVE);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
CallsDummyCall *
|
||||
calls_dummy_call_new (const gchar *number)
|
||||
calls_dummy_call_new (const gchar *number,
|
||||
gboolean inbound)
|
||||
{
|
||||
g_return_val_if_fail (number != NULL, NULL);
|
||||
|
||||
return g_object_new (CALLS_TYPE_DUMMY_CALL,
|
||||
"number", number,
|
||||
"inbound-constructor", inbound,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -158,12 +190,57 @@ set_property (GObject *object,
|
|||
self->number = g_value_dup_string (value);
|
||||
break;
|
||||
|
||||
case PROP_INBOUND_CONSTRUCTOR:
|
||||
self->inbound = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
constructed (GObject *object)
|
||||
{
|
||||
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
|
||||
CallsDummyCall *self = CALLS_DUMMY_CALL (object);
|
||||
|
||||
if (self->inbound)
|
||||
{
|
||||
self->state = CALLS_CALL_STATE_INCOMING;
|
||||
}
|
||||
else
|
||||
{
|
||||
self->state = CALLS_CALL_STATE_DIALING;
|
||||
g_timeout_add_seconds (1, (GSourceFunc)outbound_timeout_cb, self);
|
||||
}
|
||||
|
||||
parent_class->constructed (object);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
CallsDummyCall *self = CALLS_DUMMY_CALL (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_INBOUND:
|
||||
g_value_set_boolean (value, self->inbound);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
finalize (GObject *object)
|
||||
{
|
||||
|
@ -181,8 +258,10 @@ calls_dummy_call_class_init (CallsDummyCallClass *klass)
|
|||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = finalize;
|
||||
object_class->get_property = get_property;
|
||||
object_class->set_property = set_property;
|
||||
object_class->constructed = constructed;
|
||||
object_class->finalize = finalize;
|
||||
|
||||
props[PROP_NUMBER] =
|
||||
g_param_spec_string ("number",
|
||||
|
@ -190,8 +269,25 @@ calls_dummy_call_class_init (CallsDummyCallClass *klass)
|
|||
_("The dialed number"),
|
||||
"+441234567890",
|
||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
|
||||
g_object_class_install_property (object_class, PROP_NUMBER,
|
||||
props[PROP_NUMBER]);
|
||||
|
||||
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
||||
props[PROP_INBOUND_CONSTRUCTOR] =
|
||||
g_param_spec_boolean ("inbound-constructor",
|
||||
_("Inbound (constructor)"),
|
||||
_("Whether the calls is inbound (dummy class constructor)"),
|
||||
FALSE,
|
||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
|
||||
g_object_class_install_property (object_class, PROP_INBOUND_CONSTRUCTOR,
|
||||
props[PROP_INBOUND_CONSTRUCTOR]);
|
||||
|
||||
props[PROP_INBOUND] =
|
||||
g_param_spec_boolean ("inbound",
|
||||
_("Inbound"),
|
||||
_("Whether the call is inbound"),
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_CONSTRUCT);
|
||||
g_object_class_override_property (object_class, PROP_INBOUND, "inbound");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -33,7 +33,8 @@ G_BEGIN_DECLS
|
|||
|
||||
G_DECLARE_FINAL_TYPE (CallsDummyCall, calls_dummy_call, CALLS, DUMMY_CALL, GObject);
|
||||
|
||||
CallsDummyCall *calls_dummy_call_new (const gchar *number);
|
||||
CallsDummyCall *calls_dummy_call_new (const gchar *number,
|
||||
gboolean inbound);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -127,19 +127,13 @@ call_state_changed_cb (CallsDummyOrigin *self,
|
|||
|
||||
|
||||
static void
|
||||
dial (CallsOrigin *origin, const gchar *number)
|
||||
add_call (CallsDummyOrigin *self, const gchar *number, gboolean inbound)
|
||||
{
|
||||
CallsDummyOrigin *self;
|
||||
CallsDummyCall *dummy_call;
|
||||
CallsCall *call;
|
||||
|
||||
g_return_if_fail (number != NULL);
|
||||
g_return_if_fail (CALLS_IS_DUMMY_ORIGIN (origin));
|
||||
|
||||
self = CALLS_DUMMY_ORIGIN (origin);
|
||||
|
||||
dummy_call = calls_dummy_call_new (number);
|
||||
g_return_if_fail (dummy_call != NULL);
|
||||
dummy_call = calls_dummy_call_new (number, inbound);
|
||||
g_assert (dummy_call != NULL);
|
||||
|
||||
call = CALLS_CALL (dummy_call);
|
||||
g_signal_connect_swapped (call, "state-changed",
|
||||
|
@ -148,7 +142,17 @@ dial (CallsOrigin *origin, const gchar *number)
|
|||
|
||||
self->calls = g_list_append (self->calls, dummy_call);
|
||||
|
||||
g_signal_emit_by_name (origin, "call-added", call);
|
||||
g_signal_emit_by_name (CALLS_ORIGIN (self), "call-added", call);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dial (CallsOrigin *origin, const gchar *number)
|
||||
{
|
||||
g_return_if_fail (number != NULL);
|
||||
g_return_if_fail (CALLS_IS_DUMMY_ORIGIN (origin));
|
||||
|
||||
add_call (CALLS_DUMMY_ORIGIN (origin), number, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -245,3 +249,14 @@ calls_dummy_origin_init (CallsDummyOrigin *self)
|
|||
{
|
||||
self->name = g_string_new (NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
calls_dummy_origin_create_inbound (CallsDummyOrigin *self,
|
||||
const gchar *number)
|
||||
{
|
||||
g_return_if_fail (number != NULL);
|
||||
g_return_if_fail (CALLS_IS_DUMMY_ORIGIN (self));
|
||||
|
||||
add_call (self, number, TRUE);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,9 @@ G_BEGIN_DECLS
|
|||
|
||||
G_DECLARE_FINAL_TYPE (CallsDummyOrigin, calls_dummy_origin, CALLS, DUMMY_ORIGIN, GObject);
|
||||
|
||||
CallsDummyOrigin *calls_dummy_origin_new (const gchar *name);
|
||||
CallsDummyOrigin *calls_dummy_origin_new (const gchar *name);
|
||||
void calls_dummy_origin_create_inbound (CallsDummyOrigin *self,
|
||||
const gchar *number);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "calls-dummy-origin.h"
|
||||
|
||||
#include <libpeas/peas.h>
|
||||
#include <glib-unix.h>
|
||||
|
||||
|
||||
struct _CallsDummyProvider
|
||||
|
@ -82,6 +83,22 @@ get_origins (CallsProvider *iface)
|
|||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
usr1_handler (CallsDummyProvider *self)
|
||||
{
|
||||
CallsDummyOrigin *origin;
|
||||
|
||||
g_return_val_if_fail (self->origins != NULL, FALSE);
|
||||
|
||||
g_debug ("Received SIGUSR1, adding new incoming call");
|
||||
|
||||
origin = CALLS_DUMMY_ORIGIN (self->origins->data);
|
||||
calls_dummy_origin_create_inbound (origin, "0987654321");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
constructed (GObject *object)
|
||||
{
|
||||
|
@ -90,6 +107,10 @@ constructed (GObject *object)
|
|||
|
||||
calls_dummy_provider_add_origin (self, "Dummy origin");
|
||||
|
||||
g_unix_signal_add (SIGUSR1,
|
||||
(GSourceFunc)usr1_handler,
|
||||
self);
|
||||
|
||||
parent_class->constructed (object);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ G_DEFINE_TYPE_WITH_CODE (CallsMMCall, calls_mm_call, G_TYPE_OBJECT,
|
|||
enum {
|
||||
PROP_0,
|
||||
PROP_MM_CALL,
|
||||
PROP_INBOUND,
|
||||
PROP_LAST_PROP,
|
||||
};
|
||||
static GParamSpec *props[PROP_LAST_PROP];
|
||||
|
@ -334,6 +335,28 @@ constructed (GObject *object)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
CallsMMCall *self = CALLS_MM_CALL (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_INBOUND:
|
||||
g_value_set_boolean (value,
|
||||
mm_call_get_direction (self->mm_call)
|
||||
== MM_CALL_DIRECTION_INCOMING);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dispose (GObject *object)
|
||||
{
|
||||
|
@ -364,6 +387,7 @@ calls_mm_call_class_init (CallsMMCallClass *klass)
|
|||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->get_property = get_property;
|
||||
object_class->set_property = set_property;
|
||||
object_class->constructed = constructed;
|
||||
object_class->dispose = dispose;
|
||||
|
@ -375,8 +399,17 @@ calls_mm_call_class_init (CallsMMCallClass *klass)
|
|||
_("A libmm-glib proxy object for the underlying call object"),
|
||||
MM_TYPE_CALL,
|
||||
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
|
||||
g_object_class_install_property (object_class, PROP_MM_CALL,
|
||||
props[PROP_MM_CALL]);
|
||||
|
||||
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
||||
|
||||
props[PROP_INBOUND] =
|
||||
g_param_spec_boolean ("inbound",
|
||||
_("Inbound"),
|
||||
_("Whether the call is inbound"),
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_CONSTRUCT);
|
||||
g_object_class_override_property (object_class, PROP_INBOUND, "inbound");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,16 +41,17 @@ struct _CallsCallDisplay
|
|||
GTimer *timer;
|
||||
guint timeout;
|
||||
|
||||
GtkLabel *incoming_phone_call;
|
||||
GtkBox *party_box;
|
||||
GtkLabel *primary_contact_info;
|
||||
GtkLabel *secondary_contact_info;
|
||||
GtkLabel *status;
|
||||
GtkLabel *time;
|
||||
|
||||
GtkButton *answer;
|
||||
GtkToggleButton *mute;
|
||||
GtkBox *controls;
|
||||
GtkBox *gsm_controls;
|
||||
GtkBox *general_controls;
|
||||
GtkButton *hang_up;
|
||||
GtkToggleButton *speaker;
|
||||
GtkButton *answer;
|
||||
|
||||
GtkRevealer *dial_pad_revealer;
|
||||
};
|
||||
|
@ -88,6 +89,12 @@ hang_up_clicked_cb (GtkButton *button,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
hold_toggled_cb (GtkToggleButton *togglebutton,
|
||||
CallsCallDisplay *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
mute_toggled_cb (GtkToggleButton *togglebutton,
|
||||
CallsCallDisplay *self)
|
||||
|
@ -101,6 +108,13 @@ speaker_toggled_cb (GtkToggleButton *togglebutton,
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
add_call_clicked_cb (GtkButton *button,
|
||||
CallsCallDisplay *self)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dial_pad_symbol_clicked_cb (CallsCallDisplay *self,
|
||||
gchar symbol,
|
||||
|
@ -157,7 +171,7 @@ timeout_cb (CallsCallDisplay *self)
|
|||
|
||||
g_string_append_printf (str, "%02u", (guint)elapsed);
|
||||
|
||||
gtk_label_set_text (self->time, str->str);
|
||||
gtk_label_set_text (self->status, str->str);
|
||||
|
||||
g_string_free (str, TRUE);
|
||||
return TRUE;
|
||||
|
@ -167,38 +181,91 @@ timeout_cb (CallsCallDisplay *self)
|
|||
#undef MINUTE
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
stop_timeout (CallsCallDisplay *self)
|
||||
{
|
||||
if (self->timeout == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
g_source_remove (self->timeout);
|
||||
self->timeout = 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
call_state_changed_cb (CallsCallDisplay *self,
|
||||
CallsCallState state)
|
||||
{
|
||||
GString *state_str = g_string_new("");
|
||||
GtkStyleContext *hang_up_style;
|
||||
|
||||
g_return_if_fail (CALLS_IS_CALL_DISPLAY (self));
|
||||
|
||||
calls_call_state_to_string (state_str, state);
|
||||
gtk_label_set_text (self->status, state_str->str);
|
||||
g_debug ("Call state changed to `%s'", state_str->str);
|
||||
g_string_free (state_str, TRUE);
|
||||
hang_up_style = gtk_widget_get_style_context
|
||||
(GTK_WIDGET (self->hang_up));
|
||||
|
||||
/* Widgets */
|
||||
switch (state)
|
||||
{
|
||||
case CALLS_CALL_STATE_INCOMING:
|
||||
gtk_widget_hide (GTK_WIDGET (self->status));
|
||||
gtk_widget_hide (GTK_WIDGET (self->controls));
|
||||
gtk_widget_show (GTK_WIDGET (self->incoming_phone_call));
|
||||
gtk_widget_show (GTK_WIDGET (self->answer));
|
||||
gtk_widget_hide (GTK_WIDGET (self->mute));
|
||||
gtk_widget_hide (GTK_WIDGET (self->speaker));
|
||||
gtk_style_context_remove_class
|
||||
(hang_up_style, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
|
||||
break;
|
||||
case CALLS_CALL_STATE_ACTIVE:
|
||||
case CALLS_CALL_STATE_HELD:
|
||||
|
||||
case CALLS_CALL_STATE_DIALING:
|
||||
case CALLS_CALL_STATE_ALERTING:
|
||||
case CALLS_CALL_STATE_ACTIVE:
|
||||
case CALLS_CALL_STATE_HELD:
|
||||
case CALLS_CALL_STATE_WAITING:
|
||||
gtk_style_context_add_class
|
||||
(hang_up_style, GTK_STYLE_CLASS_DESTRUCTIVE_ACTION);
|
||||
gtk_widget_hide (GTK_WIDGET (self->answer));
|
||||
gtk_widget_show (GTK_WIDGET (self->mute));
|
||||
gtk_widget_show (GTK_WIDGET (self->speaker));
|
||||
gtk_widget_hide (GTK_WIDGET (self->incoming_phone_call));
|
||||
gtk_widget_show (GTK_WIDGET (self->controls));
|
||||
gtk_widget_show (GTK_WIDGET (self->status));
|
||||
|
||||
gtk_widget_set_visible
|
||||
(GTK_WIDGET (self->gsm_controls),
|
||||
state != CALLS_CALL_STATE_DIALING
|
||||
&& state != CALLS_CALL_STATE_ALERTING);
|
||||
break;
|
||||
|
||||
case CALLS_CALL_STATE_DISCONNECTED:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Status text */
|
||||
switch (state)
|
||||
{
|
||||
case CALLS_CALL_STATE_INCOMING:
|
||||
break;
|
||||
|
||||
case CALLS_CALL_STATE_DIALING:
|
||||
case CALLS_CALL_STATE_ALERTING:
|
||||
gtk_label_set_text (self->status, _("Calling..."));
|
||||
break;
|
||||
|
||||
case CALLS_CALL_STATE_ACTIVE:
|
||||
case CALLS_CALL_STATE_HELD:
|
||||
case CALLS_CALL_STATE_WAITING:
|
||||
if (self->timeout == 0)
|
||||
{
|
||||
self->timeout = g_timeout_add
|
||||
(500, (GSourceFunc)timeout_cb, self);
|
||||
timeout_cb (self);
|
||||
}
|
||||
break;
|
||||
|
||||
case CALLS_CALL_STATE_DISCONNECTED:
|
||||
stop_timeout (self);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -230,7 +297,7 @@ set_party (CallsCallDisplay *self, CallsParty *party)
|
|||
const gchar *name, *number;
|
||||
|
||||
image = calls_party_create_image (party);
|
||||
gtk_box_pack_end (self->party_box, image, TRUE, FALSE, 0);
|
||||
gtk_box_pack_end (self->party_box, image, TRUE, TRUE, 0);
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (image), 100);
|
||||
gtk_widget_show (image);
|
||||
|
||||
|
@ -276,8 +343,6 @@ constructed (GObject *object)
|
|||
CallsCallDisplay *self = CALLS_CALL_DISPLAY (object);
|
||||
|
||||
self->timer = g_timer_new ();
|
||||
self->timeout = g_timeout_add (500, (GSourceFunc)timeout_cb, self);
|
||||
timeout_cb (self);
|
||||
|
||||
call_state_changed_cb (self, calls_call_get_state (self->call));
|
||||
|
||||
|
@ -296,6 +361,7 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_OVERLAY);
|
||||
CallsCallDisplay *self = CALLS_CALL_DISPLAY (object);
|
||||
|
||||
stop_timeout (self);
|
||||
g_clear_object (&self->call);
|
||||
|
||||
parent_class->dispose (object);
|
||||
|
@ -307,7 +373,6 @@ finalize (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_OVERLAY);
|
||||
CallsCallDisplay *self = CALLS_CALL_DISPLAY (object);
|
||||
|
||||
g_source_remove (self->timeout);
|
||||
g_timer_destroy (self->timer);
|
||||
|
||||
parent_class->finalize (object);
|
||||
|
@ -335,20 +400,23 @@ calls_call_display_class_init (CallsCallDisplayClass *klass)
|
|||
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/calls/ui/call-display.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, incoming_phone_call);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, party_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, primary_contact_info);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, secondary_contact_info);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, status);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, time);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, answer);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, mute);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, controls);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, gsm_controls);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, general_controls);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, hang_up);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, speaker);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, answer);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallDisplay, dial_pad_revealer);
|
||||
gtk_widget_class_bind_template_callback (widget_class, answer_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, hang_up_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, hold_toggled_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, mute_toggled_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, speaker_toggled_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, add_call_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, dial_pad_symbol_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, hide_dial_pad_clicked_cb);
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ struct _CallsCallWindow
|
|||
|
||||
GListStore *call_holders;
|
||||
|
||||
GtkRevealer *info_revealer;
|
||||
guint info_timeout;
|
||||
GtkInfoBar *info;
|
||||
GtkLabel *info_label;
|
||||
|
||||
|
@ -85,6 +87,15 @@ update_visibility (CallsCallWindow *self)
|
|||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
show_message_timeout_cb (CallsCallWindow *self)
|
||||
{
|
||||
gtk_revealer_set_reveal_child (self->info_revealer, FALSE);
|
||||
self->info_timeout = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
show_message (CallsCallWindow *self,
|
||||
const gchar *text,
|
||||
|
@ -92,8 +103,27 @@ show_message (CallsCallWindow *self,
|
|||
{
|
||||
gtk_info_bar_set_message_type (self->info, type);
|
||||
gtk_label_set_text (self->info_label, text);
|
||||
gtk_widget_show (GTK_WIDGET (self->info));
|
||||
gtk_widget_queue_allocate (GTK_WIDGET (self));
|
||||
gtk_revealer_set_reveal_child (self->info_revealer, TRUE);
|
||||
|
||||
if (self->info_timeout)
|
||||
{
|
||||
g_source_remove (self->info_timeout);
|
||||
}
|
||||
self->info_timeout = g_timeout_add_seconds
|
||||
(3,
|
||||
(GSourceFunc)show_message_timeout_cb,
|
||||
self);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
stop_info_timeout (CallsCallWindow *self)
|
||||
{
|
||||
if (self->info_timeout)
|
||||
{
|
||||
g_source_remove (self->info_timeout);
|
||||
self->info_timeout = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,8 +132,8 @@ info_response_cb (GtkInfoBar *infobar,
|
|||
gint response_id,
|
||||
CallsCallWindow *self)
|
||||
{
|
||||
gtk_widget_hide (GTK_WIDGET (self->info));
|
||||
gtk_widget_queue_allocate (GTK_WIDGET (self));
|
||||
stop_info_timeout (self);
|
||||
gtk_revealer_set_reveal_child (self->info_revealer, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -376,6 +406,7 @@ dispose (GObject *object)
|
|||
}
|
||||
|
||||
g_clear_object (&self->call_holders);
|
||||
stop_info_timeout (self);
|
||||
|
||||
parent_class->dispose (object);
|
||||
}
|
||||
|
@ -401,6 +432,7 @@ calls_call_window_class_init (CallsCallWindowClass *klass)
|
|||
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/calls/ui/call-window.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallWindow, info_revealer);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallWindow, info);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallWindow, info_label);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsCallWindow, main_stack);
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "enum-types.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
|
||||
void
|
||||
calls_call_state_to_string (GString *string,
|
||||
|
@ -92,6 +94,13 @@ calls_call_state_parse_nick (CallsCallState *state,
|
|||
|
||||
G_DEFINE_INTERFACE (CallsCall, calls_call, CALLS_TYPE_MESSAGE_SOURCE);
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_INBOUND,
|
||||
PROP_LAST_PROP,
|
||||
};
|
||||
static GParamSpec *props[PROP_LAST_PROP];
|
||||
|
||||
enum {
|
||||
SIGNAL_STATE_CHANGED,
|
||||
SIGNAL_LAST_SIGNAL,
|
||||
|
@ -108,6 +117,15 @@ calls_call_default_init (CallsCallInterface *iface)
|
|||
CALLS_TYPE_CALL_STATE
|
||||
};
|
||||
|
||||
props[PROP_INBOUND] =
|
||||
g_param_spec_boolean ("inbound",
|
||||
_("Inbound"),
|
||||
_("Whether the call is inbound"),
|
||||
FALSE,
|
||||
G_PARAM_READABLE);
|
||||
|
||||
g_object_interface_install_property (iface, props[PROP_INBOUND]);
|
||||
|
||||
/**
|
||||
* CallsCall::state-changed:
|
||||
* @self: The #CallsCall instance.
|
||||
|
|
|
@ -35,7 +35,7 @@ G_DECLARE_INTERFACE (CallsCall, calls_call, CALLS, CALL, GObject);
|
|||
|
||||
typedef enum
|
||||
{
|
||||
CALLS_CALL_STATE_ACTIVE,
|
||||
CALLS_CALL_STATE_ACTIVE = 1,
|
||||
CALLS_CALL_STATE_HELD,
|
||||
CALLS_CALL_STATE_DIALING,
|
||||
CALLS_CALL_STATE_ALERTING,
|
||||
|
|
|
@ -44,6 +44,8 @@ struct _CallsMainWindow
|
|||
|
||||
CallsProvider *provider;
|
||||
|
||||
GtkRevealer *info_revealer;
|
||||
guint info_timeout;
|
||||
GtkInfoBar *info;
|
||||
GtkLabel *info_label;
|
||||
|
||||
|
@ -145,13 +147,41 @@ calls_main_window_new (GtkApplication *application, CallsProvider *provider)
|
|||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
show_message_timeout_cb (CallsMainWindow *self)
|
||||
{
|
||||
gtk_revealer_set_reveal_child (self->info_revealer, FALSE);
|
||||
self->info_timeout = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
show_message (CallsMainWindow *self, const gchar *text, GtkMessageType type)
|
||||
{
|
||||
gtk_info_bar_set_message_type (self->info, type);
|
||||
gtk_label_set_text (self->info_label, text);
|
||||
gtk_widget_show (GTK_WIDGET (self->info));
|
||||
gtk_widget_queue_allocate (GTK_WIDGET (self));
|
||||
gtk_revealer_set_reveal_child (self->info_revealer, TRUE);
|
||||
|
||||
if (self->info_timeout)
|
||||
{
|
||||
g_source_remove (self->info_timeout);
|
||||
}
|
||||
self->info_timeout = g_timeout_add_seconds
|
||||
(3,
|
||||
(GSourceFunc)show_message_timeout_cb,
|
||||
self);
|
||||
}
|
||||
|
||||
|
||||
static inline void
|
||||
stop_info_timeout (CallsMainWindow *self)
|
||||
{
|
||||
if (self->info_timeout)
|
||||
{
|
||||
g_source_remove (self->info_timeout);
|
||||
self->info_timeout = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,8 +190,8 @@ info_response_cb (GtkInfoBar *infobar,
|
|||
gint response_id,
|
||||
CallsMainWindow *self)
|
||||
{
|
||||
gtk_widget_hide (GTK_WIDGET (self->info));
|
||||
gtk_widget_queue_allocate (GTK_WIDGET (self));
|
||||
stop_info_timeout (self);
|
||||
gtk_revealer_set_reveal_child (self->info_revealer, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -269,6 +299,7 @@ dispose (GObject *object)
|
|||
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_APPLICATION_WINDOW);
|
||||
CallsMainWindow *self = CALLS_MAIN_WINDOW (object);
|
||||
|
||||
stop_info_timeout (self);
|
||||
g_clear_object (&self->provider);
|
||||
|
||||
parent_class->dispose (object);
|
||||
|
@ -296,6 +327,7 @@ calls_main_window_class_init (CallsMainWindowClass *klass)
|
|||
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/sm/puri/calls/ui/main-window.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsMainWindow, info_revealer);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsMainWindow, info);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsMainWindow, info_label);
|
||||
gtk_widget_class_bind_template_child (widget_class, CallsMainWindow, main_stack);
|
||||
|
|
|
@ -11,4 +11,7 @@
|
|||
<file preprocess="xml-stripblanks">new-call-box.ui</file>
|
||||
<file preprocess="xml-stripblanks">new-call-header-bar.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/sm/puri/calls/">
|
||||
<file>new-call-symbolic.svg</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
|
|
@ -76,7 +76,7 @@ calls_enum_sources = gnome.mkenums_simple('enum-types',
|
|||
calls_resources = gnome.compile_resources(
|
||||
'calls-resources',
|
||||
'calls.gresources.xml',
|
||||
source_dir: 'ui',
|
||||
source_dir: ['ui', '../data'],
|
||||
c_name: 'call',
|
||||
)
|
||||
|
||||
|
|
|
@ -9,144 +9,302 @@
|
|||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin_bottom">8</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="margin_right">12</property>
|
||||
<property name="margin_top">8</property>
|
||||
<property name="margin_top">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="width_request">300</property>
|
||||
<property name="sensitive" bind-source="dial_pad_revealer" bind-property="reveal-child" bind-flags="invert-boolean|bidirectional|sync-create"/>
|
||||
<child>
|
||||
<object class="GtkBox" id="party_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="primary_contact_info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.6"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="secondary_contact_info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="status">
|
||||
<property name="visible">True</property>
|
||||
<object class="GtkLabel" id="incoming_phone_call">
|
||||
<property name="visible">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="margin_top">40</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
<property name="label" translatable="yes">Incoming phone call</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="time">
|
||||
<object class="GtkBox" id="party_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">00:00</property>
|
||||
<property name="margin_top">30</property>
|
||||
<property name="margin_bottom">40</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="1.6"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="answer">
|
||||
<property name="label" translatable="yes">Answer</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<signal name="clicked" handler="answer_clicked_cb" swapped="no"/>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="primary_contact_info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="scale" value="1.6"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="secondary_contact_info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="height_request">65</property>
|
||||
<property name="margin_bottom">65</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="mute">
|
||||
<object class="GtkLabel" id="status">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<signal name="toggled" handler="mute_toggled_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">microphone-sensitivity-muted-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">30</property>
|
||||
<property name="margin_bottom">40</property>
|
||||
<attributes>
|
||||
<attribute name="scale" value="1.6"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="dial_pad">
|
||||
<object class="GtkBox" id="controls">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="active" bind-source="dial_pad_revealer" bind-property="reveal-child" bind-flags="bidirectional|sync-create"/>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="vexpand">False</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<object class="GtkBox" id="general_controls">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">input-dialpad-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="height_request">65</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="mute">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<signal name="toggled" handler="mute_toggled_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">microphone-sensitivity-muted-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="label" translatable="yes">Mute</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="speaker">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<signal name="toggled" handler="speaker_toggled_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">audio-volume-high-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="label" translatable="yes">Speaker</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="add_call">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<signal name="clicked" handler="add_call_clicked_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resource">/sm/puri/calls/new-call-symbolic.svg</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="label" translatable="yes">Add call</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="speaker">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<signal name="toggled" handler="speaker_toggled_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<object class="GtkBox" id="gsm_controls">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">audio-volume-high-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="height_request">65</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="hold">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<signal name="toggled" handler="hold_toggled_cb" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">media-playback-pause-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="label" translatable="yes">Hold</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="dial_pad">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="active" bind-source="dial_pad_revealer" bind-property="reveal-child" bind-flags="bidirectional|sync-create"/>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">input-dialpad-symbolic</property>
|
||||
<property name="icon_size">3</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="label" translatable="yes">Dial pad</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="blank">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="CallsEncryptionIndicator" id="encryption_indicator">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">30</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="CallsEncryptionIndicator" id="encryption_indicator">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_top">50</property>
|
||||
<property name="margin_bottom">30</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="action_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="hang_up">
|
||||
<property name="always_show_image">True</property>
|
||||
|
@ -157,6 +315,7 @@
|
|||
<property name="valign">start</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="width_request">150</property>
|
||||
<property name="hexpand">True</property>
|
||||
<signal name="clicked" handler="hang_up_clicked_cb" swapped="no"/>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
|
@ -176,6 +335,37 @@
|
|||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="answer">
|
||||
<property name="always_show_image">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="height_request">65</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="width_request">150</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="margin_left">12</property>
|
||||
<signal name="clicked" handler="answer_clicked_cb" swapped="no"/>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-answer">
|
||||
<property name="accessible-name" translatable="yes">Answer</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">call-start-symbolic</property>
|
||||
<property name="icon-size">5</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -254,4 +444,14 @@
|
|||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkSizeGroup">
|
||||
<widgets>
|
||||
<widget name="mute"/>
|
||||
<widget name="speaker"/>
|
||||
<widget name="add_call"/>
|
||||
<widget name="dial_pad"/>
|
||||
<widget name="hold"/>
|
||||
<widget name="blank"/>
|
||||
</widgets>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -11,40 +11,52 @@
|
|||
<property name="title" translatable="yes">Calls</property>
|
||||
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<object class="GtkOverlay">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="info">
|
||||
<child type="overlay">
|
||||
<object class="GtkRevealer" id="info_revealer">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<signal name="response" handler="info_response_cb" swapped="no"/>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="valign">start</property>
|
||||
<property name="reveal_child">False</property>
|
||||
<property name="transition-type">slide-down</property>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">16</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="info_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<signal name="response" handler="info_response_cb" swapped="no"/>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">16</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="info_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
@ -52,10 +64,6 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@ -102,10 +110,6 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -10,61 +10,61 @@
|
|||
<property name="show_menubar">False</property>
|
||||
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<object class="GtkOverlay">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="info">
|
||||
<child type="overlay">
|
||||
<object class="GtkRevealer" id="info_revealer">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<signal name="response" handler="info_response_cb" swapped="no"/>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="valign">start</property>
|
||||
<property name="reveal-child">False</property>
|
||||
<property name="transition-type">slide-down</property>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">16</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="info_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<signal name="response" handler="info_response_cb" swapped="no"/>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">16</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="info_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">label</property>
|
||||
<property name="wrap">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="main_stack">
|
||||
|
@ -81,11 +81,6 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
|
|
@ -39,7 +39,7 @@ test_dummy_call_get_state (CallFixture *fixture,
|
|||
{
|
||||
CallsCallState state;
|
||||
state = calls_call_get_state (CALLS_CALL (fixture->dummy_call));
|
||||
g_assert_true (state == CALLS_CALL_STATE_ACTIVE);
|
||||
g_assert_true (state == CALLS_CALL_STATE_DIALING);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue