Commit Graph

52 Commits

Author SHA1 Message Date
Florian Müllner
53d9ea7a2c search: Replace getResultMeta() with getResultMetas()
Save some function calls by fetching all search results we want to
display for a provider at once, rather than one result at a time.

https://bugzilla.gnome.org/show_bug.cgi?id=663125
2012-02-21 23:00:53 +01:00
Jasper St. Pierre
cd30128af8 placeDisplay: Fix accidental swap of parameters
https://bugzilla.gnome.org/show_bug.cgi?id=669236
2012-02-02 15:31:46 -05:00
Giovanni Campagna
7da39031e1 Place display: don't use a StIcon for DND
DND code assumes it can query the size of the actor before parenting,
while StWidget asserts that get_preferred_size() is only called
after the actor is on stage. This fixes a crash while dragging
"Connect to..."

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2012-01-14 13:31:04 +01:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
d6b6f814d3 Port all classes with inheritance to class framework
All classes that have at least one other derived class (and thus
benefit from the framework) have been now ported. These includes
NMDevice, SearchProvider, AltTab.SwitcherList, and some other
stuff around.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Stefan 'psYchotic' Zwanenburg
36eb745ecc PlacesManager: fix .gtk-bookmarks monitor scope
The GFileMonitor on ~/.gtk-bookmarks was block-scoped in the
PlacesManager._init() function, which caused it to be destroyed as soon
as the constructor was done. This caused changes in bookmarks to never
be notified to possible watchers (such as the places-menu extension).
To fix this, the 'monitor' variable has been promoted to an object
instance member.

https://bugzilla.gnome.org/show_bug.cgi?id=661921
2011-10-18 14:03:36 -04:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Ray Strode
67ae8ed8e9 overview: make shellInfo private
This commit forwards the shellInfo setMessage method
to the overview itself and makes shellInfo private.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:29:41 -04:00
Colin Walters
4886275df4 ShellApp: Change activation API
Since almost all of the callers of shell_app_activate were using the
default workspace (by passing -1), remove that parameter.

Add a new shell_app_activate_full() API which takes a workspace as
well as a timestamp; previously we might have been ignoring event
timestamps from elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=648149
2011-08-11 05:35:23 -04:00
Colin Walters
bfd344cdec Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
We need to fix the latter to return a byte array, which gjs doesn't
deal with well right now.

https://bugzilla.gnome.org/show_bug.cgi?id=649981
2011-05-19 15:27:23 -04:00
Dan Winship
898b2b903d environment: put gettext stuff into global environment
Rather than defining _() as a local function in every module, put it
into the global environment (along with C_() and ngettext()).

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:21 -04:00
Colin Walters
f079501cff placeDisplay: Remove network places
It hasn't existed in nautilus for a while now, and we don't
have places at all.

https://bugzilla.gnome.org/show_bug.cgi?id=644402
2011-03-14 10:37:19 -04:00
Florian Müllner
7723e59a72 search: Replace 'icon' property in metaInfo with a function
Search results' meta info currently is expected to have an 'icon'
property holding a Clutter.Texture of a fixed icon size. This
property is used to implement the createIcon() function of BaseIcon,
which is used to actually display the result, ignoring the size
parameter due to the fixed icon size.
Given that all available search providers create this property for
the desired icon size using a function with the same signature, it
appears logical to replace the fixed-sized 'icon' property with
such a function, so that the icon size will be defined by the display
actor rather than the search system.

https://bugzilla.gnome.org/show_bug.cgi?id=643632
2011-03-02 23:12:35 +01:00
Jasper St. Pierre
b23989871e placeDisplay: Fix another typo preventing place launching
https://bugzilla.gnome.org/show_bug.cgi?id=642207
2011-02-13 14:55:33 -05:00
Jasper St. Pierre
03729a71f4 placeDisplay: Fix typo preventing places from being launched
0d32017ffc accidentally introduced
a typo when launching places.

