From c711567c065ea6370bd798f2bbb8c07aaf5d3c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Fri, 28 Jan 2022 00:27:05 +0100 Subject: [PATCH 01/12] CameraView: Allow to change the camera resolution and framerate Add a popover to the camera view to change the resolution and framerate. --- src/MainWindow.vala | 17 +++++--- src/Widgets/CameraView.vala | 80 ++++++++++++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 6 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 1f29ab6b7..907cf6e81 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -24,11 +24,13 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { public const string ACTION_FULLSCREEN = "fullscreen"; public const string ACTION_TAKE_PHOTO = "take_photo"; public const string ACTION_RECORD = "record"; + public const string ACTION_CHANGE_CAPS = "change-caps"; private const GLib.ActionEntry[] ACTION_ENTRIES = { {ACTION_FULLSCREEN, on_fullscreen}, {ACTION_TAKE_PHOTO, on_take_photo}, {ACTION_RECORD, on_record, null, "false", null}, + {ACTION_CHANGE_CAPS, on_change_caps, "u", "uint32 0", null}, }; private uint configure_id; @@ -99,14 +101,14 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { } }); + var window_handle = new Hdy.WindowHandle (); + window_handle.add (header_bar); + var grid = new Gtk.Grid (); - grid.attach (header_bar, 0, 0); + grid.attach (window_handle, 0, 0); grid.attach (overlay, 0, 1); - var window_handle = new Hdy.WindowHandle (); - window_handle.add (grid); - - add (window_handle); + add (grid); timer_running = false; camera_view.camera_added.connect (header_bar.add_camera_option); @@ -155,6 +157,11 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { } } + private void on_change_caps (GLib.SimpleAction action, GLib.Variant? parameter) { + camera_view.change_caps (parameter.get_uint32 ()); + change_action_state (ACTION_CHANGE_CAPS, parameter); + } + public override bool configure_event (Gdk.EventConfigure event) { if (configure_id != 0) { GLib.Source.remove (configure_id); diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index 45f3b70f3..d0645231d 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -30,11 +30,13 @@ public class Camera.Widgets.CameraView : Gtk.Stack { Gtk.Widget gst_video_widget; private Gst.Pipeline pipeline; + private dynamic Gst.Element capsfilter; private Gst.Element tee; private Gst.Video.ColorBalance color_balance; private Gst.Video.Direction? hflip; private Gst.Bin? record_bin; private Gst.Device? current_device = null; + private GLib.Menu resolution_menu; public uint n_cameras { get { @@ -90,6 +92,20 @@ public class Camera.Widgets.CameraView : Gtk.Stack { "" ); + resolution_menu = new GLib.Menu (); + var popover = new Gtk.Popover.from_model (this, resolution_menu); + + events |= Gdk.EventMask.BUTTON_RELEASE_MASK; + button_release_event.connect ((event) => { + if (((Gdk.EventButton) event).button != Gdk.BUTTON_SECONDARY) { + return false; + } + + popover.pointing_to = {(int)((Gdk.EventButton) event).x, (int)((Gdk.EventButton) event).y}; + popover.popup (); + return true; + }); + add (status_box); add (no_device_view); monitor.get_bus ().add_watch (GLib.Priority.DEFAULT, on_bus_message); @@ -168,6 +184,37 @@ public class Camera.Widgets.CameraView : Gtk.Stack { Gst.Debug.BIN_TO_DOT_FILE (pipeline, Gst.DebugGraphDetails.VERBOSE, "changing"); } + var caps = camera.get_caps (); + resolution_menu.remove_all (); + for (uint i = 0; i < caps.get_size (); i++) { + unowned var s = caps.get_structure (i); + int w, h, num = 0, den = 1; + if (s.get ("width", typeof (int), out w, + "height", typeof (int), out h)) { + unowned GLib.Value? fraction = s.get_value ("framerate"); + if (fraction.holds (typeof (Gst.Fraction))) { + num = Gst.Value.get_fraction_numerator (fraction); + den = Gst.Value.get_fraction_denominator (fraction); + } else if (fraction.holds (typeof (Gst.FractionRange))) { + var range_max = Gst.Value.get_fraction_range_max (fraction); + num = Gst.Value.get_fraction_numerator (range_max); + den = Gst.Value.get_fraction_denominator (range_max); + } else if (fraction.holds (typeof (Gst.ValueList))) { + unowned GLib.Value? val = Gst.ValueList.get_value (fraction, 0); + num = Gst.Value.get_fraction_numerator (val); + den = Gst.Value.get_fraction_denominator (val); + } else { + debug ("Unknown fraction type: %s", fraction.type_name ()); + continue; + } + + resolution_menu.append ( + "%d×%d (%0.f fps)".printf (w, h, (double)num / (double)den), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); + } + } + create_pipeline (camera); current_device = camera; } @@ -195,6 +242,7 @@ public class Camera.Widgets.CameraView : Gtk.Stack { var device_src = camera.create_element (VIDEO_SRC_NAME); pipeline = (Gst.Pipeline) Gst.parse_launch ( + "capsfilter name=capsfilter ! " + "decodebin name=decodebin ! " + "videoflip method=horizontal-flip name=hflip ! " + "videobalance name=balance ! " + @@ -206,7 +254,8 @@ public class Camera.Widgets.CameraView : Gtk.Stack { ); pipeline.add (device_src); - device_src.link (pipeline.get_by_name ("decodebin")); + capsfilter = pipeline.get_by_name ("capsfilter"); + device_src.link (capsfilter); tee = pipeline.get_by_name ("tee"); hflip = (pipeline.get_by_name ("hflip") as Gst.Video.Direction); color_balance = (pipeline.get_by_name ("balance") as Gst.Video.ColorBalance); @@ -233,6 +282,23 @@ public class Camera.Widgets.CameraView : Gtk.Stack { gst_video_widget = gtksink.widget; + capsfilter.get_static_pad ("src").add_probe (Gst.PadProbeType.EVENT_BOTH, (pad, info) => { + unowned Gst.Event? event = info.get_event (); + if (event.type == Gst.EventType.CAPS) { + unowned Gst.Caps new_caps; + event.parse_caps (out new_caps); + var camera_caps = camera.get_caps (); + for (uint i = 0; i < camera_caps.get_size (); i++) { + var sec_caps = camera_caps.copy_nth (i); + if (new_caps.is_subset (sec_caps)) { + get_action_group ("win").change_action_state (MainWindow.ACTION_CHANGE_CAPS, new GLib.Variant.uint32 (i)); + return Gst.PadProbeReturn.REMOVE; + } + } + } + return Gst.PadProbeReturn.OK; + }); + add (gst_video_widget); gst_video_widget.show (); @@ -252,6 +318,18 @@ public class Camera.Widgets.CameraView : Gtk.Stack { color_balance.set_property ("contrast", contrast); } + public void change_caps (uint caps_index) { + var caps = current_device.get_caps (); + if (caps_index >= caps.get_size ()) { + return; + } + + unowned var s = caps.get_structure (caps_index); + var new_caps = new Gst.Caps.empty (); + new_caps.append_structure (s.copy ()); + capsfilter.caps = new_caps; + } + public void take_photo () { if (recording || pipeline == null) { return; From 3a765fe799f3f7d5d18a965f95c3a1c4aa33319d Mon Sep 17 00:00:00 2001 From: Jeremy Paul Wootten Date: Mon, 14 Feb 2022 20:09:34 +0000 Subject: [PATCH 02/12] Move resolution menu to headerbar --- src/Widgets/CameraView.vala | 47 +---------------------- src/Widgets/HeaderBar.vala | 75 +++++++++++++++++++++++++++++++++++-- 2 files changed, 73 insertions(+), 49 deletions(-) diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index d0645231d..4cb952d97 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -36,7 +36,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { private Gst.Video.Direction? hflip; private Gst.Bin? record_bin; private Gst.Device? current_device = null; - private GLib.Menu resolution_menu; public uint n_cameras { get { @@ -92,20 +91,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { "" ); - resolution_menu = new GLib.Menu (); - var popover = new Gtk.Popover.from_model (this, resolution_menu); - - events |= Gdk.EventMask.BUTTON_RELEASE_MASK; - button_release_event.connect ((event) => { - if (((Gdk.EventButton) event).button != Gdk.BUTTON_SECONDARY) { - return false; - } - - popover.pointing_to = {(int)((Gdk.EventButton) event).x, (int)((Gdk.EventButton) event).y}; - popover.popup (); - return true; - }); - add (status_box); add (no_device_view); monitor.get_bus ().add_watch (GLib.Priority.DEFAULT, on_bus_message); @@ -184,41 +169,11 @@ public class Camera.Widgets.CameraView : Gtk.Stack { Gst.Debug.BIN_TO_DOT_FILE (pipeline, Gst.DebugGraphDetails.VERBOSE, "changing"); } - var caps = camera.get_caps (); - resolution_menu.remove_all (); - for (uint i = 0; i < caps.get_size (); i++) { - unowned var s = caps.get_structure (i); - int w, h, num = 0, den = 1; - if (s.get ("width", typeof (int), out w, - "height", typeof (int), out h)) { - unowned GLib.Value? fraction = s.get_value ("framerate"); - if (fraction.holds (typeof (Gst.Fraction))) { - num = Gst.Value.get_fraction_numerator (fraction); - den = Gst.Value.get_fraction_denominator (fraction); - } else if (fraction.holds (typeof (Gst.FractionRange))) { - var range_max = Gst.Value.get_fraction_range_max (fraction); - num = Gst.Value.get_fraction_numerator (range_max); - den = Gst.Value.get_fraction_denominator (range_max); - } else if (fraction.holds (typeof (Gst.ValueList))) { - unowned GLib.Value? val = Gst.ValueList.get_value (fraction, 0); - num = Gst.Value.get_fraction_numerator (val); - den = Gst.Value.get_fraction_denominator (val); - } else { - debug ("Unknown fraction type: %s", fraction.type_name ()); - continue; - } - - resolution_menu.append ( - "%d×%d (%0.f fps)".printf (w, h, (double)num / (double)den), - GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) - ); - } - } - create_pipeline (camera); current_device = camera; } + private void create_pipeline (Gst.Device camera) { try { var caps = camera.get_caps (); diff --git a/src/Widgets/HeaderBar.vala b/src/Widgets/HeaderBar.vala index 74c596a67..12806713e 100644 --- a/src/Widgets/HeaderBar.vala +++ b/src/Widgets/HeaderBar.vala @@ -37,8 +37,10 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { private Gtk.MenuButton menu_button; private Gtk.Revealer camera_menu_revealer; private Gtk.Menu camera_options; + private GLib.Menu resolution_menu; private Gtk.Image take_image; private Granite.ModeSwitch mode_switch; + private Gst.Device? current_device = null; public bool recording { get; set; default = false; } public bool horizontal_flip { get; set; default = true; } @@ -129,6 +131,15 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { row_spacing = 3, margin = 12 }; + + resolution_menu = new GLib.Menu (); + var resolution_popover = new Gtk.Popover.from_model (null, resolution_menu); + var resolution_button = new Gtk.MenuButton () { + popover = resolution_popover, + tooltip_text = _("Resolution"), + image = new Gtk.Image.from_icon_name ("preferences-desktop-display-symbolic", Gtk.IconSize.MENU), + }; + image_settings.attach (brightness_image, 0, 0); image_settings.attach (brightness_label, 1, 0); image_settings.attach (brightness_scale, 0, 1, 2); @@ -180,8 +191,8 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { set_custom_title (linked_box); pack_end (menu_button); pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); - - + pack_end (resolution_button); + pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); pack_end (mode_switch); Camera.Application.settings.changed["mode"].connect ((key) => { @@ -200,6 +211,8 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { take_image.icon_name = PHOTO_ICON_SYMBOLIC; timer_button.sensitive = true; } + + update_resolution_menu (); }); notify["recording"].connect (() => { @@ -225,6 +238,7 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { } public void add_camera_option (Gst.Device camera) { + current_device = camera; var menuitem = new Gtk.RadioMenuItem.with_label (null, camera.display_name); menuitem.set_data ("camera", camera); camera_options.append (menuitem); @@ -234,15 +248,19 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { var el = camera_options.get_children ().nth_data (0) as Gtk.RadioMenuItem; menuitem.join_group (el); } + menuitem.active = true; menuitem.activate.connect (() => { + current_device = menuitem.get_data ("camera"); if (menuitem.active) { - request_camera_change (menuitem.get_data ("camera")); + request_camera_change (current_device); + update_resolution_menu (); } }); menuitem.show (); update_take_button (); + update_resolution_menu (); } public void remove_camera_option (Gst.Device camera) { @@ -259,10 +277,61 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { camera_options.remove (to_remove); } + if (camera_options.get_children ().length () > 0) { + camera_options.active = 0; + } + + update_resolution_menu (); update_take_button (); enable_all_controls (camera_options.get_children ().length () > 0); } + private void update_resolution_menu () { + resolution_menu.remove_all (); + if (current_device == null) { + return; + } + var caps = current_device.get_caps (); + + for (uint i = 0; i < caps.get_size (); i++) { + unowned var s = caps.get_structure (i); + + bool is_video_cap = s.get_name ().contains ("video"); + if (!is_video_cap) { // If select image cap then preview freezes + continue; + } + + int w, h, num = 0, den = 1; + if (s.get ("width", typeof (int), out w, + "height", typeof (int), out h)) { + + unowned GLib.Value? fraction = s.get_value ("framerate"); + if (fraction.holds (typeof (Gst.Fraction))) { + num = Gst.Value.get_fraction_numerator (fraction); + den = Gst.Value.get_fraction_denominator (fraction); + } else if (fraction.holds (typeof (Gst.FractionRange))) { + var range_max = Gst.Value.get_fraction_range_max (fraction); + num = Gst.Value.get_fraction_numerator (range_max); + den = Gst.Value.get_fraction_denominator (range_max); + } else if (fraction.holds (typeof (Gst.ValueList))) { + unowned GLib.Value? val = Gst.ValueList.get_value (fraction, 0); + num = Gst.Value.get_fraction_numerator (val); + den = Gst.Value.get_fraction_denominator (val); + } else { + warning ("Unknown fraction type: %s", fraction.type_name ()); + continue; + } + } else { + warning ("no resolution in caps"); + } + + resolution_menu.append ( + "%d×%d (%0.f fps)".printf (w, h, (double)num / (double)den), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); + } + } + private void update_take_button () { unowned Gtk.StyleContext take_button_style_context = take_button.get_style_context (); if (camera_options.get_children ().length () > 1) { From 8d21929e3db42a638196373a37219e9b79091abe Mon Sep 17 00:00:00 2001 From: Jeremy Paul Wootten Date: Tue, 15 Feb 2022 18:53:15 +0000 Subject: [PATCH 03/12] Decouple preview and capture resolutions --- src/MainWindow.vala | 6 +- src/Utils.vala | 31 ++++ src/Widgets/CameraView.vala | 311 +++++++++++++++++++++++------------- src/Widgets/HeaderBar.vala | 103 ++++++------ 4 files changed, 279 insertions(+), 172 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 22ce7ec57..f0b4b5001 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -167,8 +167,10 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { } private void on_change_caps (GLib.SimpleAction action, GLib.Variant? parameter) { - camera_view.change_caps (parameter.get_uint32 ()); - change_action_state (ACTION_CHANGE_CAPS, parameter); + camera_view.change_caps ((int)parameter.get_uint32 ()); + if (parameter != null) { + change_action_state (ACTION_CHANGE_CAPS, parameter); + } } public override bool configure_event (Gdk.EventConfigure event) { diff --git a/src/Utils.vala b/src/Utils.vala index ad3370643..44516cf52 100644 --- a/src/Utils.vala +++ b/src/Utils.vala @@ -56,4 +56,35 @@ namespace Camera.Utils { return GLib.Path.build_path (Path.DIR_SEPARATOR_S, media_directory, "Webcam"); } + + public bool parse_structure (Gst.Structure s, out int width, out int height, out double framerate) { + framerate = 0.0; + int num = 0, den = 1; + if (s.get ("width", typeof (int), out width, + "height", typeof (int), out height)) { + + unowned GLib.Value? fraction = s.get_value ("framerate"); + if (fraction.holds (typeof (Gst.Fraction))) { + num = Gst.Value.get_fraction_numerator (fraction); + den = Gst.Value.get_fraction_denominator (fraction); + } else if (fraction.holds (typeof (Gst.FractionRange))) { + var range_max = Gst.Value.get_fraction_range_max (fraction); + num = Gst.Value.get_fraction_numerator (range_max); + den = Gst.Value.get_fraction_denominator (range_max); + } else if (fraction.holds (typeof (Gst.ValueList))) { + unowned GLib.Value? val = Gst.ValueList.get_value (fraction, 0); + num = Gst.Value.get_fraction_numerator (val); + den = Gst.Value.get_fraction_denominator (val); + } else { + warning ("Unknown fraction type: %s", fraction.type_name ()); + return false; + } + } else { + warning ("no resolution in caps"); + return false; + } + + framerate = (double)num / (double)den; + return true; + } } diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index 4cb952d97..b61658726 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -1,4 +1,4 @@ -/* + /* * Copyright (c) 2011-2019 elementary, inc. (https://elementary.io) * * This program is free software; you can redistribute it and/or @@ -29,13 +29,13 @@ public class Camera.Widgets.CameraView : Gtk.Stack { private Gtk.Label status_label; Gtk.Widget gst_video_widget; - private Gst.Pipeline pipeline; - private dynamic Gst.Element capsfilter; - private Gst.Element tee; + private Gst.Pipeline preview_pipeline; private Gst.Video.ColorBalance color_balance; private Gst.Video.Direction? hflip; - private Gst.Bin? record_bin; private Gst.Device? current_device = null; + private int current_video_caps_index = -1; + private int default_video_caps_index = -1; + private int current_picture_caps_index = -1; public uint n_cameras { get { @@ -43,9 +43,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { } } - private int picture_width; - private int picture_height; - private Gst.DeviceMonitor monitor = new Gst.DeviceMonitor (); public bool recording { get; private set; default = false; } public bool horizontal_flip { @@ -97,12 +94,26 @@ public class Camera.Widgets.CameraView : Gtk.Stack { var caps = new Gst.Caps.empty_simple ("video/x-raw"); monitor.add_filter ("Video/Source", caps); + + Camera.Application.settings.changed["mode"].connect (() => { + if (current_device == null) { + return; + } else if (Camera.Application.settings.get_enum ("mode") == Utils.ActionType.PHOTO) { + + set_preview_caps (default_video_caps_index); + update_resolution_action_state (current_picture_caps_index); + } else { + set_preview_caps (current_video_caps_index); + update_resolution_action_state (current_video_caps_index); + } + }); } private void on_camera_added (Gst.Device device) { camera_added (device); change_camera (device); } + private void on_camera_removed (Gst.Device device) { camera_removed (device); if (n_cameras == 0) { @@ -156,47 +167,52 @@ public class Camera.Widgets.CameraView : Gtk.Stack { stop_recording (); } - if (record_bin != null) { - record_bin.set_state (Gst.State.NULL); - record_bin.sync_state_with_parent (); - record_bin.sync_children_states (); - } - - if (pipeline != null) { - pipeline.set_state (Gst.State.NULL); - pipeline.sync_children_states (); + if (preview_pipeline != null) { + preview_pipeline.set_state (Gst.State.NULL); + preview_pipeline.sync_children_states (); - Gst.Debug.BIN_TO_DOT_FILE (pipeline, Gst.DebugGraphDetails.VERBOSE, "changing"); + Gst.Debug.BIN_TO_DOT_FILE (preview_pipeline, Gst.DebugGraphDetails.VERBOSE, "changing"); } - create_pipeline (camera); - current_device = camera; - } - - - private void create_pipeline (Gst.Device camera) { - try { - var caps = camera.get_caps (); - picture_width = 640; - picture_height = 480; - var max_area = picture_width * picture_height; + var caps = camera.get_caps (); + int largest_picture_index = -1; + int largest_video_index = -1; + var max_area_picture = 640 * 480; + var max_area_video = 320 * 240; - for (uint i = 0; i < caps.get_size (); i++) { + if (caps != null) { + for (int i = 0; i < caps.get_size (); i++) { unowned var s = caps.get_structure (i); - if (s.get_name () == "image/jpeg") { - int w, h; - s.get_int ("width", out w); - s.get_int ("height", out h); - if (w * h > max_area) { - picture_width = w; - picture_height = h; - max_area = w * h; + int w, h; + double fr = 0.0; + if (Camera.Utils.parse_structure (s, out w, out h, out fr)) { + if (s.get_name () == "image/jpeg") { + if (w * h > max_area_picture) { + largest_picture_index = i; + max_area_picture = w * h; + } + } else if (s.get_name () == "video/x-raw") { + if (w * h >= max_area_video && fr >= 10.0) { + largest_video_index = i; + max_area_video = w * h; + } } } } + } + + current_picture_caps_index = largest_picture_index; + current_video_caps_index = largest_video_index; + default_video_caps_index = largest_video_index; + + current_device = camera; + create_video_pipeline (); + } - var device_src = camera.create_element (VIDEO_SRC_NAME); - pipeline = (Gst.Pipeline) Gst.parse_launch ( + private void create_video_pipeline () { + try { + var device_src = current_device.create_element (VIDEO_SRC_NAME); + preview_pipeline = (Gst.Pipeline) Gst.parse_launch ( "capsfilter name=capsfilter ! " + "decodebin name=decodebin ! " + "videoflip method=horizontal-flip name=hflip ! " + @@ -208,18 +224,36 @@ public class Camera.Widgets.CameraView : Gtk.Stack { "videoscale name=videoscale" ); - pipeline.add (device_src); - capsfilter = pipeline.get_by_name ("capsfilter"); + preview_pipeline.add (device_src); + dynamic Gst.Element capsfilter = preview_pipeline.get_by_name ("capsfilter"); device_src.link (capsfilter); - tee = pipeline.get_by_name ("tee"); - hflip = (pipeline.get_by_name ("hflip") as Gst.Video.Direction); - color_balance = (pipeline.get_by_name ("balance") as Gst.Video.ColorBalance); + + // Ensure action state changes with caps filter + capsfilter.get_static_pad ("src").add_probe (Gst.PadProbeType.EVENT_BOTH, (pad, info) => { + unowned Gst.Event? event = info.get_event (); + if (event.type == Gst.EventType.CAPS) { + unowned var s= event.get_structure (); + update_resolution_action_state (find_structure_index (s)); + } + + return Gst.PadProbeReturn.OK; + }); + + var default_caps = get_caps_from_index (default_video_caps_index); + if (default_caps != null) { + capsfilter.caps = default_caps; + } else { + critical ("Could not find default caps from index %u", default_video_caps_index); + } + + hflip = (preview_pipeline.get_by_name ("hflip") as Gst.Video.Direction); + color_balance = (preview_pipeline.get_by_name ("balance") as Gst.Video.ColorBalance); if (gst_video_widget != null) { remove (gst_video_widget); } - dynamic Gst.Element videorate = pipeline.get_by_name ("videorate"); + dynamic Gst.Element videorate = preview_pipeline.get_by_name ("videorate"); videorate.max_rate = 30; videorate.drop_only = true; @@ -227,38 +261,20 @@ public class Camera.Widgets.CameraView : Gtk.Stack { if (gtksink != null) { dynamic Gst.Element glsinkbin = Gst.ElementFactory.make ("glsinkbin", null); glsinkbin.sink = gtksink; - pipeline.add (glsinkbin); - pipeline.get_by_name ("videoscale").link (glsinkbin); + preview_pipeline.add (glsinkbin); + preview_pipeline.get_by_name ("videoscale").link (glsinkbin); } else { gtksink = Gst.ElementFactory.make ("gtksink", null); - pipeline.add (gtksink); - pipeline.get_by_name ("videoscale").link (gtksink); + preview_pipeline.add (gtksink); + preview_pipeline.get_by_name ("videoscale").link (gtksink); } gst_video_widget = gtksink.widget; - - capsfilter.get_static_pad ("src").add_probe (Gst.PadProbeType.EVENT_BOTH, (pad, info) => { - unowned Gst.Event? event = info.get_event (); - if (event.type == Gst.EventType.CAPS) { - unowned Gst.Caps new_caps; - event.parse_caps (out new_caps); - var camera_caps = camera.get_caps (); - for (uint i = 0; i < camera_caps.get_size (); i++) { - var sec_caps = camera_caps.copy_nth (i); - if (new_caps.is_subset (sec_caps)) { - get_action_group ("win").change_action_state (MainWindow.ACTION_CHANGE_CAPS, new GLib.Variant.uint32 (i)); - return Gst.PadProbeReturn.REMOVE; - } - } - } - return Gst.PadProbeReturn.OK; - }); - add (gst_video_widget); gst_video_widget.show (); visible_child = gst_video_widget; - pipeline.set_state (Gst.State.PLAYING); + preview_pipeline.set_state (Gst.State.PLAYING); } catch (Error e) { // It is possible that there is another camera present that could selected so do not show // no_device_view @@ -267,62 +283,98 @@ public class Camera.Widgets.CameraView : Gtk.Stack { dialog.destroy (); } } + private Gst.Pipeline? create_picture_pipeline () { + var brightness_value = GLib.Value (typeof (double)); + color_balance.get_property ("brightness", ref brightness_value); + var contrast_value = GLib.Value (typeof (double)); + color_balance.get_property ("contrast", ref contrast_value); + Gst.Pipeline? picture_pipeline = null; + + var preview_video_src = (Gst.Element) preview_pipeline.get_by_name (VIDEO_SRC_NAME); + string device_path; + preview_video_src.get ("device", out device_path); + + try { + picture_pipeline = (Gst.Pipeline) Gst.parse_launch ( + VIDEO_SRC_NAME +" device=%s name=%s num-buffers=1 !".printf (device_path, VIDEO_SRC_NAME) + + "capsfilter name=capsfilter ! " + + "decodebin name=decodebin ! " + + "videoflip method=%s !".printf (horizontal_flip ? "horizontal-flip" : "none") + + "videobalance brightness=%f contrast=%f !".printf (brightness_value.get_double (), contrast_value.get_double ()) + + "jpegenc ! filesink location=%s name=filesink".printf (Camera.Utils.get_new_media_filename (Camera.Utils.ActionType.PHOTO)) + ); + + dynamic Gst.Element capsfilter = picture_pipeline.get_by_name ("capsfilter"); + picture_pipeline.get_by_name (VIDEO_SRC_NAME).link (capsfilter); + var current_picture_caps = get_caps_from_index (current_picture_caps_index); + if (current_picture_caps != null) { + capsfilter.caps = current_picture_caps; + } + } catch (Error e) { + // It is possible that there is another camera present that could selected so do not show + // no_device_view + var dialog = new Granite.MessageDialog.with_image_from_icon_name (_("Unable To View Camera"), e.message, "dialog-error"); + dialog.run (); + dialog.destroy (); + } + + return picture_pipeline; + } public void change_color_balance (double brightnesss, double contrast) { color_balance.set_property ("brightness", brightnesss); color_balance.set_property ("contrast", contrast); } - public void change_caps (uint caps_index) { - var caps = current_device.get_caps (); - if (caps_index >= caps.get_size ()) { - return; + public void change_caps (int index) { + var new_caps = get_caps_from_index (index); + if (new_caps != null) { + unowned var s = new_caps.get_structure (0); + if (s.get_name () == "image/jpeg") { + current_picture_caps_index = index; + } else if (s.get_name () == "video/x-raw") { + current_video_caps_index = index; + dynamic Gst.Element capsfilter = preview_pipeline.get_by_name ("capsfilter"); + capsfilter.caps = new_caps; + } } + } - unowned var s = caps.get_structure (caps_index); - var new_caps = new Gst.Caps.empty (); - new_caps.append_structure (s.copy ()); - capsfilter.caps = new_caps; + private void set_preview_caps (int index) { + var new_caps = get_caps_from_index (index); + if (new_caps != null) { + dynamic Gst.Element capsfilter = preview_pipeline.get_by_name ("capsfilter"); + capsfilter.caps = new_caps; + } else { + critical ("Failed to set preview caps index %i", index); + } } - public void take_photo () { - if (recording || pipeline == null) { + private void update_resolution_action_state (int index) { + var caps = current_device.get_caps (); + if (caps == null || index < 0 || index >= caps.get_size ()) { return; } - recording = true; - pipeline.set_state (Gst.State.NULL); - pipeline.sync_children_states (); - - var preview_video_src = (Gst.Element) pipeline.get_by_name (VIDEO_SRC_NAME); - string device_path; - preview_video_src.get ("device", out device_path); - var brightness_value = GLib.Value (typeof (double)); - color_balance.get_property ("brightness", ref brightness_value); - var contrast_value = GLib.Value (typeof (double)); - color_balance.get_property ("contrast", ref contrast_value); - Gst.Pipeline picture_pipeline; - try { - picture_pipeline = (Gst.Pipeline) Gst.parse_launch ( - "v4l2src device=%s name=%s num-buffers=1 !".printf (device_path, VIDEO_SRC_NAME) + - "videoscale ! video/x-raw, width=%d, height=%d !".printf (picture_width, picture_height) + - "videoflip method=%s !".printf ((horizontal_flip)?"horizontal-flip":"none") + - "videobalance brightness=%f contrast=%f !".printf (brightness_value.get_double (), contrast_value.get_double ()) + - "jpegenc ! filesink location=%s name=filesink".printf (Camera.Utils.get_new_media_filename (Camera.Utils.ActionType.PHOTO)) - ); + get_action_group ("win").change_action_state (MainWindow.ACTION_CHANGE_CAPS, new GLib.Variant.uint32 (index)); + } - } catch (Error e) { - warning ("Could not make picture pipeline for photo - %s", e.message); + public void take_photo () { + if (recording || preview_pipeline == null) { return; } + recording = true; + preview_pipeline.set_state (Gst.State.NULL); + preview_pipeline.sync_children_states (); + var picture_pipeline = create_picture_pipeline (); var filesink = picture_pipeline.get_by_name ("filesink"); filesink.get_static_pad ("sink").add_probe (Gst.PadProbeType.EVENT_DOWNSTREAM, (pad, info) => { if (info.get_event ().type == Gst.EventType.EOS) { Idle.add (() => { picture_pipeline.set_state (Gst.State.NULL); play_shutter_sound (); - create_pipeline (current_device); + create_video_pipeline (); recording = false; return Source.REMOVE; @@ -337,7 +389,7 @@ public class Camera.Widgets.CameraView : Gtk.Stack { picture_pipeline.set_state (Gst.State.PLAYING); picture_pipeline.sync_children_states (); - Gst.Debug.BIN_TO_DOT_FILE (pipeline, Gst.DebugGraphDetails.VERBOSE, "snapshot"); + Gst.Debug.BIN_TO_DOT_FILE (picture_pipeline, Gst.DebugGraphDetails.VERBOSE, "snapshot"); } public void start_recording () { @@ -346,7 +398,8 @@ public class Camera.Widgets.CameraView : Gtk.Stack { } recording = true; - record_bin = new Gst.Bin (null); + var record_bin = new Gst.Bin (null); + record_bin.set_name ("record_bin"); string[] missing_messages = {}; var queue = Gst.ElementFactory.make ("queue", null); @@ -404,12 +457,14 @@ public class Camera.Widgets.CameraView : Gtk.Stack { var ghostpad = new Gst.GhostPad (null, queue.get_static_pad ("sink")); record_bin.add_pad (ghostpad); - pipeline.set_state (Gst.State.PAUSED); - pipeline.add (record_bin); + preview_pipeline.set_state (Gst.State.PAUSED); + preview_pipeline.add (record_bin); record_bin.sync_state_with_parent (); - tee.link (record_bin); - pipeline.set_state (Gst.State.PLAYING); - Gst.Debug.BIN_TO_DOT_FILE (pipeline, Gst.DebugGraphDetails.VERBOSE, "recording"); + preview_pipeline.get_by_name ("tee").link (record_bin); + preview_pipeline.set_state (Gst.State.PLAYING); + preview_pipeline.sync_children_states (); + + Gst.Debug.BIN_TO_DOT_FILE (preview_pipeline, Gst.DebugGraphDetails.VERBOSE, "recording"); } public void stop_recording () { @@ -417,10 +472,9 @@ public class Camera.Widgets.CameraView : Gtk.Stack { return; } - pipeline.set_state (Gst.State.PAUSED); - tee.unlink (record_bin); + preview_pipeline.set_state (Gst.State.PAUSED); + var record_bin = (Gst.Bin?)(preview_pipeline.get_by_name ("record_bin")); var filesink = record_bin.get_by_name ("filesink"); - if (filesink != null) { var locationval = GLib.Value (typeof (string)); filesink.get_property ("location", ref locationval); @@ -428,11 +482,38 @@ public class Camera.Widgets.CameraView : Gtk.Stack { recording_finished (location); } - pipeline.remove (record_bin); - pipeline.set_state (Gst.State.PLAYING); + preview_pipeline.get_by_name ("tee").unlink (record_bin); + preview_pipeline.remove (record_bin); record_bin.set_state (Gst.State.NULL); - record_bin.dispose (); + record_bin.dispose (); // Required for successful saving of video file recording = false; + preview_pipeline.set_state (Gst.State.PLAYING); + } + + private int find_structure_index (Gst.Structure? s) { + var caps = current_device.get_caps (); + if (caps != null && s != null) { + for (int i = 0; i < caps.get_size (); i++) { + if (s.is_equal (caps.get_structure (i))) { + return i; + } + } + } + + return -1; + } + + private Gst.Caps? get_caps_from_index (int index) { + var caps = current_device.get_caps (); + if (caps != null && index > 0 && index < caps.get_size ()) { + unowned var s = caps.get_structure (index); + var new_caps = new Gst.Caps.empty (); + new_caps.append_structure (s.copy ()); + return new_caps; + } else { + return null; + } + } private static void play_shutter_sound () { diff --git a/src/Widgets/HeaderBar.vala b/src/Widgets/HeaderBar.vala index 12806713e..3625e72d9 100644 --- a/src/Widgets/HeaderBar.vala +++ b/src/Widgets/HeaderBar.vala @@ -38,6 +38,7 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { private Gtk.Revealer camera_menu_revealer; private Gtk.Menu camera_options; private GLib.Menu resolution_menu; + private Gtk.MenuButton resolution_button; private Gtk.Image take_image; private Granite.ModeSwitch mode_switch; private Gst.Device? current_device = null; @@ -133,12 +134,10 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { }; resolution_menu = new GLib.Menu (); - var resolution_popover = new Gtk.Popover.from_model (null, resolution_menu); - var resolution_button = new Gtk.MenuButton () { - popover = resolution_popover, - tooltip_text = _("Resolution"), + resolution_button = new Gtk.MenuButton () { image = new Gtk.Image.from_icon_name ("preferences-desktop-display-symbolic", Gtk.IconSize.MENU), }; + resolution_button.set_menu_model (resolution_menu); image_settings.attach (brightness_image, 0, 0); image_settings.attach (brightness_label, 1, 0); @@ -195,25 +194,23 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); pack_end (mode_switch); - Camera.Application.settings.changed["mode"].connect ((key) => { - mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; - }); - - mode_switch.notify["active"].connect (() => { - if (mode_switch.active) { - Camera.Application.settings.set_enum ("mode", Utils.ActionType.VIDEO); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; - take_image.icon_name = VIDEO_ICON_SYMBOLIC; - timer_button.sensitive = false; - } else { - Camera.Application.settings.set_enum ("mode", Utils.ActionType.PHOTO); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - take_image.icon_name = PHOTO_ICON_SYMBOLIC; - timer_button.sensitive = true; - } + /* Use schema nicks for binding. The camera view monitors the mode setting and changes accordingly */ + Camera.Application.settings.bind_with_mapping ("mode", mode_switch, "active", SettingsBindFlags.DEFAULT, + (val, variant, user_data) => { + val.set_boolean (variant.get_string () == "video"); + return true; + }, + (val, expected_type, user_data) => { + if (val.get_boolean ()) { + return new Variant ("s", "video"); + } else { + return new Variant ("s", "photo"); + } + }, + null, null + ); - update_resolution_menu (); - }); + mode_switch.notify ["active"].connect (on_mode_changed); notify["recording"].connect (() => { timer_button.sensitive = !recording && !mode_switch.active; @@ -227,7 +224,7 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { } }); - mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + on_mode_changed (); } public void enable_all_controls (bool enabled) { @@ -287,48 +284,27 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { } private void update_resolution_menu () { + resolution_button.tooltip_text = mode_switch.active ? _("Video capture resolution") : _("Photo capture resolution"); resolution_menu.remove_all (); - if (current_device == null) { + if (current_device == null || current_device.get_caps () == null) { return; } - var caps = current_device.get_caps (); + var caps = current_device.get_caps (); for (uint i = 0; i < caps.get_size (); i++) { unowned var s = caps.get_structure (i); - - bool is_video_cap = s.get_name ().contains ("video"); - if (!is_video_cap) { // If select image cap then preview freezes + if (s.get_name () != (mode_switch.active ? "video/x-raw" : "image/jpeg")) { continue; } - int w, h, num = 0, den = 1; - if (s.get ("width", typeof (int), out w, - "height", typeof (int), out h)) { - - unowned GLib.Value? fraction = s.get_value ("framerate"); - if (fraction.holds (typeof (Gst.Fraction))) { - num = Gst.Value.get_fraction_numerator (fraction); - den = Gst.Value.get_fraction_denominator (fraction); - } else if (fraction.holds (typeof (Gst.FractionRange))) { - var range_max = Gst.Value.get_fraction_range_max (fraction); - num = Gst.Value.get_fraction_numerator (range_max); - den = Gst.Value.get_fraction_denominator (range_max); - } else if (fraction.holds (typeof (Gst.ValueList))) { - unowned GLib.Value? val = Gst.ValueList.get_value (fraction, 0); - num = Gst.Value.get_fraction_numerator (val); - den = Gst.Value.get_fraction_denominator (val); - } else { - warning ("Unknown fraction type: %s", fraction.type_name ()); - continue; - } - } else { - warning ("no resolution in caps"); + int w, h; + double fr = 0.0; + if (Camera.Utils.parse_structure (s, out w, out h, out fr)) { + resolution_menu.append ( + "%d×%d (%0.f fps)".printf (w, h, fr), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); } - - resolution_menu.append ( - "%d×%d (%0.f fps)".printf (w, h, (double)num / (double)den), - GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) - ); } } @@ -343,6 +319,23 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { } } + private void on_mode_changed () { + Idle.add (() => { + update_resolution_menu (); + if (mode_switch.active) { + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; + take_image.icon_name = VIDEO_ICON_SYMBOLIC; + timer_button.sensitive = false; + } else { + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; + take_image.icon_name = PHOTO_ICON_SYMBOLIC; + timer_button.sensitive = true; + } + + return Source.REMOVE; + }); + } + public void start_timeout (int time) { var timeout_reached = time == 0; From 6354aaefa4ccf8a3596ed993472e4771aa543257 Mon Sep 17 00:00:00 2001 From: Jeremy Paul Wootten Date: Tue, 15 Feb 2022 18:57:34 +0000 Subject: [PATCH 04/12] Satisfy linter --- src/Widgets/CameraView.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index b61658726..12c1eff36 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -296,7 +296,7 @@ public class Camera.Widgets.CameraView : Gtk.Stack { try { picture_pipeline = (Gst.Pipeline) Gst.parse_launch ( - VIDEO_SRC_NAME +" device=%s name=%s num-buffers=1 !".printf (device_path, VIDEO_SRC_NAME) + + VIDEO_SRC_NAME + " device=%s name=%s num-buffers=1 !".printf (device_path, VIDEO_SRC_NAME) + "capsfilter name=capsfilter ! " + "decodebin name=decodebin ! " + "videoflip method=%s !".printf (horizontal_flip ? "horizontal-flip" : "none") + From eee467cd1484bbc9766b69a58e3e46731f662531 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Thu, 17 Feb 2022 12:14:26 +0000 Subject: [PATCH 05/12] Remove sequential duplicates in resolution list; fix index 0 ignored --- src/Widgets/CameraView.vala | 5 +++-- src/Widgets/HeaderBar.vala | 24 ++++++++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index 12c1eff36..bd219afde 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -337,6 +337,8 @@ public class Camera.Widgets.CameraView : Gtk.Stack { dynamic Gst.Element capsfilter = preview_pipeline.get_by_name ("capsfilter"); capsfilter.caps = new_caps; } + } else { + critical ("Requested caps index not found %u", index); } } @@ -505,7 +507,7 @@ public class Camera.Widgets.CameraView : Gtk.Stack { private Gst.Caps? get_caps_from_index (int index) { var caps = current_device.get_caps (); - if (caps != null && index > 0 && index < caps.get_size ()) { + if (caps != null && index >= 0 && index < caps.get_size ()) { unowned var s = caps.get_structure (index); var new_caps = new Gst.Caps.empty (); new_caps.append_structure (s.copy ()); @@ -513,7 +515,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { } else { return null; } - } private static void play_shutter_sound () { diff --git a/src/Widgets/HeaderBar.vala b/src/Widgets/HeaderBar.vala index 3625e72d9..3f3c38e9b 100644 --- a/src/Widgets/HeaderBar.vala +++ b/src/Widgets/HeaderBar.vala @@ -290,6 +290,8 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { return; } + int prev_w = 0, prev_h = 0; + double prev_fr = 0.0; var caps = current_device.get_caps (); for (uint i = 0; i < caps.get_size (); i++) { unowned var s = caps.get_structure (i); @@ -300,10 +302,24 @@ public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { int w, h; double fr = 0.0; if (Camera.Utils.parse_structure (s, out w, out h, out fr)) { - resolution_menu.append ( - "%d×%d (%0.f fps)".printf (w, h, fr), - GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) - ); + // Check not duplicate ( for simplicity assume duplicates listed next to each other) + if (w != prev_w || h != prev_h || fr != prev_fr) { + if (mode_switch.active) { // Show framerate for video capture + resolution_menu.append ( + "%d×%d (%0.f fps)".printf (w, h, fr), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); + } else { // Framerate not useful for still image capture + resolution_menu.append ( + "%d×%d".printf (w, h), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); + } + } + + prev_w = w; + prev_h = h; + prev_fr = fr; } } } From 7e3c7cfb001a821c3a1b0868216b2ef8d72b5189 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 10:04:43 +0100 Subject: [PATCH 06/12] Merge master --- meson.build | 1 - po/POTFILES | 1 - po/af.po | 41 ++-- po/ak.po | 41 ++-- po/ar.po | 41 ++-- po/az.po | 41 ++-- po/be.po | 41 ++-- po/bg.po | 41 ++-- po/bn.po | 41 ++-- po/bs.po | 41 ++-- po/ca.po | 41 ++-- po/ckb.po | 79 ++++---- po/cs.po | 41 ++-- po/cv.po | 41 ++-- po/da.po | 41 ++-- po/de.po | 41 ++-- po/el.po | 41 ++-- po/en_AU.po | 41 ++-- po/en_CA.po | 41 ++-- po/en_GB.po | 41 ++-- po/eo.po | 41 ++-- po/es.po | 41 ++-- po/et.po | 41 ++-- po/eu.po | 41 ++-- po/extra/af.po | 2 +- po/extra/ak.po | 2 +- po/extra/ar.po | 2 +- po/extra/az.po | 2 +- po/extra/be.po | 2 +- po/extra/bg.po | 2 +- po/extra/bn.po | 2 +- po/extra/bs.po | 2 +- po/extra/ca.po | 6 +- po/extra/ckb.po | 67 +++--- po/extra/cs.po | 16 +- po/extra/cv.po | 2 +- po/extra/da.po | 2 +- po/extra/de.po | 2 +- po/extra/el.po | 2 +- po/extra/en_AU.po | 2 +- po/extra/en_CA.po | 2 +- po/extra/en_GB.po | 2 +- po/extra/eo.po | 2 +- po/extra/es.po | 2 +- po/extra/et.po | 2 +- po/extra/eu.po | 2 +- po/extra/extra.pot | 2 +- po/extra/fa.po | 2 +- po/extra/fi.po | 2 +- po/extra/fr.po | 6 +- po/extra/fr_CA.po | 2 +- po/extra/ga.po | 2 +- po/extra/gl.po | 2 +- po/extra/he.po | 6 +- po/extra/hi.po | 2 +- po/extra/hr.po | 2 +- po/extra/hu.po | 2 +- po/extra/hy.po | 2 +- po/extra/id.po | 2 +- po/extra/is.po | 2 +- po/extra/it.po | 2 +- po/extra/ja.po | 6 +- po/extra/jv.po | 2 +- po/extra/ka.po | 2 +- po/extra/kn.po | 2 +- po/extra/ko.po | 2 +- po/extra/ku.po | 2 +- po/extra/lb.po | 2 +- po/extra/lg.po | 2 +- po/extra/lt.po | 2 +- po/extra/lv.po | 2 +- po/extra/mg.po | 2 +- po/extra/mk.po | 2 +- po/extra/mn.po | 2 +- po/extra/mo.po | 2 +- po/extra/mr.po | 9 +- po/extra/ms.po | 2 +- po/extra/my.po | 2 +- po/extra/nb.po | 2 +- po/extra/nl.po | 2 +- po/extra/nn.po | 2 +- po/extra/pa.po | 2 +- po/extra/pl.po | 6 +- po/extra/pt.po | 13 +- po/extra/pt_BR.po | 2 +- po/extra/ro.po | 2 +- po/extra/ru.po | 2 +- po/extra/sa.po | 2 +- po/extra/si.po | 2 +- po/extra/sk.po | 16 +- po/extra/sl.po | 2 +- po/extra/sma.po | 2 +- po/extra/sq.po | 2 +- po/extra/sr.po | 2 +- po/extra/sv.po | 2 +- po/extra/szl.po | 2 +- po/extra/ta.po | 2 +- po/extra/te.po | 2 +- po/extra/th.po | 2 +- po/extra/tl.po | 2 +- po/extra/tr.po | 2 +- po/extra/ug.po | 2 +- po/extra/uk.po | 2 +- po/extra/ur.po | 2 +- po/extra/uz.po | 2 +- po/extra/vi.po | 2 +- po/extra/zh.po | 2 +- po/extra/zh_CN.po | 2 +- po/extra/zh_TW.po | 2 +- po/fa.po | 41 ++-- po/fi.po | 41 ++-- po/fr.po | 41 ++-- po/fr_CA.po | 41 ++-- po/ga.po | 41 ++-- po/gl.po | 41 ++-- po/he.po | 41 ++-- po/hi.po | 41 ++-- po/hr.po | 41 ++-- po/hu.po | 41 ++-- po/hy.po | 41 ++-- po/id.po | 41 ++-- po/io.elementary.camera.pot | 41 ++-- po/is.po | 41 ++-- po/it.po | 41 ++-- po/ja.po | 41 ++-- po/jv.po | 41 ++-- po/ka.po | 41 ++-- po/kn.po | 41 ++-- po/ko.po | 41 ++-- po/ku.po | 41 ++-- po/lb.po | 41 ++-- po/lg.po | 41 ++-- po/lt.po | 41 ++-- po/lv.po | 41 ++-- po/mg.po | 41 ++-- po/mk.po | 41 ++-- po/mn.po | 41 ++-- po/mo.po | 41 ++-- po/mr.po | 41 ++-- po/ms.po | 41 ++-- po/my.po | 41 ++-- po/nb.po | 41 ++-- po/nl.po | 41 ++-- po/nn.po | 41 ++-- po/pa.po | 41 ++-- po/pl.po | 41 ++-- po/pt.po | 41 ++-- po/pt_BR.po | 41 ++-- po/ro.po | 41 ++-- po/ru.po | 41 ++-- po/sa.po | 41 ++-- po/si.po | 41 ++-- po/sk.po | 41 ++-- po/sl.po | 41 ++-- po/sma.po | 41 ++-- po/sq.po | 41 ++-- po/sr.po | 41 ++-- po/sv.po | 41 ++-- po/szl.po | 41 ++-- po/ta.po | 41 ++-- po/te.po | 41 ++-- po/th.po | 41 ++-- po/tl.po | 41 ++-- po/tr.po | 41 ++-- po/ug.po | 41 ++-- po/uk.po | 41 ++-- po/ur.po | 41 ++-- po/uz.po | 41 ++-- po/vi.po | 41 ++-- po/zh.po | 41 ++-- po/zh_CN.po | 41 ++-- po/zh_TW.po | 41 ++-- src/MainWindow.vala | 345 +++++++++++++++++++++++++++---- src/Widgets/HeaderBar.vala | 394 ------------------------------------ 174 files changed, 2268 insertions(+), 2297 deletions(-) delete mode 100644 src/Widgets/HeaderBar.vala diff --git a/meson.build b/meson.build index 73c763f0b..e7b45ce74 100644 --- a/meson.build +++ b/meson.build @@ -31,7 +31,6 @@ executable( 'src/MainWindow.vala', 'src/Utils.vala', 'src/Widgets/CameraView.vala', - 'src/Widgets/HeaderBar.vala', 'src/Widgets/TimerButton.vala', config_file, dependencies : [ diff --git a/po/POTFILES b/po/POTFILES index 9d3748d88..1fe2a3ae3 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -2,5 +2,4 @@ src/Application.vala src/MainWindow.vala src/Utils.vala src/Widgets/CameraView.vala -src/Widgets/HeaderBar.vala src/Widgets/TimerButton.vala diff --git a/po/af.po b/po/af.po index a228f10ae..24c2c95ab 100644 --- a/po/af.po +++ b/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2017-07-29 18:22+0000\n" "Last-Translator: ThE OcTuCuBe \n" "Language-Team: Afrikaans \n" "Language-Team: ak (generated) \n" "Language-Team: Arabic \n" "Language-Team: Azerbaijani \n" "Language-Team: LANGUAGE \n" @@ -13,15 +13,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -29,6 +29,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -53,22 +70,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/bg.po b/po/bg.po index a65a1cc65..e60fd926f 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-05-09 01:33+0000\n" "Last-Translator: Daniel Foré \n" "Language-Team: Bulgarian \n" "Language-Team: bn (generated) \n" "Language-Team: Bosnian \n" "Language-Team: Catalan \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" +"PO-Revision-Date: 2022-04-02 06:21+0000\n" +"Last-Translator: Aga Ismael \n" +"Language-Team: Kurdish (Central) \n" +"Language: ckb\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.4.2\n" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" -"X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" -msgstr "" +msgstr "کامێرا" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" -msgstr "" +msgstr "پاشەکەوت کرا لە ڤیدیۆکاندا" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" -msgstr "" +msgstr "بینینی پەڕگە" #: src/MainWindow.vala:99 msgid "Recording failed" -msgstr "" +msgstr "تۆمارکردنی شكستی هێنا" + +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "ئاوێنە" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "ڕوناکی" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "کۆنتراست" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "ڕێکخستنەکان" #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" -msgstr "" +msgstr "هیچ کامێرایەکی پاڵپشتی کراو نەدۆزرایەوە" #: src/Widgets/CameraView.vala:89 msgid "" "Connect a webcam or other supported video device to take photos and video." msgstr "" +"کامێرایەک یان هەر ئامێرێکی تری ڤیدیۆیی پاڵپشتیکراو پەیوەست بکە بۆ چرکاندنی " +"وێنە و ڤیدیۆ." #: src/Widgets/CameraView.vala:152 #, c-format msgid "Connecting to \"%s\"…" -msgstr "" +msgstr "پەیوەستبوون بە \"%s\"…" #. It is possible that there is another camera present that could selected so do not show #. no_device_view #: src/Widgets/CameraView.vala:244 msgid "Unable To View Camera" -msgstr "" +msgstr "نەتوانرا کامێرا ببینرێت" #: src/Widgets/CameraView.vala:413 msgid "Photo taken" -msgstr "" - -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" +msgstr "وێنە چرکێندا" #: src/Widgets/TimerButton.vala:42 msgid "Disabled" -msgstr "" +msgstr "پەکخراو" #. /TRANSLATORS: Seconds in a timer #: src/Widgets/TimerButton.vala:45 #, c-format msgid "%d Sec" msgid_plural "%d Sec" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%d چرکە" +msgstr[1] "%d چرکە" #: src/Widgets/TimerButton.vala:64 msgid "Delay before photo is taken" -msgstr "" +msgstr "دواخستنی چرکاندنی وێنە بە چەند چرکەیەک" #~ msgid "translator-credits" #~ msgstr "" diff --git a/po/cs.po b/po/cs.po index c3e20b996..a9ee52e4c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2022-01-10 00:30+0000\n" "Last-Translator: p-bo \n" "Language-Team: Czech \n" "Language-Team: Danish \n" "Language-Team: German \n" "Language-Team: Greek \n" "Language-Team: English (Australia) \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "No Supported Camera Found" @@ -59,22 +76,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/en_CA.po b/po/en_CA.po index da904139d..d9a322f1d 100644 --- a/po/en_CA.po +++ b/po/en_CA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-06-22 13:00+0000\n" "Last-Translator: Shawn \n" "Language-Team: English (Canada) \n" "Language-Team: English (United Kingdom) \n" "Language-Team: Esperanto \n" "Language-Team: Spanish \n" "Language-Team: Estonian \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "Toetatud kaamerat ei leitud" @@ -60,22 +77,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/eu.po b/po/eu.po index ca8ca887c..819a2a14a 100644 --- a/po/eu.po +++ b/po/eu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2015-12-24 11:24+0000\n" "Last-Translator: Mario Guerriero \n" "Language-Team: Basque \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/extra/af.po b/po/extra/af.po index 2f0ac0259..adb1e0b2d 100644 --- a/po/extra/af.po +++ b/po/extra/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/ak.po b/po/extra/ak.po index 885d0211c..8aa2b0fa9 100644 --- a/po/extra/ak.po +++ b/po/extra/ak.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/ar.po b/po/extra/ar.po index ac779c6ca..9c08e72eb 100644 --- a/po/extra/ar.po +++ b/po/extra/ar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-08-29 12:17+0000\n" "Last-Translator: aalhaif \n" "Language-Team: Arabic \n" "Language-Team: Azerbaijani \n" "Language-Team: Bulgarian \n" "Language-Team: Bosnian \n" -"Language-Team: Catalan " -"\n" +"Language-Team: Catalan \n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/po/extra/ckb.po b/po/extra/ckb.po index 4352c656c..099e3b160 100644 --- a/po/extra/ckb.po +++ b/po/extra/ckb.po @@ -7,62 +7,67 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" -"PO-Revision-Date: 2018-05-27 16:59-0700\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" +"PO-Revision-Date: 2022-04-02 17:29+0000\n" +"Last-Translator: Aga Ismael \n" +"Language-Team: Kurdish (Central) \n" "Language: ckb\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ASCII\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.4.2\n" #: data/io.elementary.camera.appdata.xml.in:9 #: data/io.elementary.camera.desktop.in:4 msgid "Camera" -msgstr "" +msgstr "کامێرا" #: data/io.elementary.camera.appdata.xml.in:10 #: data/io.elementary.camera.desktop.in:5 msgid "Take photos and videos with the camera" -msgstr "" +msgstr "چرکاندن و ڤیدیۆکردنی بە کامێرا" #: data/io.elementary.camera.appdata.xml.in:12 msgid "Camera is a simple app to take photos with a webcam." -msgstr "" +msgstr "کامێرا ئەپێکی سادەیە بۆ چرکاندنی وێنە بە کامێرای کۆمپیتەرەکەت." #: data/io.elementary.camera.appdata.xml.in:17 msgid "New features:" -msgstr "" +msgstr "تایبەمەندییە تازەکان:" #: data/io.elementary.camera.appdata.xml.in:19 msgid "Take a photo or video on secondary-click" -msgstr "" +msgstr "چرکاندنی وێنە یان ڤیدیۆ بە کرتەی لاوەکی" #: data/io.elementary.camera.appdata.xml.in:21 #: data/io.elementary.camera.appdata.xml.in:44 #: data/io.elementary.camera.appdata.xml.in:61 msgid "Fixes:" -msgstr "" +msgstr "چاککراوەکان:" #: data/io.elementary.camera.appdata.xml.in:23 msgid "" "Ensure brightness, contrast, and mirror continue working after taking a photo" msgstr "" +"دڵنیابوونەوە لە کارکردنی درەوشانەوە، کۆنتراست، و ئاوێنە بەردەوامن لە پاش " +"وێنەگرتن" #: data/io.elementary.camera.appdata.xml.in:24 msgid "Wider hardware compatibility (e.g. StarBook Mk V)" -msgstr "" +msgstr "گونجاندنی لەگەڵ ڕەقەکاڵای زیاتر، وەکو (StarBook Mk V)" #: data/io.elementary.camera.appdata.xml.in:26 #: data/io.elementary.camera.appdata.xml.in:35 #: data/io.elementary.camera.appdata.xml.in:49 #: data/io.elementary.camera.appdata.xml.in:65 msgid "Minor updates:" -msgstr "" +msgstr "وردە نوێبوونەوەکان:" #: data/io.elementary.camera.appdata.xml.in:28 msgid "Improved performance and reliability" -msgstr "" +msgstr "باشترکردنی ئەدای کارکردن و پشت پێ بەستنی" #: data/io.elementary.camera.appdata.xml.in:29 #: data/io.elementary.camera.appdata.xml.in:38 @@ -71,71 +76,75 @@ msgstr "" #: data/io.elementary.camera.appdata.xml.in:81 #: data/io.elementary.camera.appdata.xml.in:88 msgid "Updated translations" -msgstr "" +msgstr "نوێکردنەوەی وەرگێڕانەکان" #: data/io.elementary.camera.appdata.xml.in:37 msgid "Update to elementary runtime 6.1" -msgstr "" +msgstr "نوێکردنەوەی بۆ ڕەنتایمی ئێلەمێنتەری ٦.١" #: data/io.elementary.camera.appdata.xml.in:46 msgid "" "Resolve issues with cameras being unavailable when multiple cameras are " "connected" msgstr "" +"چارەسەرکردنی کێشەی بەردەست نەبوونی کامێراکان کاتێک چەند کامێرایەک پەیوەست " +"دەکران بە کۆمپیتەرەوە" #: data/io.elementary.camera.appdata.xml.in:47 msgid "" "Default to a working camera if multiple cameras are connected and one is " "unavailable" msgstr "" +"ئەگەر هاتوو دوو کامێرا پەیوەست کرابوون بە کۆمپیتەرەکە و دانەیەکیان کار " +"نەکات، ئەوا خۆکارانە ئەو کامێرایە کارپێدەکات کە کار دەکات" #: data/io.elementary.camera.appdata.xml.in:57 msgid "Improvements:" -msgstr "" +msgstr "باشترکراوەکان:" #: data/io.elementary.camera.appdata.xml.in:59 msgid "Take full-resolution pictures" -msgstr "" +msgstr "چرکاندنی وێنەی فول دیقە" #: data/io.elementary.camera.appdata.xml.in:63 msgid "Fix restoring window size" -msgstr "" +msgstr "چارەسەری گەڕاندنەوەی قەبارەی پەنجەرە" #: data/io.elementary.camera.appdata.xml.in:74 msgid "Switch between multiple cameras" -msgstr "" +msgstr "گۆڕینی کامێراکان" #: data/io.elementary.camera.appdata.xml.in:75 msgid "Send a notification when recording is finished" -msgstr "" +msgstr "ناردنی ئاگادارکردنەوە کاتیك تۆمارکردنی ڤیدیۆ کۆتایی دێت" #: data/io.elementary.camera.appdata.xml.in:76 msgid "Add option to mirror the camera" -msgstr "" +msgstr "زیادکردنی بژاردە بۆ ئاوێنەکردنی کامێرا" #: data/io.elementary.camera.appdata.xml.in:77 msgid "Add brightness and contrast adjustment" -msgstr "" +msgstr "زیادکردنی ڕێکخستنی ڕووناکی و کۆنتراست" #: data/io.elementary.camera.appdata.xml.in:78 msgid "Support the dark style" -msgstr "" +msgstr "پاڵپشتی کردنی ستایلی تاریک" #: data/io.elementary.camera.appdata.xml.in:79 msgid "Prevent multiple countdown timers from running at the same time" -msgstr "" +msgstr "ڕێگریکردن لە کارکردنی چەند چرکەژمێرێک لە یەک کاتدا" #: data/io.elementary.camera.appdata.xml.in:80 msgid "Improved support for camera hardware" -msgstr "" +msgstr "گەشە بە پاڵپشتی ڕەقەکاڵای کامێرا دراوە" #: data/io.elementary.camera.appdata.xml.in:130 msgid "elementary, Inc." -msgstr "" +msgstr "کۆمپانیای ئێلەمێنتەری هاوپشک." #: data/io.elementary.camera.desktop.in:6 msgid "Photo Booth" -msgstr "" +msgstr "چوارچێوەی وێنە" #: data/io.elementary.camera.desktop.in:8 msgid "io.elementary.camera" @@ -143,4 +152,4 @@ msgstr "" #: data/io.elementary.camera.desktop.in:11 msgid "Photo;Video;Webcam;Camera;Booth;" -msgstr "" +msgstr "وێنە؛ڤیدیۆ؛کامێرای کۆمپیتەر؛کامێرا؛چوارچێوە;" diff --git a/po/extra/cs.po b/po/extra/cs.po index cd3cbf9a3..ff9295cb5 100644 --- a/po/extra/cs.po +++ b/po/extra/cs.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" -"PO-Revision-Date: 2022-01-10 00:30+0000\n" -"Last-Translator: p-bo \n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" +"PO-Revision-Date: 2022-03-02 12:55+0000\n" +"Last-Translator: arnemec \n" "Language-Team: Czech \n" "Language: cs\n" "MIME-Version: 1.0\n" @@ -35,11 +35,11 @@ msgstr "" #: data/io.elementary.camera.appdata.xml.in:17 msgid "New features:" -msgstr "" +msgstr "Nové funkce:" #: data/io.elementary.camera.appdata.xml.in:19 msgid "Take a photo or video on secondary-click" -msgstr "" +msgstr "Kliknutí pravým tlačítkem pořídí fotku nebo nahraje video" #: data/io.elementary.camera.appdata.xml.in:21 #: data/io.elementary.camera.appdata.xml.in:44 @@ -50,11 +50,11 @@ msgstr "Opravy:" #: data/io.elementary.camera.appdata.xml.in:23 msgid "" "Ensure brightness, contrast, and mirror continue working after taking a photo" -msgstr "" +msgstr "Zajištěno, že jas, kontrast a zrcadlení funguje i po pořízení fotky" #: data/io.elementary.camera.appdata.xml.in:24 msgid "Wider hardware compatibility (e.g. StarBook Mk V)" -msgstr "" +msgstr "Širší kompatibilita s hardware (např. StarBook Mk V)" #: data/io.elementary.camera.appdata.xml.in:26 #: data/io.elementary.camera.appdata.xml.in:35 @@ -65,7 +65,7 @@ msgstr "Drobné aktualizace:" #: data/io.elementary.camera.appdata.xml.in:28 msgid "Improved performance and reliability" -msgstr "" +msgstr "Vylepšený výkon a spolehlivost" #: data/io.elementary.camera.appdata.xml.in:29 #: data/io.elementary.camera.appdata.xml.in:38 diff --git a/po/extra/cv.po b/po/extra/cv.po index edb35137c..2854c5cdd 100644 --- a/po/extra/cv.po +++ b/po/extra/cv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/da.po b/po/extra/da.po index 9961b3611..f40cba3d7 100644 --- a/po/extra/da.po +++ b/po/extra/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Danish \n" "Language-Team: German \n" "Language-Team: Greek \n" diff --git a/po/extra/en_AU.po b/po/extra/en_AU.po index bef1eccdd..892fb332e 100644 --- a/po/extra/en_AU.po +++ b/po/extra/en_AU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: English (Australia) \n" "Language-Team: English (Canada) \n" "Language-Team: English (United Kingdom) \n" "Language-Team: Esperanto \n" "Language-Team: Spanish \n" "Language-Team: LANGUAGE \n" diff --git a/po/extra/fa.po b/po/extra/fa.po index 9f128fbf8..0c008bc8b 100644 --- a/po/extra/fa.po +++ b/po/extra/fa.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-09-07 18:23+0000\n" "Last-Translator: Ali Khomami P. \n" "Language-Team: Persian \n" "Language-Team: Finnish \n" -"Language-Team: French " -"\n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/po/extra/fr_CA.po b/po/extra/fr_CA.po index 61db40915..e7af34f04 100644 --- a/po/extra/fr_CA.po +++ b/po/extra/fr_CA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/ga.po b/po/extra/ga.po index f73d2dbbd..0518d5c15 100644 --- a/po/extra/ga.po +++ b/po/extra/ga.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/gl.po b/po/extra/gl.po index 61ec85bcf..755f33e8f 100644 --- a/po/extra/gl.po +++ b/po/extra/gl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Galician \n" -"Language-Team: Hebrew " -"\n" +"Language-Team: Hebrew \n" "Language: he\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/po/extra/hi.po b/po/extra/hi.po index e74b438b1..4e9cb6d9d 100644 --- a/po/extra/hi.po +++ b/po/extra/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Hindi \n" diff --git a/po/extra/hr.po b/po/extra/hr.po index 54859b145..5715444c7 100644 --- a/po/extra/hr.po +++ b/po/extra/hr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-09-07 18:23+0000\n" "Last-Translator: Aleksandar Kovač \n" "Language-Team: Croatian \n" "Language-Team: Hungarian \n" "Language-Team: Indonesian \n" "Language-Team: Italian \n" "Language-Team: Japanese \n" @@ -61,7 +61,7 @@ msgstr "対応機種の増加 (StarBook Mk V など)" #: data/io.elementary.camera.appdata.xml.in:49 #: data/io.elementary.camera.appdata.xml.in:65 msgid "Minor updates:" -msgstr "軽微なアップデート:" +msgstr "そのほかのアップデート:" #: data/io.elementary.camera.appdata.xml.in:28 msgid "Improved performance and reliability" diff --git a/po/extra/jv.po b/po/extra/jv.po index 9201cb2db..a31ea5a96 100644 --- a/po/extra/jv.po +++ b/po/extra/jv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/ka.po b/po/extra/ka.po index 5bfad0d57..e9b261509 100644 --- a/po/extra/ka.po +++ b/po/extra/ka.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/kn.po b/po/extra/kn.po index 2d8587ca0..42e1b7f65 100644 --- a/po/extra/kn.po +++ b/po/extra/kn.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-27 16:59-0700\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" diff --git a/po/extra/ko.po b/po/extra/ko.po index 3096adf83..18e4c6277 100644 --- a/po/extra/ko.po +++ b/po/extra/ko.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Korean \n" "Language-Team: Kurdish \n" "Language-Team: Lithuanian \n" -"Language-Team: Marathi " -"\n" +"Language-Team: Marathi \n" "Language: mr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -50,8 +50,7 @@ msgstr "निराकारणे:" #: data/io.elementary.camera.appdata.xml.in:23 msgid "" "Ensure brightness, contrast, and mirror continue working after taking a photo" -msgstr "" -"फोटो घेतल्यानंतर ब्राइटनेस, कॉन्ट्रास्ट आणि मिरर काम करत असल्याची खात्री करा" +msgstr "फोटो घेतल्यानंतर ब्राइटनेस, कॉन्ट्रास्ट आणि मिरर काम करत असल्याची खात्री करा" #: data/io.elementary.camera.appdata.xml.in:24 msgid "Wider hardware compatibility (e.g. StarBook Mk V)" diff --git a/po/extra/ms.po b/po/extra/ms.po index 33f6cb9c7..5bf3afcfb 100644 --- a/po/extra/ms.po +++ b/po/extra/ms.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-09-07 18:23+0000\n" "Last-Translator: Daniel Foré \n" "Language-Team: Malay \n" diff --git a/po/extra/my.po b/po/extra/my.po index eefa985ab..73bca6a67 100644 --- a/po/extra/my.po +++ b/po/extra/my.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-05-09 01:33+0000\n" "Last-Translator: Daniel Foré \n" "Language-Team: Burmese \n" "Language-Team: Norwegian Bokmål \n" "Language-Team: Dutch \n" diff --git a/po/extra/nn.po b/po/extra/nn.po index 0745a1c8f..a7c3f64ee 100644 --- a/po/extra/nn.po +++ b/po/extra/nn.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Norwegian Nynorsk \n" "Language-Team: Punjabi \n" -"Language-Team: Polish " -"\n" +"Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/po/extra/pt.po b/po/extra/pt.po index 4e7ad74d5..687cd7b56 100644 --- a/po/extra/pt.po +++ b/po/extra/pt.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" -"PO-Revision-Date: 2021-12-21 19:33+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" +"PO-Revision-Date: 2022-04-30 20:13+0000\n" "Last-Translator: Hugo Carvalho \n" "Language-Team: Portuguese \n" @@ -35,11 +35,11 @@ msgstr "A câmara é uma aplicação simples para tirar fotos com uma webcam." #: data/io.elementary.camera.appdata.xml.in:17 msgid "New features:" -msgstr "" +msgstr "Novas funcionalidades:" #: data/io.elementary.camera.appdata.xml.in:19 msgid "Take a photo or video on secondary-click" -msgstr "" +msgstr "Tirar foto ou video com um clique secundário" #: data/io.elementary.camera.appdata.xml.in:21 #: data/io.elementary.camera.appdata.xml.in:44 @@ -51,10 +51,11 @@ msgstr "Correções:" msgid "" "Ensure brightness, contrast, and mirror continue working after taking a photo" msgstr "" +"Garante que o brilho, contraste e reflexão se mantenha depois de tirar foto" #: data/io.elementary.camera.appdata.xml.in:24 msgid "Wider hardware compatibility (e.g. StarBook Mk V)" -msgstr "" +msgstr "Maior compatibilidade de hardware (por exemplo, StarBook Mk V)" #: data/io.elementary.camera.appdata.xml.in:26 #: data/io.elementary.camera.appdata.xml.in:35 @@ -65,7 +66,7 @@ msgstr "Pequenas atualizações:" #: data/io.elementary.camera.appdata.xml.in:28 msgid "Improved performance and reliability" -msgstr "" +msgstr "Melhoria de performance e robustez" #: data/io.elementary.camera.appdata.xml.in:29 #: data/io.elementary.camera.appdata.xml.in:38 diff --git a/po/extra/pt_BR.po b/po/extra/pt_BR.po index c436e5b0f..9c12e78dd 100644 --- a/po/extra/pt_BR.po +++ b/po/extra/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Portuguese (Brazil) \n" "Language-Team: Russian \n" "Language-Team: Sinhala \n" "Language-Team: Slovak \n" @@ -37,11 +37,11 @@ msgstr "" #: data/io.elementary.camera.appdata.xml.in:17 msgid "New features:" -msgstr "" +msgstr "Nové funkcie:" #: data/io.elementary.camera.appdata.xml.in:19 msgid "Take a photo or video on secondary-click" -msgstr "" +msgstr "Odfotiť alebo nahrať video kliknutím sekundárneho tlačidla myši" #: data/io.elementary.camera.appdata.xml.in:21 #: data/io.elementary.camera.appdata.xml.in:44 @@ -53,10 +53,12 @@ msgstr "Opravy:" msgid "" "Ensure brightness, contrast, and mirror continue working after taking a photo" msgstr "" +"Zaistené, že možnosti zmeny jasu, kontrastu a zrkadlenia budú fungovať aj po " +"vytvorení fotky" #: data/io.elementary.camera.appdata.xml.in:24 msgid "Wider hardware compatibility (e.g. StarBook Mk V)" -msgstr "" +msgstr "Širšia kompatibilita s hardvérom (napr. StarBook Mk V)" #: data/io.elementary.camera.appdata.xml.in:26 #: data/io.elementary.camera.appdata.xml.in:35 @@ -67,7 +69,7 @@ msgstr "Menšie aktualizácie:" #: data/io.elementary.camera.appdata.xml.in:28 msgid "Improved performance and reliability" -msgstr "" +msgstr "Vylepšený výkon a spoľahlivosť" #: data/io.elementary.camera.appdata.xml.in:29 #: data/io.elementary.camera.appdata.xml.in:38 @@ -80,7 +82,7 @@ msgstr "Aktualizované preklady" #: data/io.elementary.camera.appdata.xml.in:37 msgid "Update to elementary runtime 6.1" -msgstr "" +msgstr "Behové prostredie elementary aktualizované na verziu 6.1" #: data/io.elementary.camera.appdata.xml.in:46 msgid "" diff --git a/po/extra/sl.po b/po/extra/sl.po index 80d6e211c..187c5ea02 100644 --- a/po/extra/sl.po +++ b/po/extra/sl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-22 11:25+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Slovenian \n" "Language-Team: Serbian \n" "Language-Team: Swedish \n" "Language-Team: Silesian \n" "Language-Team: Tagalog \n" "Language-Team: Turkish \n" "Language-Team: Ukrainian \n" "Language-Team: Uzbek \n" diff --git a/po/extra/vi.po b/po/extra/vi.po index 5eadf03cb..ac8894712 100644 --- a/po/extra/vi.po +++ b/po/extra/vi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: extra\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-05-09 01:33+0000\n" "Last-Translator: Daniel Foré \n" "Language-Team: Vietnamese \n" "Language-Team: Chinese \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional) \n" "Language-Team: Persian \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/fi.po b/po/fi.po index 398d290ff..428afe260 100644 --- a/po/fi.po +++ b/po/fi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-07 08:27+0000\n" "Last-Translator: Jiri Grönroos \n" "Language-Team: Finnish \n" "Language-Team: French \n" "Language-Team: French (Canada) \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/ga.po b/po/ga.po index ccadd7271..92e974d7e 100644 --- a/po/ga.po +++ b/po/ga.po @@ -1,19 +1,19 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -21,6 +21,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -45,22 +62,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/gl.po b/po/gl.po index ddc7a279e..8bbf623d8 100644 --- a/po/gl.po +++ b/po/gl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2019-12-09 19:25+0000\n" "Last-Translator: Daniel R. \n" "Language-Team: Galician \n" "Language-Team: Hebrew \n" "Language-Team: Hindi \n" "Language-Team: Croatian \n" "Language-Team: Hungarian \n" "Language-Team: LANGUAGE \n" @@ -13,15 +13,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -29,6 +29,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -53,22 +70,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/id.po b/po/id.po index e8db23227..8e2b238fb 100644 --- a/po/id.po +++ b/po/id.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2020-11-18 14:15+0000\n" "Last-Translator: deovaliandro \n" "Language-Team: Indonesian \n" "Language-Team: LANGUAGE \n" @@ -18,15 +18,15 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/is.po b/po/is.po index e4a8a9302..c05d5f555 100644 --- a/po/is.po +++ b/po/is.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2015-12-21 14:30+0000\n" "Last-Translator: Launchpad Translations Administrators \n" "Language-Team: Icelandic \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/it.po b/po/it.po index 378a7be21..ac41a3e0d 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2020-10-23 17:15+0000\n" "Last-Translator: Fabio Zaramella \n" "Language-Team: Italian \n" "Language-Team: Japanese \n" "Language-Team: LANGUAGE \n" @@ -13,15 +13,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -29,6 +29,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -53,22 +70,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/kn.po b/po/kn.po index ccadd7271..92e974d7e 100644 --- a/po/kn.po +++ b/po/kn.po @@ -1,19 +1,19 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -21,6 +21,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -45,22 +62,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/ko.po b/po/ko.po index 6445567fd..7173f5a2d 100644 --- a/po/ko.po +++ b/po/ko.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-06-28 00:09+0000\n" "Last-Translator: Jung-Kyu Park \n" "Language-Team: Korean \n" "Language-Team: Kurdish \n" "Language-Team: LANGUAGE \n" @@ -13,15 +13,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -29,6 +29,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -53,22 +70,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/lg.po b/po/lg.po index 24372c6ba..3234e37a2 100644 --- a/po/lg.po +++ b/po/lg.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-01-20 19:39+0000\n" "Last-Translator: Laurence Bahiirwa \n" "Language-Team: Ganda \n" "Language-Team: Lithuanian \n" "Language-Team: Latvian \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/mg.po b/po/mg.po index ccadd7271..92e974d7e 100644 --- a/po/mg.po +++ b/po/mg.po @@ -1,19 +1,19 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -21,6 +21,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -45,22 +62,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/mk.po b/po/mk.po index ccadd7271..92e974d7e 100644 --- a/po/mk.po +++ b/po/mk.po @@ -1,19 +1,19 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -21,6 +21,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -45,22 +62,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/mn.po b/po/mn.po index ccadd7271..92e974d7e 100644 --- a/po/mn.po +++ b/po/mn.po @@ -1,19 +1,19 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -21,6 +21,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -45,22 +62,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/mo.po b/po/mo.po index 617f939c1..8bae02f5f 100644 --- a/po/mo.po +++ b/po/mo.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-05-30 17:26+0000\n" "Last-Translator: Romanic Ion Nicușor \n" "Language-Team: Moldovan \n" "Language-Team: Marathi \n" "Language-Team: Malay \n" "Language-Team: Burmese \n" "Language-Team: Norwegian Bokmål \n" "Language-Team: Dutch \n" "Language-Team: Norwegian Nynorsk \n" "Language-Team: Punjabi 1;\n" "X-Generator: Weblate 4.4.2\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "ਕੈਮਰਾ" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "ਵਿਡੀਓਜ਼ ਵਿੱਚ ਸਾਂਭੋ" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "ਫ਼ਾਇਲ ਵੇਖੋ" @@ -35,6 +35,23 @@ msgstr "ਫ਼ਾਇਲ ਵੇਖੋ" msgid "Recording failed" msgstr "ਰਿਕਾਰਡਿੰਗ ਨਾਕਾਮ ਰਹੀ" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "ਸ਼ੀਸ਼ਾ" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "ਚਮਕ" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "ਰੰਗਾਂ ਦਾ ਉੱਘੜਵਾਂਪਣ" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "ਸੈਟਿੰਗਾਂ" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "ਕੋਈ ਸਮਰੱਥ ਕੈਮਰਾ ਨਹੀਂ ਮਿਲਿਆ" @@ -59,22 +76,6 @@ msgstr "ਕੈਮਰਾ ਵੇਖਣ ਵਿੱਚ ਅਸਮਰੱਥ" msgid "Photo taken" msgstr "ਤਸਵੀਰ ਖਿੱਚੀ ਗਈ" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "ਸ਼ੀਸ਼ਾ" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "ਚਮਕ" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "ਰੰਗਾਂ ਦਾ ਉੱਘੜਵਾਂਪਣ" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "ਸੈਟਿੰਗਾਂ" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "ਬੰਦ ਕੀਤਾ ਹੋਇਐ" diff --git a/po/pl.po b/po/pl.po index ac4859459..60cde6fca 100644 --- a/po/pl.po +++ b/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-09-30 11:05+0000\n" "Last-Translator: jasiosasio \n" "Language-Team: Polish \n" "Language-Team: Portuguese \n" "Language-Team: Portuguese (Brazil) \n" "Language-Team: Romanian \n" "Language-Team: Russian \n" "Language-Team: Sinhala \n" "Language-Team: Slovak \n" "Language-Team: Slovenian \n" "Language-Team: LANGUAGE \n" @@ -13,15 +13,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -29,6 +29,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -53,22 +70,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/sq.po b/po/sq.po index d5498d285..9df4dbc99 100644 --- a/po/sq.po +++ b/po/sq.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2015-12-21 14:30+0000\n" "Last-Translator: Launchpad Translations Administrators \n" "Language-Team: Albanian \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "Nuk u gjetën kamera të përballuara" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/sr.po b/po/sr.po index 98636ca2b..5bd4f6212 100644 --- a/po/sr.po +++ b/po/sr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2020-12-19 10:16+0000\n" "Last-Translator: Мирослав Николић \n" "Language-Team: Serbian \n" "Language-Team: Swedish \n" "Language-Team: Silesian =20) ? 1 : 2;\n" "X-Generator: Weblate 3.9.1\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "Kamera" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -30,6 +30,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "Niy szło znojś żodnyj spiyranyj kamery" @@ -57,22 +74,6 @@ msgstr "" msgid "Photo taken" msgstr "Zrobiōno fotografijo" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "Zastawiōny" diff --git a/po/ta.po b/po/ta.po index 35b0885a4..f08c0b17e 100644 --- a/po/ta.po +++ b/po/ta.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2015-12-21 14:30+0000\n" "Last-Translator: Launchpad Translations Administrators \n" "Language-Team: Tamil \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/te.po b/po/te.po index 41926a12f..feb7ee39f 100644 --- a/po/te.po +++ b/po/te.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2015-12-21 14:30+0000\n" "Last-Translator: Launchpad Translations Administrators \n" "Language-Team: LANGUAGE \n" @@ -13,15 +13,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -29,6 +29,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -53,22 +70,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/th.po b/po/th.po index 5bc4fdee5..d75ac5079 100644 --- a/po/th.po +++ b/po/th.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2016-05-15 13:01+0000\n" "Last-Translator: Jeerapat Sripumngoen \n" "Language-Team: Thai \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/tl.po b/po/tl.po index 9f9da1937..be6f8fa8c 100644 --- a/po/tl.po +++ b/po/tl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2018-09-24 00:04+0000\n" "Last-Translator: Axel Philip Advento \n" "Language-Team: Tagalog \n" "Language-Team: Turkish \n" "Language-Team: Uyghur \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-22 08:32+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "" @@ -58,22 +75,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/uk.po b/po/uk.po index 8c0557b1e..3250da712 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pantheon-camera\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-07-06 18:43+0000\n" "Last-Translator: Ihor Hordiichuk \n" "Language-Team: Ukrainian \n" "Language-Team: Urdu \n" @@ -18,15 +18,15 @@ msgstr "" "X-Launchpad-Export-Date: 2016-09-24 06:53+0000\n" "X-Generator: Launchpad (build 18204)\n" -#: src/MainWindow.vala:63 +#: src/MainWindow.vala:77 msgid "Camera" msgstr "" -#: src/MainWindow.vala:83 +#: src/MainWindow.vala:84 msgid "Saved to Videos" msgstr "" -#: src/MainWindow.vala:84 +#: src/MainWindow.vala:85 msgid "View File" msgstr "" @@ -34,6 +34,23 @@ msgstr "" msgid "Recording failed" msgstr "" +#. Construct AppMenu +#: src/MainWindow.vala:185 +msgid "Mirror" +msgstr "" + +#: src/MainWindow.vala:191 +msgid "Brightness" +msgstr "" + +#: src/MainWindow.vala:204 +msgid "Contrast" +msgstr "" + +#: src/MainWindow.vala:248 +msgid "Settings" +msgstr "" + #: src/Widgets/CameraView.vala:88 msgid "No Supported Camera Found" msgstr "کوئی معاون کردہ کیمرہ نہیں ملا" @@ -60,22 +77,6 @@ msgstr "" msgid "Photo taken" msgstr "" -#: src/Widgets/HeaderBar.vala:89 -msgid "Mirror" -msgstr "" - -#: src/Widgets/HeaderBar.vala:93 -msgid "Brightness" -msgstr "" - -#: src/Widgets/HeaderBar.vala:99 -msgid "Contrast" -msgstr "" - -#: src/Widgets/HeaderBar.vala:153 -msgid "Settings" -msgstr "" - #: src/Widgets/TimerButton.vala:42 msgid "Disabled" msgstr "" diff --git a/po/uz.po b/po/uz.po index 89af90394..54833301f 100644 --- a/po/uz.po +++ b/po/uz.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-08 00:02+0000\n" +"POT-Creation-Date: 2022-04-30 20:14+0000\n" "PO-Revision-Date: 2021-03-21 21:15+0000\n" "Last-Translator: Shukrullo Turgunov \n" "Language-Team: Uzbek \n" "Language-Team: Vietnamese \n" "Language-Team: Chinese \n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional) { - if (event.button == Gdk.BUTTON_SECONDARY) { - header_bar.take_button.activate (); - - return Gdk.EVENT_STOP; - } - - return base.button_press_event (event); - }); - - var overlay = new Gtk.Overlay (); - overlay.add (camera_view); + camera_view.camera_added.connect (add_camera_option); + camera_view.camera_removed.connect (remove_camera_option); var recording_finished_toast = new Granite.Widgets.Toast (_("Saved to Videos")); recording_finished_toast.set_default_action (_("View File")); @@ -96,22 +97,16 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { warning ("Error launching file manager: %s", e.message); } }); - overlay.add_overlay (recording_finished_toast); var recording_finished_fail_toast = new Granite.Widgets.Toast (_("Recording failed")); - overlay.add_overlay (recording_finished_fail_toast); - camera_view.recording_finished.connect ((file_path) => { - if (file_path == "") { - recording_finished_fail_toast.send_notification (); - } else { - recording_finished_toast.set_data ("location", file_path); - recording_finished_toast.send_notification (); - } - }); + var overlay = new Gtk.Overlay (); + overlay.add (camera_view); + overlay.add_overlay (recording_finished_toast); + overlay.add_overlay (recording_finished_fail_toast); var window_handle = new Hdy.WindowHandle (); - window_handle.add (header_bar); + window_handle.add (construct_headerbar ()); var grid = new Gtk.Grid (); grid.attach (window_handle, 0, 0); @@ -119,15 +114,187 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { add (grid); - timer_running = false; - camera_view.camera_added.connect (header_bar.add_camera_option); - camera_view.camera_removed.connect (header_bar.remove_camera_option); + camera_view.recording_finished.connect ((file_path) => { + if (file_path == "") { + recording_finished_fail_toast.send_notification (); + } else { + recording_finished_toast.set_data ("location", file_path); + recording_finished_toast.send_notification (); + } + }); + camera_view.start (); + } - header_bar.request_camera_change.connect (camera_view.change_camera); + /* This function copies (with some reordering/reformating) the construct clause of Camera.Widgets.HeaderBar */ + private Gtk.HeaderBar construct_headerbar () { + timer_button = new Widgets.TimerButton () { + image = new Gtk.Image.from_icon_name ("timer-symbolic", Gtk.IconSize.SMALL_TOOLBAR) + }; + + /* Construct take photo/video tool */ + take_image = new Gtk.Image () { + icon_name = PHOTO_ICON_SYMBOLIC, + icon_size = Gtk.IconSize.BUTTON + }; + take_timer_label = new Gtk.Label (null); + + video_timer_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT + }; + video_timer_revealer.add (take_timer_label); + + var take_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { + halign = Gtk.Align.CENTER + }; + take_box.pack_start (take_image); + take_box.pack_start (video_timer_revealer); + + take_button = new Gtk.Button () { + action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO, + width_request = 54 + }; + take_button.add (take_box); + var take_button_style_provider = new Gtk.CssProvider (); + take_button_style_provider.load_from_resource ("/io/elementary/camera/application.css"); + unowned Gtk.StyleContext take_button_style_context = take_button.get_style_context (); + take_button_style_context.add_provider (take_button_style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + take_button_style_context.add_class ("take-button"); + take_button_style_context.add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); + + /* Construct mode switch */ + mode_switch = new Granite.ModeSwitch.from_icon_name (PHOTO_ICON_SYMBOLIC, VIDEO_ICON_SYMBOLIC) { + valign = Gtk.Align.CENTER + }; + mode_switch.notify["active"].connect (() => { + if (mode_switch.active) { + Camera.Application.settings.set_enum ("mode", Utils.ActionType.VIDEO); + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; + take_image.icon_name = VIDEO_ICON_SYMBOLIC; + timer_button.sensitive = false; + } else { + Camera.Application.settings.set_enum ("mode", Utils.ActionType.PHOTO); + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; + take_image.icon_name = PHOTO_ICON_SYMBOLIC; + timer_button.sensitive = true; + } + }); + Camera.Application.settings.changed["mode"].connect ((key) => { + mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + }); + mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + + /* Construct AppMenu */ + var mirror_switch = new Granite.SwitchModelButton (_("Mirror")); + mirror_switch.bind_property ( + "active", camera_view, "horizontal-flip", GLib.BindingFlags.BIDIRECTIONAL + ); + + var brightness_image = new Gtk.Image.from_icon_name ("display-brightness-symbolic", Gtk.IconSize.MENU); + var brightness_label = new Gtk.Label (_("Brightness")) { + hexpand = true, + xalign = 0 + }; + var brightness_scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, -1, 1, 0.1) { + draw_value = false, + hexpand = true, + margin_bottom = 6 + }; + brightness_scale.set_value (0); + brightness_scale.add_mark (0, Gtk.PositionType.BOTTOM, ""); + + var contrast_image = new Gtk.Image.from_icon_name ("color-contrast-symbolic", Gtk.IconSize.MENU); + var contrast_label = new Gtk.Label (_("Contrast")) { + hexpand = true, + xalign = 0 + }; + var contrast_scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 2, 0.1) { + draw_value = false, + hexpand = false + }; + contrast_scale.set_value (1); + contrast_scale.add_mark (1, Gtk.PositionType.BOTTOM, ""); + + contrast_scale.value_changed.connect (() => { + camera_view.change_color_balance (brightness_scale.get_value (), contrast_scale.get_value ()); + }); + brightness_scale.value_changed.connect (() => { + camera_view.change_color_balance (brightness_scale.get_value (), contrast_scale.get_value ()); + }); - camera_view.start (); + var image_settings = new Gtk.Grid () { + column_spacing = 6, + row_spacing = 3, + margin = 12 + }; + image_settings.attach (brightness_image, 0, 0); + image_settings.attach (brightness_label, 1, 0); + image_settings.attach (brightness_scale, 0, 1, 2); + image_settings.attach (contrast_image, 0, 2); + image_settings.attach (contrast_label, 1, 2); + image_settings.attach (contrast_scale, 0, 3, 2); + + var menu_popover_grid = new Gtk.Grid () { + width_request = 250, + margin_bottom = 3 + }; + menu_popover_grid.attach (image_settings, 0, 0); + menu_popover_grid.attach (mirror_switch, 0, 1); + menu_popover_grid.show_all (); + + var popover = new Gtk.Popover (null); + popover.add (menu_popover_grid); + + menu_button = new Gtk.MenuButton () { + image = new Gtk.Image.from_icon_name ("open-menu-symbolic", Gtk.IconSize.MENU), + popover = popover, + tooltip_text = _("Settings") + }; + + /* Construct menu for multiple cameras */ + camera_options = new Gtk.Menu (); + var camera_menu_button = new Gtk.MenuButton () { + popup = camera_options + }; + unowned Gtk.StyleContext camera_menu_button_style_context = camera_menu_button.get_style_context (); + camera_menu_button_style_context.add_provider (take_button_style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + camera_menu_button_style_context.add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); + camera_menu_button_style_context.add_class ("camera-menu"); + + camera_menu_revealer = new Gtk.Revealer () { + transition_duration = 250, + transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT + }; + camera_menu_revealer.add (camera_menu_button); + + linked_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); + linked_box.pack_start (take_button); + linked_box.pack_start (camera_menu_revealer); + + /* Pack tools into HeaderBar */ + var header_widget = new Gtk.HeaderBar () { + show_close_button = true, // Gtk4 -> show_title_buttons = true, + custom_title = linked_box // Gtk4 -> title_widget = linked_box + }; + header_widget.get_style_context ().add_class (Gtk.STYLE_CLASS_TITLEBAR); + header_widget.pack_start (timer_button); + header_widget.pack_end (menu_button); + header_widget.pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); + header_widget.pack_end (mode_switch); + + notify["recording"].connect (() => { + timer_button.sensitive = !recording && !mode_switch.active; + mode_switch.sensitive = !recording; + video_timer_revealer.reveal_child = recording; + + if (recording) { + take_image.icon_name = STOP_ICON_SYMBOLIC; + } else { + take_image.icon_name = VIDEO_ICON_SYMBOLIC; + } + }); - header_bar.request_change_balance.connect (camera_view.change_color_balance); + enable_header (true); + return header_widget; } private void on_fullscreen () { @@ -143,8 +310,8 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { return; } - var delay = header_bar.timer_delay; - header_bar.start_timeout (delay); + var delay = timer_button.delay; + start_timeout (delay); timer_running = true; GLib.Timeout.add_seconds (delay, () => { @@ -157,11 +324,11 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { private void on_record (GLib.SimpleAction action, GLib.Variant? parameter) { if (action.state.get_boolean ()) { camera_view.stop_recording (); - header_bar.stop_recording_time (); + stop_recording_time (); action.set_state (new Variant.boolean (false)); } else { camera_view.start_recording (); - header_bar.start_recording_time (); + start_recording_time (); action.set_state (new Variant.boolean (true)); } } @@ -195,4 +362,104 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { return base.configure_event (event); } + + /** Header bar tools management functions from Camera.Widgets.HeaderBar **/ + + private void enable_header (bool enable) { + linked_box.sensitive = enable; + mode_switch.sensitive = enable; + menu_button.sensitive = enable; + timer_button.sensitive = enable; + } + + private void add_camera_option (Gst.Device camera) { + var menuitem = new Gtk.RadioMenuItem.with_label (null, camera.display_name); + menuitem.set_data ("camera", camera); + camera_options.append (menuitem); + + int i = (int) camera_options.get_children ().length () - 1; + if (i > 0) { + var el = camera_options.get_children ().nth_data (0) as Gtk.RadioMenuItem; + menuitem.join_group (el); + } + menuitem.active = true; + menuitem.activate.connect (() => { + if (menuitem.active) { + camera_view.change_camera (menuitem.get_data ("camera")); + } + }); + menuitem.show (); + + update_take_button (); + enable_header (true); + } + + private void remove_camera_option (Gst.Device camera) { + Gtk.Widget to_remove = null; + foreach (unowned Gtk.Widget menuitem in camera_options.get_children ()) { + var name = ((Gtk.MenuItem) menuitem).get_data ("camera").name; + if (name == camera.name) { + to_remove = menuitem; + break; + } + } + + if (to_remove != null) { + camera_options.remove (to_remove); + } + + update_take_button (); + enable_header (camera_options.get_children ().length () > 0); + } + + private void update_take_button () { + unowned Gtk.StyleContext take_button_style_context = take_button.get_style_context (); + if (camera_options.get_children ().length () > 1) { + camera_menu_revealer.reveal_child = true; + take_button_style_context.add_class ("multiple"); + } else { + camera_menu_revealer.reveal_child = false; + take_button_style_context.remove_class ("multiple"); + } + } + + private void start_timeout (int time) { + var timeout_reached = time == 0; + + mode_switch.sensitive = timeout_reached; + take_image.visible = timeout_reached; + timer_button.sensitive = timeout_reached; + video_timer_revealer.reveal_child = !timeout_reached; + + if (!timeout_reached) { + take_timer_label.label = time.to_string (); + + Timeout.add_seconds (1, () => { + start_timeout (time - 1); + return GLib.Source.REMOVE; + }); + } + } + + private uint recording_timeout = 0U; + private void start_recording_time () { + recording = true; + int seconds = 0; + take_timer_label.label = Granite.DateTime.seconds_to_time (seconds); + + recording_timeout = Timeout.add_seconds (1, () => { + seconds++; + take_timer_label.label = Granite.DateTime.seconds_to_time (seconds); + return GLib.Source.CONTINUE; + }); + } + + private void stop_recording_time () { + recording = false; + if (recording_timeout > 0) { + GLib.Source.remove (recording_timeout); + } + + recording_timeout = 0U; + } } diff --git a/src/Widgets/HeaderBar.vala b/src/Widgets/HeaderBar.vala deleted file mode 100644 index 3f3c38e9b..000000000 --- a/src/Widgets/HeaderBar.vala +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Copyright (c) 2011-2019 elementary, inc. (https://elementary.io) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301 USA. - * - * Authored by: Marcus Wichelmann - * Corentin Noël - */ - -public class Camera.Widgets.HeaderBar : Gtk.HeaderBar { - public signal void request_change_balance (double brightness, double contrast); - - public Gtk.Button take_button; - - private const string PHOTO_ICON_SYMBOLIC = "view-list-images-symbolic"; - private const string VIDEO_ICON_SYMBOLIC = "view-list-video-symbolic"; - private const string STOP_ICON_SYMBOLIC = "media-playback-stop-symbolic"; - - private Widgets.TimerButton timer_button; - private Gtk.Revealer video_timer_revealer; - private Gtk.Label take_timer; - private Gtk.Box linked_box; - private Gtk.MenuButton camera_menu_button; - private Gtk.MenuButton menu_button; - private Gtk.Revealer camera_menu_revealer; - private Gtk.Menu camera_options; - private GLib.Menu resolution_menu; - private Gtk.MenuButton resolution_button; - private Gtk.Image take_image; - private Granite.ModeSwitch mode_switch; - private Gst.Device? current_device = null; - - public bool recording { get; set; default = false; } - public bool horizontal_flip { get; set; default = true; } - - public signal void request_camera_change (Gst.Device camera); - - public int timer_delay { - get { - return timer_button.delay; - } - } - - construct { - timer_button = new Widgets.TimerButton (); - timer_button.image = new Gtk.Image.from_icon_name ("timer-symbolic", Gtk.IconSize.SMALL_TOOLBAR); - - take_image = new Gtk.Image (); - take_image.icon_name = PHOTO_ICON_SYMBOLIC; - take_image.icon_size = Gtk.IconSize.BUTTON; - - take_timer = new Gtk.Label (null); - - video_timer_revealer = new Gtk.Revealer (); - video_timer_revealer.transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT; - video_timer_revealer.add (take_timer); - - var take_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - take_box.halign = Gtk.Align.CENTER; - take_box.pack_start (take_image); - take_box.pack_start (video_timer_revealer); - - take_button = new Gtk.Button (); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - take_button.width_request = 54; - take_button.add (take_box); - - var take_button_style_provider = new Gtk.CssProvider (); - take_button_style_provider.load_from_resource ("/io/elementary/camera/application.css"); - - unowned Gtk.StyleContext take_button_style_context = take_button.get_style_context (); - take_button_style_context.add_provider (take_button_style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - take_button_style_context.add_class ("take-button"); - take_button_style_context.add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); - - mode_switch = new Granite.ModeSwitch.from_icon_name (PHOTO_ICON_SYMBOLIC, VIDEO_ICON_SYMBOLIC); - mode_switch.valign = Gtk.Align.CENTER; - - var mirror_switch = new Granite.SwitchModelButton (_("Mirror")); - mirror_switch.bind_property ("active", this, "horizontal-flip", GLib.BindingFlags.BIDIRECTIONAL); - - var brightness_image = new Gtk.Image.from_icon_name ("display-brightness-symbolic", Gtk.IconSize.MENU); - var brightness_label = new Gtk.Label (_("Brightness")) { - hexpand = true, - xalign = 0 - }; - - var contrast_image = new Gtk.Image.from_icon_name ("color-contrast-symbolic", Gtk.IconSize.MENU); - var constrast_label = new Gtk.Label (_("Contrast")) { - hexpand = true, - xalign = 0 - }; - - var brightness_scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, -1, 1, 0.1) { - draw_value = false, - hexpand = true, - margin_bottom = 6 - }; - brightness_scale.set_value (0); - brightness_scale.add_mark (0, Gtk.PositionType.BOTTOM, ""); - - var contrast_scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 2, 0.1) { - draw_value = false, - hexpand = false - }; - contrast_scale.set_value (1); - contrast_scale.add_mark (1, Gtk.PositionType.BOTTOM, ""); - - brightness_scale.value_changed.connect (() => { - request_change_balance (brightness_scale.get_value (), contrast_scale.get_value ()); - }); - - contrast_scale.value_changed.connect (() => { - request_change_balance (brightness_scale.get_value (), contrast_scale.get_value ()); - }); - - var image_settings = new Gtk.Grid () { - column_spacing = 6, - row_spacing = 3, - margin = 12 - }; - - resolution_menu = new GLib.Menu (); - resolution_button = new Gtk.MenuButton () { - image = new Gtk.Image.from_icon_name ("preferences-desktop-display-symbolic", Gtk.IconSize.MENU), - }; - resolution_button.set_menu_model (resolution_menu); - - image_settings.attach (brightness_image, 0, 0); - image_settings.attach (brightness_label, 1, 0); - image_settings.attach (brightness_scale, 0, 1, 2); - image_settings.attach (contrast_image, 0, 2); - image_settings.attach (constrast_label, 1, 2); - image_settings.attach (contrast_scale, 0, 3, 2); - - var menu_popover_grid = new Gtk.Grid () { - width_request = 250, - margin_bottom = 3 - }; - menu_popover_grid.attach (image_settings, 0, 0); - menu_popover_grid.attach (mirror_switch, 0, 1); - menu_popover_grid.show_all (); - - var popover = new Gtk.Popover (null); - popover.add (menu_popover_grid); - - menu_button = new Gtk.MenuButton () { - image = new Gtk.Image.from_icon_name ("open-menu-symbolic", Gtk.IconSize.MENU), - popover = popover, - tooltip_text = _("Settings") - }; - - camera_options = new Gtk.Menu (); - - camera_menu_button = new Gtk.MenuButton () { - popup = camera_options - }; - - unowned Gtk.StyleContext camera_menu_button_style_context = camera_menu_button.get_style_context (); - camera_menu_button_style_context.add_provider (take_button_style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - camera_menu_button_style_context.add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); - camera_menu_button_style_context.add_class ("camera-menu"); - - camera_menu_revealer = new Gtk.Revealer () { - transition_duration = 250, - transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT - }; - camera_menu_revealer.add (camera_menu_button); - - linked_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - linked_box.pack_start (take_button); - linked_box.pack_start (camera_menu_revealer); - - show_close_button = true; - get_style_context ().add_class (Gtk.STYLE_CLASS_TITLEBAR); - pack_start (timer_button); - set_custom_title (linked_box); - pack_end (menu_button); - pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); - pack_end (resolution_button); - pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); - pack_end (mode_switch); - - /* Use schema nicks for binding. The camera view monitors the mode setting and changes accordingly */ - Camera.Application.settings.bind_with_mapping ("mode", mode_switch, "active", SettingsBindFlags.DEFAULT, - (val, variant, user_data) => { - val.set_boolean (variant.get_string () == "video"); - return true; - }, - (val, expected_type, user_data) => { - if (val.get_boolean ()) { - return new Variant ("s", "video"); - } else { - return new Variant ("s", "photo"); - } - }, - null, null - ); - - mode_switch.notify ["active"].connect (on_mode_changed); - - notify["recording"].connect (() => { - timer_button.sensitive = !recording && !mode_switch.active; - mode_switch.sensitive = !recording; - video_timer_revealer.reveal_child = recording; - - if (recording) { - take_image.icon_name = STOP_ICON_SYMBOLIC; - } else { - take_image.icon_name = VIDEO_ICON_SYMBOLIC; - } - }); - - on_mode_changed (); - } - - public void enable_all_controls (bool enabled) { - linked_box.sensitive = enabled; - mode_switch.sensitive = enabled; - menu_button.sensitive = enabled; - timer_button.sensitive = enabled; - } - - public void add_camera_option (Gst.Device camera) { - current_device = camera; - var menuitem = new Gtk.RadioMenuItem.with_label (null, camera.display_name); - menuitem.set_data ("camera", camera); - camera_options.append (menuitem); - - int i = (int) camera_options.get_children ().length () - 1; - if (i > 0) { - var el = camera_options.get_children ().nth_data (0) as Gtk.RadioMenuItem; - menuitem.join_group (el); - } - - menuitem.active = true; - menuitem.activate.connect (() => { - current_device = menuitem.get_data ("camera"); - if (menuitem.active) { - request_camera_change (current_device); - update_resolution_menu (); - } - }); - menuitem.show (); - - update_take_button (); - update_resolution_menu (); - } - - public void remove_camera_option (Gst.Device camera) { - Gtk.Widget to_remove = null; - foreach (unowned Gtk.Widget menuitem in camera_options.get_children ()) { - var name = ((Gtk.MenuItem) menuitem).get_data ("camera").name; - if (name == camera.name) { - to_remove = menuitem; - break; - } - } - - if (to_remove != null) { - camera_options.remove (to_remove); - } - - if (camera_options.get_children ().length () > 0) { - camera_options.active = 0; - } - - update_resolution_menu (); - update_take_button (); - enable_all_controls (camera_options.get_children ().length () > 0); - } - - private void update_resolution_menu () { - resolution_button.tooltip_text = mode_switch.active ? _("Video capture resolution") : _("Photo capture resolution"); - resolution_menu.remove_all (); - if (current_device == null || current_device.get_caps () == null) { - return; - } - - int prev_w = 0, prev_h = 0; - double prev_fr = 0.0; - var caps = current_device.get_caps (); - for (uint i = 0; i < caps.get_size (); i++) { - unowned var s = caps.get_structure (i); - if (s.get_name () != (mode_switch.active ? "video/x-raw" : "image/jpeg")) { - continue; - } - - int w, h; - double fr = 0.0; - if (Camera.Utils.parse_structure (s, out w, out h, out fr)) { - // Check not duplicate ( for simplicity assume duplicates listed next to each other) - if (w != prev_w || h != prev_h || fr != prev_fr) { - if (mode_switch.active) { // Show framerate for video capture - resolution_menu.append ( - "%d×%d (%0.f fps)".printf (w, h, fr), - GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) - ); - } else { // Framerate not useful for still image capture - resolution_menu.append ( - "%d×%d".printf (w, h), - GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) - ); - } - } - - prev_w = w; - prev_h = h; - prev_fr = fr; - } - } - } - - private void update_take_button () { - unowned Gtk.StyleContext take_button_style_context = take_button.get_style_context (); - if (camera_options.get_children ().length () > 1) { - camera_menu_revealer.reveal_child = true; - take_button_style_context.add_class ("multiple"); - } else { - camera_menu_revealer.reveal_child = false; - take_button_style_context.remove_class ("multiple"); - } - } - - private void on_mode_changed () { - Idle.add (() => { - update_resolution_menu (); - if (mode_switch.active) { - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; - take_image.icon_name = VIDEO_ICON_SYMBOLIC; - timer_button.sensitive = false; - } else { - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - take_image.icon_name = PHOTO_ICON_SYMBOLIC; - timer_button.sensitive = true; - } - - return Source.REMOVE; - }); - } - - public void start_timeout (int time) { - var timeout_reached = time == 0; - - mode_switch.sensitive = timeout_reached; - take_image.visible = timeout_reached; - timer_button.sensitive = timeout_reached; - video_timer_revealer.reveal_child = !timeout_reached; - - if (!timeout_reached) { - take_timer.label = time.to_string (); - - Timeout.add_seconds (1, () => { - start_timeout (time - 1); - return GLib.Source.REMOVE; - }); - } - } - - private uint recording_timeout = 0U; - public void start_recording_time () { - recording = true; - int seconds = 0; - take_timer.label = Granite.DateTime.seconds_to_time (seconds); - - recording_timeout = Timeout.add_seconds (1, () => { - seconds++; - take_timer.label = Granite.DateTime.seconds_to_time (seconds); - return GLib.Source.CONTINUE; - }); - } - - public void stop_recording_time () { - recording = false; - if (recording_timeout > 0) { - GLib.Source.remove (recording_timeout); - } - - recording_timeout = 0U; - } -} From 9a932cd60b3a635da97302756ddf720a3f0ad526 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 10:05:47 +0100 Subject: [PATCH 07/12] Reapply changes to Headerbar to MainWindow --- src/MainWindow.vala | 135 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 117 insertions(+), 18 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index d061780ab..357da53c1 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -41,6 +41,8 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { private Widgets.CameraView camera_view; private Gtk.Menu camera_options; + private GLib.Menu resolution_menu; + private Gtk.MenuButton resolution_button; private Gtk.Button take_button; private Gtk.Image take_image; private Gtk.Label take_timer_label; @@ -51,6 +53,8 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { private Gtk.MenuButton menu_button; private Gtk.Box linked_box; + private Gst.Device? current_device = null; + private bool timer_running = false; public bool recording { get; private set; default = false; } @@ -165,23 +169,42 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { mode_switch = new Granite.ModeSwitch.from_icon_name (PHOTO_ICON_SYMBOLIC, VIDEO_ICON_SYMBOLIC) { valign = Gtk.Align.CENTER }; - mode_switch.notify["active"].connect (() => { - if (mode_switch.active) { - Camera.Application.settings.set_enum ("mode", Utils.ActionType.VIDEO); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; - take_image.icon_name = VIDEO_ICON_SYMBOLIC; - timer_button.sensitive = false; - } else { - Camera.Application.settings.set_enum ("mode", Utils.ActionType.PHOTO); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - take_image.icon_name = PHOTO_ICON_SYMBOLIC; - timer_button.sensitive = true; - } - }); - Camera.Application.settings.changed["mode"].connect ((key) => { - mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; - }); - mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + /* Use schema nicks for binding. The camera view monitors the mode setting and changes accordingly */ + Camera.Application.settings.bind_with_mapping ("mode", mode_switch, "active", SettingsBindFlags.DEFAULT, + (val, variant, user_data) => { + val.set_boolean (variant.get_string () == "video"); + return true; + }, + (val, expected_type, user_data) => { + if (val.get_boolean ()) { + return new Variant ("s", "video"); + } else { + return new Variant ("s", "photo"); + } + }, + null, null + ); + + mode_switch.notify ["active"].connect (on_mode_changed); + + // mode_switch.notify["active"].connect (() => { + // if (mode_switch.active) { + // Camera.Application.settings.set_enum ("mode", Utils.ActionType.VIDEO); + // take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; + // take_image.icon_name = VIDEO_ICON_SYMBOLIC; + // timer_button.sensitive = false; + // } else { + // Camera.Application.settings.set_enum ("mode", Utils.ActionType.PHOTO); + // take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; + // take_image.icon_name = PHOTO_ICON_SYMBOLIC; + // timer_button.sensitive = true; + // } + // }); + // Camera.Application.settings.changed["mode"].connect ((key) => { + // mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + // }); + // mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + on_mode_changed (); /* Construct AppMenu */ var mirror_switch = new Granite.SwitchModelButton (_("Mirror")); @@ -270,6 +293,13 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { linked_box.pack_start (take_button); linked_box.pack_start (camera_menu_revealer); + + resolution_menu = new GLib.Menu (); + resolution_button = new Gtk.MenuButton () { + image = new Gtk.Image.from_icon_name ("preferences-desktop-display-symbolic", Gtk.IconSize.MENU), + }; + resolution_button.set_menu_model (resolution_menu); + /* Pack tools into HeaderBar */ var header_widget = new Gtk.HeaderBar () { show_close_button = true, // Gtk4 -> show_title_buttons = true, @@ -279,6 +309,8 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { header_widget.pack_start (timer_button); header_widget.pack_end (menu_button); header_widget.pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); + header_widget.pack_end (resolution_button); + header_widget.pack_end (new Gtk.Separator (Gtk.Orientation.HORIZONTAL)); header_widget.pack_end (mode_switch); notify["recording"].connect (() => { @@ -373,6 +405,7 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { } private void add_camera_option (Gst.Device camera) { + current_device = camera; var menuitem = new Gtk.RadioMenuItem.with_label (null, camera.display_name); menuitem.set_data ("camera", camera); camera_options.append (menuitem); @@ -384,13 +417,16 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { } menuitem.active = true; menuitem.activate.connect (() => { + current_device = menuitem.get_data ("camera"); if (menuitem.active) { - camera_view.change_camera (menuitem.get_data ("camera")); + camera_view.change_camera (current_device); + update_resolution_menu (); } }); menuitem.show (); update_take_button (); + update_resolution_menu (); enable_header (true); } @@ -408,10 +444,73 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { camera_options.remove (to_remove); } + if (camera_options.get_children ().length () > 0) { + camera_options.active = 0; + } + + update_resolution_menu (); update_take_button (); enable_header (camera_options.get_children ().length () > 0); } + private void update_resolution_menu () { + resolution_button.tooltip_text = mode_switch.active ? _("Video capture resolution") : _("Photo capture resolution"); + resolution_menu.remove_all (); + if (current_device == null || current_device.get_caps () == null) { + return; + } + + int prev_w = 0, prev_h = 0; + double prev_fr = 0.0; + var caps = current_device.get_caps (); + for (uint i = 0; i < caps.get_size (); i++) { + unowned var s = caps.get_structure (i); + if (s.get_name () != (mode_switch.active ? "video/x-raw" : "image/jpeg")) { + continue; + } + + int w, h; + double fr = 0.0; + if (Camera.Utils.parse_structure (s, out w, out h, out fr)) { + // Check not duplicate ( for simplicity assume duplicates listed next to each other) + if (w != prev_w || h != prev_h || fr != prev_fr) { + if (mode_switch.active) { // Show framerate for video capture + resolution_menu.append ( + "%d×%d (%0.f fps)".printf (w, h, fr), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); + } else { // Framerate not useful for still image capture + resolution_menu.append ( + "%d×%d".printf (w, h), + GLib.Action.print_detailed_name ("win.change-caps", new GLib.Variant.uint32 (i)) + ); + } + } + + prev_w = w; + prev_h = h; + prev_fr = fr; + } + } + } + + private void on_mode_changed () { + Idle.add (() => { + update_resolution_menu (); + if (mode_switch.active) { + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; + take_image.icon_name = VIDEO_ICON_SYMBOLIC; + timer_button.sensitive = false; + } else { + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; + take_image.icon_name = PHOTO_ICON_SYMBOLIC; + timer_button.sensitive = true; + } + + return Source.REMOVE; + }); + } + private void update_take_button () { unowned Gtk.StyleContext take_button_style_context = take_button.get_style_context (); if (camera_options.get_children ().length () > 1) { From d7ad0c685f9dbd3b2e0e812f8e1eaa33f92f17e1 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 10:15:19 +0100 Subject: [PATCH 08/12] Remove commented out code --- src/MainWindow.vala | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 357da53c1..1be4a1688 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -186,24 +186,6 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { ); mode_switch.notify ["active"].connect (on_mode_changed); - - // mode_switch.notify["active"].connect (() => { - // if (mode_switch.active) { - // Camera.Application.settings.set_enum ("mode", Utils.ActionType.VIDEO); - // take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; - // take_image.icon_name = VIDEO_ICON_SYMBOLIC; - // timer_button.sensitive = false; - // } else { - // Camera.Application.settings.set_enum ("mode", Utils.ActionType.PHOTO); - // take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - // take_image.icon_name = PHOTO_ICON_SYMBOLIC; - // timer_button.sensitive = true; - // } - // }); - // Camera.Application.settings.changed["mode"].connect ((key) => { - // mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; - // }); - // mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; on_mode_changed (); /* Construct AppMenu */ From 4270160832a262ddcb60b32476559d235f8133f8 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 12:57:12 +0100 Subject: [PATCH 09/12] Fix mode changing and action state --- src/MainWindow.vala | 52 +++++++++++++++-------------------- src/Widgets/CameraView.vala | 54 ++++++++++--------------------------- 2 files changed, 35 insertions(+), 71 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index b11b16699..5e7a49013 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -168,23 +168,9 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { valign = Gtk.Align.CENTER }; - mode_switch.notify["active"].connect (() => { - if (mode_switch.active) { - Camera.Application.settings.set_enum ("mode", Utils.ActionType.VIDEO); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; - take_image.icon_name = VIDEO_ICON_SYMBOLIC; - timer_button.sensitive = false; - } else { - Camera.Application.settings.set_enum ("mode", Utils.ActionType.PHOTO); - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - take_image.icon_name = PHOTO_ICON_SYMBOLIC; - timer_button.sensitive = true; - } - }); - Camera.Application.settings.changed["mode"].connect ((key) => { - mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; - }); + mode_switch.notify["active"].connect_after (on_mode_changed); mode_switch.active = Camera.Application.settings.get_enum ("mode") == Utils.ActionType.VIDEO; + // No need to monitor external changes to own settings as inside sandbox and only changed by MainWindow /* Construct AppMenu */ var mirror_switch = new Granite.SwitchModelButton (_("Mirror")); @@ -344,8 +330,8 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { } private void on_change_caps (GLib.SimpleAction action, GLib.Variant? parameter) { - camera_view.change_caps ((int)parameter.get_uint32 ()); if (parameter != null) { + camera_view.change_caps ((int)parameter.get_uint32 ()); change_action_state (ACTION_CHANGE_CAPS, parameter); } } @@ -433,6 +419,12 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { private void update_resolution_menu () { resolution_button.tooltip_text = mode_switch.active ? _("Video capture resolution") : _("Photo capture resolution"); + var caps_index = mode_switch.active ? camera_view.current_video_caps_index : camera_view.current_picture_caps_index; + if (caps_index < 0) { + // Suppress terminal warnings during startup + return; + } + resolution_menu.remove_all (); if (current_device == null || current_device.get_caps () == null) { return; @@ -470,23 +462,21 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { prev_fr = fr; } } + + change_action_state (ACTION_CHANGE_CAPS, new GLib.Variant.uint32 (caps_index)); } private void on_mode_changed () { - Idle.add (() => { - update_resolution_menu (); - if (mode_switch.active) { - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; - take_image.icon_name = VIDEO_ICON_SYMBOLIC; - timer_button.sensitive = false; - } else { - take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; - take_image.icon_name = PHOTO_ICON_SYMBOLIC; - timer_button.sensitive = true; - } - - return Source.REMOVE; - }); + camera_view.on_mode_changed (mode_switch.active); + update_resolution_menu (); + if (mode_switch.active) { + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_RECORD; + take_image.icon_name = VIDEO_ICON_SYMBOLIC; + timer_button.sensitive = false; + } else { + take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; + take_image.icon_name = PHOTO_ICON_SYMBOLIC; + timer_button.sensitive = true; } private void update_take_button () { diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index bd219afde..f97ad90fb 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -33,9 +33,10 @@ public class Camera.Widgets.CameraView : Gtk.Stack { private Gst.Video.ColorBalance color_balance; private Gst.Video.Direction? hflip; private Gst.Device? current_device = null; - private int current_video_caps_index = -1; private int default_video_caps_index = -1; - private int current_picture_caps_index = -1; + + public int current_video_caps_index { get; private set; default = -1; } + public int current_picture_caps_index { get; private set; default = -1; } public uint n_cameras { get { @@ -94,19 +95,16 @@ public class Camera.Widgets.CameraView : Gtk.Stack { var caps = new Gst.Caps.empty_simple ("video/x-raw"); monitor.add_filter ("Video/Source", caps); + } - Camera.Application.settings.changed["mode"].connect (() => { - if (current_device == null) { - return; - } else if (Camera.Application.settings.get_enum ("mode") == Utils.ActionType.PHOTO) { - - set_preview_caps (default_video_caps_index); - update_resolution_action_state (current_picture_caps_index); - } else { - set_preview_caps (current_video_caps_index); - update_resolution_action_state (current_video_caps_index); - } - }); + public void on_mode_changed (bool is_video) { + if (current_device == null) { + return; + } else if (is_video) { + set_preview_caps (current_video_caps_index); + } else { + set_preview_caps (default_video_caps_index); + } } private void on_camera_added (Gst.Device device) { @@ -192,7 +190,7 @@ public class Camera.Widgets.CameraView : Gtk.Stack { max_area_picture = w * h; } } else if (s.get_name () == "video/x-raw") { - if (w * h >= max_area_video && fr >= 10.0) { + if (w * h > max_area_video && fr >= 10.0) { largest_video_index = i; max_area_video = w * h; } @@ -204,7 +202,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { current_picture_caps_index = largest_picture_index; current_video_caps_index = largest_video_index; default_video_caps_index = largest_video_index; - current_device = camera; create_video_pipeline (); } @@ -232,8 +229,7 @@ public class Camera.Widgets.CameraView : Gtk.Stack { capsfilter.get_static_pad ("src").add_probe (Gst.PadProbeType.EVENT_BOTH, (pad, info) => { unowned Gst.Event? event = info.get_event (); if (event.type == Gst.EventType.CAPS) { - unowned var s= event.get_structure (); - update_resolution_action_state (find_structure_index (s)); + //TODO Find correct resolution index and update action state. } return Gst.PadProbeReturn.OK; @@ -352,15 +348,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { } } - private void update_resolution_action_state (int index) { - var caps = current_device.get_caps (); - if (caps == null || index < 0 || index >= caps.get_size ()) { - return; - } - - get_action_group ("win").change_action_state (MainWindow.ACTION_CHANGE_CAPS, new GLib.Variant.uint32 (index)); - } - public void take_photo () { if (recording || preview_pipeline == null) { return; @@ -492,19 +479,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { preview_pipeline.set_state (Gst.State.PLAYING); } - private int find_structure_index (Gst.Structure? s) { - var caps = current_device.get_caps (); - if (caps != null && s != null) { - for (int i = 0; i < caps.get_size (); i++) { - if (s.is_equal (caps.get_structure (i))) { - return i; - } - } - } - - return -1; - } - private Gst.Caps? get_caps_from_index (int index) { var caps = current_device.get_caps (); if (caps != null && index >= 0 && index < caps.get_size ()) { From 19dadb7272af495139b293562d3b07a6303c62b9 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 18:11:25 +0100 Subject: [PATCH 10/12] Insert missing brace --- src/MainWindow.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 5e7a49013..5c6a961dc 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -477,6 +477,7 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { take_button.action_name = Camera.MainWindow.ACTION_PREFIX + Camera.MainWindow.ACTION_TAKE_PHOTO; take_image.icon_name = PHOTO_ICON_SYMBOLIC; timer_button.sensitive = true; + } } private void update_take_button () { From 9daa1ddab0155a4cb81b4c12bba015fa5c2e94de Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 19:09:54 +0100 Subject: [PATCH 11/12] Fix preview freezing on recording. --- src/Widgets/CameraView.vala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Widgets/CameraView.vala b/src/Widgets/CameraView.vala index f97ad90fb..39053e8f7 100644 --- a/src/Widgets/CameraView.vala +++ b/src/Widgets/CameraView.vala @@ -451,7 +451,6 @@ public class Camera.Widgets.CameraView : Gtk.Stack { record_bin.sync_state_with_parent (); preview_pipeline.get_by_name ("tee").link (record_bin); preview_pipeline.set_state (Gst.State.PLAYING); - preview_pipeline.sync_children_states (); Gst.Debug.BIN_TO_DOT_FILE (preview_pipeline, Gst.DebugGraphDetails.VERBOSE, "recording"); } From 80de93afb9771d5d1385363638511c61aedf4322 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 2 May 2022 19:11:54 +0100 Subject: [PATCH 12/12] Stop resolution change while recording --- src/MainWindow.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 5c6a961dc..bbd7ce0ef 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -280,6 +280,7 @@ public class Camera.MainWindow : Hdy.ApplicationWindow { notify["recording"].connect (() => { timer_button.sensitive = !recording && !mode_switch.active; mode_switch.sensitive = !recording; + resolution_button.sensitive = !recording; video_timer_revealer.reveal_child = recording; if (recording) {