Commit Graph

74 Commits

Author SHA1 Message Date
Florian Müllner
4d51056226 runDialog: Remove "Run" button again
While not in the mockups, it was introduced during review of commit
0c807bddaf after discussion on IRC, but the designers disagree;
remove it again.

https://bugzilla.gnome.org/show_bug.cgi?id=687127
2012-10-30 15:50:05 +01:00
Florian Müllner
a607174a25 runDialog: Add entry to focus chain
Currently the entry takes the intial key focus, but is not actually
part of the focus chain. Fix that, even though keynav does not work
too well for the dialog anyway, due to the entry consuming tab for
command completion.

https://bugzilla.gnome.org/show_bug.cgi?id=687127
2012-10-30 15:50:05 +01:00
Florian Müllner
0c807bddaf runDialog: Better match style of other modal dialogs
Update the run dialog to
 - use a proper title
 - use dialog buttons
 - use the standard entry style

https://bugzilla.gnome.org/show_bug.cgi?id=687127
2012-10-29 19:12:12 +01:00
Jasper St. Pierre
45e64f453f runDialog: Use a symbolic icon
Another fallout from the St.IconType changes

https://bugzilla.gnome.org/show_bug.cgi?id=686233
2012-10-17 12:04:28 -04: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
Rui Matos
aa5d352a06 Remove the shell_get_event_state() wrapper
The bug that this wrapper was working around has been fixed for quite some
time: https://bugzilla.gnome.org/show_bug.cgi?id=650329.
2012-02-28 18:11:36 +01:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
d6b6f814d3 Port all classes with inheritance to class framework
All classes that have at least one other derived class (and thus
benefit from the framework) have been now ported. These includes
NMDevice, SearchProvider, AltTab.SwitcherList, and some other
stuff around.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Florian Müllner
9439da81c4 Add context menus to some entries
Use ShellEntry.addContextMenu() to add context menus to most
existing entries, with the exception of:

 - the login dialog - it may act be used to enter either the
                      username (e.g. no password entry) or the
                      password, and copy/paste does not make sense
                      (nowhere to copy from, nowhere to paste to)
 - notifications    - while adding a context menu is useful here as
                      well, it will require changes to the tray's
                      focus grab handling, so leave those entries
                      out for now

https://bugzilla.gnome.org/show_bug.cgi?id=659275
2011-10-17 15:29:32 +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
Rui Matos
d12dd1491f runDialog: catch exceptions from Gio.app_info_launch_default_for_uri()
An uncaught exception here would mean that the dialog wouldn't close.

https://bugzilla.gnome.org/show_bug.cgi?id=653700
2011-07-20 00:25:11 +01:00
Florian Müllner
aa4dbee362 run-dialog: Use user preference when executing in terminal
Rather than hardcoding gnome-terminal, pick up the user's preferred
terminal from System Settings.

https://bugzilla.gnome.org/show_bug.cgi?id=648422
2011-06-01 19:29:41 +02:00
Colin Walters
a8baf4a2a2 Change 'debugexit' to quit main loop rather than exit(), add cleanup
A new envrionment variable GNOME_SHELL_ENABLE_CLEANUP is added which
causes us to attempt freeing global data.  The reason this isn't
enabled by default is that it's a waste of time at best, and at
worst in corner cases could cause crashes which would fill up
crash databases.  Better to leave it as a developer-only tool.

Start stubbing out some cleanup in ShellGlobal.

https://bugzilla.gnome.org/show_bug.cgi?id=649517
2011-05-19 15:35:04 -04:00
Dan Winship
898b2b903d environment: put gettext stuff into global environment
Rather than defining _() as a local function in every module, put it
into the global environment (along with C_() and ngettext()).

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:21 -04:00
Vadim Girlin
33125e78c8 Alt-F2: Avoid running programs multiple times
Returning true from the event handler seems to avoid getting
duplicate return events; these duplicate events likely are
getting generated by IBus.

https://bugzilla.gnome.org/show_bug.cgi?id=644509
2011-03-21 20:50:08 -04:00
Dan Winship
a40daa3c22 runDialog: popModal before running the command
If you run a command from Alt+F2 that tries to get a server grab (eg,
xmag), it will fail if it starts up before the run dialog is finished
hiding.

Additionally, the run dialog currently stays focused while it is
fading out, potentially stealing keystrokes (or causing the user to
accidentally launch two copies of a program).

Change ModalDialog.close() to call popModal() immediately

Add a ModalDialog.popModal method, and call that before running the
RunDialog command. If the command succeeds, close the dialog as
before. If it fails, call ModalDialog.pushModal() to put things back
to normal before displaying the error.

