Commit Graph

1046 Commits

Author SHA1 Message Date
Cosimo Cecchi
18d69d7032 util: don't depend on the nautilus GSettings schema
Without the desktop, even Nautilus hardcodes "Home" in all places
nowadays (except for the desktop itself). I think a run-time dependency
on nautilus being installed (GSettings will abort if the schema is not
found) is not worth it to keep compatibility with the desktop.

(Also, nautilus itself could probably hardcode "Home" for the desktop as
well and remove the preference).

https://bugzilla.gnome.org/show_bug.cgi?id=659895
2011-10-19 15:37:08 -04:00
Jasper St. Pierre
5d25716cee st-texture-cache: Use ANSI C-style comments
https://bugzilla.gnome.org/show_bug.cgi?id=660968
2011-10-19 12:40:44 -04:00
Jasper St. Pierre
4bb48e56d2 Drop deprecated g_thread_init call
GThread will automatically initialize at program start now.

https://bugzilla.gnome.org/show_bug.cgi?id=662011
2011-10-18 16:13:55 -04:00
Jasper St. Pierre
338ba10ca2 shell-recorder-src: Statically init mutexes instead of using the deprecated API
https://bugzilla.gnome.org/show_bug.cgi?id=662011
2011-10-18 16:13:50 -04:00
Jasper St. Pierre
577ccc4d56 Unmanage the screen before reexecing
This ensures a 'clean shutdown' of mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=660848
2011-10-17 21:55:13 -04:00
Florian Müllner
a26a77f9db st-entry: Display a capslock warning in password entries
Implement the GtkEntry behavior of showing a warning icon when
capslock is turned on while entering hidden text.

https://bugzilla.gnome.org/show_bug.cgi?id=660806
2011-10-17 22:43:47 +02:00
Florian Müllner
6bc34e0f32 shell-app: Plug a small memory leak 2011-10-13 22:09:39 +02:00
Jasper St. Pierre
cecb1a41fb st-texture-cache: Fix a minor crash when computing our border-radius
If we add a 0-sized actor with a border-radius, we will crash as we try to
allocate a 0-sized texture in Cogl. Bail out early instead of doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=661617
2011-10-13 14:15:18 -04:00
Florian Müllner
aee3c6f041 shell-app: Remove MATCH_MULTIPLE_{PREFIX,SUFFIX}
We originally OR'ed search terms and favored results which matched
multiple times to get more relevant results. When changing search
to AND search terms, the semantics of "multiple matches" were
changed to refer to a single term matching multiple criteria (name,
executable), which seemed like a good idea at the time.

However in practice this just results in applications whose
user-visible name matches the executable name on disk being
favored over applications using a more generic name, which
isn't too useful (in particular when taking usage frequency
into account).

https://bugzilla.gnome.org/show_bug.cgi?id=623372
2011-10-13 17:46:45 +02:00
Florian Müllner
c427bba9f1 shell-app: Improve prefix matches
Currently we use a very strict definition of "prefix", where the
search term has to match at the very beginning of the searched
criteria (application name, executable name). Use a more liberal
definition by including matches where the preceding character is
a space (application name) or hyphen (executable name) as well;
as many applications use a prefix, this should improve the quality
of results.

https://bugzilla.gnome.org/show_bug.cgi?id=623372
2011-10-13 17:46:45 +02:00
Florian Müllner
da83ad561b app-system: Consider usage frequency in search results
Application search results are internally categorized in four sets,
multiple and single prefix matches and multiple and single substring
matches. Each set is currently sorted alphabetically by application
name when concatenating the sets to the final result.
Change the last step to sort each set by usage frequency instead,
which is more likely to favor the most relevant match than
"arbitrary" alphabetic order.

https://bugzilla.gnome.org/show_bug.cgi?id=623372
2011-10-13 17:46:45 +02:00
Dan Winship
4333bdc709 *.[ch]: add emacs modeline to C files that were missing it
(excluding files that are synced from another module)

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:17 -04:00
Jasper St. Pierre
67b7b7a950 shell-util: Fix a bogus annotation
Creating a new instance is not (transfer none), unless I'm missing
somehting here...

https://bugzilla.gnome.org/show_bug.cgi?id=661231
2011-10-11 00:07:31 -04:00
Jasper St. Pierre
786cfbd397 shell-util: Remove shell_util_icon_from_string
GJS doesn't need to be able to represent interfaces for you to be able to
access an interface method, so Gio.icon_new_for_string works fine.

