diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-28 16:33:04 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-11-02 19:35:50 +0800 |
commit | b42c4d7fe379f92ee007381422d2e66f5de88a91 (patch) | |
tree | 18f3c716a4d23c25dac11799618cbc021985cacc /src | |
parent | 2b6e3c804d6cc4ed79160b2dc631bbb5ba08a0e2 (diff) | |
download | gsoc2013-empathy-b42c4d7fe379f92ee007381422d2e66f5de88a91.tar.gz gsoc2013-empathy-b42c4d7fe379f92ee007381422d2e66f5de88a91.tar.zst gsoc2013-empathy-b42c4d7fe379f92ee007381422d2e66f5de88a91.zip |
call-window: add 'inhibit' signal
https://bugzilla.gnome.org/show_bug.cgi?id=684979
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-call-window.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 6c7f4f2f0..64cda3d01 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -104,6 +104,13 @@ enum { PROP_CALL_HANDLER = 1, }; +enum { + SIG_INHIBIT, + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL]; + typedef enum { RINGING, /* Incoming call */ CONNECTING, /* Outgoing call */ @@ -2355,6 +2362,13 @@ empathy_call_window_class_init ( G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_CALL_HANDLER, param_spec); + + signals[SIG_INHIBIT] = g_signal_new ("inhibit", + G_OBJECT_CLASS_TYPE (empathy_call_window_class), + G_SIGNAL_RUN_LAST, + 0, NULL, NULL, NULL, + G_TYPE_NONE, + 1, G_TYPE_BOOLEAN); } void @@ -2598,6 +2612,8 @@ empathy_call_window_disconnected (EmpathyCallWindow *self, /* Leave full screen mode if needed */ gtk_window_unfullscreen (GTK_WINDOW (self)); + g_signal_emit (self, signals[SIG_INHIBIT], 0, FALSE); + gtk_action_set_sensitive (priv->menu_fullscreen, FALSE); gtk_widget_set_sensitive (priv->dtmf_panel, FALSE); @@ -3635,6 +3651,8 @@ start_call (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); + g_signal_emit (self, signals[SIG_INHIBIT], 0, TRUE); + priv->call_started = TRUE; empathy_call_handler_start_call (priv->handler, gtk_get_current_event_time ()); |