Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.flatpak-builder/
build-dir/
.idea
10 changes: 10 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/Flatseal.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added data/gschemas.compiled
Binary file not shown.
14 changes: 12 additions & 2 deletions src/widgets/applicationRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,29 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

const {GLib, GObject, Adw} = imports.gi;
const {GLib, GObject, Adw, Gtk} = imports.gi;


var FlatsealApplicationRow = GObject.registerClass({
GTypeName: 'FlatsealApplicationRow',
Template: 'resource:///com/github/tchx84/Flatseal/widgets/applicationRow.ui',
InternalChildren: ['icon'],
}, class FlatsealApplicationRow extends Adw.ActionRow {
_init(appId, appName, appIconName) {
_init(appId, appName, appIconName, asDangerousFs = false) {
super._init();
this._icon.set_from_icon_name(appIconName);
this.set_title(GLib.markup_escape_text(appName, -1));
this.set_subtitle(appId);

if (asDangerousFs) {
const warningIcon = new Gtk.Image({
icon_name: 'dialog-warning-symbolic',
pixel_size: 16,
tooltip_text: 'This app has full access to the file system (filesystem=host or home). This may be a security risk..'
});
this.add_suffix(warningIcon);
}

}

get appId() {
Expand Down
9 changes: 8 additions & 1 deletion src/widgets/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,14 @@ var FlatsealWindow = GObject.registerClass({

allApplications.forEach(app => {
iconTheme.add_search_path(app.appThemePath);
const row = new FlatsealApplicationRow(app.appId, app.appName, app.appIconName);


const allPermissions = this._permissions.getAll();
const appPermissions = allPermissions.find(p => p.appId === app.appId);
const fsPerms = appPermissions ? appPermissions.value : [];
const hasDangerousFs = fsPerms.includes('host') || fsPerms.includes('home');

const row = new FlatsealApplicationRow(app.appId, app.appName, app.appIconName, hasDangerousFs);
this._applicationsListBox.append(row);

if (app.appId === this._settings.getSelectedAppId())
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<object class="GtkStackPage">
<property name="name">withPermissionsPage</property>
<property name="child">
<object class="AdwPreferencesPage" id="permissionsBox">
<object class="AdwPreferencesPage" id="permissionsBox">// Aq// Aqui você deve acessar as permissões do appui você deve acessar as permissões do app
<child>
<object class="AdwPreferencesGroup" id="appInfoGroup"/>
</child>
Expand Down