Commit Graph

15 Commits

Author SHA1 Message Date
Milan Crha
5c935af7d3 build: Port to gcr4
The gcr4 is going to replace gcr3. As only base functions are used,
the port to gcr4 is trivial.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2386>
2022-08-02 16:13:54 +00:00
Florian Müllner
9a2505f18c shell: Specify G_PARAM_EXPLICIT_NOTIFY where appropriate
Like we did in ST, opt out of g_object_set()'s implicit change
notifications, so that notify is only emitted when a property
*actually* changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2168>
2022-02-10 13:09:37 +00:00
Florian Müllner
17719352f3 shell: Use g_object_notify_by_pspec() where possible
It's slightly more efficient not having to do property lookups. While
that is unlikely to be a concern for the properties in question, it's
still good practice and makes the code base a bit more consistent.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2168>
2022-02-10 13:09:37 +00:00
Niels De Graef
28ab1f4af4 Ensure G_PARAM_STATIC_STRINGS for all properties
In `st`, we can do this by using `ST_PARAM_*`. In the other code files,
just use `G_PARAM_STATIC_STRINGS` directly.

This is just a minor convenience to prevent a few unnecessary string
copies.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/646
2019-07-30 13:58:44 +00:00
Cosimo Cecchi
2c45b5416e keyring-prompt: relax NULL check in remove_mnemonics()
Instead of considering a GValue containing a NULL string to be a
programmer error, simply return NULL.
remove_mnemonics() is in fact called on the value of the
"choice-label" property as well, which has NULL as its default
value.

This prevents triggering the following gnome-shell warning:

gnome-shell[1082]: remove_mnemonics: assertion 'label != NULL' failed

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:36:11 -07:00
Veerasamy Sevagen
b197a1affb cleanup: Fix spelling errors
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/515
2019-05-15 19:32:29 +00:00
Florian Müllner
1a39666f7c shell: Port to GTask 2015-10-15 22:59:49 +02:00
Florian Müllner
294702d3f1 shell: Use G_DECLARE_*_TYPE macros
Cut down on boilerplate by using the (no longer that) new helper
macros. We don't care about breaking ABI in private libraries, so
use G_DECLARE_FINAL_TYPE even where the class struct used to be
exposed in the header, except for types we inherit from ourselves
(obviously) or where the class exposes any vfuncs (where changes
could affect inheritance in extensions).
2015-10-15 22:58:28 +02:00
Watson Yuuma Sato
59a18c4ead ShellKeyringPrompt: Strip out mnemonics indicators from labels
Currently GNOME Shell doesn't support mnemonics and prompters may
send labels with it.

Remove the mnemonics indicator for now.

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fixed style issue

https://bugzilla.gnome.org/show_bug.cgi?id=750465
2015-06-09 11:45:47 +02:00
Florian Müllner
93c9e031e3 Update (allow-none) annotations
The annotation has been deprecated in favor of (nullable) and/or
(optional).
2014-05-28 22:01:55 +02:00
Florian Müllner
a89fd17b8e shell: Make KeyringPrompt.cancel() callable from signal handlers
gcr/gnome-keyring don't handle the case where prompt_password_async()/
prompt_confirm_async() return their result from within the function
very well (or rather: break badly). Calling gcr_prompt_close() instead
is safe, but to avoid these kind of errors in the future, modify
shell_keyring_prompt_cancel() to work as expected in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=708187
2013-09-23 13:32:17 +02:00
Stef Walter
855a31ff25 components: Allow cancelling of dialog between prompts
Some callers of the keyring prompt keep the dialog up while
processing the prompt. Allow the user to cancel the prompt
while in this state.

This is propagated to the caller, who can cancel the operation
in question when this occurs.

https://bugzilla.gnome.org/show_bug.cgi?id=682830
2013-05-09 05:58:55 +02:00
Giovanni Campagna
55a4517cd1 Fix documentation warnings
gobject-introspection now emits many more warnings for malformed
comments, and they fail the build.

https://bugzilla.gnome.org/show_bug.cgi?id=673656
2012-04-09 19:57:51 +02:00
Stef Walter
e3fb77c051 Use non-pageable memory for gnome-keyring passwords
* Use a ClutterTextBuffer that allocates non-pageable
   memory to hold passwords for gnome-keyring, ssh, gpg
 * Requires gcr 3.3.5

https://bugzilla.gnome.org/show_bug.cgi?id=652460
2012-02-29 20:24:02 +01:00
Stef Walter
3ee07d0e82 Add gnome-keyring prompter
* Add a keyring prompter based on GcrSystemPrompter
 * Adds dependency on gcr version 3.3.5 or higher
 * Not yet using unmerged support for non-pageable memory

https://bugzilla.gnome.org/show_bug.cgi?id=652459
2012-02-29 20:16:14 +01:00