diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-24 22:37:02 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-28 00:33:43 +0800 |
commit | 3d6c558cf87c2a7144c40edecd8cebbfac9a1596 (patch) | |
tree | 554c9e7b69206cafc3b44e33c802556a2dd42fa5 /src | |
parent | 49df4fbadf79b918a67356647e586bf76cd1f0b7 (diff) | |
download | gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.tar gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.tar.gz gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.tar.bz2 gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.tar.lz gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.tar.xz gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.tar.zst gsoc2013-empathy-3d6c558cf87c2a7144c40edecd8cebbfac9a1596.zip |
set the icon of the camera_off button
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-call-window.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 9f930d870..985b55d41 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -126,6 +126,7 @@ struct _EmpathyCallWindowPriv GtkAction *send_video; GtkAction *redial; GtkAction *menu_fullscreen; + GtkWidget *tool_button_camera_off; /* The frames and boxes that contain self and remote avatar and video input/output. When we redial, we destroy and re-create the boxes */ @@ -267,6 +268,24 @@ empathy_call_window_setup_toolbar (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); GtkToolItem *tool_item; + GtkWidget *camera_off_icon; + GdkPixbuf *pixbuf, *modded_pixbuf; + + /* set the icon of the 'camera off' button by greying off the webcam icon */ + pixbuf = empathy_pixbuf_from_icon_name ("camera-web", + GTK_ICON_SIZE_SMALL_TOOLBAR); + + modded_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, + gdk_pixbuf_get_width (pixbuf), + gdk_pixbuf_get_height (pixbuf)); + + gdk_pixbuf_saturate_and_pixelate (pixbuf, modded_pixbuf, 1.0, TRUE); + g_object_unref (pixbuf); + + camera_off_icon = gtk_image_new_from_pixbuf (modded_pixbuf); + g_object_unref (modded_pixbuf); + gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON ( + priv->tool_button_camera_off), camera_off_icon); /* Add an empty expanded GtkToolItem so the volume button is at the end of * the toolbar. */ @@ -741,6 +760,7 @@ empathy_call_window_init (EmpathyCallWindow *self) "always_show_preview", &priv->always_show_preview, "ui_manager", &priv->ui_manager, "menufullscreen", &priv->menu_fullscreen, + "camera_off", &priv->tool_button_camera_off, NULL); g_free (filename); |