Commit Graph

18 Commits

Author SHA1 Message Date
Marina Zhurakhinskaya
d67c88e4dc Bug 577380 - Use the default application for the mime type to open the document
Using appExec for the last application that registered the document was failing
in certain cases, such as for the Open Office for which the application
execution string is being registered as "soffice %u" in ~/.recently-used.xbel.
In general, using the default application for the mime type seems to be a more
predictable way to open documents. We still fall back to using the appExect
for the last application if the default application for a given mime type was
not found.
2009-05-05 15:51:56 -04:00
Owen W. Taylor
20e755023b Clean up underscores in function and variable names
Try to fix all places where we accidentally used foo_bar instead
of fooBar for function names, function parameters, and variables.

(Lucas Rocha pointed out one example.)

http://bugzilla.gnome.org/show_bug.cgi?id=581141
2009-05-04 13:50:49 -04:00
Owen W. Taylor
4664fac566 Improve comments about startup notification
Do a better job at describe the problems in docDisplay.js related
to not reading the desktop files and finding StartupNotify=true.
Also, fix a typo.

http://bugzilla.gnome.org/show_bug.cgi?id=580658
2009-05-01 16:21:00 -04:00
Owen W. Taylor
bb69afc830 Set the workspace when launching apps
main.js: Add create_app_launch_context() with code from appDisplay;
  additionally set the workspace on the launch context to the current
  workspace so that the application launches on the right workspace
  even if the user switches before the app starts.

appDisplay.js docDisplay.js: Use Main.create_app_launch_context()

http://bugzilla.gnome.org/show_bug.cgi?id=580658 (Reported by Igor Vatavuk)
2009-05-01 15:18:51 -04:00
Marina Zhurakhinskaya
82cf98740a Bug 578178 – Show large previews for image files
Use the actual image from the file for expanded mode previews for image files. Use the pixbuf loader to set the appropriate image size as soon as the image is prepared, but before it is loaded, to avoid loading large images. Apply the pixbuf orientation setting so that the image is properly rotated. Preserve the original size of the image if its dimensions are smaller than the space available.

Make sure we provide the accurate available width for the details actor. This
width has to exclude the padding and border width. Also provide the available height for the details actor.
2009-04-28 15:35:36 -04:00
Marina Zhurakhinskaya
dcc0f368bd Add tooltip delay to the preview pop-ups.
Showing previews after a delay allows the user to move the mouse around
the screen without triggering constant pop-ups.

Make sure we remove the pop-up when the user hits Escape and redisplay
the pop-up if we are updating the section results due to a change in space
allocated for it.

Rename protected variable _hasPreview to _showPreview in order to not have
the naming conflict with a new private variable _havePointer, which we
name in first person.
2009-03-21 10:37:15 -04:00
Marina Zhurakhinskaya
288fb7a837 Bug 571426 - Show pop-up previews of sideshow items
The pop-up previews have larger images than the item displays, which is
particularly nice when we are displaying thumbnails for documents. The
previews are also at least as wide as is required to fit the item title
on one line and the item description inside them is wrapped. Therefore
they act as tooltips showing the full title and description text.

The preview updates when the item under the mouse pointer changes. Changes
in overlay.js ensure that we keep the sideshow on top when the
workspaces are not being animated so that we can find the item over which the
pointer is located.

The preview is removed when the item it is shown for starts being dragged.

_hideInProgress variable was added to represent the state of the overlay
when the code for hiding it was already triggered. This fixes the error
which was happening when the code for hiding the overlay was triggered
multiple times (for example by the user clicking the Activities button
twice when exiting the overlay).
2009-03-20 12:06:34 -04:00
Marina Zhurakhinskaya
30a9c6b2f4 Don't reset the page selection if the results have changed while the user
was browsing exiting results

This is most noticeable when viewing results in xephyr, and then opening
a document in your regular session. But it could also be noticeable if
downloading a new file completes while the user is in the overlay.