https://bugzilla.gnome.org/show_bug.cgi?id=642207
2011-02-13 08:44:14 -05:00
Owen W. Taylor
0d32017ffc Don't switch to a workspace when dragging it to launch on that workspace
With workspace thumbnails, we don't switch workspaces when dragging windows
between workspaces or adding new workspaces, so we also shouldn't switch
on launch.

 * Add workspace parameters to shell_doc_system_open(),
   shell_app_activate, shell_app_open_new_window()

 * Pass a 'params' object when activating items in the overview with
   two currently defined parameters: workspace and timestamp. (timestamp
   is only implemented where it is easy and doesn't require interface
   changes - using the global current timestamp for the shell is almost
   always right or at least good enough.)

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:21 -05:00
Florian Müllner
ad52d783bd places: Do not use nautilus' 'desktop-is-home-dir' setting
g_settings_schema_new() aborts if the requested schema is not found,
so the previous approach of handling the case of unstable nautilus
not being installed did not work.
Instead, remove the use of the setting altogether - the original intent
was to not have separate items for Desktop and Home in the places
section if the nautilus key was set. As the section has been removed
anyway, the impact of always adding the desktop folder is minimal
(e.g. searching for "desktop" will match the desktop folder even
if it's set to the home folder).
2011-01-17 21:05:13 +01:00
Florian Müllner
26aaecc33d places: Fail gracefully when not using unstable nautilus
The latest development version of nautilus has been ported to
GSettings, which we now use as well for the desktop-is-home-dir
preference. Obviously, the required schema is only available if
a recent enough nautilus version is installed. Instead of adding
yet another module to the moduleset, catch the exception and
ignore the preference in case the schema is not available.

https://bugzilla.gnome.org/show_bug.cgi?id=639689
2011-01-17 17:46:37 +01:00
Florian Müllner
f91138d0a2 places: Port to GSettings
'Places' follows the nautilus preference of whether the Desktop
should be a separate directory or the home folder should be used.
Nautilus has been ported to GSettings a while ago, so follow suit.

https://bugzilla.gnome.org/show_bug.cgi?id=639689
2011-01-17 15:54:24 +01:00
Florian Müllner
89d89ae1cf places: Remove obsolete code
The dash no longer contains a places section, so remove the now
unused code.

https://bugzilla.gnome.org/show_bug.cgi?id=639689
2011-01-17 10:33:28 +01:00
Dan Winship
8bdfb8df68 util: add Util.spawn and friends
Add Util.spawn, Util.spawnCommandLine, and Util.spawnDesktop for
spawning a command/argv/.desktop file in the background, automatically
handling errors via MessageTray.SystemNotificationSource(), and
Util.trySpawn, Util.trySpawnCommandLine, and Utils.trySpawnDesktop
that don't do automatic error handling (but do at least clean up the
error message in the exception a bit).

Update various other bits of code around the shell to use the new
methods.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Florian Müllner
1ea488bb3d overview: Replace InfoBar with message tray notifications
The layout of recent mockups occupies the space previously reserved
for the info bar with the view selector. As the bar's purpose is
mainly to provide the user with feedback, it makes sense to use the
existing message tray facility instead of moving the bar elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 02:25:15 +01:00
Giovanni Campagna
21ac225981 StIcon: add support for GIcon
Add a "gicon" property so that a GIcon can be used instead of an
icon name, while still getting icon recoloring from the theme.
Also include a compatibility wrapper in libshell until GJS has
support for interface static methods.

https://bugzilla.gnome.org/show_bug.cgi?id=622451
2010-11-16 22:11:27 +01:00
Owen W. Taylor
0e3431ac47 Use St.Icon for named icons
Switch from St.TextureCache.load_named_icon() to using St.Icon for named
icons. Along with the advantage of getting colorization right for symbolic
icons, this allows moving some icon sizes into the CSS.

In the CSS, the system status icon size is changed to be 1em (=16px for the
default font size), at the request of the artists. See bug 613448.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Dan Winship
a6e4bab990 Add symbolic icons to TextureCache's load_icon_name()
Icons can be loaded as St.Icon.SYMBOLIC, FULLCOLOR, APPLICATION or
DOCUMENT. The first will look for a symbolic equivalent, the second
looks for a full-color version (and does fallback, eg, from
"drive-harddisk-usb" to "drive-harddisk"). APPLICATION and DOCUMENT do
full-color icons without fallback (as specified by the icon spec).

