Commit Graph

29 Commits

Author SHA1 Message Date
Florian Müllner
213e38c2ef cleanup: Use arrow notation for anonymous functions
Arrow notation is great, use it consistently through-out the code base
to bind `this` to anonymous functions, replacing the more overbose
Lang.bind(this, function() {}).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:55:00 +00:00
Florian Müllner
76f09b1e49 cleanup: Use method syntax
Modern javascript has a short-hand for function properties, embrace
it for better readability and to prepare for an eventual port to
ES6 classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/23
2018-02-21 13:54:58 +00:00
Gautier Pelloux-Prayer
35a9c3ec86 extension: log message if extension could not be installed
https://bugzilla.gnome.org/show_bug.cgi?id=776940
2017-11-21 13:15:05 -05:00
Florian Müllner
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
88b1a5d3a0 extensions: Consistently handle createExtensionObject() errors
The method may throw an error, for example when metadata.json is
missing or cannot be parsed, however we are currently not always
handling it.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-07-17 13:00:00 +02:00
Florian Müllner
f77333e4d7 extensionDownloader: Don't reuse .prompt-* style classes
Those will go away when we port authentication prompts to the new
MessageDialogContent widget, so pick the style classes from there
and adjust individual properties with more specific rules to re-
produce the existing style.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
2017-07-16 18:14:01 +02:00
Yuri Konotopov
3bf89055e3 extensionDownloader: return tuple of string on success
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=777544
2017-02-15 23:15:20 +04:00
Jakub Steiner
2aed6ade79 theme: modal dialog headlines
https://bugzilla.gnome.org/show_bug.cgi?id=745687
2015-03-10 19:16:28 +01:00
Jakub Steiner
83e5ea4827 Revert "theme: use a global headline class"
This reverts commit 5915348396.
2015-03-10 18:27:43 +01:00
Jakub Steiner
5915348396 theme: use a global headline class
https://bugzilla.gnome.org/show_bug.cgi?id=745687
2015-03-10 17:45:04 +01:00
William Jon McCann
551b96d79f Set style classes for extension download dialog
So that the layout is correct.

https://bugzilla.gnome.org/show_bug.cgi?id=739888
2014-11-10 18:58:12 -05:00
William Jon McCann
b2a65f809f Use recommended quotes
See https://wiki.gnome.org/Design/OS/Typography
2014-01-17 16:34:44 -05:00
Ray Strode
e9f18c6d8d modalDialog: drop global.get_current_time() arguments to close
Modal dialogs take an optional timestamp in their close method.
If the timestamp is not passed in, then global.get_current_time()
is used.

Some callers of the close method pass in global.get_current_time()
unnecessarly (since it's the default).

This commit drops the argument for those cases.

https://bugzilla.gnome.org/show_bug.cgi?id=694296
2013-02-20 14:16:53 -05:00
Jasper St. Pierre
67115b3e9b extensionDownloader: Fix extension installation
The name of the method is "get_as_bytes"

https://bugzilla.gnome.org/show_bug.cgi?id=682578
2012-08-23 22:57:46 -03:00
Jasper St. Pierre
4696bfbb80 extensionSystem: Make unloadExtension take an extension object, not a UUID
For consistency with loadExtension.

https://bugzilla.gnome.org/show_bug.cgi?id=682578
2012-08-23 22:57:45 -03:00
Giovanni Campagna
8970e17911 ModalDialog: add 'default' pseudo-class to default button
Add 'default' parameter to setButtons, that controls the binding
of Return (unless overridden) and applies the 'default' pseudo-class.
Currently it has no effect, but it will start having after the
login dialog redesign.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Jasper St. Pierre
1e286e43ad extensionDownloader: Add update/blacklist support for extensions
This is a bare-bones copy/replace. It does not implement ChangeLog
support. If we cannot get System Updates integration, I will implement
notification support.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-10 14:36:41 -04:00
Jasper St. Pierre
539993b4f4 extensionDownloader: Move extension loading code to the install dialog
Move the part that loads the extension to the callback. This makes the
next patch a lot cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-10 14:36:41 -04:00
Jasper St. Pierre
23e86d7dd5 extensionDownloader: Clean up names of methods
FromUUID is redundant.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
c99e8eb29d extensionSystem: Be saner at error handling
Use our native JS error system in the "extension system" API, only
using the signal/log-based error reporting at the last mile. Additionally,
delete the directory if loading the extension failed, and report the error
back over DBus.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
7949397958 shellDBus: Add a real error reporting system to InstallExtensionRemote
Instead of using the 'extension-state-changed' signal to relay errors,
use DBus's native error mechanism to inform the method caller that the
call has failed. This requires making the method actually asynchronous
so that we don't block the browser, which is stuck waiting for a reply
from the browser plugin. To ensure this, we need to modify the browser
plugin API to ensure its extesion installation method is asynchronous.

Additionally, this lets us remove the awful, broken hacks that we used
when a user clicked the "Cancel" button, replacing it by a DBus return
value.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
1d1359b58f extensionDownloader: Properly error out when downloading/parsing infos
When the extension downloader was originally designed, the information
downloading part was inserted at the last minute, along with the modal
dialog as a security feature to make sure an extension didn't silently
get installed on the user's machines either due to a security issue in
the browser-plugin, or an XSS issue on the extensions website. Correct
the mistake I made when writing the code; instead of dropping an error
on the floor, log it correctly. This "bug" has already bitten a number
of users who forgot to configure proxy settings in the control center.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
8915bb4892 extensionDownloader: Fix errors during error paths during installation
https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
48b83f1ffd extensionDownloader: Fix loading of downloaded extensions
We refactored the ExtensionSystem API to take an extension object,
but forgot to update the downloader.

https://bugzilla.gnome.org/show_bug.cgi?id=679099
2012-07-02 18:29:56 -04:00
Jasper St. Pierre
75570b7995 extensionSystem: Add a method to unload an extension
https://bugzilla.gnome.org/show_bug.cgi?id=677586
2012-06-12 17:16:09 -04:00
Jasper St. Pierre
5265884af9 extensionUtils: Remove userExtensionsDir
Make this less stateful

https://bugzilla.gnome.org/show_bug.cgi?id=677586
2012-06-12 17:16:08 -04:00
Jasper St. Pierre
feef35a8ca extensionUtils: Don't write to the filesystem on start
Create the potentially empty directory when we need to, not when we
don't.

https://bugzilla.gnome.org/show_bug.cgi?id=677586
2012-06-12 17:16:08 -04:00
Jasper St. Pierre
3ff51da529 extensionSystem: Split off the extension downloader into a separate file
This keeps all UI out of the extension system, leaving it strictly for
loading and unloading extensions.

https://bugzilla.gnome.org/show_bug.cgi?id=677586
2012-06-12 17:16:08 -04:00