Commit Graph

702 Commits

Author SHA1 Message Date
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
Adel Gadllah
edb50d5dc7 String formatting: Fix warning
Fix to not trigger a warning like:

JS ERROR: !!!   WARNING: 'anonymous function does not always return a value'

by adding a return ""; at the end of the anonymous function.

https://bugzilla.gnome.org/show_bug.cgi?id=595661
2009-10-05 17:59:33 +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
Dan Winship
ceefc5eea4 Convert remaining uses of "let me = this;" to Lang.bind
https://bugzilla.gnome.org/show_bug.cgi?id=595293
2009-09-15 13:11:23 -04:00
Colin Walters
9feda69888 When in window filtering mode, reset filter before showing window
When we had a filtered set of windows, and want to exit the overview
into a particular window, what we do is re-show all the old windows
first, but don't reset the scaling on them.  This will involve
some overlapping, but that's not a big deal because we'll immediately
get overlap anyways in the normal case zooming the windows back.

https://bugzilla.gnome.org/show_bug.cgi?id=594699
2009-09-14 15:41:19 -04:00
Colin Walters
33f9895d71 Don't proxy methods through overview; add a getWorkspacesForWindow()
Duplicating the methods was unnecessary.  Also, we want a getWorkspacesForWindow()
method as preparation for multi-monitor work.

https://bugzilla.gnome.org/show_bug.cgi?id=594699
2009-09-14 15:41:12 -04:00
Colin Walters
2812c21322 Allow popup menu to be persistent, and support direct window selection
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.

Also, allow the user to mouse over the actual windows and select
them directly.  If the user mouses over a window, reflect that in
the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=594699
2009-09-14 15:37:29 -04:00
Colin Walters
7ac9fb2dd0 Make popdown,popup methods idempotent; remove 'popdown' for 'cancelled'
Callers will generally expect _popup and _popdown to be a no-op if
the menu is already in that state; make it so.

Also change the 'popdown' signal to be 'cancelled'; this is
clearer and allows us to avoid having activate also call popdown.

https://bugzilla.gnome.org/show_bug.cgi?id=594699
2009-09-14 15:37:26 -04:00
Colin Walters
05c99241d6 [Overview] Make content area eat mouse events during animations
There are ton of different kinds of mouse even handlers in the overview;
WindowClone has several mouse-enter/leave handlers, we still have a variety
of classes not ported to ButtonBox and so incorrectly handling double-click,
etc.

Since we at present don't have anything in the overview area for which
it makes sense to interact with during the animation, create a transparent
event-eating box which we raise to the top during the animation.

https://bugzilla.gnome.org/show_bug.cgi?id=594074
2009-09-14 15:31:49 -04:00
Marina Zhurakhinskaya
02c65fab8d Don't show section headers for sections with no results and don't show page
controls if there is only one page of results

This makes the search results display more streamlined.

Make sure that we move the selection to a different section if we are going
from displaying a single section to displaying all and the section that
used to be displayed alone doesn't have any results.
2009-09-11 19:30:11 -04:00
Colin Walters
dfe16f4af6 Revert "[AppWell] Allow popup menu to be persistent, and support direct window selection"
This reverts commit 6e31e59b57.
2009-09-11 18:58:30 -04:00
Colin Walters
6e31e59b57 [AppWell] Allow popup menu to be persistent, and support direct window selection
When the user click+hold+release over the icon, the effect we want
is for the menu to stick around.

Also, allow the user to mouse over the actual windows and select
them directly.  If the user mouses over a window, reflect that in
the menu.
2009-09-11 18:57:44 -04:00
Marina Zhurakhinskaya
458778bcfd Add a separate section of search results that shows system preferences
System preferences should not be mixed in with applications in search results.
2009-09-11 17:48:02 -04:00
Dan Winship
d8cabbee0b More global-ization 2009-09-11 17:23:42 -04:00
Marina Zhurakhinskaya
3029a4086b Restructure the search results code to be able to support any number of sections
We will be adding more search results sections, so we should store the intended
order of the search results sections and their properties in an array of data
structures.

This information allows us to have generic code for creating the search results
sections, moving the selection between them and transitioning between showing
all sections and a single section.
2009-09-11 16:42:54 -04:00
Colin Walters
913aeae166 Actually update well menu filtering for review messages
My updates got lost due to accidentally being on a rebase branch.
2009-09-09 17:28:52 -04:00
Colin Walters
dddad9e1b5 [AppDisplay] In search/browse, show existing window instead of always launching
This brings search in line with the AppWell behavior which is definitely
right.  For browse we probably want more options.
2009-09-09 16:49:26 -04:00
Colin Walters
4bfa68d209 [AppWell] Fix previous commit
Somehow missed changing a call when updating for review comments.
2009-09-09 16:49:07 -04:00
Colin Walters
05812ef7f9 [AppWell] Enable lightboxing immediately on popup
Rather than starting lightboxing only when the mouse enters the
menu, start it when an application filter is set.

Also delete a stale function in WindowClone from previous work.

http://bugzilla.gnome.org/show_bug.cgi?id=594555
2009-09-09 11:40:09 -04:00
Dan Winship
a0df412deb Extend (+) button sensitivity to corner of screen, for Fittsability
https://bugzilla.gnome.org/show_bug.cgi?id=591984
2009-09-09 11:31:50 -04:00
Dan Winship
678a88dbdb Remove some "let global ..."s that snuck back in as part of old patches 2009-09-09 09:42:00 -04:00
Dan Winship
5e944c9a3b Move the add workspace button out of the Workspaces object, into Overview
http://bugzilla.gnome.org/show_bug.cgi?id=594049
2009-09-09 09:36:59 -04:00
Colin Walters
470c65d046 [AppWell] Make control-click create a new window
Implement this for now by just re-launching the application, which
visually will normally create a new window.

http://bugzilla.gnome.org/show_bug.cgi?id=594565
2009-09-08 18:48:51 -04:00
Colin Walters
ef6ea078dd [AppWell] Position menu components on integral coordinates
This avoids fuzz.

http://bugzilla.gnome.org/show_bug.cgi?id=594553
2009-09-08 18:48:17 -04:00
Colin Walters
37ee16b34d Use clutter_event_get_* instead of ShellGlobal
Before Clutter gained accessors for event information, we had
shell_global_ functions.  Now that Clutter has them, use them and
delete the ShellGlobal code.

http://bugzilla.gnome.org/show_bug.cgi?id=594561
2009-09-08 17:58:13 -04:00
Colin Walters
80a5f78eb2 [AppWell] Unify drag and drop behavior between Running versus Inactive
This fixes a regression where drag and drop didn't work for inactive
items correctly.

http://bugzilla.gnome.org/show_bug.cgi?id=594542
2009-09-08 17:58:13 -04:00
Dan Winship
4b727ef40d Scroll wheel should zoom windows in the overview
Allow using the scroll wheel to zoom in on windows in the overview.

Original patch from JP St. Pierre.
http://bugzilla.gnome.org/show_bug.cgi?id=591849
2009-09-08 17:37:24 -04:00
Dan Winship
d0d79c5b3e Make "global" global.
Rather than doing "let global = Shell.Global.get()" everywhere we
need it, just create a global variable called "global".

http://bugzilla.gnome.org/show_bug.cgi?id=594546
2009-09-08 16:21:15 -04:00
Adel Gadllah
0882da0a71 Add error handling to the runDialog
Show the errors to the user instead of silently logging them to the terminal,
also rework positioning to get rid of magic numbers.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>

http://bugzilla.gnome.org/show_bug.cgi?id=593840
2009-09-08 14:35:23 -04:00
Colin Walters
25410a730e Bug 591763 - Add application window menu
When we have multiple windows for an application, implement the following
behavior:

* On click + immediate release, go to the most recently used
* On click, hold for 0.6s, pop up a menu with windows, filtering
  the window list to just those windows.
  Mouse over on the window list highlights the moused-over window.

Implement this by splitting well item into InactiveWellItem
and RunningWellItem, sharing a base class BaseWellItem.
2009-09-08 14:31:44 -04:00
Colin Walters
fa5fb6b8a8 Bug 594184 - Fix up glow positioning logic
We were allowing the glow allocation to go too far to the right;
clean up the logic.
2009-09-04 20:03:56 -04:00
Owen W. Taylor
b7b4c54ab5 Make checking if an item is under the pointer asynchonous again
Checking if an item is under the pointer by calling stage.get_actor_at_pos()
synchronously will trigger a too-early allocation of the stage. Use an idle
at Meta.PRIORITY_BEFORE_REDRAW. (Before 553503d it was using a 5 msec timeout,
553503d made it synchronous.)

http://bugzilla.gnome.org/show_bug.cgi?id=592608
2009-09-04 19:12:07 -04:00
Colin Walters
52abf266c0 Redo AppWell glow to be based on a based on a .png instead of cairo
Instead of drawing an ellipse, use a hand-drawn .png file which
looks a bit less regular and blends better.
2009-09-04 17:42:10 -04:00
Dan Winship
38d21c8edf Remove some vestigial code 2009-09-03 09:50:39 -04:00
Adel Gadllah
090908439b Add volumes support to places
Display the mounted volumes in the places section of the overlay.

Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Colin Walters <walters@verbum.org>
2009-09-02 15:04:24 -04:00
Colin Walters
1a834f7d8b Add API to programmatically initiate a drag
For some use cases we have other behavior on mouse press and want
to manually control when a drag starts.  Split out the drag initiation
code into startDrag.
2009-09-02 14:34:57 -04:00
Dan Winship
3e54087e42 Add Tweener.slowDownFactor, initialize from $GNOME_SHELL_SLOWDOWN_FACTOR
This allows for easier debugging of glitchy animations
2009-09-02 09:15:37 -04:00
Marina Zhurakhinskaya
ac4bcee050 Merge headers when a single section of search results is displayed
There is no need to show two headers when we are only displaying a single
section of search results, so we merge the section header with the main
header in that case.

Show a back button on the left of the main header to get back to the results
for all sections.

Remove this._showTooltip flag from SearchSectionHeader because we no longer
show this type of header when we want to suppress the tooltip.

Add this._appSearchResultsOnlyShown and this._docSearchResultsOnlyShown
flags to track when a single section is shown more cleanly.
2009-09-01 19:06:20 -04:00
Marina Zhurakhinskaya
553503dace Remove the timeout for checking if an item is drawn under the pointer
We no longer need the timeout for checking if an item is drawn under
the pointer because we display search results in the main pane and there is
no lowering/raising of other overview actors going on as the results are
being displayed.
2009-09-01 16:29:14 -04:00
Marina Zhurakhinskaya
90381ceea2 Improve key navigation for search results
Select an item by default when the search results are displayed.

Enable moving from one section of search results to another with key navigation.

Reset the selection when the search is updated or a new page is displayed
or the transition between viewing multiple sections and viewing just one is made.
2009-09-01 16:24:47 -04:00
Steve Frécinaux
bcc3dc0711 Consolidate window tracking filters between app monitor and overview.
The windows we considered for both the app monitor and the overview
workspaces were the same, but the code was duplicated once in C, once
in Javascript.
2009-08-31 21:35:23 +02:00
Owen W. Taylor
5803aa7e65 Simplify Button class by using ShellButtonBox
Make Button class purely about adding visuals, and use ShellButtonBox
for behavior. API equivalences:

  shell.button => shell.actor [for consistency]

  staysPressed parameter to constructor => replaced by manually setting
   the 'active' property of button.actor as appropriate

  pressIn/release => button.actor.active = true/false

  enter-event/leave-event signals => button.actor notify::hover

Along the way, this fixes a bug with the user status menu where it was
not getting set to active because the button was getting a leave
(triggered by the menu popping up and grabbing the pointer) before for
button release, which disabled the staysPressed behavior.

Reported by Michael Meeks
http://bugzilla.gnome.org/show_bug.cgi?id=593471
2009-08-29 15:20:19 -04:00
Thomas Wood
7fb8e2d0ef Bug 592507 - Javascript exception when ~/.gtk-bookmarks is missing
Check the file exists before trying to access it and simply return if it
is not available.
2009-08-29 14:26:26 +01:00
Marina Zhurakhinskaya
a230ad9225 Improve the display of search results
Use bigger font and brighter color for the search results section headers.
Add more padding.

Display "(see all)" tooltip in the section headers on mouse-over.
(Still TODO: supressing that tooltip when all results are already being shown.)
2009-08-28 16:26:06 -04:00
Owen W. Taylor
7a87474bcd Switch Find entry text size to px
All our font sizes were in px, other than the size for the text in
the search entry. Switch that from 12 to 16px (which is the same size
at the standard 96dpi), it doesn't become out of scale if the DPI
is different. (Using fixed px sizes isn't probably what we want to
do in the long term; moving to style sheets will be a good place to
fix that. But better to be consistent.)

http://bugzilla.gnome.org/show_bug.cgi?id=593212
2009-08-28 16:21:21 -04:00
Owen W. Taylor
479acf2d18 Renable PrintScreen and Super_L in the overview
When we are modal, examine keypresses and look for:

 - 'Print': Run the screenshot command in any mode; very useful for
   bug filing, reviews, etc.

 - Release of Super_L/Super_R - if in the overview, toggle back
   out of the overview.

http://bugzilla.gnome.org/show_bug.cgi?id=593427
2009-08-28 15:15:17 -04:00
Owen W. Taylor
943c5e2edc Improve comment about button-release-event handler
Improve the documentation about the button-release-event handler
we put on the status-menu button at Colin's suggestion.

http://bugzilla.gnome.org/show_bug.cgi?id=593362
2009-08-28 12:40:56 -04:00
Owen W. Taylor
1340413740 Fix hang when clicking on the user status menu in the overview
shell-global.[ch]: Add shell_global_display_is_grabbed() that
  uses the newly added meta_display_get_grab_op() to check
  for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
  check if the menu is popped up. Check for active grabs before
  popping the menu up. Use gtk_menu_popdown() rather than
  gtk_widget_hide(). Remove an excess gtk_widget_show() and
  some excess casts.
panel.js: Check whether the status menu is popped up after button
  release, and if it's not popped up, unhighlight the button.

Reported by Nuno Donato
http://bugzilla.gnome.org/show_bug.cgi?id=593362
2009-08-28 12:34:04 -04:00
William Jon McCann
6f94b8cffe Change search box text to "Find..."
We want to find more than apps and documents and the previous
string was too long in some languages and on some display sizes.
2009-08-28 11:56:40 -04:00
William Jon McCann
14a7e310fc Make the gradient on the top panel the same as the "dash"
The previous top color was a bit too bright.
2009-08-28 11:47:19 -04:00
Colin Walters
ed7881d6c9 [AppMonitor] Handle window title changes causing mapping changes
For Firefox/OpenOffice, right now we have a workaround in the
code where we look at their "title" property.  However, we
weren't monitoring that property for changes, and I'm fairly
certain Firefox at least was mapping a window and then very
quickly changing its title after.  So we need to handle
dynamic changes.

Split out the wm_class mapping from the title hack.  It was
messy and weird to have the two mixed because they're not
at all related, and we're not trying to handle WM_CLASS changes
right now.

Explicitly connect to notify::title in the case where we had
a title fallback.  When a title changes, just treat it as
an add+remove.

In the Application Menu area in the panel, hook up to app-added
and app-removed so we get notification of the active app changing.
2009-08-27 02:22:25 -04:00
Colin Walters
003807334b Delete Tidy
It wasn't used any more.
2009-08-27 02:00:23 -04:00
Marina Zhurakhinskaya
cdbb7f8f5f Display only first page of search results by default and display a total results count
Display only first page of search results by default for each section and
allow clicking on the section header to view all the results for a given
section. This design will allow us to easily move from paging to scrolling
without having to stack multiple scrollbars in a single pane.

Display a total results count next to the section name. This serves as an
indicator that there are more results. The section header pre-lights to
indicate that it can be clicked on.

Make sure we go back to the first page of results when we exit a single
section mode. Make sure we re-instate all result sections if the search
mode is left.

Close the only section search mode on Esc, and only close the search
when Esc is hit again.
2009-08-26 18:46:58 -04:00
Colin Walters
ecc1f964c9 Add 'r' as an alias to 'restart' in run dialog
For even faster turnaround inspection of changes.

Also add a comment about the idle_add in the 'lg' command.
2009-08-26 18:43:44 -04:00
Dan Winship
0f4e9189c5 Split out "AppIcon" and make WellDisplayItem a subclass of it 2009-08-26 16:28:42 -04:00
Owen W. Taylor
799f56fe87 Use new plugin-modality functionality in Mutter
We now have functionality in Mutter to grab the keyboard on behalf
of a plugin. This avoids interactions with the key handling code
in Mutter that could leave the user with an inconsistent state
and no way to get out of it.

src/shell-global.[ch]: Change shell_global_grab_keyboard() and
  shell_global_grab_keyboard() to shell_global_begin_modal()
  shell_global_end_modal() and call mutter_plugin_begin_modal()
  mutter_plugin_end_modal() rather than directly grabbing the
  keyboard.
main.js: Call global.begin_modal/end_modal from Main.startModal()
  and Main.endModal()
altTab.js; Remove call to Main.startModal() - we're letting Mutter
  handle modality for Alt-Tab.
main.js lookingGlass.js overview.js runDialog.js: Rename
  Main.startModal() to Main.beginModal() for consistency with
  naming in mutter and ShellGlobal.

http://bugzilla.gnome.org/show_bug.cgi?id=590686
2009-08-26 14:07:02 -04:00
Marina Zhurakhinskaya
300cefd66a Display search results in the dash
Display search results in the dash instead of showing them in a separate pane.
We get dynamic allocation for the section height based on the number of
results, but a lot of the problems with the previous search results display,
such as displaying empty sections and paging overflow are still present.

Also, we don't yet close the browse pane for applications or documents when
we display the search results and only replace it if we are showing the
details pane, so all that looks weird. We'll need to work out the interaction
for these cases.
2009-08-21 18:21:35 -04:00
Marina Zhurakhinskaya
72b4d2a234 Make hotCorner a class variable
This fixes a bug where we were already using this._hotCorner
in _onHotCornerEnvironsLeft() and were incorrectly setting
this._hotCornerEntered to false when the hot corner was
re-entered from the environs.
2009-08-21 15:56:07 -04:00
Colin Walters
7465338ea1 [appDisplay] Always relaunch application on drag and drop
Rather than just launching if we weren't already running, always
relaunch, which happens to make Firefox, etc. work.  See
the comment in the commit for more explanation.
2009-08-20 20:03:28 -04:00
Colin Walters
9dff05a394 places: Implement drag&drop for overview
Add drag and drop.  We need to be able to recreate the icon texture,
so instead of passing it directly into PlaceDisplay, pass
a factory function which knows how to create a new texture.
2009-08-20 19:37:51 -04:00
Colin Walters
9f5a5ad635 appDisplay: Don't leave overview for drag&drop of an app
The design says we stay in the overview for these situations.
2009-08-20 19:37:50 -04:00
Colin Walters
2dcd0511c4 dash: Make recent docs display two columns
The design has smaller icons in two columns.  Add a new
custom display to docDisplay for it.

Clean up some of the texture cache handling for recent URIs so
it's not size-dependent, since the dash size is now different
from the default GenericDisplay size.
2009-08-20 19:37:50 -04:00
Colin Walters
dd1a309cb6 dnd: Centralize drag actor positioning code, use shellWorkspaceLaunch for workspaces
We had multiple copies of the code to position a drag actor given a particular
source.  Instead, just put it inside dnd.js.

Second, rather than test for GenericDisplay/WellDisplayItem etc.,
in various places, add a new method on each source "shellWorkspaceLaunch"
which both marks the item as being droppable on a workspace, and is
called by the workspaces code to launch the item.
2009-08-20 19:37:50 -04:00
Colin Walters
3e0f5aec0c Bug 587951 - Don't show empty categories
When loading menus, skip ones which entirely consist of NoDisplay=true
items.
2009-08-18 23:27:49 -04:00
Colin Walters
4f5c3b4b74 Bug 591267 - Fix places icon centering
Pack the place icon in a vertical centering box to avoid the horizontal
box stretching it vertically.
2009-08-18 23:15:57 -04:00
Colin Walters
a4bf54e465 ShellAppMonitor: create "applications" for unknown windows
Use MetaGroup for a window when looking up applications.  If
we know the application for a TYPE_NORMAL window in the group,
use that.

However, we aren't always going to know the application for a window.  In
that case, create a fake one.

ShellAppInfo has a "transient" flag so we know not to write these
fake apps to the usage file.

Clean up the idle focus handler to better handle the case where
no window is focused, and where we don't want to track the
particular window.

Update track_window to create the fake window.

When a window goes away, we want to delete the usage.

Rewrite shell_app_monitor_get_running_apps to be based
on the window_to_app hash, because that's what has the pointer
to ShellAppInfo*.  Before we were looking up all ids through
ShellAppSystem, but that shouldn't be holding a ref to transients.

Change the well display icon to be centered, since our icons for
window apps aren't 48 pixels.
2009-08-18 23:07:16 -04:00
Dan Winship
6e298759a4 Use g_shell_parse_argv() in run dialog
http://bugzilla.gnome.org/show_bug.cgi?id=581137
2009-08-18 18:17:02 -04:00
Marina Zhurakhinskaya
30d3c1fe72 Use a larger area around the hot corner to decide if the user has left the hot corner
Using a larger area around the hot corner to decide if the user has left the
hot corner prevents triggering the hot corner multiple times due to an
accidental jitter.
2009-08-18 14:59:53 -04:00
Colin Walters
7469a2626a Bug 591859 - Use glib/gi18n-lib to get correct gettext package
We need to use the -lib variant which in turn uses the
GETTEXT_PACKAGE define, because the default translation
domain is actually mutter, not gnome-shell.
2009-08-17 08:53:59 -04:00
Colin Walters
6319f649c2 Some search appearance fixes for last commit
Add a close-black.svg.  Add some padding around the content.
Fix magnifier.svg to be 18 pixels wide.
2009-08-16 10:09:34 -04:00
Marina Zhurakhinskaya
44d34aba19 Highlight the search entry when the user clicks or starts typing in it
This will give the user a visual indication that the search is active.

We need to replace the gray close button in the search entry with a black one.
2009-08-15 16:40:59 -04:00
Siegfried-Angel Gevatter Pujals
559c313fc7 Fix untranslatable string: "Find apps or documents" 2009-08-15 00:13:55 +02:00
Colin Walters
ca51a8c926 Add initial calls to Gettext
We don't have a lot of strings, and what ones we do have we've
been avoiding duplication.  This patch adds calls to _() i.e. gettext
for those strings we do have.
2009-08-14 09:32:15 -04:00
Colin Walters
f097304f3b Bug 582763 - Remove maximization effects
The maximize effect looked really ugly.  In the absence of any cooler
effects, none at all is better than what we have.  Current compiz
doesn't have one either.

Note that in the future when we merge the frame into the panel
in the maximize case, we may want an effect for that.
2009-08-14 08:41:00 -04:00
Dan Winship
51db34d223 Implement distinct 2-window and multi-window highlights 2009-08-13 13:19:24 -04:00
Owen W. Taylor
059c330d95 Clear _searchTimeoutId when removing search
When we remove the search because the search empty is
entry, we need to reset _searchTimeoutId to 0.

http://bugzilla.gnome.org/show_bug.cgi?id=591719
2009-08-13 13:15:02 -04:00
Owen W. Taylor
4aae57c274 Explicitly set the size of the workspace actors
Instead of counting on the implicit sizing of ClutterGroup, which isn't
going to work well because of current limitations of ClutterClone, set
the size of workspace explicitly based on the screen size.

This should fix various problems with drag-and-drop being unreliable;
if a workspace was sized to big it could overlap other workspaces or
elements of the overview.

http://bugzilla.gnome.org/show_bug.cgi?id=591643
2009-08-13 08:50:05 -04:00
Marina Zhurakhinskaya
fb0ca1ba9d Make dragging an item to the Add Workspace button launch it on a new workspace
It is convenient to drag an item to the Add Workspace button and
have it be launched on a new workspace.

Based on a patch from Josh Adams.
2009-08-12 20:13:24 -04:00
Colin Walters
1e41f869de Bug 591624 - dash: Rename searchId to searchTimeoutId
From review comments.
2009-08-12 19:37:47 -04:00
Colin Walters
28517e4c34 places: Use consistent variable for bookmark monitor timeout
We had an inconsistent usage of the timeout variable name.  Fix
it to consistently be a member property of this.
2009-08-12 19:34:02 -04:00
Colin Walters
619066780f dash: Clean up search pane creation
There was some weirdness relating to when the search pane is shown
in a timeout, and how that relates to setSearch.  Instead of doing
this in the timeout, just call setSearch() in the timeout.  The
pane hide/show state is directly controlled from the handler.
2009-08-12 19:33:08 -04:00
Colin Walters
1636e6c187 dash: Don't expand displayControl
It shouldn't take up more space than it needs.
2009-08-12 19:32:50 -04:00
Colin Walters
d17c94f9b9 Initialize ShellAppMonitor/ShellAppSystem at predicatable time
Currently ShellAppMonitor relies on all the .desktop files being
loaded.  We should initialize it very early to ensure that anything
that uses it has up-to-date information right away.
2009-08-12 17:10:17 -04:00
Dan Winship
4b47803162 Implement the multi-window highlight on WellDisplayItem 2009-08-12 17:08:19 -04:00
Dan Winship
15a3f39f65 Add finer-grained signals to ShellAppMonitor, update appDisplay 2009-08-12 17:08:19 -04:00
Colin Walters
f7d85e618c Bug591246 - Minor code-cosmetic fixes
Missed these two in original commit.
2009-08-12 16:33:39 -04:00
Colin Walters
f00500d3d5 Bug 591246 - Move towards shell-black02 mockup
Remove the last use of passing width into Dash by having the
Pane with the previews scaling dynamically and relying on
Clutter scaling.

If we only have one workspace, don't display a selection frame
for it.

Rework Dash into a searchArea and sectionArea, which get
explicitly sized by overlay.js.  We use the workspaces size
to choose the size of those dash areas.

Switch dash colors/boxes etc. to ones from shell-black02.

Add a gradient to the panel.

Add a magnifier.svg for use in search.
2009-08-12 16:07:05 -04:00
Colin Walters
43d737c663 Ensure dash is raised over workspaces
Having the workspace actor on top of the dash broke drag and drop.
2009-08-12 15:12:55 -04:00
Siegfried-Angel Gevatter Pujals
b51bcf3e2b Catch exception trying to create a preview of an unknown image type 2009-08-12 01:30:58 +02:00
Marina Zhurakhinskaya
babb13f603 Remove unused button width and height arguments and specify button height explicitly
minWidth and minHeight arguments of the Button class were not used.

Panel buttons need their height to be explicitly specified as
PANEL_HEIGHT to take up full panel height. This fixes the problem with the
user not being able to click at the very top edge of the panel to activate
the button.
2009-08-11 18:16:33 -04:00
Colin Walters
74eac21870 Add application menu area to panel
This is a start at the "Active Appliction Item" component of the
shell design.  Currently we just show the currently focused
application.  When launching a new application, we show that as well.

The implementation here is not complete; basically when launching
we de-focus the active one, and the application well shows the
most recent startup sequence.

This kind of fails in the case of multiple sequences, and we
also don't correctly de-focus the current window in other
launch paths.
2009-08-11 13:09:41 -04:00
Colin Walters
e330c5ea17 panel: Switch to fully dynamic layout
There was lots of fixed positioning in the Panel; now it is completely
dynamic, and width/height is driven from main.js.  We still have a
global constant Panel.PANEL_HEIGHT, but this is a big step towards
eliminating it.

Also, this avoids overdraw in the "way too many tray icons" case.  The
clock will shift left.
2009-08-11 13:08:19 -04:00
Sander Dijkhuis
47af454115 Bug 591437 - Rename overlay.js to overview.js
Replace 'overlay' with the more descriptive name 'overview'
where the Activities Overview is meant. Call it Overview
(capitalized) in code comments.

The overlay-group and overlay-key provided by Mutter are not
affected, since they may be used for other components than
the Activities Overview.
2009-08-11 15:15:25 +02:00
Sander Dijkhuis
1f31e80c47 Bug 584609 - Zoom the whole overlay when showing or hiding
Instead of only transforming the active workspace, create a
zooming effect when showing or hiding the overlay. This makes
the transitions simpler: the workspaces are now fixed to the
overlay actor group and will not slide over the Dash.

overlay.js: Add zoom animations, fade in/out Dash during those,
    remove obsolete Dash clipping and stacking logic, add public
    get[Scale|Position]() and getZoomedIn[Scale|Position]()
    functions.
workspaces.js: Remove zoom animations, add fade animations for
    the remove button, add helper functions for the overlay
    zooming, keep the movement of windows linear to that of
    their workspaces, remove the updatePosition() and
    updateInOverlay() functions and fullSize variables that
    were left from the old overlay design.
2009-08-11 02:21:13 +02:00
Owen W. Taylor
b0c7dac56b Distribute places.js
Add places.js to the Makefile.am
2009-08-10 18:36:54 -04:00
Owen W. Taylor
26a074588b Bug 591114 - Remove expanded background
The "expanded background" that is behind the workspaces etc. in the overview
should be removed.  It isn't in the designs, it is distracting, and it breaks
the overview metaphor.

At least temporarily, just make the background of the overview black.
Change the pane popup to black as well, but keep a blue border so that
it is visually distinguished from the background.

Based on a patch by Colin Walters, with fixes from  Marina Zhurakhinskaya.
2009-08-10 17:25:05 -04:00
Marina Zhurakhinskaya
00cc32d95a Ignore clicks on hot corner during transition
It's both intuitive to go to the corner of the screen
and click the activities button at the same time.

Both actions bring up the overlay,  but combined
they cancel each other out.  This commit makes
clicking the hot corner not cancel the act of
going to the hot corner.

Based on a patch from Ray Strode.
2009-08-10 14:19:07 -04:00
Colin Walters
9fa88caded Bug 591316 - Fix bad notify:: parameters
We weren't using them, and they were wrong.
2009-08-10 11:18:19 -04:00
Owen W. Taylor
06d17e08c0 Reposition windows when scaling workspaces
The scale of windows within a workspace is determined by the
scale of the workspace since we never scale a window bigger
than the original size of the window. So when we rescale
workspaces we have to rerun Workspace.positionWindows().

http://bugzilla.gnome.org/show_bug.cgi?id=591124
2009-08-10 10:09:25 -04:00
Owen W. Taylor
4830808d2f When fading in window icons, use the final position not current position
The onComplete when positioning windows may come before the
final stage of the workspace positioning animation. So we can't
use actor.get_transformed_position() to figure out where to put
the icons. Compute the final position manually ourselves instead.

http://bugzilla.gnome.org/show_bug.cgi?id=591123
2009-08-10 09:59:40 -04:00
Owen W. Taylor
02ee6f69b3 Fix updating of workspace frame actor
Both the position and size of the frame actor depend on the scale
of the workspace, so update them both when the scale changes.

On the other hand, the the frame actor doesn't need to be
repositioned when the workspace moves (since it is relative to the
workspace). We do base the frame  position of the desktop actor, but
that will presumably stay fixed (at 0,0) in most all cases.

http://bugzilla.gnome.org/show_bug.cgi?id=591122
2009-08-10 09:56:35 -04:00
Owen W. Taylor
5d0808e1c0 Use the size of the window, not of the clone to position windows
When Workspace._positionWindows is called, the clone might nto
yet have its final size (because of the clone is is a clone of
the window texture and the window texture isn't updated until
right before painting.) So get the size from the MetaWindow
instead ... the MetaWindow size is determined synchronously when
the window is managed.

http://bugzilla.gnome.org/show_bug.cgi?id=590741
2009-08-10 09:54:38 -04:00
Siegfried-Angel Gevatter Pujals
1f864fba7f Show bookmarks with spaces in the name correctly
Take everything in the ~/.gtk-bookmark lines after the URI
as label, not only the first word. (eg. if there's a line like
"file:///home/rainct/Ubuntu%20One Ubuntu One", now "Ubuntu One"
is taken as the label, instead of only "Ubuntu").
2009-08-09 19:19:07 +02:00
Siegfried-Angel Gevatter Pujals
cc83aee401 Show "Network" item on Ubuntu
If gnome-network-scheme.desktop can't be found, look for
network-scheme.desktop (which is used, for example, on
Ubuntu).
2009-08-09 19:00:00 +02:00
Siegfried-Angel Gevatter Pujals
185ccecec1 Make <AppSystem>.load_from_desktop_file() raise an exception again
Pass the error variable to g_key_file_load_from_data_dirs in
Shell.AppSystem.get_default().load_from_desktop_file again, and
use a try/catch in places.js.
2009-08-09 18:32:22 +02:00
Siegfried-Angel Gevatter Pujals
205c57d6af Fix FTBFS and crash triggered by <AppSystem>.load_from_desktop_file()
- Avoid error '"iconname" may be used uninitialized in this function'
  by initializing said variable to NULL.

- Define shell_util_get_file_description as static (like the other
  similar functions) to avoid another compiler error.

- Don't save errors from g_key_file_load_from_data_dirs into the
  variable "error" (ie. pass NULL to it instead). Without this,
  gnome-shell crashes if the key file can't be found (with message
  "Error invoking Shell.load_from_desktop_file: Valid key file could
  not be found in search dirs").

- Check the result of the load_from_desktop_file() call in places.js,
  as it may be null.
2009-08-09 17:39:17 +02:00
Colin Walters
e323593f4a Add Places
Implement the Places mockup.  This commit adds a link to Home,
Network, Connect to server, and the GTK+ bookmarks.
2009-08-09 09:53:06 -04:00
Colin Walters
9bd22dc033 ShellAppSystem: Support loading a .desktop file directly
Previously, ShellAppSystem only loaded (and cached) the set of
.desktop files from applications.menu and settings.menu, using
the gnome-menus library.  The ShellAppInfo structure was
a "hidden typedef" for GMenuTreeEntry.

But we need to support loading an arbitrary .desktop file.  Thus,
refactor the ShellAppInfo into a real struct, with a refcount,
and allow it to point to either a GMenuTreeEntry or a GKeyFile.

Also, in the case where we fail to lookup an icon for an
application, ensure we return a 0 opacity texture.
2009-08-09 09:53:06 -04:00
Siegfried-Angel Gevatter Pujals
4495f98dce Fix negative height request in WellGrid
When WellGrid had no child it was doing a division by zero,
which screwed up the calculation for the height request and
having it ask for a negative number. This commit fixes this
by always requesting 0 in this case.
2009-08-09 03:34:35 +02:00
Siegfried-Angel Gevatter Pujals
5a75b44f71 Consider height when positioning windows in the overlay
I've done some little modifications to the window positioning code
used in the overlay so that it considers the height of the windows
and they don't overlap or get out of the workspace.

I've also raised the hard-coded scales a bit to have the windows as
big as possible without overlapping (this could use some testing on
a non-widescreen monitor).
2009-08-08 22:10:40 +02:00
Colin Walters
ebd6f4bc8f appDisplay: Reimplement well layout to be width-independent
Use ShellGenericContainer to implement a fully dynamic layout
for the application well.  It's still fixed to 4 columns by default,
but no longer requires a fixed width to be passed in on start.

With another chunk of work, it could likely try to adjust to
the case where we can only fit fewer than 4 items in the well.

Remove the border highlighting on mouseover, since that caused
reallocations, and the grid layout isn't trivial.

Delete the unused shell_global_get_word_with function.
2009-08-08 15:47:49 -04:00
Colin Walters
91911da302 Bug 590985 - Fix frequent apps list being empty
We shouldn't append .desktop again, that was a leftover from
the old WM_CLASS based application code.
2009-08-08 11:57:09 -04:00
Colin Walters
3c87d76741 dnd: Fix used of undefined variables
The variables this._yOffset and this._xOffset are included in the
drop coordinates, but as far as I can tell never defined.  Looking
back on the commit that introduced this code, they weren't removed
from anywhere else either.

The drop coordinates seem correct without them, so just delete them.
2009-08-08 10:09:30 -04:00
Marina Zhurakhinskaya
ccafa53bd6 Enable hot corner for triggering the overview mode
Use the 1x1 actor in the top left corner of the screen to enter and leave
the overview mode by just moving the mouse over to it.

No delay is used for triggering the hot corner because a delay significant
enough to allow moving away the mouse to avoid triggering it ruins the desired
flow when triggering the hot corner is actually intended.

The hot corner is not enabled in the full screen mode because the application
or the virtual system might have a hot corner of its own in that place.
2009-08-07 16:45:35 -04:00
Colin Walters
4e23f4cfc9 Bug 591077 - Hide overlay when activating an application
It's easier to explicitly call Main.overlay.hide() instead
of chaining activation signals, this got lost in a mix between
the big dash rewrite and ongoing changes to the Application well.
2009-08-07 15:45:52 -04:00
Colin Walters
4d52c10958 Bug 589316 - Add application/window icon to overlay windows
To better distinguish between vast fields of white of which many
windows are composed, add the application icon to the bottom
right of the window.

We fade them in to avoid an abrupt feel.  The icons are in the
workspaces group, not individual workspace groups to avoid
having to adjust them when we scale the workspaces.

Replace Workspace._lookupIndexAndClone with Workspace.lookupIndex,
and make the caller go from index to clone, or clone and index.
2009-08-07 13:29:34 -04:00
Colin Walters
c23b9ee192 dnd: Emit drag-end in after snapback complete
Emit the signal at the correct time to take action
on snapback (i.e. after the end of the snapback animation).

Add a boolean to the drag-end signal saying whether it was accepted,
which ensures consumers know whether the drag was successful.
2009-08-07 13:29:34 -04:00
Owen W. Taylor
354112fb41 Tweak sizing of windows in overview
Tweak arrangements with 2,3,4,5 windows in a desktop so:

 - Windows are a bit bigger
 - All windows for 5 windows are equally sized instead of making
   the windows in the bottom row larger

This does cause some more problems with tall windows overlapping
or running off the edge of the workspace, but it's an overall
small improvement to the behavior.
2009-08-06 15:19:04 -04:00
Owen W. Taylor
f7746ec3f6 Initialize GStreamer from shell_recorder_init()
Move the GStreamer initialization from the Javascript code into
shell_recorder_init(). This avoids a dependency on the GStreamer
introspection information and will make it easier to drop the
gir-repository module dependency.
2009-08-06 15:19:04 -04:00
Siegfried-Angel Gevatter Pujals
03e0fe1e95 Replace _getIndexOfDisplayedActor with a function in OverflowList
Said function in genericDisplay.js was returning the index of the
actor based upon its position in the entire list, while everywhere
else indexes relative to the currently displayed page were used.

