Commit graph

100 commits

Author SHA1 Message Date
Robert Ancell
dad5cc58b6 applications: Hide buttons that launch gnome-software if it is not available
Fixes #417
2020-09-25 03:39:57 +00:00
jeongsu816
015fbf8f4c applications: ensure private types used by the template
on some systems, private types of settings app are not resolved.

    Error building template class 'CcApplicationsPanel' for
    an instance of type 'CcApplicationsPanel': 
    Invalid object type 'CcToggleRow'

to fix this issue, ensure private types used by the template
2020-08-07 03:44:49 +00:00
Olivier Fourdan
6428355436 applications: Add shortcuts permissions
gnome-shell saves the user choice for applications allowed to disable
regular shortcuts in the permission store, using "GRANTED" or "DENIED"
(in gnome-shell/js/ui/inhibitShortcutsDialog.js).

Add a new entry to change that permission in the application panel,
similar to what gnome-shell does.
2020-07-21 16:52:22 +02:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Umang Jain
dbf1b0dafb applications: Integrate with malcontent's restrictions
malcontent[1] is  parental(or admin) controlled interface which
can restrict a application's visibility and interactivity for a
standard user. Hence, if the current uid has any restrictions
on its installed applications, filter them out from the applications
panel.

Make the malcontent support enable or disable by setting it up as
a build-time meson option.

[1]: https://gitlab.freedesktop.org/pwithnall/malcontent/
2020-06-17 12:56:43 +01:00
lenke182
5c5b46ddd2 Revert "applications: snap-row: Shorten permission text to prevent button overflow (2)"
This reverts commit a4f42995c75c3d0a35aa7a0dfbc7d0d6bc3090ab
2020-06-15 04:48:16 +00:00
Robert Ancell
ead0ae4178 applications: Use new snapd-glib API for labelling Snap interfaces
This removes the need to put translated strings in g-c-c, and allows them to be
shared between multiple applications that use Snaps.
2020-04-16 03:59:33 +00:00
Robert Ancell
f246d40e95 applications: Fix only connected snap interfaces showing
Not enough information was being queried from snapd.
2020-04-16 15:49:17 +12:00
Robert Ancell
b4922526c1 applications: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
Robert Ancell
23db1e9933 applications: Replace GtkStack child names with widget references
The child names are easier to break if widgets are changed - this can't be
detected by the compiler.
2020-03-30 01:57:06 +00:00
Robert Ancell
0beed338af applications: Use GTK widget types 2020-03-30 01:57:06 +00:00
Allan Day
4894057b7d applications: update icon
application-x-executable didn't look very good here. 
adwaita-icon-theme now has a dedicated icon for this panel, which is 
better suited - preferences-desktop-apps. Use this instead.
2020-02-20 20:16:00 +00:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Matthias Clasen
266ccac6ca applications: Add a 'set desktop background' switch
This is backed by the 'wallpaper' permission that
the flatpak portal uses.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/808
2020-02-02 12:44:13 -03:00
Robert Ancell
096eefe7b9 applications: Show snap interface controls 2019-12-18 12:29:19 +13:00
Robert Ancell
aa471faa4a applications: Show snap app sizes 2019-12-18 12:29:19 +13:00
Robert Ancell
4ffc990d93 applications: Show portal permissions for snaps 2019-12-18 12:29:18 +13:00
Robert Ancell
fbb31cc1a7 applications: Rename functions as portal permssions are not Flatpak specific 2019-12-18 12:28:31 +13:00
Robert Ancell
6aa5961ef5 applications: Fix builtin-permissions showing when none are set
Shows the placeholder text "Yadda Yadda"
2019-12-18 12:18:34 +13:00
Robert Ancell
be3ced3ff2 applications: Add missing whitespace 2019-12-18 12:18:34 +13:00
Matthias Clasen
edc4044f84 applications: Add a 'run in background' switch
This is backed by the 'background' permission that
the flatpak portal uses. It would be slightly nicer
if we had a separate 'unset' state. For now, we just
show 'unset' as 'on'.
2019-12-10 03:09:43 +00:00
Robert Ancell
5dbbc20918 shell: Show the submenu icon hint for the applications panel
The panel swarms details/devices/privacy show this icon. Since the applications
panel is not made from sub-panels, this doesn't show. For consistency this shows
the icon so the transition isn't as jarring for the user.

