Commit Graph

561 Commits

Author SHA1 Message Date
Colin Walters
38c06ca837 Create ShellApp, rebase things on it
Previously, we had ShellAppInfo, which contains fundamental
information about an application, and methods on ShellAppMonitor
to retrieve "live" information like the window list.

AppIcon ended up being used as the "App" class which was painful
for various reasons; among them that we need to handle window
list changes, and some consumers weren't ready for that.

Clean things up a bit by introducing a new ShellApp class in C,
which currently wraps a ShellAppInfo.

AppIcon then is more like the display actor for a ShellApp.  Notably,
the ".windows" property moves out of it.  The altTab code which
won't handle dynamic changes instead is changed to maintain a
cached version.

ShellAppMonitor gains some more methods related to ShellApp now.

In the future, we might consider changing ShellApp to be a GInterface,
which could be implemented by ShellDesktopFileApp, ShellWindowApp.

Then we could axe ShellAppInfo from the "public" API and it would
return to being an internal loss mitigation layer for GMenu.

https://bugzilla.gnome.org/show_bug.cgi?id=598227
2009-10-14 14:37:34 -04:00
Colin Walters
d1bdd6f11d [search] Finish queued search on Return
If we had a pending search processing, finish it when the user
activates the entry.

This is a small conceptual change; the large diff is simply
moving the search implementation (unedited otherwise) from
an anonymous inline to a named function so it can be called
sanely in _activate.

https://bugzilla.gnome.org/show_bug.cgi?id=598111
2009-10-13 16:57:39 -04:00
Colin Walters
39edf54aa9 Scroll to bottom when pushing a result
This makes the evaluator significantly more useful past a few
results.

https://bugzilla.gnome.org/show_bug.cgi?id=597919
2009-10-13 13:10:43 -04:00
Marina Zhurakhinskaya
a27c29f4fc Improve capitalization
"Add to Favorites" and "Remove from Favorites" menu options should be
capitalized throughout.
2009-10-09 00:33:33 -04:00
Marina Zhurakhinskaya
212d5c1954 Add missing files to POTFILES.in; add a translation hint
POTFILES.in was missing some files.

"Activities" is not easily translatable into some languages, e.g. Russian,
so suggest using the word for "Overview" instead.
2009-10-09 00:30:10 -04:00
Steve Frécinaux
8929f43ad9 [AppSwitcher] Fix hiding the arrow on application change.
The down arrow is shown when an application with more than one
window is selected, but the window list is not always displayed.

This patch fixes the fact that the arrow was not hidden when one
focus an app with a single window when coming from an app with
multiple windows, if the window list was not displayed.

https://bugzilla.gnome.org/show_bug.cgi?id=597791
2009-10-08 13:56:47 +02:00
Owen W. Taylor
ff39edd1ee Deal with unknown flags from ClutterEvent.get_state()
When we get a ClutterModifierType from Clutter, it might contain
bits not in the enumeration. See bug 59771 for a similar problem
with GdkModifierType.

Add a wrapper Shell.get_event_state() around clutter_event_get_state()
to mask these bits out and only return approved bits.

https://bugzilla.gnome.org/show_bug.cgi?id=597735
2009-10-07 17:22:37 -04:00
Owen W. Taylor
a81a16801d Fix overview to show on the correct monitor
When tweening the overview in, tween it to appear on the correct
position of the primary monitor, not at (0,0); position
the 'backOver' actor to cover all monitors properly.

Reported by Rui Matos

https://bugzilla.gnome.org/show_bug.cgi?id=597721
2009-10-07 17:14:56 -04:00
Owen W. Taylor
4c6f770dea Fix positioning of the Calendar on multihead
Parens were in the wrong place, resulting in the calendar not
being properly centered on the primary monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=597078
2009-10-07 14:52:49 -04:00
Marina Zhurakhinskaya
c0b01c0210 Match on menu category during application search
Being able to display all applications in a category based on the search
string with a category name is generaly useful.

Prepare all the applications that match a search term based on their
category name up-front.