https://bugzilla.gnome.org/show_bug.cgi?id=661231
2011-10-11 00:07:31 -04:00
Florian Müllner
23a4d4c69e texture-cache: Don't share requests for uncachable textures
Make create_texture_and_ensure_request() aware of the caching
policy to avoid returning the same texture for different
images.

https://bugzilla.gnome.org/show_bug.cgi?id=660585
2011-10-05 21:30:27 +02:00
Matthias Clasen
472b20d933 ShellContactSystem: Make address search actually work
The code was not dealing properly with what folks returns
for im and email addresses.

https://bugzilla.gnome.org/show_bug.cgi?id=660925
2011-10-05 20:26:39 +02:00
Matthias Clasen
492dd718fb ShellContactSystem: make search terms conjunctive
Require that all terms match. This is the expected behaviour
and matches what gnome-contacts does. Keep the prefix/infix
weights in place for now.

https://bugzilla.gnome.org/show_bug.cgi?id=660912
2011-10-05 20:26:38 +02:00
Florian Müllner
503508af41 contact-system: Add helper method to get a (display) email
Folks uses collection/set objects from libgee to store email addresses
associated with an individual. Unfortunately to extract addresses, parts
of libgee which are unusable from (introspected) bindings have to be
used[0], so add a helper method.

[0] in particular gee_iterator_get(), which is annotated as
    "return: (transfer full): gpointer"

https://bugzilla.gnome.org/show_bug.cgi?id=660580
2011-10-05 20:26:38 +02:00
Matthias Clasen
4ec5e55122 Move shell contacts search closer to gnome-contacts
Match folks' name and nick fields, in addition to alias,
and look at email addresses in addition to im addresses.
This is more in line with what gnome-contacts does.

To match this new usage, rename the ALIAS_..._WEIGHT and
IM_..._WEIGHT constants to NAME_ and ADDR_, respectively.

https://bugzilla.gnome.org/show_bug.cgi?id=660580
2011-10-05 20:26:38 +02:00
Jasper St. Pierre
f9b37a21e8 StThemeNodeDrawing: Remove useless LoadCornerData
Done as part of my quest to merge Mx and St:

https://github.com/magcius/mx/tree/st-rebase

https://bugzilla.gnome.org/show_bug.cgi?id=660968
2011-10-05 12:24:28 -04:00
Jasper St. Pierre
0ccb280008 st-theme-node-drawing: Fix centering when the image needs to be scaled
The translate coordinates are calculated as the offset after the scale, so it
needs to be applied after the scale as well. This fixes random centering issues
in the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=660674
2011-10-04 15:46:01 -04:00
Florian Müllner
e49a595f54 st-texture-cache: Don't cache GIcons which cannot be serialized
For GIcons we use g_icon_to_string() in the key, but the function
will return NULL if the icon cannot be serialized. As a result,
all non-serializable GIcons of the same size end up with the same
cache key - an example for this are contacts with avatars, which
currently all end up with the same image.
To fix, opt out of caching for GIcons which cannot be serialized.

https://bugzilla.gnome.org/show_bug.cgi?id=660585
2011-09-30 20:14:25 +02:00
Florian Müllner
4e9e91fdce recorder: Use CoglHandle instead of CoglHandle*
The latter has always been wrong and should have been fixed a
while ago, but somehow we overlooked shell-recorder.

https://bugzilla.gnome.org/show_bug.cgi?id=659822
2011-09-28 19:56:23 +02:00
Florian Müllner
8bd5b1e696 st: Fix crash in theme-node-transition
Setting up the framebuffers for transitions may fail, in which case
the material used for drawing is left uninitialized, so trying to
access it results in a crash.
Instead bail out in this case, which means that we won't paint
anything during the transition - still, drawing errors are better
than crashes ...

https://bugzilla.gnome.org/show_bug.cgi?id=659676
2011-09-26 19:52:36 +02:00
Dan Winship
5adb5411fa keyboard: fix D-Bus name acquisition flags to totally block Antler
We never want the antler keyboard to run if gnome-shell is running, so
grab org.gnome.Caribou.Keyboard without the "allow replacement" flag.

