Commit Graph

66 Commits

Author SHA1 Message Date
Hashem Nasarat
8ca25aed8b viewSelector: stop launching app from empty search
In the overview, when there is no text in the search entry, this._searchActive
will be set to false. Moving the Clutter.Return code block ensures that
pressing enter in the search field after deleting the characters of a search
will no longer launch the #1 application for the previous search.

https://bugzilla.gnome.org/show_bug.cgi?id=692391
2013-01-27 20:29:26 +01:00
Cosimo Cecchi
4bd071bf3c viewSelector: clean up active search state code
'active' isn't terribly clear about just what is active; also, make it
private, remove an useless extra object state we were saving, and
refactor some messy code.
Based on a patch by Tanner Doshier.

https://bugzilla.gnome.org/show_bug.cgi?id=692454
2013-01-24 12:04:20 -05:00
Giovanni Campagna
c97b4dd48e ViewSelector: use Params to pass optional parameters to addPage
This allows to introduce new parameters without making the signature
overly complex.

https://bugzilla.gnome.org/show_bug.cgi?id=690171
2013-01-18 20:53:20 +01:00
Giovanni Campagna
be10f3c2b5 ViewSelector: remove unnecessary StBoxLayout
It was a remnant from the tabbed interface.

https://bugzilla.gnome.org/show_bug.cgi?id=690171
2012-12-15 15:23:21 +01:00
Tanner Doshier
04d68c6e36 overview: overview as boxlayouts
https://bugzilla.gnome.org/show_bug.cgi?id=682286
2012-12-13 09:38:45 -05:00
Florian Müllner
2a5eed1eb4 viewSelector: Ignore key-presses during non-overview modals
Since commit 0c807bddaf, the run dialog no longer handles Escape
key presses itself but uses the action key mechanism of modal dialogs.
As the latter uses key-release events, our own handling of the Escape
key runs on key-press.
Fix this by bailing out early if anything has pushed a modal in addition
to the overview (like system modals, looking glass, ...).

https://bugzilla.gnome.org/show_bug.cgi?id=688196
2012-11-28 21:15:09 +01:00
Stéphane Démurget
5e3111bad8 ctrl-alt-tab: use better icons
The top panel and message tray icons were by default a gnome foot and
are replaced by better ones. The applications icon is now using the
symbolic apps icon of the dash, and the windows icon is also improved.

https://bugzilla.gnome.org/show_bug.cgi?id=641303
2012-11-20 11:42:04 +00:00
Cosimo Cecchi
f25832d1b6 view-selector: add support for disable-external search setting
https://bugzilla.gnome.org/show_bug.cgi?id=687491
2012-11-19 11:45:21 -05:00
Cosimo Cecchi
cf363171aa remote-search: apply sort-order from GSettings
Sort providers according to the GSettings state, and make sure to reload
them as soon as the sort order changes.

https://bugzilla.gnome.org/show_bug.cgi?id=687491
2012-11-19 11:45:21 -05:00
Cosimo Cecchi
9791d15f39 view-selector: filter out disabled search providers
If the added search provider has an appId in the list of the disabled
search providers settings, ignore it.

https://bugzilla.gnome.org/show_bug.cgi?id=687491
2012-11-19 11:45:21 -05:00
Florian Müllner
f084011a61 viewSelector: Make toggle-application-view binding available in overview
https://bugzilla.gnome.org/show_bug.cgi?id=688202
2012-11-17 01:52:52 +01:00
Cosimo Cecchi
9aefbd189c view-selector: add missing semicolon
https://bugzilla.gnome.org/show_bug.cgi?id=687491
2012-11-06 17:47:47 -05:00
Jeremy Bicha
dd3484b93f dash: Open 'Show Apps' with Super+A
This is a workaround for power users for the "Show Apps" button
placement being too inconvenient to press at the bottom of the
dash favorites list.

Unity also uses Super+A to show the Apps lens.

https://bugzilla.gnome.org/show_bug.cgi?id=685738
2012-10-16 01:38:12 +02:00
Giovanni Campagna
f39098a4f2 ViewSelector: remove the places & devices search provider
Remove the PlacesManager, its search provider and all associated code.
Places search is now provided by nautilus using the external search
provider API.

https://bugzilla.gnome.org/show_bug.cgi?id=683506
2012-09-16 19:02:22 +02:00
Rui Matos
3b293e91e3 viewSelector: Make the start search event available to input methods
Since we now use the capture phase to feed events into the input
method, we must set the capture flag for the event that starts
searches so that IMs can get at it.

