Commit Graph

271 Commits

Author SHA1 Message Date
Florian Müllner
499ae609dd appDisplay: Use a custom LayoutManager for the AllView stack
ClutterBinLayout uses the maximum width/height of all children in
size requests and positions children according to the expand/align
properties. This means that the vertical position of folder popups
is not considered in size requests, so if the main view is smaller
than a folder popup's height and offset, the popup will be truncated
and/or mispositioned. Fix those cases by using a custom LayoutManager
that behaves like ClutterFixedLayout for height requests and like
ClutterBinLayout otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=694371
2013-03-15 22:41:54 +01:00
Jasper St. Pierre
5870709fbc appDisplay: Move ensureIconVisible logic to util, make it more generic
In particular, make it work if we have multiple parents, like in the
search case.

https://bugzilla.gnome.org/show_bug.cgi?id=689681
2013-03-12 19:29:47 -04:00
Giovanni Campagna
95602eb85d AppDisplay: fix allocation loop warnings
Don't use a constraint to position the boxpointer horizontally. Instead,
use the right alignment flags and let the layout managers do their job.

https://bugzilla.gnome.org/show_bug.cgi?id=694284
2013-02-22 14:58:13 +01:00
Florian Müllner
6ea8f35343 appDisplay: Center AllView content
If the AllView is scrolled, the vertical scrollbar will take away
some horizontal space on one side, resulting in the content ending
up slightly off-center.
Account for this by using overlay-scrollbars instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694261
2013-02-22 10:57:50 +01:00
Florian Müllner
7425b382d6 appDisplay: Remove scroll view hack in FrequentView
The frequent view should not be scrolled, but to work around the
icon grid overflowing, we used a (non-scrolling) scroll view anyway.
Now that IconGrid:fillParent allows us to avoid overflow, we can
remove this hack.

https://bugzilla.gnome.org/show_bug.cgi?id=694256
2013-02-22 09:50:57 +01:00
Florian Müllner
9db73767d9 appDisplay: Remove unnecessary StBin from hierarchy
The bin is used to top-align views that don't fill the entire height,
but the same can be achieved by setting appropriate expand properties.
2013-02-22 00:07:54 +01:00
Giovanni Campagna
d3f978a19d AppDisplay: fix undefined variable reference
https://bugzilla.gnome.org/show_bug.cgi?id=694282
2013-02-20 17:04:01 +01:00
Giovanni Campagna
a50ddd6d8c AppDisplay: fake a release event to dnd when opening the menu
PopupMenuManager eats the next release event, which would otherwise close
the menu, so we need to tell dnd that we're handling it, and no drag should
be started, so it can ungrab the pointer and restore state.

https://bugzilla.gnome.org/show_bug.cgi?id=694276
2013-02-20 17:01:25 +01:00
Giovanni Campagna
37700b4b1a AppDisplay: fix folder popup arrow
The arrow origin must be in the coordinate space of the box pointer,
but it cannot be calculated when the box pointer is shown, because it's
not allocated yet, so pass the source to the boxpointer and adjust
the arrow at the next paint.

https://bugzilla.gnome.org/show_bug.cgi?id=694264
2013-02-20 16:04:54 +01:00
Adel Gadllah
b922035d4f iconGrid: Dynamically adjust spacing based on columnLimit
Adjust the spacing based on the available width when a columnLimit
is set to evenly place the icons.