This patch also moves the call to _displayMatchedItems() to _redisplay
instead of making it in both _setDefaultList() and _doSearchFilter().
2009-03-11 17:56:22 -04:00
Marina Zhurakhinskaya
5af37f140e Bug 574117 - Allow paging through the application and document results in the overlay
Add a display control that contains page numbers for the result
pages and is shown in the expanded results view. All of the page selection and
switching is handled by the GenericDisplay which exposes a displayControl
actor, which is then displayed by the Sideshow.
2009-03-09 16:52:11 -04:00
Colin Walters
85dae56a31 Bug 571203 - Handle spaces in overlay search
Previously we were stripping all whitespace.  Instead, just strip leading+trailing
whitespace, split the remaining search into individual terms which we search
for independently.

Items are grouped by the number of terms they match, then sorted
alphabetically.
2009-02-11 16:50:42 -05:00
Marina
2d3988c5fc Bug 570579: Redo the layout of overlay components
Divide the screen into a grid and use it to determine the layout of the overlay components in a more consistent manner.

Remove the 'Add workspace' control and slide the workspaces
display to the side without scaling it when switching to the 'More' mode.
2009-02-10 17:38:06 -05:00
Marina Zhurakhinskaya
e9826ecb45 Add a 'More' control to the applications display in the overlay
mode. When this control is clicked, documents display section slides down,
workspaces display slides to the side, and a multi-column applications view is
presented to the user. "More' control is replaced with a 'Less' control. When
the 'Less' control is clicked a default overlay view is restored.

Clean up positioning of the components of the overlay sideshow
and the items within generic item displays.


svn path=/trunk/; revision=179
2009-02-03 22:58:33 +00:00
Dan Winship
87a3088719 sort imports consistently; everything-but-our-javascript, alphabetically,
then a blank line, then all of our javascript, alphabetically

svn path=/trunk/; revision=176
2009-02-02 23:02:16 +00:00
Owen Taylor
b6ec5080c8 Escape % in g_app_info_create_from_commandline
g_app_info_create_from_commandline supports % escapes for
file name, icon name, etc, so we need to escape the command line
we pass in. If it contains an URL with url-encoded UTF-8 it will
typically have some percent signs.

(Reported by Achim Frase)

svn path=/trunk/; revision=151
2009-01-17 14:41:45 +00:00
Owen Taylor
ac6a5ef4af Cleanup: use destructuring assignment
For multiple return values use

 let [val1, val2, val3] = function();

Rather than:

 temp = function();
 val1 = temp[0];
 ...

svn path=/trunk/; revision=149
2009-01-16 20:40:16 +00:00
Marina Zhurakhinskaya
849ddbd3f6 Display thumbnails of recent files in the overlay mode by using GnomeThumbnailFactory to get them. Fall back to the system icon for the file type provided by GtkRecentInfo when a thumbnail is not available.
svn path=/trunk/; revision=143
2009-01-09 01:09:35 +00:00
Marina Zhurakhinskaya
4406943fd8 Check if the file still exists when displaying matches for the search.
Use get_modified() instead of get_visited() for GtkRecentInfo as get_modified() seems to reflect when the file was last modified or visted, while get_visited() stays the same as get_added(). See http://bugzilla.gnome.org/show_bug.cgi?id=567094

svn path=/trunk/; revision=141
2009-01-08 23:31:23 +00:00
Marina Zhurakhinskaya
48cda5b179 Create two base classes: GenericDisplayItem and GenericDisplay, as
well as corresponding classes for applications and documents that inherit from
them. 

Use half the height of the sideshow in the overlay mode for the
AppDisplay, and the other half for the DocDisplay. 

Enable moving the selection between the two displays by using up and down arrow keys. 

Enable activating any item by clicking on it, in addition to activating the currently selected item by pressing Enter.

Apply search entry content to both sets of items.


svn path=/trunk/; revision=132
2008-12-20 04:27:57 +00:00