Remove unused this._appCategories and a call to non-existing
itemInfo.get_categories()
2009-10-07 14:28:49 -04:00
Dan Winship
d7af6d40e3 [AppSwitcher] Use thumbnails instead of a window menu, and other UI changes
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-07 14:00:43 -04:00
Colin Walters
90ebcd32e3 Fix exception when showing menu for not-running app
Need to check windows.length before checking first window.

https://bugzilla.gnome.org/show_bug.cgi?id=597466
2009-10-06 17:19:36 -04:00
Marina Zhurakhinskaya
53d0581377 Don't process the first click on Activities button for a timeout period after the hot corner was triggered
This avoids opening and closing the overview when the hot corner is triggered
and the activities button is clicked.
2009-10-06 16:58:30 -04:00
Dan Winship
439daf828f [AppSwitcher] add a workaround for a gjs problem with GdkModifierType
gdk_display_get_pointer() sometimes returns values for the mask that
aren't part of the GdkModifierType enumeration, which gjs doesn't like
(bug 597292). Work around that by adding a C wrapper that strips out
the extra flags.

https://bugzilla.gnome.org/show_bug.cgi?id=597559
2009-10-06 16:07:37 -04:00
Colin Walters
d120d03de9 Workaround being allocated 0x0
Because of a chain of bugs we could end up getting allocated 0x0,
and this would cause the WellGrid allocation code to be unhappy.

See http://bugzilla.openedhand.com/show_bug.cgi?id=1831

Simply treat 0 as "unlimited" i.e. equivalent to -1.

https://bugzilla.gnome.org/show_bug.cgi?id=597586
2009-10-06 15:12:20 -04:00
Colin Walters
4bdd40911f Disconnect from window user time notifications, only sort when mapped
Before we were badly leaking AppIcons by not disconnecting from the
window signal handlers when our actor got destroyed.  This caused
us to repeatedly re-sort the windows for each AppIcon that
had ever been displayed with obvious bad consequences.

Besides simply chaining the signals to the lifetime of the AppIcon
actor, we also only do the sorting if we're mapped.  This decreases
the amount of work to do in the not-mapped case.

https://bugzilla.gnome.org/show_bug.cgi?id=597120
2009-10-06 12:49:43 -04:00
Dan Winship
ff4ac0d02e [AppIcon] Improve shell_draw_box_pointer()
Add a new enum type for the pointer direction, rather than abusing
ClutterGravity, and implement the missing directions.

https://bugzilla.gnome.org/show_bug.cgi?id=597498
2009-10-06 09:53:47 -04:00
Dan Winship
45dd342cc0 [AppIcon] redo constructor to take a params object, add "size" param
Add a "size" parameter to allow changing the AppIcon size, and then
simplify the constructor by taking an object with parameters like
gobject-introspection constructors do, rather than taking a large
number of miscellaneous arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=597498
2009-10-06 09:53:42 -04:00
Dan Winship
e5efecd2bd [AppIcon] compute the sorted window list even if not doing the menu
https://bugzilla.gnome.org/show_bug.cgi?id=597498
2009-10-05 22:35:05 -04: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
Adel Gadllah
fd1e7b2a0f Places: Add padding between "Connect to.." and devices section
Add padding after "Connect to.." to make the list look consistent when devices
are connected.

https://bugzilla.gnome.org/show_bug.cgi?id=597423
2009-10-05 22:24:04 +02:00
Marina Zhurakhinskaya
aed1e67add Check that no new term was introduced before doing a subsearch
We combine search terms with OR, so if a new search term is introduced,
the search results are no longer a subset of the previous search results.
2009-10-05 13:50:58 -04:00
Dan Winship
dc99e8ffcd [AppSwitcher] Change separator color
https://bugzilla.gnome.org/show_bug.cgi?id=597362
2009-10-05 13:13:21 -04:00
Adel Gadllah
6a8b50cb00 Don't create multiple copies of the (+) button
Currently we recreate it every time Main.overview.show() is called,
 so destroy it to avoid having multiple copies floating around.

https://bugzilla.gnome.org/show_bug.cgi?id=597309
2009-10-05 18:54:41 +02:00
Colin Walters
2f6c951997 Avoid doing expensive work when not mapped
For some unknown reason we were connecting to app-added and
app-removed on ShellAppMonitor in the AppDisplay class, which
never made any use of the data.  Simply don't connect to those
signals for now.  In the future we should have AppDisplay
be using the AppIcon class which will more correctly handle
dynamic changes.