https://bugzilla.gnome.org/show_bug.cgi?id=694215
2013-02-20 00:39:18 +01:00
Florian Müllner
b75fc2bde3 appDisplay: Add additional view showing frequently used apps
According to the design mockups, the app picker should follow the
recent view pattern as used by applications, where the user is first
offered a subset of applications he/she is likely to start, and only
then allow switching to the full set of installed applications.
So implement the ability to manage several views in AppDisplay and add
FrequentView as additional view, which uses the existing ShellAppUsage
to display a list of frequently used applications.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
6628214484 appDisplay: Make folder popups "view-modal"
While a group is open, we want to block events on items underneath,
but still allow interaction with components outside the app display
as well as scrolling of the view as a whole.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
e3c9c46c1c appDisplay: Create AppFolderIcons for selected categories
App folders are intended for grouping some applications, not to
assign a category to every single application, so we will only
create folders for a selected subset of the existing categories.
Software/Alacarte will eventually allow to create/modify those
folders, so store the setting in GSettings so that it can be
shared with those applications.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
6a1b341336 appDisplay: Add AllView.addFolder() method
Adjust AllView to be able to hold both apps and folders, and add an
addFolder() method to insert a folder.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
65f96494f8 appDisplay: Separate app loading from filling the grid
At the moment when loading the applications, each app is inserted
at its correct (alphabetical) position. Avoid this overhead by
loading all apps first, then sort them once and fill the grid with
the sorted actors.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
6e3e2d9f29 appDisplay: Add new FolderIcon class
FolderIcons will appear in the primary app view along AppIcons, but
represent a group of applications rather than a single application.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
25d8debb11 appDisplay: Add intermediate stack widget to hold folder popups
AllView will be updated to allow app folders in addition to app
launchers. Folders will pop up in the existing view, so add an
additional stack widget into the hierarchy which popups will use
as parent.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
426b227f03 appDisplay: Make AlphabeticalView an abstract base class of AllView
We are going to introduce app folders, which will also present an
alphabetical list of applications, but use a different UI. In
preparation for that, split out the item logic into an abstract
base class.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:18:56 +01:00
Florian Müllner
2fbd9b95a7 appDisplay: Set a maximum column number
In particular on widescreen monitors, the number of items in a row
can be overwhelming, so limit the number of columns and center the
view.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Florian Müllner
9758029c11 appDisplay: Make _loadCategory() a utility function
When we bring back categories as folders, this method will be
useful outside of AppDisplay.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Florian Müllner
4f8f79a907 appDisplay: Remove unused variables
https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Florian Müllner
c9e2f16404 appDisplay: Merge AllAppDisplay and ViewByCategories
With categories removed, the separation between AllAppDisplay and
ViewByCategories no longer makes sense. Also use this opportunity
to rename the outdated AllAppDisplay to AppDisplay; it will
eventually be used to manage different views.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Florian Müllner
2658754295 appDisplay: Merge AppIcon and AppWellIcon
AppIcon is just a tiny wrapper around BaseIcon, which does not add
anything over using BaseIcon directly, so merge its code with
AppWellIcon. As the concept of the "app well" has not been used
since well before 3.0, use AppIcon as name for the merged class.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Florian Müllner
77d8ff3620 appDisplay: Remove categories
We will eventually display some categories as app folders, but the
existing code doesn't help with the implementation, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=694192
2013-02-20 00:08:11 +01:00
Florian Müllner
75885c3095 appDisplay: Fix _ensureIconVisible()
The fade effect was renamed a while ago, but we missed to update
the use in _ensureIconVisible().

https://bugzilla.gnome.org/show_bug.cgi?id=694125
2013-02-18 22:44:23 +01:00
Cosimo Cecchi
6bb38b873b appDisplay: remove unused parameter to AppWellIcon constructor
https://bugzilla.gnome.org/show_bug.cgi?id=686984
2013-02-18 14:54:53 -05:00
Giovanni Campagna
3044a6b517 Remove builtin settings search provider
It is now provided as a remote provider by gnome-control-center.

https://bugzilla.gnome.org/show_bug.cgi?id=690824
2013-02-18 16:56:45 +01:00
Cosimo Cecchi
07696086a2 appDisplay: set hscrollbar_policy = NEVER on the category view actor
https://bugzilla.gnome.org/show_bug.cgi?id=686881
2013-01-24 15:10:02 -05:00
Cosimo Cecchi
d0902fa28b search: remove SearchProvider base class
This is causing more confusion than anything else these days; the DBus
API is properly documented now and that's what people are expected to
use, the rest are implementation details we're not interested in
exposing.

https://bugzilla.gnome.org/show_bug.cgi?id=681797
2012-12-10 16:50:54 -05:00
Tanner Doshier
835d4e4b58 appDisplay: Don't use icons in results for settings
The search results are not necessarily improved by including icons, so don't.

https://bugzilla.gnome.org/show_bug.cgi?id=681797
2012-12-10 16:50:54 -05:00
Tanner Doshier
c5d8484e19 searchDisplay: Add ListSearchResult and ListSearchResults
These are for all search results except apps (and Wanda).
We also simplify a bit the packing of search results, which removes some
ugly code in navigateFocus() where we needed to call
st_widget_navigate_focus() twice, since the grid icon was composed by
two nested boxes, both focusable.

https://bugzilla.gnome.org/show_bug.cgi?id=681797
2012-12-10 16:50:53 -05:00
Tanner Doshier
9af107feff searchDisplay, and others: Switch from provider title to provider icon
Display a '+' icon on the provider icon if there are more results that are
hidden. If the provider icon is clicked, ask the provider to launch itself and
perform a search with the current terms.