https://bugzilla.gnome.org/show_bug.cgi?id=644857
2011-03-21 14:26:08 -04:00
Dan Winship
bad8dbc2d2 modalDialog: grab focus immediately, not after fade-in
If the user types Alt+F2 and then immediately starts typing, some keys
can get lost. Fix that by grabbing focus sooner.

https://bugzilla.gnome.org/show_bug.cgi?id=644857
2011-03-21 14:26:08 -04:00
Florian Müllner
291ef07cf3 run-dialog: Honor lockdown settings
org.gnome.desktop.lockdown has a setting to prevent the use of the
Alt-F2 run dialog. Honor this setting.

https://bugzilla.gnome.org/show_bug.cgi?id=645335
2011-03-21 15:00:32 +01:00
Jasper St. Pierre
75ae209653 history: Fix HistoryManager
Make GSettings support optional, refactor text entry handling,
fix some off-by-one bugs in the management itself, use Params
for parsing, fix other typos and bugs.

https://bugzilla.gnome.org/show_bug.cgi?id=642793
2011-03-04 09:07:15 -05:00
Jasper St. Pierre
30da70a09e runDialog: use new history manager implementation
https://bugzilla.gnome.org/show_bug.cgi?id=642237
2011-02-19 13:28:16 -05:00
Florian Müllner
9617e83d88 run-dialog: Center error message vertically
Commit 912a30c56 left error message and icon aligned to the top,
but it looks better when the message is centered vertically.
2011-01-27 22:05:46 +01:00
William Jon McCann
912a30c566 Clean up the presentation of errors in the run dialog
Removes redundant text, better icon, and shows are better error when
a command isn't found than "No such file or directory".
2011-01-27 15:46:03 -05:00
Maxim Ermilov
883f51be93 runDialog: use fileUtils.listDirAsync in CommandCompleter
https://bugzilla.gnome.org/show_bug.cgi?id=623708
2011-01-18 00:41:50 +03:00
Ray Strode
2905b0318d runDialog: animate to new height on error
When an error message is displayed the run dialog
pops to the new height instantly.  It needs a
a transition.

This commit makes the dialog quickly grow to its
ultimate height, making room for the error message,
before showing it.

https://bugzilla.gnome.org/show_bug.cgi?id=637187
2011-01-14 00:11:17 -05:00
Ray Strode
ab1ecb5ba2 runDialog: subclass from modalDialog
Now that we have a modalDialog base class in gnome-shell,
it makes sense to use it for the run dialog.

Note, the run dialog doesn't currently have buttons, so
it isn't exercising all the API of the base class.

https://bugzilla.gnome.org/show_bug.cgi?id=637187
2011-01-14 00:11:17 -05:00
Dan Winship
8bdfb8df68 util: add Util.spawn and friends
Add Util.spawn, Util.spawnCommandLine, and Util.spawnDesktop for
spawning a command/argv/.desktop file in the background, automatically
handling errors via MessageTray.SystemNotificationSource(), and
Util.trySpawn, Util.trySpawnCommandLine, and Utils.trySpawnDesktop
that don't do automatic error handling (but do at least clean up the
error message in the exception a bit).

Update various other bits of code around the shell to use the new
methods.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Federico Mena Quintero
77289737c5 Add an 'rt' command to the Run dialog to reload the theme
This should be useful for theme authors who want to quickly reload
the theme without restarting the whole shell.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=630428
2011-01-07 15:21:48 -05:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Milan Bouchet-Valat
2799327c84 Migrate to GSettings
Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
2010-06-18 20:27:41 +02:00
Florian Müllner
6e09cc5fc8 Fade in alt-tab popup, adjust timings
The design calls for item to not appear abruptly, but not too slow
either - 100ms seems to be a good sweet spot for elements which are
supposed to appear "instantly".
Add a fade effect to the alt-tab popup and set the timings for other
fade effects to 100ms.

https://bugzilla.gnome.org/show_bug.cgi?id=621247
2010-06-16 20:55:26 +02:00
Florian Müllner
51478f16ec [runDialog] Fix adding entries to empty history
Before adding a new entry to the history, we check that it does not
match the previous entry to cut down the number of duplicate entries.
Part of that condition is a check for a history length greater zero
to avoid an illegal negative index, with the side effect that nothing
is ever added while the history is empty.

https://bugzilla.gnome.org/show_bug.cgi?id=621123
2010-06-09 18:24:04 +02:00
Florian Müllner
528930d0a9 [Lightbox] Use a fade effect to smooth the transition
Add show()/hide() methods to Lightbox, which (optionally) fade the
lightbox. Change all lightboxes to fade in smoothly.

https://bugzilla.gnome.org/show_bug.cgi?id=602466
2010-06-09 17:07:10 +02:00
Marina Zhurakhinskaya
703b21cef0 Don't use double quotes for things that don't need to be translated
This is our convention.