https://bugzilla.gnome.org/show_bug.cgi?id=684040
2012-09-14 21:50:38 +02:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Florian Müllner
ee0102e86e viewSelector: Allow to close the application view with escape
With the latest changes to the overview, the application view is now
clearly on a different level compared to the window picker. For that
reason it now makes sense to close it on Escape rather than hiding
the overview directly, as we do for search.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 20:40:01 +02:00
Florian Müllner
776b71bad5 viewSelector: Allow to start keynav using the down arrow
As the search entry acts like it had keyboard focus, it seems
logical to use the down arrow to move focus to the active page.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 20:40:01 +02:00
Florian Müllner
ea14d74141 viewSelector: Clean up focusTrap in search results
Rather than relying on implementation details of StWidget's keyboard
navigation to "hide" the focusTrap from arrow key navigation, implement
the desired behavior explicitly in a custom widget.

https://bugzilla.gnome.org/show_bug.cgi?id=663901
2012-08-20 20:40:00 +02:00
Joost Verdoorn
8c40ded498 viewSelector: Replace tab system with pages
The old tab system is no longer a good fit for the current design, so
replace most of the abstractions with a simpler page system.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:19 +02:00
Joost Verdoorn
c267a7a7f9 viewSelector: Merge SearchTab into the ViewSelector
Tabs used to provide an abstraction for a page and the control used to
activate it. As the latter has now been replaced with external controls
handled directly in the viewSelector, the abstraction itself doesn't make
much sense anymore. In preparation of replacing it, move the search
handling provided by the SearchTab directly in the viewSelector.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:19 +02:00
Joost Verdoorn
0959adcfe3 overview: Center the dash vertically
https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:19 +02:00
Joost Verdoorn
7d12f47bf8 viewSelector: Remove shortcut to switch between tabs
We no longer have tabs, so it no longer makes sense to keep the shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:19 +02:00
Joost Verdoorn
dff673533d viewSelector: Remove tab title bar
All the functionality provided by the tab titles has been replaced, so the
title bar can be removed without loss of functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:18 +02:00
Joost Verdoorn
816a29d582 viewSelector: Hook up the dash's showApps button
We pass the dash’s showApps button to the viewSelector, and we connect it
to the showing and hiding of the appsView. This is necessary because there
are different mechanisms for switching the views, and it has to stay in
sync with the button’s state.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:18 +02:00
Joost Verdoorn
0ea2d98768 overview: Move the entry out of the SearchTab into the overview
The entry should be positioned in the center of the overview. This makes
that its position can’t be set in the viewSelector without making things
overly complicated. Therefore we move the entry to the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:17 +02:00
Joost Verdoorn
b5dc78a968 viewSelector: Use a fixed set of view tabs
Design calls for views being accessible by other means than the current tab
system, so we have no longer a need for the public viewTab API. Move the
initialization of tabs to the viewSelector and make
viewSelector.addViewTab() private.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
2012-08-20 14:23:17 +02:00
Jasper St. Pierre
ef4231b9c0 search: Junk the OpenSearch system
The original design for the overview had buttons for searching for
Wikipedia and Google, but in practice this is a bad idea. The buttons
are the default activations, meaning that using the overview as a
fluent motion of launching something - "firefxo<Enter>", will launch
Google/Wikipedia.

https://bugzilla.gnome.org/show_bug.cgi?id=670168
2012-08-19 21:19:17 -04:00
Florian Müllner
384c7e2c17 viewSelector: Allow to start navigating results using arrow keys
We currently require users to tab away from the search entry before
search results can be navigated using arrow keys. For convenience,
support using arrow keys directly from the entry.

https://bugzilla.gnome.org/show_bug.cgi?id=663901
2012-03-20 18:22:26 +01:00
Florian Müllner
5f0389c07c viewSelector: Tie cursor visibility to :focus style
With the recent keynav changes, the keyboard focus can now move
away from the search entry while a search is active. While we
keep the focus entry style while a search is active, we set the
cursor visibility depending on whether the entry has focus. This
doesn't seem very logical, so always request to show the cursor
when we appear focused.
Note that at least for now we are just expressing intent, as clutter
never draws the cursor for unfocused entries.
2012-03-10 16:26:23 +01:00
Rui Matos
203382e007 viewSelector: While on search results keep the entry styled as focused
This hints the user that even though keynav focus is on the search
results, if there's character input it will update the search string.