https://bugzilla.gnome.org/show_bug.cgi?id=681797
2012-12-10 16:50:53 -05:00
Jasper St. Pierre
9dfc3af9d7 popupMenu: Port to GrabHelper
https://bugzilla.gnome.org/show_bug.cgi?id=689109
2012-12-07 19:55:28 -05:00
Cosimo Cecchi
a43ee41b0b app-display: use a GAppInfo for the settings provider
this._gnomecc is currently unused; we actually need a GAppInfo for this
provider if we want to display an icon next to it (see future commits),
so just turn it into one.
We might move this to an external provider altogether in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=689735
2012-12-06 12:15:13 -05:00
Cosimo Cecchi
9b846cbb83 search: remove additional params from activateResult() call
The only case when we're interested in using those parameters nowadays
is for DnD, which is handled in a separate method already.
Since we're not going to support DnD for non-app search results anyway,
drop the params from all the activateResults() calls; this will be
useful later since we're going to add another parameter to it.

https://bugzilla.gnome.org/show_bug.cgi?id=689735
2012-12-06 12:15:13 -05:00
Jasper St. Pierre
5fc16bb05b searchDisplay, appDisplay: Use ClutterPanAction for re-swipe scrolling
The sooner we can kill off the custom overview swipe scroll code, the
better.

https://bugzilla.gnome.org/show_bug.cgi?id=689062
2012-11-30 16:03:34 -05:00
Cosimo Cecchi
e58fbeea17 appDisplay: don't increment counter if we didn't add a category
Or we'll later try to jump to the wrong category when clicking on it.
2012-11-29 19:21:41 -05:00
Stéphane Démurget
e6a3958e45 appDisplay: do not show empty categories
Desktop files can specify if the application should only be shown for
specified desktops with OnlyShowIn and NotShowIn directives options.

If a menu category only contained entries for a different desktop, we
were still creating the category.

We now only add a category button if there is at least one application
to be displayed in this category.

https://bugzilla.gnome.org/show_bug.cgi?id=687970
2012-11-20 21:17:57 +01:00
Stéphane Démurget
ee2f12fe81 dash: properly restore item label on popup close
We simply hide the label when the popup is opened instead of relying
on the popup state when the hover state change.

To do this we replace the flag isMenuUp by a 'menu-state-changed' signal
on the AppWellIcon. This simplifies the dash label visibility handling
code that need additional changes for the bug.

https://bugzilla.gnome.org/show_bug.cgi?id=657315
2012-11-07 00:26:11 +01:00
Jasper St. Pierre
0c4692ae58 appDisplay: Fix recursive directory NoDisplay testing
We were accidentally testing NoDisplay on the wrong directory.

https://bugzilla.gnome.org/show_bug.cgi?id=658176
2012-06-21 16:03:48 -04:00
Jasper St. Pierre
196f6c241a appDisplay: Don't show apps in NoDisplay categories in the All view
We explicitly include NoDisplay applications in the ShellAppSystem because
we want app tracking for them, but we explicitly filter NoDisplay applications
out when showing them to the user because we don't want to show them to the
user. We also based our "All" apps view on a flattened list of apps. While
we did check for NoDisplay on the app item itself, we didn't check against
its parents. Refactor the app display view to not use a separate flat list
of applications, but instead a concatenation of all the applications in all
the loaded categories.

https://bugzilla.gnome.org/show_bug.cgi?id=658176
2012-06-11 13:55:59 -04:00
Jasper St. Pierre
333e380340 search: Remove the ability to add synchronous search providers
As shown in the previous commits, synchronous search is easily implemented
by the asynchronous search API. The only reason we still have a
synchronous search API is of historical reasons. Well, we're not a museum,
and git log can keep our fossils safe if need be....

https://bugzilla.gnome.org/show_bug.cgi?id=675328
2012-05-07 15:29:46 -03:00
Jasper St. Pierre
58f77a19ed search: Port all search providers over to the async API
https://bugzilla.gnome.org/show_bug.cgi?id=675328
2012-05-07 15:29:32 -03:00
Alejandro Piñeiro
e91f4e88b5 a11y: Setting LIST_ITEM role for Categories items on Applications view 2012-03-14 12:36:33 +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
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
Florian Müllner
53d9ea7a2c search: Replace getResultMeta() with getResultMetas()
Save some function calls by fetching all search results we want to
display for a provider at once, rather than one result at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=663125
2012-02-21 23:00:53 +01:00
Seif Lotfy
2b9561fcbb dash: Move labels beside the app icon upon hovering
Instead of using an St.Tooltip to show the app's name under the icon,
manually position a new St.Label ourselves. Make sure to keep the label
hidden when right-clicking so it doesn't get in the way of the popup menu.
Only one tooltip/label will be displayed at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=666166
2011-12-22 09:07:48 +00: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