The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
2010-05-13 16:00:38 -04:00
Joseph Scheuhammer
62afd2ffa3 Reorganize stage in terms of a UI Group actor and everything else
In preparation for adding magnification, "uiGroup.patch", organizes the stage
along the following lines:

Stage
  *Magnifier
  UI group
    Window group
    Chrome group
    Overlay group
    Alt tab
    App display
    Chrome
    ...

This allows a magnifier actor to clone and magnify the UI group.  The magnifier
is a sibling of the UI Group in this stage oraganization -- see the next patch,
"Magnifier.patch".
2010-05-06 17:18:10 -04:00
Dan Winship
cfea0649d8 remove some Big references from places that don't need them any more
https://bugzilla.gnome.org/show_bug.cgi?id=614516
2010-04-06 08:17:33 -04:00
Siegfried-Angel Gevatter Pujals
a9bdffc9e6 runDialog: Accept Enter (keypad) key in addition to Return. 2010-03-31 15:29:11 +02:00
Dan Winship
5635797cb9 runDialog: use Shell.get_event_state(e), not e.get_state() 2010-03-24 13:16:12 -04:00
Adel Gadllah
aefa8af60e [runDialog] Don't add duplicates to the history
When the user runs the same command as the last one saved there
is no need to save it again, otherwise we the history might end
up having lots of dupes which makes searching for an old command
harder.

https://bugzilla.gnome.org/show_bug.cgi?id=613731
2010-03-23 20:22:46 +01:00
Florian Müllner
52f1cc6d19 Remove user_data arguments for callbacks
Gjs now removes user_data arguments for callbacks - the existing
code still works because all user_data arguments are unused and
at the end of the argument list, but it's a lot prettier to remove
them.
2010-03-19 20:13:18 +01:00
Maxim Ermilov
908b0fb727 support arrow-up to recall previous commands
runDialog store history in gconf.
https://bugzilla.gnome.org/show_bug.cgi?id=612635
2010-03-18 22:05:09 +03:00
Dan Winship
3ce89e3c80 Add missing semicolons noted by jslint
Taken from a patch by Lex Hider on the mailing list
2010-03-15 09:50:05 -04:00
Florian Müllner
62ca7fb268 [runDialog] Support opening files and folders
Support completion on files and folders in the run dialog and launch
the default application when activated. Assume a path relative to the
home directory if execution as command fails and the input doesn't start
with a slash.
Removed workaround for relayout of error messages.

https://bugzilla.gnome.org/show_bug.cgi?id=611209
2010-03-09 00:12:58 +01:00
Colin Walters
22948b3d39 Merge St.TextureCache and Shell.TextureCache
Brute force merge these two by essentially replacing St.TextureCache
with a (renamed) Shell.TextureCache.

One function was added for convenience, namely "st_texture_cache_load_file_simple".
St.TextureCache had a function to load a texture from a filename, and it
returned NULL on error but only half the callers actually checked this.  This
function is better.

https://bugzilla.gnome.org/show_bug.cgi?id=607500
2010-03-05 16:19:40 -05:00
Maxim Ermilov
72cb4bf346 Port Lightbox to CSS and use it in runDialog
Make Lightbox stylable and add a common style. Use it in runDialog.
https://bugzilla.gnome.org/show_bug.cgi?id=604978
2010-02-26 23:16:55 +03:00
Maxim Ermilov
bffadf1b6e Improve run dialog
Bind <Ctrl>+<Return> for run in terminal.
Port runDialog to css.
https://bugzilla.gnome.org/show_bug.cgi?id=604978
2010-02-26 20:22:39 +03:00
Florian Müllner
4deef2a9ef [Overview] Allow selecting windows in lightbox mode
Make the event blocking done by Lightbox optional - leave it activated
when displaying the run dialog, but deactivate it when highlighting
windows in the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=602774
2010-01-18 13:53:31 +01:00
Maxim Ermilov
2a0e0ae66f Fix crash in runDialog
The run dialog crashes when PATH contains non-existing directories (some
distros seem to do that ...).
Fix by filtering those out before setting up file monitors.

https://bugzilla.gnome.org/show_bug.cgi?id=606418
2010-01-14 13:16:55 -05:00
Maxim Ermilov
f4c05deb2d Completion in alt+F2
Bind <Tab> for command's completion and path's completion.
https://bugzilla.gnome.org/show_bug.cgi?id=597677
2009-12-18 11:31:17 -05:00
ultrageek.lloyd
1cc78fdf60 Clear text when closing run dialogue
Signed-off-by: Colin Walters <walters@verbum.org>
2009-11-21 15:50:57 -05:00
Adel Gadllah
3bf88b8988 Run dialog: Make error message translatable
Allow the error message to be translated.

https://bugzilla.gnome.org/show_bug.cgi?id=597422
2009-10-05 23:53:50 +02:00