Commit Graph

63 Commits

Author SHA1 Message Date
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Cosimo Cecchi
49c4ba5656 theme: make a GResource
Now that we have all the infrastructure ready, port the theme to a
GResource.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:54:18 -07:00
Cosimo Cecchi
328bb1c21b st: always use GFile internally
We're moving the theme infrastructure towards GResource, so as a first
step move all the loading to use GFiles instead of URIs or paths.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:53:39 -07:00
Owen W. Taylor
b6f3e15037 Add support for meta_restart() and MetaDisplay::restart
Support was added to Mutter to allow it to trigger a restart
to allow for restarts when switching in or out of stereo mode.

Hook up to the new signals on MetaDisplay to show the restart
message and reexec. Meta.is_restart() is used to suppress
the startup animation.

This also allows us to do 'Alt-F2 r' restarts more cleanly
without a visual flash and animation.

https://bugzilla.gnome.org/show_bug.cgi?id=733026
2014-07-16 18:04:19 -04:00
Rui Matos
2974b29f15 layout: Create a group for modal dialogs
This way we can ensure that they're always stacked under the OSK.

https://bugzilla.gnome.org/show_bug.cgi?id=719451
2014-03-18 17:03:39 +01:00
Rui Matos
1b78dd662b modalDialog: Remove unused parentActor param
No ModalDialog users set this so let's hardcode it.

https://bugzilla.gnome.org/show_bug.cgi?id=719451
2014-03-18 17:03:38 +01:00
Giovanni Campagna
7e9ecf4eb2 Add a radial background shade for modal dialogs
Use a new ShellGLSLQuad actor class to build a RadialEffect that can be
enabled on Lightboxes to achieve a radial effect similar to the overview
one. Then enable it for modal dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=669798
2014-01-19 16:02:46 +01:00
Florian Müllner
deb2f30b37 js: Use EVENT_PROPAGATE/EVENT_STOP constants in event handlers
Just as SOURCE_CONTINUE/SOURCE_REMOVE in source functions, these
constants increase code clarity over plain true/false.

https://bugzilla.gnome.org/show_bug.cgi?id=719567
2013-12-16 18:27:19 +01:00
Florian Müllner
00ccbdaae9 modalDialog: Request HEIGHT_FOR_WIDTH
All our modal dialogs are given a fixed width and grow vertically
as necessary. Set the request mode accordingly, so that wrapped
labels are considered correctly during size request, and not only
at allocation time (where they'll either take away from the padding
or even cause the dialog to overflow).

https://bugzilla.gnome.org/show_bug.cgi?id=704015
2013-08-20 08:18:29 +02:00
Jasper St. Pierre
3bb330fcc4 modalDialog: The dialog layout should expand, not the buttons
https://bugzilla.gnome.org/show_bug.cgi?id=705916
2013-08-14 20:39:07 -04:00
Florian Müllner
0ae1f9ffc7 modalDialog: Minor coding style fix
https://bugzilla.gnome.org/show_bug.cgi?id=703807
2013-07-09 22:06:13 +02:00
Ray Strode
aa6b63373e ui: move AnimatedIcon out of panel.js
The class is generally useful, so it only makes sense in panel.js
for historical reasons. Because other parts of the code are
using it, though, problems are cropping up that require a
workaround like:

placeSpinner: function(...) {
    /* This is here because of recursive imports */
    const Panel = imports.ui.panel;
    Panel.AnimatedIcon(spinnerIcon, WORK_SPINNER_ICON_SIZE);
    ...
}

This commit moves AnimatedIcon to its own file so we can drop that
workaround.

https://bugzilla.gnome.org/show_bug.cgi?id=702818
2013-06-25 15:16:42 -04:00
Stef Walter
046a1a7af8 modalDialog: Show spinner when working
Use the same UI concept from the login screen to show spinners when
the polkit or keyring dialogs are working

https://bugzilla.gnome.org/show_bug.cgi?id=684438
2013-05-09 17:38:21 +02:00
Florian Müllner
e2c86cef47 modalDialog: Replace Shell.Stack with layout manager
Commit e98eb57e3e added flags to expand the dialog's background
stack, which works fine with the current clutter-1.16 branch, but
breaks on clutter-1.14 (as shipped with GNOME 3.8).
Using an St.Widget with a Clutter.BinLayout fixes this, and is more
modern Clutter usage.

https://bugzilla.gnome.org/show_bug.cgi?id=699877
2013-05-08 00:07:03 +02:00
Florian Müllner
e98eb57e3e modalDialog: Always use a stack for the background
Currently a system modal dialog's actor hierarchy depends on whether
events should be blocked while the dialog is shown or not. Change
it to always contain a stack, to allow subclasses to add additional
background elements.

https://bugzilla.gnome.org/show_bug.cgi?id=694912
2013-05-07 20:52:58 +02:00
Ray Strode
7c21ab0985 Revert "Revert "modalDialog: Destroy dialogs on close""
This reverts commit 007820b7c1.