And update various callers to use the right flags.

Based on a patch from Matt Novenstern.

https://bugzilla.gnome.org/show_bug.cgi?id=621311
2010-09-24 10:57:27 -04:00
Florian Müllner
a9c0dcbd6b [search] Use 'AND' instead of 'OR' on search terms
The current search system uses the OR operator to concatenate search
terms. While results which are matched multiple times sort before
other matches, it is almost guaranteed that adding an additional term
to the search increments the number of results, which is rather
surprising.

https://bugzilla.gnome.org/show_bug.cgi?id=610955
2010-08-18 23:59:27 +02:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Milan Bouchet-Valat
2799327c84 Migrate to GSettings
Use GSettings for all Shell configuration. GConf is kept to read
configuration from external programs (Metacity, Nautilus and Magnifier),
but ShellGConf is removed because it's mostly useless for the few calls
we still have. Also get rid of unused GConf code in ShellAppSystem.

A basic GConf schema is still used to override Metacity defaults and
configure Magnifier in a system-wide fashion. GConf is also used as
GSettings backend via the GSETTINGS_BACKEND environment variable.
All of this will be removed when these programs have been ported
to GSettings and able to use dconf.

GLib 2.25.9 is required. Schemas are converted to the new XML format,
and compiled at build time in data/ so that the Shell can be run from
the source tree. This also requires setting the GSETTINGS_SCHEMA_DIR
environment variable both when running installed or from source tree,
in src/gnome-shell.in and src/gnome-shell-clock-preferences.in.

https://bugzilla.gnome.org/show_bug.cgi?id=617917
2010-06-18 20:27:41 +02:00
Florian Müllner
a57a34c540 [linearView] Zoom out when dragging an item from the dash
When dragging windows in linear view, the workspace zooms out to
allow moving the window to other workspaces. Enable the same
behaviour for items dragged from the dash.

https://bugzilla.gnome.org/show_bug.cgi?id=618055
2010-05-27 12:12:10 +02:00
Marina Zhurakhinskaya
703b21cef0 Don't use double quotes for things that don't need to be translated
This is our convention.

The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
2010-05-13 16:00:38 -04:00
Adel Gadllah
750672061a placesDisplay: Prevent bookmarks from being cut off
Moving to St.Table introduced a regression that resulted in the height
of Places section to only depend on the height of the left column.

This could result into some bookmarks not being displayed at all because
there are not enough items in the left column to allocate the needed height.

Fix this by removing the St.BoxLayout actors and add the items directly to
the table.

https://bugzilla.gnome.org/show_bug.cgi?id=614144
2010-03-31 17:08:51 +02:00
Florian Müllner
feaaefd8ba [appDisplay,placeDisplay] Remove manual dnd mode
As the special handling for St.Clickable moved into dnd, it is no
longer necessary to use manual mode in these cases.

https://bugzilla.gnome.org/show_bug.cgi?id=610385
2010-03-29 17:46:05 +02:00
Florian Müllner
095e15fc11 [placesDisplay] Replace remaining Big.Boxes with St.Widgets
While most of the code already is CSS stylable, the two-colum setup
is still done using Big.Box with hard coded spacings. Port those
remaining parts to St.Widget, so that all spacings can be adjusted
by the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=610385
2010-03-27 19:45:10 +01:00
Florian Müllner
d1a178301f [placeDisplay] Prefer eject over unmount when applicable
Clicking the eject button in the places display always triggers an
unmount action. In some cases like USB drives or DVDs, eject makes
more sense - it is also consistent with nautilus' behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=613405
2010-03-24 19:38:58 +01:00
Dan Winship
a8fa8a498a Fix dragging of App Well and Places icons
The hover rewrite added a freeze/thaw_notify to
st_clickable_leave_event() (to match the one already in
st_clickable_enter_event()), which broke code in two places that
assumed "pressed" would still be TRUE when "hover" changed to FALSE.
Fix that by exposing the "held" property as well.
2010-03-24 13:48:29 -04:00
Owen W. Taylor
dfb110cd0f [DND] Use Params for DND.makeDraggable()
Replace boolean 'manualMode' with a params object for
improved readability and future expansion.