Add a flat into the panel .desktop file to enable this - other panels might
require this in the future
2019-11-28 11:20:41 +13:00
Robert Ancell
2a8b287d33 applications: Fix link to privacy panel
The privacy panel was removed in a4bdc37, so this link is broken.
We link to the first panel in the privacy section, which is what
is show when selecting this section.
2019-11-27 21:32:54 +00:00
Robert Ancell
f1e0666eca Simplify usage of g_variant_iter_loop
Access strings via pointers, which reduces copying and the chances of leaks.
Simplify cases where string arrays were modified - no need to replace the value as it's no longer allocated.
Always complete the loop so references are freed.
2019-11-27 21:25:34 +00:00
Felipe Borges
0b91c02377 applications: Use "application-x-executable" when app has no icon 2019-11-17 22:56:27 +00:00
Robert Ancell
5021d4ee0f applications: Remove trailing whitespace 2019-11-13 13:16:06 +00:00
Robert Ancell
cd377768f5 Avoid warnings where G_LOG_DOMAIN is overriden
Undefine the value before overriding it to avoid the following warnings:
../panels/background/cc-background-chooser.c:22: warning: "G_LOG_DOMAIN" redefined
2019-11-04 22:12:05 +00:00
Mohammed Sadiq
4fe618254e applications: Fix a memory leak 2019-10-17 20:02:41 +00:00
Robert Ancell
6ac37bb182 applications: Remove unused variable 2019-10-15 09:31:30 +13:00
Robert Ancell
6691c4dfd3 applications: Use g_autofree for strings 2019-09-30 21:02:14 +00:00
Robert Ancell
97985a664e Remove unused GNOMELOCALEDIR defines 2019-09-09 21:45:53 +00:00
Georges Basile Stavracas Neto
75f150d5a2 shell: Add position to cc_shell_embed_widget_in_header()
So we can control where the widget should be added to. The
main window only supports left and right positions.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Jakub Steiner
db98738366 Applications: use larger icons
- the new application icon style strongly advises to use
  sizes above 32px. Lower the whitespace to fit more items
- make fullcolor icons not semi-opaque
2019-04-24 00:27:18 +00:00
Georges Basile Stavracas Neto
25be82715a applications: Add a placeholder widget for the sidebar list
So we keep it consistent with other lists that allow filtering,
such as the main panel list itself.
2019-04-01 22:27:51 +00:00
Georges Basile Stavracas Neto
8070940e6e applications: Add search entry to the sidebar
This matches the current mockups [1] for the panel, and
allows easily finding applications.

[1] https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/applications/applications-wires.png
2019-04-01 22:27:51 +00:00
Georges Basile Stavracas Neto
6b5d8a93b6 applications: Select the first row at startup
That way we are not presented the empty view initially.
2019-04-01 22:27:51 +00:00
Georges Basile Stavracas Neto
622fec8303 applications: Trivial code style update 2019-04-01 22:27:51 +00:00
Georges Basile Stavracas Neto
de724065c6 applications: Remove unecessary cast
The variable is a GtkListBox already.
2019-04-01 22:27:51 +00:00
Robert Ancell
3565216b5b applications: Make async file operations cancellable
The previous operations could crash if the panel was changed during an operation.
2019-03-20 17:19:36 +00:00
Robert Ancell
a3db60a24b applications: Rename functions as portal permssions are not Flatpak specific 2019-03-20 17:07:45 +00:00
Robert Ancell
a856740dfa applications: Fix wrong IDs being passed to portal permission store
There were two cases of the app ID being used instead of the Flatpak ID.
2019-03-20 17:07:45 +00:00
Robert Ancell
29eebceddd applications: Fix flatpak ID memory leak 2019-03-18 14:53:43 +00:00
Felipe Borges
4e34738cbb applications: Add shadow to application icons
The new GNOME application icons need a shadow when placed on top
of a light background.

See https://gitlab.gnome.org/GNOME/Initiatives/issues/2
2019-03-13 13:45:26 +01:00
Robert Ancell
0f257d2451 applications: Add missing creation of cancellable 2019-03-11 18:24:59 +00:00
Adrien Plazas
358dbe3ce8 applications: Emit sidebar-activated on sidebar row activation
This will let the window know it should focus on the panel rather than
on the sidebar.
2019-01-21 21:53:21 +00:00
Adrien Plazas
b94496703e applications: Update the panel on activation, not selection
This allows to activate the already selected panel with a single click
rather than a double click, which will be needed to simply focus the
panel when the window will use a leaflet.
2019-01-21 21:53:21 +00:00
Jeremy Bicha
f5600cf9d6 applications: Don't use symbolic icon name in .desktop
gnome-control-center's shell uses the -symbolic version
automatically. Use the icon name without the -symbolic
suffix to match what we do with other panels.
2019-01-17 21:36:34 +00:00
Jeremy Bicha
dfcc2ba83d Revert "applications: Remove markup from a translatable string"
This reverts commit d2c759fcae.

The commit caused the Applications panel to crash with
Unhandled tag: <attributes>

Apparently CInfoRow doesn't know how to handle attributes.
2019-01-07 21:34:33 -05:00
Piotr Drąg
d2c759fcae applications: Remove markup from a translatable string 2019-01-07 20:06:03 +01:00
Georges Basile Stavracas Neto
1245fd787b
Introduce Applications panel
This is an initial implementation of most of the
intended functionality for this panel. Flatpak
integration itself is implemented by spawning
"flatpak info -m $appid", which gives us the
metadata in key file format, and allows flatpak
to be a runtime dependency.

Even after removing the .desktop suffix, there can
still be a difference between the app ID generated
in this way and the flatpak ID, since flatpaks are
allowed to export files whose prefix is the flatpak
ID. Fix this by pulling the X-Flatpak key out of
the desktop file. This would cause trouble for
org.libreoffice.LibreOffice-math.
2019-01-07 10:59:30 -02:00