(I only meant to revert that in my local branch)
2013-04-06 10:53:11 -04:00
Ray Strode
007820b7c1 Revert "modalDialog: Destroy dialogs on close"
This reverts commit 3dd6113a0a.
2013-04-06 10:28:47 -04:00
Jasper St. Pierre
3dd6113a0a modalDialog: Destroy dialogs on close
It turns out that we never destroyed modal dialogs when closing
them, causing them to still linger in the scene graph even when
there were no references to them in the JS. The one case where
we don't want to destroy modal dialogs after being closed is
endSessionDialog, so provide a parameter that allows classes
to override this behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=697295
2013-04-04 15:04:14 -04:00
Stef Walter
7b705dd670 modalDialog: Fix auto-completion of prompts immediately upon display
Shell modal dialogs can take their action on a certain key's
key-release-event. For example on <enter> the affirmative action is
usually run.

Make sure that the key was also pressed on the dialog and we're not
seeing a spurious key-release-event from a key that was pressed before
the dialog was displayed.

https://bugzilla.gnome.org/show_bug.cgi?id=692937
2013-03-04 09:17:41 +01:00
Adel Gadllah
627a2412d2 ui: Don't use Clutter.Group
It is deprecated use Clutter.Actor instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694441
2013-02-22 14:28:58 +01:00
Ray Strode
677cdfd6c8 modalDialog: emit 'closed' signal when dialog is closed
Opening and closing a modal dialog is not instant. There
is a transition animation involved.  When the dialog is
finished opening, it currently emits the "opened" signal.

When it's finished closing, however, it doesn't emit a
"closed" signal.  This means, there's not a good way to
know when the dialog finishes closing.

This commit adds the "closed" signal.

https://bugzilla.gnome.org/show_bug.cgi?id=694296
2013-02-20 14:16:53 -05:00
Florian Müllner
b682c8e052 main: Move KeybindingMode into Shell
Having the definition in C instead of Javascript allows sharing
the corresponding header with gnome-settings-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=643111
2013-02-04 16:48:40 +01:00
Jasper St. Pierre
a0d7d7bc4b loginDialog: Allow right-clicking on button items
In a gdm session, we may not know what mouse orientation the user
may be in, so it makes sense to support both the left and right
mouse buttons to activate login or other items.

Additionally, add the behavior to all modal dialog items, even in
a user session, because it's unlikely that the user will right-click
on buttons, and it makes for an easier implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=688748
2013-01-22 23:42:53 -05:00
Jasper St. Pierre
42e58a4b72 modalDialog: Make the button layout visible always
With the last button-less modal dialog gone, there's no reason it
should ever be hidden.

https://bugzilla.gnome.org/show_bug.cgi?id=690594
2012-12-25 22:18:42 -05:00
Stéphane Démurget
4c55a6f436 modalDialog: do not launch disabled button actions
The "Sign In" button of the login dialog has its look disabled when the
entry is empty, but it can still be triggered by the Enter key.

This fixes the modal dialog so it does not trigger the action of an
insensitive button, and also means we do not need to connect to the
"activate" signal of the entry anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=687113
2012-11-20 21:08:37 +01:00
Stéphane Démurget
c10e4c3117 modalDialog: give more control over the layout
Make the button layout public for callers to be able to have more
control over like adding custom widgets. Also, the clearButtons and
addButton methods are added as convenience for the most frequent usage.

https://bugzilla.gnome.org/show_bug.cgi?id=687113
2012-11-20 21:08:37 +01:00
Florian Müllner
b58f502dd6 main: Add optional keybindingMode parameter to pushModal()
For now we just use it to assign an identifier to modal modes in
which we want to allow some keybindings, but we don't use it for
any actual filtering; we'll start doing this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Florian Müllner
c2065cc3e2 main: Use Params for optional parameters to pushModal()
As the number of optional parameters grows, it gets more convenient
to use Params instead of passing in a lot of undefined/null/0 values.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:44:22 +01:00
Jasper St. Pierre
360d94dd67 modalDialog: Remove the fade in buttons code
Due to a typo, it never worked correctly. After a fix-up to the appropriate
method, the behavior is suboptimal, as the buttons only fade in the first time
the modal dialog is constructed. Just remove the fade-in behavior, rather than
keeping this non-working code around.

https://bugzilla.gnome.org/show_bug.cgi?id=677426
2012-10-16 10:49:20 -04:00
Giovanni Campagna
48fb16b570 ScreenShield: show the unlock dialog on the primary monitor when using the keyboard
Make ModalDialog.open() accept an optional onPrimary argument, and
pass it when the dialog is activated using ESC or Return.