https://bugzilla.gnome.org/show_bug.cgi?id=659865
2011-09-23 07:53:51 -04:00
Florian Müllner
566d566f26 alt-tab: Do not hardcode ALT modifier
While we allow for arbitrary modifiers in keybindings, both the
alt-tab and ctrl-alt-tab popups close when ALT is not present in
the modifier mask, resulting in ALT being de-facto hardcoded.
Instead, pass the actual modifier mask when invoking the popups.

https://bugzilla.gnome.org/show_bug.cgi?id=645200
2011-09-20 21:07:19 +02:00
Florian Müllner
526a53bdd4 shell-network-agent: Do not handle VPN secrets
VPN secrets are currently unhandled by the UI code. To avoid
lengthy timeouts, bail out early with an error, so NetworkManager
falls back to the nm-applet agent directly.

https://bugzilla.gnome.org/show_bug.cgi?id=658484
2011-09-20 20:05:21 +02:00
Colin Walters
3833124d66 apps: Uniquify application instances explicitly by id
Commit 0af108211c introduced a
regression where applications that appear in multiple categories were
duplicated in the "All Apps" list, because we switched from
uniquifying on desktop file ID to the GMenuTreeEntry.

Switch back to keeping the set of apps based on ID.  To flesh this
out, we keep the ShellApp instance for a given ID around forever, and
when we're loading new contents, we replace the GMenuTreeEntry inside
the app. That means callers still get new data.

We still keep around the running app list, though we could just
recompute it from the app list now.

https://bugzilla.gnome.org/show_bug.cgi?id=659351
2011-09-20 13:56:53 -04:00
Colin Walters
e5e1b52abf apps: Unify code for apps/settings loading more
The apps and settings loading code duplicated the part to traverse a
GMenuTree.  Unify this by adding a new function to return a flattened
set.

This will also be useful for a future change to how we store apps -
this way we can look at both the current set of apps and the new set.

https://bugzilla.gnome.org/show_bug.cgi?id=659351
2011-09-20 13:56:53 -04:00
Adel Gadllah
2140a498a2 StTable: Silence row_span warning for now
This seems to be very noisy and generally harmless so
silence it up for now.

https://bugzilla.gnome.org/show_bug.cgi?id=658939
2011-09-19 21:25:07 +02:00
Colin Walters
37726a4cb6 app: Don't abort if a .desktop file has no Exec= key
Seen in the wild in nautilus-pastebin-configurator.desktop.
2011-09-19 14:13:20 -04:00
Adel Gadllah
09fe12d0c1 st-scroll-view-fade: Pass a precomputed fade area to the shader
Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

https://bugzilla.gnome.org/show_bug.cgi?id=659159
2011-09-19 18:51:01 +02:00
Jasper St. Pierre
82eccb566c windowManager: Use an off-screen buffer for window dimming
The way the window dimmer shader is applied will cause rendering errors with
the rounded corners, invisible borders or shaped textures since it doesn't deal
well with the multitexturing used by the MetaShapedTexture. Use an off-screen
buffer to flatten the texture before being applied.

https://bugzilla.gnome.org/show_bug.cgi?id=659302
2011-09-19 12:39:41 -04:00
Colin Walters
f54b82f64c global: Initiate *full* GC at idle
While I've been trying to make the GC kick in more often, I've decided
it's a better tradeoff to aggressively GC at "leisure", for multiple
reasons.

We can and should revisit this at a later time, but basically:

* The shell doesn't generate *that* much JS data - garbage collection
  is very fast here.
* Long periods without GC mean we're not calling free() when we
  could, which in turn makes heap fragmentation much worse.
* Ensuring the GC runs at idle makes it much less likely we'll take
  a random large GC hit in the middle of an animation.

https://bugzilla.gnome.org/show_bug.cgi?id=659254
2011-09-17 10:16:35 -04:00
Colin Walters
36bfe8c533 memory: Add display of elapsed seconds since a garbage collection
This is useful information for debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=659254
2011-09-17 10:16:35 -04:00
Vincent Untz
36d564526c build: Fix rule to create .service files
It was always taking the first .service.in file to create all .service
files: org.gnome.Shell.CalendarServer.service.in was the only one being
used.