https://bugzilla.gnome.org/show_bug.cgi?id=613367
2010-03-23 11:32:16 -04:00
Florian Müllner
52f1cc6d19 Remove user_data arguments for callbacks
Gjs now removes user_data arguments for callbacks - the existing
code still works because all user_data arguments are unused and
at the end of the argument list, but it's a lot prettier to remove
them.
2010-03-19 20:13:18 +01:00
Colin Walters
1f274c04fb [placeDisplay] Add missing return statements
Otherwise we get a warning.
2010-03-18 14:04:35 -04:00
Florian Müllner
ddfe9442fa [placeDisplay] Fix dnd regression
DND from the places section broke with 1c4c3afb when St.Label was
replaced with St.Button.
To fix, replace St.Button with St.Clickable and use a fake_release
when starting a drag.

https://bugzilla.gnome.org/show_bug.cgi?id=609218
2010-03-18 18:15:43 +01:00
Florian Müllner
cc8a95572e [placeDisplay] Show a message when unmount fails
When an unmount operation fails, the only feedback given currently
is an exception on stderr. Use the infoBar to display an error
message and allow the user to retry the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=612200
2010-03-18 01:43:18 +01:00
Dan Winship
3ce89e3c80 Add missing semicolons noted by jslint
Taken from a patch by Lex Hider on the mailing list
2010-03-15 09:50:05 -04:00
Colin Walters
22948b3d39 Merge St.TextureCache and Shell.TextureCache
Brute force merge these two by essentially replacing St.TextureCache
with a (renamed) Shell.TextureCache.

One function was added for convenience, namely "st_texture_cache_load_file_simple".
St.TextureCache had a function to load a texture from a filename, and it
returned NULL on error but only half the callers actually checked this.  This
function is better.

https://bugzilla.gnome.org/show_bug.cgi?id=607500
2010-03-05 16:19:40 -05:00
Florian Müllner
74446ce3e0 [Places] Hide desktop icon when desktop_is_home_dir
With the above preference set to true, the home and desktop entries
both represent the same location. Hide the desktop icon in that case
to avoid redundancy.

https://bugzilla.gnome.org/show_bug.cgi?id=606922
2010-01-20 23:36:14 +01:00
Colin Walters
5202dd5157 [dash] Change section titles to match 20091114 mockup
Documents is changed to Items, and add "& Devices" to Places.

https://bugzilla.gnome.org/show_bug.cgi?id=605491
2010-01-07 18:33:00 -05:00
Florian Müllner
1c4c3afb27 Add eject buttons in places menu for places which support it
https://bugzilla.gnome.org/show_bug.cgi?id=602976
2009-12-18 15:12:53 -05:00
Colin Walters
b7646d18ae Add search.js, rebase search system on top
The high level goal is to separate the concern of searching for
things with display of those things; for example in newer mockups,
applications are displayed exactly the same as they look in the
AppWell.

Another goal was optimizing for speed; for example,
application search was pushed mostly down into C, and we avoid
lowercasing and normalizing every item over and over.

https://bugzilla.gnome.org/show_bug.cgi?id=603523
2009-12-18 10:07:22 -05:00
Colin Walters
42757a0c87 Move Main.currentTime() and Main.createAppLaunchContext() into ShellGlobal
Primarily motivated by wanting these functions accessible from C.

https://bugzilla.gnome.org/show_bug.cgi?id=603522
2009-12-15 15:54:38 -05:00
Colin Walters
1526500079 [placeDisplay] Fix inverted logic for desktop-is-home case
We only want to hide the Desktop link if it desktopIsHome, not
if it isn't.
2009-11-16 14:13:14 -05:00
Colin Walters
06cf6c51f3 [placeDisplay] Port more to CSS, lower spacing
Newer mockups have smaller spacing here.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:02 -05:00
Colin Walters
66cab3b8ed [genericDisplay+other] Port to CSS, style cleanups
Mostly a straightforward porting of style code to CSS, except
that various bits of other code referenced a few GenericDisplay
constants, so those needed to be ported as well.

Add some padding at the top between the close button and the items.

Center the text and description.

https://bugzilla.gnome.org/show_bug.cgi?id=600734
2009-11-12 11:42:01 -05:00