https://bugzilla.gnome.org/show_bug.cgi?id=685855
2012-10-15 22:45:19 +02:00
Florian Müllner
55284e418c modalDialog: Add alternative keys to activate default
Currently Return is used to activate the default button of a modal
dialog if no key is specified. It makes sense to allow alternatives
as the keypad's Enter key as well in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=685511
2012-10-04 21:18:54 +02:00
Jasper St. Pierre
cc6744055f gdm: Don't fade in the log in dialog
Instead, directly show it.

https://bugzilla.gnome.org/show_bug.cgi?id=682428
2012-09-19 01:41:17 -03:00
Giovanni Campagna
1a65374e21 Port modal dialogs to the new MonitorConstraint
This commit makes ModalDialog use the new MonitorConstraint instead
of custom code to force itself on the right monitor.
At the same it ports wanda, which has something similar to a modal
dialog, but is not using the ModalDialog module.

https://bugzilla.gnome.org/show_bug.cgi?id=681743
2012-08-16 21:45:21 +02:00
Giovanni Campagna
5a35c57866 ModalDialog: make dialogLayout public
ModalDialog subclasses may want to add content outside contentLayout
(in particular, UnlockDialog wants to have it after the buttons)
2012-08-07 20:35:29 +02:00
Giovanni Campagna
413ace2eb1 UnlockDialog: allow going back to the lock screen by pressing escape
https://bugzilla.gnome.org/show_bug.cgi?id=681143
2012-08-03 19:54:48 +02:00
Giovanni Campagna
c0652bcd8f ScreenShield: implement curtain design
This separates the screen shield into two main screens. One is
the lock screen, and it is shown when coming back from idle status
and when failing authentication. The other is the actual unlock
dialog.
Moving from the first to the second is possible by pressing Escape
or by dragging an arrow on the bottom on the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02: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
Tim L
dc004f6eb7 modalDialog: show dialogs on monitor with the mouse pointer
Show the dialog on the monitor containing the pointer, rather than
the monitor with active focused window. This brings it inline with
the behaviour seen when launching applications.

Remove the focusMonitor/focusIndex from LayoutManager. These
properties were only used by the modal dialogs. Remove them since
they are not being used elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=642591
2012-06-08 23:05:56 -04:00
Rui Matos
b58425d7d7 modalDialog: Fix setting the initial key focus after the 1st time
Checking if _buttonLayout contains _initialKeyFocus always fails since we
destroy all children before. Instead, use a signal handler id when explicitly
setting the initial key focus which is zeroed if/when the actor is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=663437
2012-03-12 00:52:34 +01:00
Alejandro Piñeiro
a5baeac428 a11y: Setting role and label-actor for runDialog
https://bugzilla.gnome.org/show_bug.cgi?id=670308
2012-03-10 02:27:19 +01:00
Florian Müllner
760da64a4c modalDialog: Hide button layout by default
For modal dialogs without buttons, the button group still contributes
padding/spacing. To fix that, hide it by default and only show it
when actually adding buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=668209
2012-02-28 18:07:05 +01:00
Jasper St. Pierre
bb862e20c0 st: Remove st-group
Now that ClutterActor/StWidget is concrete, we don't need it.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Jasper St. Pierre
c892610f27 st-container: Remove st_container_destroy_children
It was a simple wrapper around clutter_actor_destroy_all_children.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-22 17:00:44 -05:00
Adel Gadllah
fbf6e032d0 modalDialog: Fix bindConstraint
Clutter.BindCoordinate is an enum not a bitmask, so use Clutter.BindCoordinate.ALL
instead of a bitmask of POSITION and SIZE.
2012-02-15 18:13:10 +01:00
Giovanni Campagna
987099ea55 Port ModalDialog to the class framework
Similar to the previous commits, time to port shell modal dialogs
to the class framework.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Adel Gadllah
668920cec4 Small coding style fixes 2011-10-20 22:42:30 +02:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Florian Müllner
6d92af17fd modal-dialog: Don't let buttons steal manually-set focus
ModalDialog provides a method to set the initial focus. However,
when adding buttons, the initial focus is always set to the last
button, thus overwriting a previously set manual focus.
Instead, only set the initial key focus if setInitialKeyFocus()
has not been called manually before.

https://bugzilla.gnome.org/show_bug.cgi?id=659133
2011-09-19 21:26:32 +02:00
Jasper St. Pierre
4352cc231e modalDialog: Don't use a for...in loop for iterating over arrays.
for...in loops do not guarantee that the indexes iterate in order. As a
consequence, buttons may appear in an undesired order.
2011-09-19 13:42:47 -04:00
Ray Strode
db39ba3b9f modalDialog: add mode that leaves shell reactive
A modal dialog in the shell blocks anything but that dialog from
receiving user input. Applications within the session and other
parts of UI are rendered non-reactive.

When GDM gets changed to use the shell for its greeter, the user
list will be presented as a shell dialog. That dialog shouldn't
block access to the panel menus, etc.

This commit adds a shellReactive property that makes the ModalDialog
class continue to block access to applications, but allow the user
to interact with the shell itself.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:36:57 -04:00