Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/gresource.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/io/elementary/xdg-desktop-portal-pantheon">
<file alias="48x48/apps/accessories-screencast-tool.svg" compressed="true" preprocess="xml-stripblanks">icons/screencast.svg</file>
<file alias="48x48@2/apps/accessories-screencast-tool.svg" compressed="true" preprocess="xml-stripblanks">icons/screencast.svg</file>

<file alias="scalable/actions/grab-area-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/grab-area-symbolic.svg</file>
<file alias="scalable/actions/grab-screen-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/grab-screen-symbolic.svg</file>
<file alias="scalable/actions/grab-window-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/grab-window-symbolic.svg</file>
Expand Down
119 changes: 119 additions & 0 deletions data/icons/screencast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/ScreenCast/Dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Authored by: Leonhard Kargl <leo.kargl@proton.me>
*/

public class ScreenCast.Dialog : Granite.Dialog {
public class ScreenCast.Dialog : Granite.MessageDialog {
public SourceType source_types { get; construct; }
public bool allow_multiple { get; construct; }

Expand All @@ -27,6 +27,7 @@ public class ScreenCast.Dialog : Granite.Dialog {
monitor_rows = new List<SelectionRow> ();

list_box = new Gtk.ListBox () {
hexpand = true,
vexpand = true
};
list_box.add_css_class (Granite.STYLE_CLASS_RICH_LIST);
Expand Down Expand Up @@ -64,8 +65,9 @@ public class ScreenCast.Dialog : Granite.Dialog {
child = scrolled_window
};

get_content_area ().append (frame);
custom_bin.append (frame);

resizable = true;
default_height = 400;
default_width = 300;

Expand Down
2 changes: 1 addition & 1 deletion src/ScreenCast/Portal.vala
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class ScreenCast.Portal : Object {
start.callback ();
});

session.start (parent_window);
session.start (app_id, parent_window);

yield;

Expand Down
15 changes: 13 additions & 2 deletions src/ScreenCast/Session.vala
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,19 @@ public class ScreenCast.Session : Object {
this.cursor_mode = cursor_mode;
}

internal void start (string parent_window) {
var dialog = new Dialog (source_types, allow_multiple);
internal void start (string app_id, string parent_window) {
var dialog = new Dialog (source_types, allow_multiple) {
image_icon = new ThemedIcon ("accessories-screencast-tool"),
primary_text = _("An application wants to access the screen"),
Comment thread
danirabbit marked this conversation as resolved.
secondary_text = _("Select which parts of the screen to share:")
};

if (app_id != "") {
var app_info = new DesktopAppInfo (app_id + ".desktop");
if (app_info != null) {
dialog.primary_text = _("“%s” wants to access the screen").printf (app_info.get_display_name ());
Comment thread
danirabbit marked this conversation as resolved.
}
}

try {
var parent = ExternalWindow.from_handle (parent_window);
Expand Down