https://bugzilla.gnome.org/show_bug.cgi?id=663901
2012-03-10 15:00:18 +01:00
Rui Matos
d2ba9eb967 viewSelector: Make the search canceling behavior consistent
When canceling a search pressing Escape while the focus is on the
search entry we clear the entry, set its text to the hint and go back
to the previously selected tab. Make this the behavior also for when
the focus is on search results and not on the entry itself.

https://bugzilla.gnome.org/show_bug.cgi?id=663901
2012-03-10 15:00:18 +01:00
Rui Matos
b864b03a65 searchDisplay, viewSelector: add default result activation
Adds a way to highlight and activate the first search result when
pressing enter on the search entry.

https://bugzilla.gnome.org/show_bug.cgi?id=663901
2012-03-10 15:00:18 +01:00
Rui Matos
c7a37660ce searchDisplay, viewSelector: use St keynav in Applications and Search
https://bugzilla.gnome.org/show_bug.cgi?id=663901
2012-03-10 15:00:18 +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
Jasper St. Pierre
15f881f967 st: Remove custom text direction stuff
Clutter has its own built-in system for managing text directions, like GTK+.
Convert over to use this.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-28 08:14:06 -05:00
Florian Müllner
f2c79be11a workspaces-display: Make workspacesView private
WorkspacesDisplay was introduced to manage the workspace objects
and views; however, the overview still accesses the view held
by the workspacesDisplay directly, which is a bit odd.
Add some additional methods needed by the overview, and make the
view a private property.

https://bugzilla.gnome.org/show_bug.cgi?id=652580
2011-12-01 17:55:13 +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
Nohemi Fernandez
b9069df85c search: fix keyboard hiding when user starts a new search
The keyboard hides prematurely when the user is typing into
an empty search box because the click is a captured event that
triggers a loss of entry focus. By adding a keyboard check to
this event, the problem is solved.

https://bugzilla.gnome.org/show_bug.cgi?id=661340
2011-10-13 14:12:21 -04: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
Philippe Normand
595be5083c overview: Add API to remove search providers
As extensions are now expected to provide a "disable" function,
they need to remove search providers they added. Implement the
removal functionality and add a public removeSearchProvider()
method.

https://bugzilla.gnome.org/show_bug.cgi?id=657548
2011-09-04 13:28:08 +02:00
Philippe Normand
3418e6e85e Add support for asynchronous search providers
Some search providers may want to change their results, or may not
want to block on an external service to get their results (DBus, etc.)
Set up an infrastructure to allow search providers to add their search
results at a later time.

Based on a patch by Jasper St. Pierre and Seif Lotfy.

https://bugzilla.gnome.org/show_bug.cgi?id=655220
2011-08-30 11:55:28 -04:00
Maxim Ermilov
203dedfb3a viewSelector: Bind <Ctrl>+<Return> for open new window
https://bugzilla.gnome.org/show_bug.cgi?id=613082
2011-07-17 00:50:26 +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
Nohemi Fernandez
35c85d9fac Fix search handling when typing multiple searches in the search box
In the current implementation of the search entry, when replacing a
selected search term with another term, the first character of the
replacement is prepended to the hint text rather than starting a new
search. This fix makes sure that the focus is not lost when changing
the selected search term.

https://bugzilla.gnome.org/show_bug.cgi?id=636341
2011-04-15 19:42:08 +02:00
Florian Müllner
018e3bc35f search-tab: Don't handle clicks on inactive icon
The icon set as secondary icon of the search entry depends on whether
a search is active or not - clicking the icon should reset the entry
only in the former case. This is implemented by connecting/disconnecting
the 'secondary-icon-clicked' signal when updating the icon, but an
additional signal connection was left-over when refactoring the search
entry, resulting in clicks on the inactive icon removing the hint text.
Fix by removing the stray signal connection.

https://bugzilla.gnome.org/show_bug.cgi?id=646855
2011-04-11 20:57:05 +02:00
Nohemi Fernandez
59e3cbb36b search-entry: Fix clicks on the clear icon
onTextChanged() called a non-existent method, fix that

https://bugzilla.gnome.org/show_bug.cgi?id=647098
2011-04-08 00:28:42 +02:00
Florian Müllner
06ea78af1b view-selector: Don't fade in the initially selected tab
The fade effect when switching tabs should only be applied when
switching from a previously selected tab, not when selecting the
initial one - otherwise, the window previews are faded in the first
time the overview is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=644389
2011-03-19 11:16:09 +01:00