In the AppWell, avoid doing the full relayout until we're
actually mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=597169
2009-10-05 11:32:33 -04:00
Adel Gadllah
64cd51667d Add String formatting
Add String formatting by extending the String object with a
format method.

Now we can do stuff like "Text: %s, %d".format(somevar, 5)

This is required for proper translation of some strings.

https://bugzilla.gnome.org/show_bug.cgi?id=595661
2009-10-04 23:37:33 +02:00
Steve Frécinaux
26015ef16d Select next window from the current app on alt+tab
This slightly changes the behaviour of the alt+tab window, this way:
when using alt-tab on a workspace that contains two or more windows from
the same window, the application selected when hitting alt+tab is the
currently selected application, but the highlighted window is the next
one.

Intended goal is to make it easier to cycle around windows of the same
application while not having to cycle through all the applications first.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-04 12:45:23 -04:00
Steve Frécinaux
4798ad5107 Consider workspace when sorting windows in menu.
By sorting the windows in the current workspace first, we ensure that
when using alt+tab to switch windows, we will pick a window on the
active workspace as the default focused window for the application if
the application has at least one window on the current workspace (that
is, if it is on the left of the app switcher separator).

This makes the behaviour of alt+tab more predictable for the user, as
an user will expect alt+tab to switch to the window he/she can see right
now rather than the one on the workspace he just left (presumably to do
something else on the workspace he's currently on).

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-04 12:45:19 -04:00
Adel Gadllah
9b05304c2d Use better fitting color for non ARGB tray icons
Currently we use 0xefefefff as a background color for non ARGB tray icons,
which looks out of place (i.e does not fit the panel's background gradient).

Change it to 0x0b0b0bff to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=597148
2009-10-04 10:02:37 +02:00
Colin Walters
3b8d53060d Immediately pop up menu on right click
We were actually showing a menu on button 3 before, but only
through a chain of coincidences.  This patch explicitly supports
it and makes sure we show it immediately rather than after
a timeout. Pass the activating button in so that we only pop
down on that button.

https://bugzilla.gnome.org/show_bug.cgi?id=596371
2009-10-02 19:28:25 -04:00
Colin Walters
b3a5fc72fb Add Add/Remove from favorites menu, unify lists more
Also have inactive applications pop up a menu.

Add/Remove from favorites is now in the menu.

Concatenate the favorites/not-favorites instead of having a gap only
if you happened to have a not-divisible-by-4 number of favorites.

https://bugzilla.gnome.org/show_bug.cgi?id=596371
2009-10-02 19:28:25 -04:00
Adel Gadllah
8a2cc11cc0 Fix rundialog not closing for internal commands
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=597076
2009-10-02 14:18:51 -04:00
Dan Winship
e382da9708 [AppSwitcher] Update colors/border
Switch from Big.Box to St.Bin and update styling per latest spec

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-02 09:04:04 -04:00
Dan Winship
ab1fbbde92 add a missing (optional) ";" 2009-10-02 08:49:22 -04:00
Steve Frécinaux
5f5266ca60 [AppSwitcher] Display a separator between apps on this workspace and others.
This makes a visible distinction between the apps that only have minimized
windows on the current workspace and the ones that have no window on the
workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-02 14:17:00 +02:00
Steve Frécinaux
68e8b14b8b [AppSwitcher] Use GenericContainer instead of BigBox.
This allows defining some custom policy for size allocation.
Currently, the minimum width is always used, but it can be tweaked
afterwards when a sizing policy has been defined.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-02 14:15:01 +02:00
Marina Zhurakhinskaya
abdd8b330c Don't show all sections each time the search is updated
We shouldn't show all sections each time the search is updated because that
breaks viewing search results for a single section and flickers headers for
sections with no results.
2009-10-01 18:21:27 -04:00
Marina Zhurakhinskaya
eb8176deeb Fix regressions in the item displays
Fix displaying documents in the document browse and refreshing the selection
when the results have changed.

Make sure we are passing the appropriate flag to _redisplay() in GenericDisplay.

Make sure we set this._appsStale to true if there was a change in the
applications set.

Don't call _refreshCache() from the AppDisplay constructor.

Don't short-circuit the call to _refreshCache() from _redisplay() on initial load.

Rename _redisplayFull() to recreateDisplayItems() and remove adding an
actor to the actual result list in _addDisplayItem() because we redo adding the
actors to the list in _redisplayReordering() anyway to ensure that we add
them in the right order.

Based on a patch from Colin Walters.
2009-10-01 17:41:17 -04:00
Steve Frécinaux
1c69380923 [AppSwitcher] Put apps with no window on current workspace at the end.
Following the idea expressed in bug 590563 by mccann ("Minimized or
hidden applications should appear at the end of the list"), we should
also put applications that have no visible window in the active
workspace at the end of the alt-tab window list, after apps which have
minimized windows in the active workspace.
2009-10-01 23:25:15 +02:00
Owen W. Taylor
afb3b1e718 Fixes for Calendar widget
Miscellaneous fixes from review:

- Distribute calendar.js and the interactive test
- Make the pointless protection against leap seconds actually work
  by starting in the middle of the day so that forward/back always
  move a day.
- Use a variable instead of an inline '8' to know where to start
  when removing old day actors.
- Remove a stray comment from the test

https://bugzilla.gnome.org/show_bug.cgi?id=596432
2009-10-01 16:48:24 -04:00
Owen W. Taylor
061a2cfbfb Add scroll-wheel support to the calendar
Make the calendar reactive and handle scroll events to change the month.
(GtkCalendar and hence the old gnome-panel calendar supported this and
it is apparently a handy way to flip through months.)

The padding is moved from the CalenderPopup to the Calendar so that the
scroll region extends all the way to the edge of the popup.

https://bugzilla.gnome.org/show_bug.cgi?id=596432
2009-10-01 16:48:24 -04:00
Adel Gadllah
90ddad7ba1 Make Connect string translatable
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=597038
2009-10-01 16:11:33 -04:00
Colin Walters
20b29ff48f Sync clone stacking order with MetaStackTracker
Previously, we initialized actor stacking order from the return
value of global.get_windows() once, which is defined to be in
stack order.  However it was not updated later.  Furthermore,
the way stackAbove was called from onAnimationComplete in
WindowClone was highly dubious, since there are lots of animations
which apply to the clones, and we want the stacking to be right
all of the time, not when some animation completes.

Fix this by connecting to 'restacked' on the screen and syncing
the clones.

I also snuck in another bugfix here; we weren't disconnecting
from the 'showing' signal handler, which had various bad
consequences.

https://bugzilla.gnome.org/show_bug.cgi?id=596263
2009-10-01 15:59:05 -04:00
Owen W. Taylor
04e28cd7c4 Add a calendar pop-down to the clock
js/ui/calendar.js: Generic calendar widget
tests/interactive/calendar.js: Basic test of the calendar

js/ui/panel.js: Add a pop-down from the clock that shows a
  calendar widget. The pop-down is not menu-like to allow the user to
  interact with an application while looking at the calendar.
gnome-shell.css: Add theming for calendar, calendar popup, and for
  buttons on the panel

https://bugzilla.gnome.org/show_bug.cgi?id=596432
2009-10-01 15:05:11 -04:00
Owen W. Taylor
af3ec56ca1 Handle adding children to StTable from Javascript
Remove the StTable specific methods to add actors:

 st_table_add_actor()
 st_table_add_actor_with_properties()

Since they shadow the generic ClutterContainer add_actor() method,
and patch in our add() convenience function as we do for
StBoxLayout.

https://bugzilla.gnome.org/show_bug.cgi?id=596811
2009-10-01 14:46:33 -04:00
Owen W. Taylor
1c7c53d19f lookingGlass: Get font from GConf
Instead of using "Monospace", pick the users configured monospace font
name up from GConf. (This is a nice touch, but is more done here to
demonstrate that we can do it rather than for any great utility.)

https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:46:32 -04:00
Owen W. Taylor
d4304495c6 Port LookingGlass console to ST widgets
* Style aspects like colors and fonts are moved into gnome-shell.css.
* Scrolling is adding using StScrollView.

Based on a patch from Colin Walters
https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:46:32 -04:00
Owen W. Taylor
a9fd350396 Port our imported parts of Mx to ShellTheme
ShellTheme replaces both StStyle and ccss_stylesheet_t.

The interface StStylable is replaced by usage of ShellThemeNode.
A concrete node class allows some significant optimizations of property
inheritance that would have been much more difficult to achieve with
the highly abstract pair of StStylable and ccss_node_t.

Some operations that were previously on StStylable (like the
::style-changed signal) are directly on NtkWidget.

Custom properties are no longer registered as param-specs; instead you
call directly into shell theme node to look up a length or color:

shell_theme_node_get_length (theme_node, "border-spacing", FALSE, &spacing);

The dependency on libccss is dropped, while preserving all existing
functionality and adding proper parsing and inheritance of font properties
and proper inheritance for the 'color' property.

Some more javascript tests for CSS functionality are added; workarounds for
a CSS bug where *.some-class was needed instead of .some-class are removed.

https://bugzilla.gnome.org/show_bug.cgi?id=595990
2009-10-01 14:41:18 -04:00
Owen W. Taylor
6b95864076 Fix installation and distribution of stylesheet data
Install and distribute gnome-shell.css and theme images. They are moved
down from $datadir to $datadir/theme to avoid a weirdness where we have
images in $datadir and then also in $datadir/images.

(Also moved in the source tree to avoid adding another difference between
installed and uninstalled operation.)

https://bugzilla.gnome.org/show_bug.cgi?id=595989
2009-10-01 14:41:18 -04:00
Owen W. Taylor
55497899dd Add some structure for interactive tests of UI components
js/ui/environment.js: Split out initial UI setup (Tweener initialization,
  ClutterContainer monkey-patching) into a separate file we can import from tests.

tests/: Directory for various types of tests
tests/run-test.sh: Shell script that to run tests with an appropriate
  environment set up.

tests/testcommon/: Common modules and data for tests
tests/interactive/: Interactive tests

tests/interactive/box-layout.js: A sample test of StLayout

https://bugzilla.gnome.org/show_bug.cgi?id=595987
2009-10-01 14:41:17 -04:00
Owen W. Taylor
e37790fdf9 Monkey-patch in ClutterContainer methods for StBoxLayout
Setting options for children added to StBoxLayout is not convenient
since we are missing the varargs methods of clutter_container.

Patch in:

 child_set() - set properties of a child
 add() - add a child and set properties (this is different from
         clutter_container_add()! I think the deviation is
         with avoiding the awkward name add_with_properties()
         which is what might be expected. ClutterContainer
         currently doesn't have a method like this at all.)

The code is written to allow patching into multiple ClutterContainer
classes but for now only StBoxLayout is patched, since it's the only
container we are using where we need to set options as properties.

https://bugzilla.gnome.org/show_bug.cgi?id=595419
2009-10-01 14:41:17 -04:00
Colin Walters
529f74c0e5 Load gnome-shell.css at startup
https://bugzilla.gnome.org/show_bug.cgi?id=591245
2009-10-01 14:41:17 -04:00
Dan Winship
2b78d5bd5d Improve support for multihead setups
Fix panel, app switcher, and looking glass to limit themselves to the
primary monitor, and run dialog to limit itself to the monitor
containing the currently-focused window.

The overview is also limited to the primary monitor now (with the
other monitors being blacked out), although the workspaces within the
overview are shaped like the full "screen" (the bounding box of all
monitors). To be fixed later.

https://bugzilla.gnome.org/show_bug.cgi?id=593060
2009-10-01 13:46:03 -04:00
Adel Gadllah
c9d9846759 Add Desktop in Places
Updated by Colin Walters <walters@verbum.org to monitor gconf
and use g_get_user_special_dir.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=596933
2009-10-01 11:53:30 -04:00
Colin Walters
6baafaa530 [places] Fix double spacing between actions and devices
https://bugzilla.gnome.org/show_bug.cgi?id=596991
2009-10-01 10:43:57 -04:00
Dan Winship
c2af05f753 [AppSwitcher] Allow use of arrow keys in the popup
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-10-01 10:35:40 -04:00
Steve Frécinaux
97df305a6d [AppSwitcher] Drop the line wrapping code.
Also rename _grid into _appsBox as grid is not an appropriate word
anymore for what this box is.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-30 23:32:36 +02:00
Steve Frécinaux
fee385ba35 [AppSwitcher] Do not show the glow for icons in alt+tab dialog.
Unlike icons in the application well, do not show the glow used to
indicate running apps.  It is somewhat redundant here.  These are all
running apps and it is fairly clear from the window list if there are
multiple instances available, according to mccann.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-29 18:43:35 +02:00
Dan Winship
373fa3c325 [AppSwitcher] deal with the user releasing Alt before we get the grab
Previously mutter was doing this for us, but now we need to do it
ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=596695
2009-09-29 10:07:09 -04:00
Dan Winship
9432ddb12e [windowmanager] Remove destroy effect
It slows things down, it's a slightly weird effect, and because the
window is still live while it's animating, you may see subwindows
being destroyed during the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=596441
2009-09-28 09:45:38 -04:00
Dan Winship
d4a2f9e604 [AppIcon] Sort minimized windows after normal ones in AppIcon menu
https://bugzilla.gnome.org/show_bug.cgi?id=596389
2009-09-28 09:43:51 -04:00
Dan Winship
7f468b36e7 [AppSwitcher] Put apps with only minimized windows at end of list
https://bugzilla.gnome.org/show_bug.cgi?id=596389
2009-09-28 09:43:51 -04:00
Steve Frécinaux
cad774aca1 Use "More" instead of "Browse"
The text "Browse" used for the buttons on the dash section headers is a
little obscure and tends to translate into something that doesn't fit
well.

Going back to "More" will hopefully be more manageable in translation.

https://bugzilla.gnome.org/show_bug.cgi?id=596433
2009-09-27 17:59:54 +02:00
Siegfried-Angel Gevatter Pujals
b25bbf4c0a Small application browse tweaks
- Add spacing after Frequent, reduce it for the other app categories.

   Put a small gap (one line) between Frequent and the other
   categories to make it clear that it is something a little
   different.

 - Remove category icons from the applications menu.

   Remove category icons; they aren't particularly helpful
   (they are gone from the GNOME-2.28 menus too) and having them
   in Applications Browse draws the eye to the wrong thing - the
   category - rather than the right thing - the application icons.

https://bugzilla.gnome.org/show_bug.cgi?id=596435
2009-09-27 15:02:52 +02:00
Dan Winship
72dd458c80 [AppSwitcher] Make the background translucent again
The default AppIcon gray border color isn't very visible against a
dark gray background, but a white border looks too bold in the Well. So
allow the caller to override the AppIcon border color, so that the Well
can use gray-on-black and the AppSwitcher can use white-on-gray. (And
then revert the AppSwitcher back to the translucent gray background.)

https://bugzilla.gnome.org/show_bug.cgi?id=596337
2009-09-26 12:08:16 -04:00
Siegfried-Angel Gevatter Pujals
79d5d3dba0 Add a missing "let". 2009-09-26 00:50:13 +02:00
Siegfried-Angel Gevatter Pujals
c14a4deddf Rename iconButton to IconButton, as it is a class. 2009-09-26 00:50:07 +02:00
Colin Walters
4bab511fa5 [Overview] Don't treat 1024x600 as widescreen
This works significantly better on my netbook.

https://bugzilla.gnome.org/show_bug.cgi?id=596375
2009-09-25 17:29:04 -04:00
Siegfried-Angel Gevatter Pujals
36b11ee8c7 Do not show "More" next to "Recent Docs" if there are no docs (bug #582037) 2009-09-25 21:17:57 +02:00
Siegfried-Angel Gevatter Pujals
3ffc510be7 runDialog.js: really update the enableInternalCommands when the key changes
The run dialog uses the "development_tools" gconf key to determine
whether funcions like "lg" or "restart" should be enabled, but it
failed to notice it on the run when said key changed. This commit
fixes this.
2009-09-25 20:10:45 +02:00
Dan Winship
f5f22b3935 [AppSwitcher] Keep track of the selected window for each app
Rather than selecting windows[0] each time the cycle returns to an
app, select whatever window of that app was selected last time around.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-25 13:33:23 -04:00
Colin Walters
159081dcfc Optimize searching further
There are now 3 code paths in decreasing speed:

First, optimize subsearching more by just hiding the actors
that didn't match, since we know the ordering has to be right.

For initiating a search (or backspacing an existing one), again
instead of destroying and recreating actors, just temporarily
remove them and re-add them in the desired order.

Finally for when data has changed, use the old code path of
destroying all actors.  (This itself could obviously be optimized
if we had a way to know that just one application changed, but
at the moment we don't).

https://bugzilla.gnome.org/show_bug.cgi?id=596119
2009-09-25 12:09:46 -04:00
Colin Walters
1da4837d98 Don't show search results sections until we've actually searched
We queue a 150ms timeout when the user starts typing to avoid searching
for the first keystroke.  However, this caused us to change to the search
mode, but show the leftover state of the search displays from an
earlier search state.

Instead, just hide the results sections until we've actually performed
the current search once.

https://bugzilla.gnome.org/show_bug.cgi?id=596119
2009-09-25 12:08:41 -04:00
Colin Walters
32ef951fe0 Optimize subsearches
This is probably not the biggest optimization that needs to be
made at least for application searching, but we can optimize the
case where we're going from a search of "fi" to "fire" by just
re-searching the list of things we already had that matched "fi"
instead of looping over everything.

https://bugzilla.gnome.org/show_bug.cgi?id=596119
2009-09-25 12:08:15 -04:00
Colin Walters
3564d78d30 Use shellwm.takeover_keybinding for Alt-F1 and Alt-F2
This fixes a regression where we weren't using the correct event
timestamps, because for both of these we were sending an XClientMessage
to ourself.

https://bugzilla.gnome.org/show_bug.cgi?id=596262
2009-09-25 11:28:13 -04:00
Marina Zhurakhinskaya
2020d15a1a Fall back to fewer than 4 columns if space limited
First eliminate the variable WELL_ITEM_HSPACING since it was 0
and thus effectively was not used.

Add a new variable WELL_ITEM_MIN_HSPACING which is the minimum
space between grid items we allow.  When computing layout, allow
for a number of columns less than 4 by using the minimum item
size.

https://bugzilla.gnome.org/show_bug.cgi?id=595023

Based on a patch from Colin Walters.
2009-09-24 21:40:46 -04:00
Owen W. Taylor
64d8d7a91c List shellDBus.js in Makefile.am
Include the new file shellDBus.js with installed and distributed Javascript.
2009-09-24 18:13:23 -04:00
Dan Winship
eb025901c8 [AppSwitcher] Implement pointer selection 2009-09-24 16:13:57 -04:00
Dan Winship
9fee99bc7a [AppSwitcher] Implement window cycling 2009-09-24 16:13:52 -04:00
Dan Winship
67bfbc9b4b [AppSwitcher] Use AppIcon and switch applications rather than windows
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-24 16:13:47 -04:00
Dan Winship
11d884d724 [AppSwitcher] Port Alt-Tab switcher to custom_handler interface
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-24 16:13:42 -04:00
Dan Winship
24d42adc04 Add Main.activateWindow() to remove some duplication 2009-09-24 11:11:01 -04:00
Dan Winship
110ef17e2d Add Main.currentTime(), to get the correct current-event-time
https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-24 11:10:55 -04:00
Colin Walters
4876474be3 Add shellDBus.js which implements Eval(str) and an OverviewActive property
For various reasons I'd like a method which allows evaluation; say
log in from another machine and run "gnome-shell --repl" or something.

Also as a possible solution for the screensaver X grab issue, add
a (read/write) property "OverviewActive".

https://bugzilla.gnome.org/show_bug.cgi?id=596102
2009-09-23 16:56:33 -04:00
Dan Winship
0e4a86f2e6 [AppIcon] move well menu code from appDisplay.js to appIcon.js
The menu is needed by the app switcher as well as the overview, so
make it slightly more generic and move the code to appIcon. Also add
support for drawing the menu either to the right of or below the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-23 10:02:04 -04:00
Dan Winship
18dbc5462f [AppIcon] Make BaseWellItem a subclass of AppIcon
Part of https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-22 18:24:22 -04:00
Dan Winship
8f660f563c [AppIcon] Remove redundant window array 2009-09-22 18:24:22 -04:00
Dan Winship
fa316ddd3d [AppIcon] Make sure small icons still get full-sized AppIcon actors 2009-09-22 18:24:22 -04:00
Colin Walters
7703bee284 [workspaces] Use a stable minimum-motion placement for windows
Rather than having the mapping from window into "slots" (or
possible positions in the workspaces) be dependent on stacking
order, compute the minimum-motion which is a vector from one
top left corner to another.  This order won't change as long
as the window set and their positions stay fixed.

There are two minimum motion algorithims; one simply computes
all possible placements by permuting the window list, up to
a current maximum of 5 windows.  Past that (which also happens
to be the number where we switch to a grid), we use a "greedy"
algorithm which for each slot, finds the window with least motion
for that slot.

To break any ties, we use an internal integer in MetaWindow which
enumerates the order in which windows were created.

https://bugzilla.gnome.org/show_bug.cgi?id=582654
2009-09-22 18:14:32 -04:00
Dan Winship
0b6d09bbe2 [lightbox] Fix logic; get_children() returns children bottom-to-top 2009-09-22 18:11:25 -04:00
Dan Winship
3734479cbd [lightbox] Add lightbox.js and use it in overview, alt-tab, and run dialog
https://bugzilla.gnome.org/show_bug.cgi?id=596000
2009-09-22 17:23:14 -04:00
Marina Zhurakhinskaya
6cae94edcc Bug 594916 - Allow cancelling DND by hitting Esc
Esc used to close the overview and get the DND actor stuck on the desktop when
it was pressed when dragging.
2009-09-22 16:15:28 -04:00
Dan Winship
0918bdd612 [AppWell] Don't add "New Window" item to menus for transient apps 2009-09-22 13:30:24 -04:00
Dan Winship
e79b15c645 Remove taskbar-highlighting support from Alt-Tab popup
The "lightbox" effect had support for highlighting a particular
rectangular region on the taskbar when Alt-Tabbing to a minimized
window. Since we no longer use the taskbar, this code is just cruft
now.

Part of https://bugzilla.gnome.org/show_bug.cgi?id=590563
2009-09-18 08:23:01 -04:00
Colin Walters
cee7106cb1 Better handle pushModal failing
Previously we'd leave the focus on the stack, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=595382
2009-09-17 16:36:33 -04:00
Colin Walters
2c0661d377 Add "New Window" menu item
Refactor the current menu code to support both window selection
and "normal" menu items.  Add a "New Window" item which does what
you'd expect.

Clean up the way we handle highlighting the window items to be
more direct; rather than looping over all items in most cases,
just directly manipulate one item

https://bugzilla.gnome.org/show_bug.cgi?id=594557
2009-09-17 16:36:18 -04:00
Colin Walters
98bd590a5d [runDialog] Add 'debugexit' command
There are few uses for being able to exit the shell directly; my
current one is that the gtype debug infrastructure is implemented
as an atexit() handler.
2009-09-15 17:47:57 -04:00
Colin Walters
159690b2d3 Enable Alt-f2 in overview
This isn't a long-term solution; what we really want is for Alt-F2 to
just be an application search with a hack to detect shell commands,
but in the short term this allows us to run the magic 'lg' command
from the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
2009-09-15 16:20:19 -04:00
Colin Walters
8a2bfd0e55 Change keyboard handling API to handle nested modal calls
Rename beginModal/endModal to pushModal/popModal.  All of the current callers
just want to ensure that we're in a modal state; they don't actually need to
fail if we already are.

These functions also now take the Clutter keyboard focus, while recording
the previous focus.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
2009-09-15 16:15:16 -04:00
Colin Walters
2ddc7cf00f Only enable internal commands if developer_tools is true
'r' is a bit too accidentally-hittable for outside of developer usage.
However it will still be enabled when developer_tools is true.

https://bugzilla.gnome.org/show_bug.cgi?id=595116
2009-09-15 16:14:36 -04:00