X-Git-Url: https://git.0d.be/?p=empathy.git;a=blobdiff_plain;f=src%2Fempathy-call-window.c;h=eb39855babb9632c1257b1a78a441b33f76c7ead;hp=996c0f717d0e2db14fb0a36d292f6586322349a1;hb=f2d81bc778ae11d5518d9b054ce230fc90d37c82;hpb=5dd66017b88e4a0d248ff75e26f12c45a959a7fa diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 996c0f71..eb39855b 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -19,56 +19,35 @@ */ #include "config.h" +#include "empathy-call-window.h" -#include -#include - -#include - -#include -#include -#include #include - -#include -#include -#include - #include -#include - #include #include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define DEBUG_FLAG EMPATHY_DEBUG_VOIP -#include - -#include "empathy-call-window.h" -#include "empathy-call-window-fullscreen.h" -#include "empathy-call-factory.h" #include "empathy-about-dialog.h" -#include "empathy-audio-src.h" #include "empathy-audio-sink.h" -#include "empathy-video-src.h" +#include "empathy-call-utils.h" +#include "empathy-call-window-fullscreen.h" +#include "empathy-camera-menu.h" +#include "empathy-camera-monitor.h" +#include "empathy-dialpad-widget.h" +#include "empathy-geometry.h" +#include "empathy-gsettings.h" +#include "empathy-images.h" #include "empathy-mic-menu.h" #include "empathy-preferences.h" +#include "empathy-request-util.h" #include "empathy-rounded-actor.h" #include "empathy-rounded-rectangle.h" #include "empathy-rounded-texture.h" -#include "empathy-camera-menu.h" +#include "empathy-sound-manager.h" +#include "empathy-ui-utils.h" +#include "empathy-utils.h" + +#define DEBUG_FLAG EMPATHY_DEBUG_VOIP +#include "empathy-debug.h" #define CONTENT_HBOX_SPACING 3 #define CONTENT_HBOX_CHILDREN_PACKING_PADDING 0 @@ -98,6 +77,8 @@ /* The roundedness of preview box and placeholders */ #define PREVIEW_ROUND_FACTOR 16 +#define PREVIEW_BUTTON_OPACITY 180 + G_DEFINE_TYPE(EmpathyCallWindow, empathy_call_window, GTK_TYPE_WINDOW) enum { @@ -633,7 +614,8 @@ empathy_call_window_camera_removed_cb (EmpathyCameraMonitor *monitor, } static void -empathy_call_window_preview_button_clicked_cb (GtkButton *button, +empathy_call_window_preview_button_clicked_cb (ClutterClickAction *action, + ClutterActor *actor, EmpathyCallWindow *self) { GtkWidget *menu; @@ -646,7 +628,9 @@ empathy_call_window_preview_button_clicked_cb (GtkButton *button, } static void -empathy_call_window_preview_hidden_button_clicked_cb (GtkButton *button, +empathy_call_window_preview_hidden_button_clicked_cb ( + ClutterClickAction *action, + ClutterActor *actor, EmpathyCallWindow *self) { GtkWidget *menu; @@ -1074,7 +1058,6 @@ create_video_preview (EmpathyCallWindow *self) ClutterActor *preview; ClutterActor *b; ClutterAction *action; - GtkWidget *button; PreviewPosition pos; g_assert (priv->video_preview == NULL); @@ -1126,27 +1109,27 @@ create_video_preview (EmpathyCallWindow *self) "async", FALSE, NULL); - /* Translators: this is an "Info" label. It should be as short - * as possible. */ - button = gtk_button_new_with_label (_("i")); - priv->preview_shown_button = b = gtk_clutter_actor_new_with_contents (button); - clutter_actor_set_size (b, 24, 24); + /* Preview show */ + priv->preview_shown_button = b = gtk_clutter_actor_new_with_contents ( + gtk_image_new_from_icon_name ("emblem-system-symbolic", + GTK_ICON_SIZE_MENU)); clutter_actor_set_margin_right (b, 4); clutter_actor_set_margin_bottom (b, 2); + clutter_actor_set_opacity (b, PREVIEW_BUTTON_OPACITY); make_background_transparent (GTK_CLUTTER_ACTOR (b)); clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (layout), b, CLUTTER_BIN_ALIGNMENT_END, CLUTTER_BIN_ALIGNMENT_END); - g_signal_connect (button, "clicked", - G_CALLBACK (empathy_call_window_preview_button_clicked_cb), - self); + action = clutter_click_action_new (); + clutter_actor_add_action (b, action); + g_signal_connect (action, "clicked", + G_CALLBACK (empathy_call_window_preview_button_clicked_cb), self); - /* Translators: this is an "Info" label. It should be as short - * as possible. */ - button = gtk_button_new_with_label (_("i")); - priv->preview_hidden_button = b = gtk_clutter_actor_new_with_contents (button); - clutter_actor_set_size (b, 24, 24); + /* Preview hidden */ + priv->preview_hidden_button = b = gtk_clutter_actor_new_with_contents ( + gtk_image_new_from_icon_name ("emblem-system-symbolic", + GTK_ICON_SIZE_MENU)); make_background_transparent (GTK_CLUTTER_ACTOR (b)); clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->preview_layout), @@ -1158,9 +1141,10 @@ create_video_preview (EmpathyCallWindow *self) clutter_actor_hide (priv->preview_hidden_button); - g_signal_connect (button, "clicked", - G_CALLBACK (empathy_call_window_preview_hidden_button_clicked_cb), - self); + action = clutter_click_action_new (); + clutter_actor_add_action (b, action); + g_signal_connect (action, "clicked", + G_CALLBACK (empathy_call_window_preview_hidden_button_clicked_cb), self); clutter_bin_layout_add (CLUTTER_BIN_LAYOUT (priv->preview_layout), priv->video_preview, @@ -2919,6 +2903,7 @@ empathy_call_window_get_audio_sink_pad (EmpathyCallWindow *self, g_warning ("Could not start audio sink"); goto error; } + priv->audio_output_added = TRUE; } template = gst_element_class_get_pad_template ( @@ -4030,7 +4015,7 @@ empathy_call_window_state_event_cb (GtkWidget *widget, show_controls (window, set_fullscreen); show_borders (window, set_fullscreen); gtk_action_set_stock_id (priv->menu_fullscreen, - (set_fullscreen ? "gtk-leave-fullscreen" : "gtk-fullscreen")); + (set_fullscreen ? "view-restore" : "view-fullscreen")); priv->is_fullscreen = set_fullscreen; }