https://bugzilla.gnome.org/show_bug.cgi?id=659194
2011-09-16 09:21:14 +02:00
Matthias Clasen
5b39b87199 Fix up a11y settings handling
Somebody changed the type of the atk-bridge-location key
from s to ay. Without telling affected parties :-(

https://bugzilla.gnome.org/show_bug.cgi?id=658562
2011-09-08 18:38:29 -04:00
Ray Strode
98649f9397 apps: handle 'app-state-changed' move in shell-app-usage
commit 0af108211c moved which
object the app-state-changed signal is emitted from.

This commit updates shell-app-usage.c to keep up with the times.

https://bugzilla.gnome.org/show_bug.cgi?id=658503
2011-09-08 10:20:06 -04:00
Dan Winship
9ae8d90be4 ShellStack: make this an StWidget
Base ShellStack on StContainer rather than ClutterGroup, so that it
has StWidget-y features (and so we don't have to "cheat" in
shell_stack_allocate()). Implement navigate_focus() to only ever pass
focus into the top-most child, since doing otherwise would be
surprising.

https://bugzilla.gnome.org/show_bug.cgi?id=646934
2011-09-08 08:49:55 -04:00
Florian Müllner
857cb9c501 shell-util: Hide week_start string from xgettext
The translation is taken from GTK+, so translations in the gnome-shell
domain are pointless - hide the string, so that it is not extracted
by xgettext.
2011-09-07 23:55:01 +02:00
Dan Winship
cbb3831c7b shell-generic-container: document signals
In particular, document that you can ignore the get-preferred-*
signals if and only if you have a fixed width/height specified by some
other means.

https://bugzilla.gnome.org/show_bug.cgi?id=657986
2011-09-06 14:33:02 -04:00
Colin Walters
0af108211c apps: Ensure running apps override new .desktop file data
This patch fixes the "apps vanish from alt-TAB bug".

If a "package system" rips away and possibly replaces .desktop files
at some random time, we have historically used inotify to detect this
and reread state (in a racy way, but...).  In GNOME 2, this was
generally not too problematic because the menu widget was totally
separate from the list of windows - and the data they operate on was
disjoint as well.

In GNOME 3 we unify these, and this creates architectural problems
because the windows are tied to the app.

What this patch tries to do is, when rereading the application state,
if we have a running application, we keep that app around instead of
making a new instance.  This ensures we preserve any state such as the
set of open windows.

This requires moving the running state into ShellAppSystem.  Adjust
callers as necessary, and while we're at it drop the unused "contexts"
stuff.

This is just a somewhat quick band-aid; a REAL fix would require us
having low-level control over application installation.  As long as
we're on top of random broken tar+wget wrappers, it will be gross.

A slight future improvement to this patch would add an explicit
"merge" between the old and new data.  I think probably we always keep
around the ShellApp corresponding to a given ID, but replace its
GMenuTreeEntry.

https://bugzilla.gnome.org/show_bug.cgi?id=657990
2011-09-05 17:29:41 -04:00
Dan Winship
885e194c25 run-js-test: fix
Needs to explicitly initialize the ShellGlobal now

https://bugzilla.gnome.org/show_bug.cgi?id=649631
2011-09-05 12:23:59 -04:00
Marc-Antoine Perennou
b245ee6212 Fix bus name in error message
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2011-09-02 11:54:56 -04:00
Dan Winship
98fa71ba18 main: grab the keyboard D-Bus interface at startup
https://bugzilla.gnome.org/show_bug.cgi?id=658065
2011-09-02 11:41:02 -04:00
Dan Winship
14e8cba2b1 Add some (element-type) annotations to appease g-i master 2011-08-30 12:07:43 -04:00
Alexander Larsson
c2c4c26f72 Don't crash displaying contacts with no alias
If a folks individual has no alias we crash when passing in NULL
to strstr(). Fix this by checking for non-null first.
2011-08-30 11:13:35 +02:00
Morten Mjelva
352fb7b833 search: Allow searching for people in overview mode
This adds contacts search to shell, powered by libfolks.
Changes:

- Add Folks and Gee to the build system
- ShellContactSystem, a backend in C
- ContactDisplay, search frontend in JS

https://bugzilla.gnome.org/show_bug.cgi?id=643018
2011-08-29 17:43:30 -04:00
Florian Müllner
fa786fd3ef Replace GdmUser with AccountsService
The GdmUser copy+paste code has been superseded by AccountsService,
so kill the former and use the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=650893
2011-08-29 22:53:41 +02:00
Jasper St. Pierre
5d138e1b79 appDisplay: Don't show NoDisplay items in the Applications tab 2011-08-29 15:56:07 -04:00