Commit b3689c66 authored by Julian Sparber's avatar Julian Sparber

AvaterDialog: fix #138 crash when taking a webcam picture

Since get cheese_widget_get_camera () and get_video_area () are not
defined static they are are exported but we don't have the function
signature, therefore this adds the header file with the function
signatures.

This also allows the dialog to be smaller, by reducing the size request
on the Clutter widget
parent 99366453
......@@ -42,17 +42,8 @@ public class Contacts.CropCheeseDialog : Hdy.Dialog {
this.flash = new Cheese.Flash (this);
this.cheese = new Cheese.Widget ();
/* WORKAROUND: we can't directly access the video area with get_video_area ()
to set a smaller min size for the video */
foreach (var child in (this.cheese as Container).get_children ()) {
if (child is Container) {
int width;
int height;
child.get_size_request (out width, out height);
if (width == 460 && height == 345)
child.set_size_request (328, 246);
}
}
/* make the minimum video size smaller */
this.cheese.get_video_area ().set_size_request (328, 246);
this.cheese.show ();
this.stack.add_named (this.cheese, STACK_NAME_CHEESE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment