Commit Graph

386 Commits

Author SHA1 Message Date
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