This made actions in the details pane break (bug #590949), so I
replace it with a new function in shell-overflow-list.c,
shell_overflow_list_get_actor_index, which is page based.
2009-08-06 19:51:11 +02:00
Siegfried-Angel Gevatter Pujals
22c98e6240 Fix incorrect variable name: mimeType -> this.mimeType. 2009-08-06 17:25:58 +02:00
Siegfried-Angel Gevatter Pujals
21858d928a Clear text in the run dialog when it's hidden with escape 2009-08-06 02:04:04 +02:00
Siegfried-Angel Gevatter Pujals
be95ca553a Fix indentation issues in altTab.js, plus minor cleanup in some other files. 2009-08-06 01:54:22 +02:00
Colin Walters
c4b4248707 Bug 589086 - Fix non-integer positioning in altTab
Non-integer makes fonts look awful.  Fix this by rounding
down.
2009-08-05 11:43:54 -04:00
Dan Winship
41f6e8ef86 Add dash.js to js/ui/Makefile.am. #590813 2009-08-05 08:58:35 -04:00
Colin Walters
85b4b97b7b Rewrite Dash, remove hardcoded width/height from GenericDisplay
This patch is a near-total rewrite of the Dash.  First, the dash
code moves into a separate file, dash.js.

Inside dash.js, the components are more broken up into separate
classes; in particular there's now a Pane class and a MoreLink
class.  Instead of each section of the dash, when activated,
attempting to close all N-1 other sections, instead there
is the concept of a single "active pane", and when e.g. activating
the More link for documents, if we know there's an active pane
which happens to be the apps, close it.

Many redundant containers were removed from the dash, and all
manual width, height and x/y offsets are entirely gone.  We move
the visual apperance closer to the design by using the view-more.svg,
etc.

To complete the removal of height/width calculations from the dash,
we also had to do the same for GenericDisplay.  Also clean up
the positioning inside overlay.js so calculation of children's
positioning is inside a single function that flows from screen.width
and screen.height, so in the future we can stop passing the width
into the Dash constructor and call this once and work on screen
resizing.
2009-08-05 04:04:27 -04:00
Colin Walters
2726fdb831 Bug 588343 - Major rework of window monitoring to be application-based
The previous application monitoring code was originally designed
to be based on WM_CLASS, which was then resolved on a server.
We have that resolution code locally now, so instead
of saving WM_CLASS data, save application IDs.

Also, inside the WM we have a much better
infrastructure for tracking windows.  In particular, rather
than polling, we can just watch for focus notification on
the display, and window add/remove.

Instead of polling XScreensaver, use DBus to watch org.gnome.Session
which already has an idle time watch.

Now there is no polling at all inside the monitor.
2009-08-04 18:40:37 -04:00
Colin Walters
898d76af53 lookingGlass: Add hierarchy list and property inspector
Add a Notebook class which we then use to pack in separate Hierarchy
and Properties tabs.

Split out the inspector into its own class to avoid bloat in the
main class.
2009-08-04 11:12:02 -04:00
Halton Huo
7c26303b25 lookingGlass: Add to Makefile.am
Signed-off-by: Colin Walters <walters@verbum.org>
2009-08-04 10:01:06 -04:00
Colin Walters
902956ca0d lookingGlass: Draw a red border around target actor 2009-08-04 09:55:52 -04:00
Colin Walters
3429abff40 lookingGlass: Faster history save, avoid empty lines
5 seconds is should help ensure we lose work less often on
Alt-f2 restart.

Avoid saving empty lines to history, and filter them out if
we find them.

Minor fixes for the still-not-enabled inspector.
2009-08-04 09:55:46 -04:00
Colin Walters
61b28c5c7d Adjust tray spacing to cope with many icons
This patch attempts to adjust if we have many tray icons; currently
the simple algorithm is to drop down to a spacing of 8 if we have
more than 6.  In the future we should fix the panel layout so that
the clock moves to the side.
2009-08-03 20:42:00 -04:00
Siegfried-Angel Gevatter Pujals
e84e842c1e Fix 'redeclaration of global' error in lookingGlass.js. 2009-08-04 02:36:53 +02:00
Colin Walters
0792f8d4a3 lookingGlass: Fix spacing and line appearance 2009-08-03 20:21:07 -04:00
Colin Walters
52ae75d4b8 LookingGlass - JavaScript prompt and interactive Clutter controller
Add a dropdown pane triggered by Alt-F2, "lg" which supports interactive
JavaScript evaluation, saving/restoring a history file, as well as
an inspector element to pick by using the mouse.
2009-08-03 20:17:08 -04:00
Colin Walters
224538c885 Cleanups for runDialog
Using an internal boolean rather than the visibility property seems
more reliable to me.  Add a list of internal functions rather than
an if/else chain, so for example an extension could hook something on.

Delete the javascript evaluator in favor of the upcoming lookingGlass.js.
2009-08-03 20:16:15 -04:00
Colin Walters
d7f5fd5d24 Give the runDialog a rounded corner
Just makes things a bit nicer looking.
2009-08-01 21:46:02 -04:00
Colin Walters
026f014d32 Bug 589937 - Raise clone on window activation
We had duplicate code in appDisplay and workspaces for handling activating
a window; unify that inside workspaces, add an API to Main.overlay to
access it from both contexts.

Also, explicitly raise the clone we're activating to the top
before starting the animation to leave the overlay.
2009-07-31 19:26:32 -04:00
Jon Nettleton
a439a58f13 Remove taskpanel
The new design doesn't have the task panel at the bottom; remove it.

Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-31 17:42:49 -04:00
Colin Walters
29ffa46d08 Move drawing functions from shell-global into new shell-drawing.c file
Just to avoid shell-global.c bloat.
2009-07-31 17:26:47 -04:00
Siegfried-Angel Gevatter Pujals
0a1aac862f Fix details pane repositioning
Two calls to _repositionDetails() were done too early,
before the visibility of the results pane had changed,
so they had no effect. Thus when a search was done while
a details pane was active, the pane with the results was
hidden by the details pane.

In addition to fixing this, move the two remaining calls to
the line after changing the results pane's visibility
to make it clearer why the calls are there.
2009-07-31 16:12:19 +02:00
Marina Zhurakhinskaya
f7fff83647 Fix showing small item previews
Don't use a clone of an actor that's not part of the scene graph for the
item previews. This patch fixes previews in the details pane for documents
for which we don't have full previews and for applications.

Use create_icon_texture() from AppInfo instead of looking up the file
for gicon when creating an application icon for the details pane.
2009-07-29 17:56:13 -04:00
Siegfried-Angel Gevatter Pujals
77c92d75d5 Toggle the info pane when clicking the info icon (#587550)
Now clicking on the information icon of the same item a second
time will hide the details pane. Clicking it another time will
show it again, etc.

This is achieved by adding a 'toggle-details' signal which
switches the visibility of the details pane.

Other than the necessary changes, function _selectIndex (in
genericDisplay.js) has been restructured a bit to avoid
duplicating checks.
2009-07-29 19:35:11 +02:00
Siegfried-Angel Gevatter Pujals
f3efbf432f Replace lastVisited method in DocInfo with timestamp attribute
This is not only more consistent with the name, uri and
mimeType attributes, but makes adding Zeitgeist support easier.
2009-07-29 10:52:33 +02:00
Marina Zhurakhinskaya
efcf8bae9d Align category labels vertically
Add a box to contain the MenuItem labels and align them vertically.

Clean up the style in the MenuItem code.
2009-07-27 19:02:46 -04:00
Colin Walters
adfb419ceb Don't line wrap application names in wells, fix running alignment
The experiment with avoiding ellipsization was a definite failure;
several translations have very long names, and we'd end up
with a single column.

Also fix extra padding; we only want some space at the top, not
left/right.
2009-07-27 18:35:41 -04:00
Siegfried-Angel Gevatter Pujals
ff6ee2c0c2 DocsWidget -> RecentDocsWidget
Rename DocsWidget to RecentDocsWidget (as widgets for most used docs,
docs related to the currently open documents, etc. may be added in the
future), and change the title so that it doesn't abbreviate 'Docs' (for
consistency with the overlay).
2009-07-27 14:50:54 -04:00
Colin Walters
96cf9c739e Avoid ellipsizing app names; Draw glow around running
Corresponding with the design, if an application is in a running
state (has > 0 windows open), draw a glow behind the name.

To make the display look a bit nicer, set the width of each item
to be equal to the longest word among all the items.
2009-07-27 12:45:22 -04:00
Marina Zhurakhinskaya
9f4ccb83e3 Make dash background darker
Make dash background darker so that the blue color used for indicating
running apps can be visible. Use the dark blue (almost black) color from
Jeremy's mockup.

Make the dash height be the full screen height minus the height of the panel.
Don't use padding on top or on the bottom.

Remove the border from the main dash, but leave it for the results and details
panes. Make the border slightly transparent.

Make sure the details pane is correctly positioned by not applying the
additional padding when determining its x position.
2009-07-24 17:25:20 -04:00
Marina Zhurakhinskaya
978ab8a4dd Return false from the timeout callback function
Timeout callback function should not be rescheduled again with the same timeout
because we compute a new timeout and schedule it again instead. So the callback
function needs to return false to not be scheduled again by default.
2009-07-24 12:58:53 -04:00
Colin Walters
2cc650e389 Bug 589437 - Switch to workspace of target app to activate
The user explicitly selected a window, so take them to it.
2009-07-23 12:28:31 -04:00
Marina Zhurakhinskaya
f24169735a Fix updating last visited time for the doc display items.
Make sure that we calculate the next update time correctly.

Store timeout time instead of the timeout delta, so that it doesn't get outdated.

Create a new callback when the time update happens for the original callback.

Make sure last visited time is updated in the details pane by keeping track
of the description actors created for the detail actors.

Add comments to the new functions.
2009-07-22 18:57:05 -04:00
Colin Walters
75c875f073 Fix time updating for recent files 2009-07-22 12:46:05 -04:00
Colin Walters
b4cf178cc5 Display last visited time as docInfo description
It's useful information, and takes up some of the blank space.
2009-07-21 23:05:08 -04:00
Colin Walters
8d9fc28872 Bug 588050 - Cache information icon forever, only look up recent once
Extend ShellTextureCache by adding the concept of a policy, which
we expose to the public API for loading URIs.

This lets us have the shell tell the cache to keep the information
icon texture around forever.

Secondly, fix the caching of recent info; we shouldn't always be
loading the backup pixbuf.  Move recent info loading entirely
into ShellTextureCache.
2009-07-17 17:35:53 -04:00
Sander Dijkhuis
9e85d197fd Bug 588462 - Use a plain black panel with a different layout
The semi-transparent gradient on the panel is replaced by a
solid black background. The shadow below the panel is removed.
The clock is put at the center instead of the right side of
the panel and has the date removed. The user icon is hidden.
Instead of boldface, a regular font is used. Padding is added
on each side and between panel elements.

button.js: Allow for custom text colors and fonts.
panel.js: Change the panel colors and layout, remove the shadow.
2009-07-16 22:02:32 +02:00
Sander Dijkhuis
2aea9c59a4 Bug 588173 - No remove button on the first workspace
If there is only one workspace and it's empty, it should
not get a remove button. Add a workspaceNum != 0 check to
workspaces.js.
2009-07-14 14:58:24 +02:00
Colin Walters
001af72727 Merge branch 'bug588050-doc-textures' 2009-07-13 16:24:55 -04:00
Colin Walters
9d594d7f26 Always clear details pane when unsetting more mode
We don't want a detail pane hanging around for an item no
longer visible.
2009-07-13 11:01:50 -04:00
Colin Walters
2161e90cda Fixes for GenericDisplay
GenericDisplay wasn't quite completely converted to the ShellOverflowList
model.  Since the list now holds all actors, the indexing/wrapping
was incorrect.

Add a property which lets us keep track of how many items are displayed,
use this in genericDisplay.

Avoid setting selectedIndex to -2 when going up with no items.

If we're not displaying any results at all, don't attempt keynav (for now).
2009-07-13 11:01:49 -04:00
Sander Dijkhuis
f7a82d6400 Bug 588445 - Use BigBox vertical alignment for the clock
panel.js: Replace the manual vertical padding calculation
    for the panel's clock with an y_align property on its
    BigBox container.
2009-07-13 16:16:44 +02:00
Sander Dijkhuis
10e30f7dc7 Bug 588405 - Handle status menu button appearance in JavaScript
Make the ClutterText and ClutterTexture from the status menu
button available to JavaScript, and from there improve the
font definition of the user name.

shell-status-menu.[ch]: Add public get_name() and get_icon()
    functions that return the user name label and icon
    texture, remove the markup from update_name_text().
panel.js: Set the font for the button consistently with that
    of the other panel labels.
2009-07-13 13:54:38 +02:00
Milan Bouchet-Valat
177edc5444 Bug 587955 - Small cleanups to iconButton
Missing trailing ; after "this._fadeOut()". A few missing spaces after "if". Parameter inconsistently named "icon" instead of "texture".
2009-07-11 18:44:21 +02:00
Colin Walters
b45cd0a4eb Small fixes for sidebar application bits
We need to set the .name property, also skip unknown apps.
2009-07-10 17:04:39 -04:00