Commit Graph

955 Commits

Author SHA1 Message Date
Cosimo Cecchi
297d1356a2 mount-operation: add a ShellMountOperation implementation
Ideally, this would be an entirely-JS implementation, but we have a
couple of issues with gjs and gobject-introspection to work around, so
we need a ShellMountOperation class for the time being.

This first commit implements the show-processes dialog, with a system
modal style very similar to the EndSession dialog.
Implementations of ask-question and ask-password will follow shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:36 -04:00
Cosimo Cecchi
0b9c726b4e sniffer: add a mimetype sniffer helper executable
The sniffer is a simple helper process, activated as a DBus service,
that tries to crawl as many files as possible in the provided target
directory (i.e. the new mount's root), for a maximum amount of time -
which is set here to 1.5 seconds (i.e. it will crawl either all the
files in the directory tree, or as many as it can before the specified
timeout expires).

Crawled files are ordered by their content type, and a generic estimation
of the type of files composing the directory is returned to the caller,
using generic 'x-content/*' mimetypes.

The process will then set an autoquit timeout on itself, which can be
disabled by setting the env variable HOTPLUG_SNIFFER_PERSIST for
debugging purposes. The HOTPLUG_SNIFFER_DEBUG env variable can also be
set to enable debugging output.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -04:00
Jasper St. Pierre
32df0e80ca main: Fix small memory leak in main.c
==17386== 1,669 (88 direct, 1,581 indirect) bytes in 1 blocks are definitely lost in loss record 4,090 of 4,151
==17386==    at 0x4C24AF4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17386==    by 0x691B099: g_malloc0 (in /usr/lib/libglib-2.0.so.0.2800.8)
==17386==    by 0x692006A: g_option_context_new (in /usr/lib/libglib-2.0.so.0.2800.8)
==17386==    by 0x5124C57: meta_get_option_context (in /usr/lib/libmutter.so.0.0.0)
==17386==    by 0x401D4F: main (in /usr/bin/gnome-shell)

https://bugzilla.gnome.org/show_bug.cgi?id=654269
2011-07-13 13:36:56 -04:00
Jasper St. Pierre
297eab738f gnome-shell-jhbuild.in: Fix restore_gnome.
The gconf keys used to restore GNOME aren't in a proper GNOME3 environment.
To mimic what GNOME3 gnome-session does would be extremely complicated, so
just launch the system gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=654527
2011-07-13 13:35:16 -04:00
Jasper St. Pierre
a007b1bb2d st-entry: Inherit all colors
https://bugzilla.gnome.org/show_bug.cgi?id=643768
2011-07-12 15:30:59 -04:00
Jasper St. Pierre
f524138a64 st-entry: Support a different color for selected text
This should improve readability in text entries where the text
color is very close to the color of the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=643768
2011-07-12 15:30:59 -04:00
Jasper St. Pierre
325462d9bf St: Take the cairo fallback for large corners
The cogl path pads the corners out to the maximum corner radius to make the
math and painting logic easier. Unfortunately, when the radius exceeds the
actor's halfsize, the padding ends up interfering with other corners, creating
a big mess of rendering errors.

It'd be extremely complicated to fix this properly in the Cogl code,
so take the Cairo fallback.

https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 18:05:07 -04:00
Jasper St. Pierre
ee4ae62946 St: Implement CSS3 specification for reducing border-radius
Currently, any cases of overlapping corners were just ignored and rendered incorrectly.
Implement the corner overlap algorithm as specified by the W3C to fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 18:04:51 -04:00
Guillaume Desmottes
998c5f17fc Approve room invitations
We use to rely on Empathy for this but as we plan to allow users to be
connected on IM without having Empathy running the Shell should do it now.

https://bugzilla.gnome.org/show_bug.cgi?id=653740
2011-07-07 11:18:46 +02:00
Jasper St. Pierre
a6dfe20348 shell-util: Add a helper method for saving files from HTTP
Unfortunately, gjs cannot handle binary C strings directly from
gobject-introspection. Add a simple workaround method in C to help
us save random files from the web.

https://bugzilla.gnome.org/show_bug.cgi?id=653989
2011-07-06 12:46:18 -04:00
Jasper St. Pierre
ed46390bbc Add dependency on libsoup
https://bugzilla.gnome.org/show_bug.cgi?id=653989
2011-07-06 12:46:13 -04:00
Dan Winship
64b2b4a7d4 layout: new file handling shell layout
Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=636963
2011-07-06 08:38:35 -04:00
Guillaume Desmottes
b22c5eb167 Implement Telepathy Debug interface (#652816)
This enable debugging using empathy-debugger.
2011-07-06 09:31:18 +02:00
Florian Müllner
1ebca2e6d5 shell-util: Adapt to nautilus' switch to GSettings
shell_util_get_file_display_name_if_mount() uses a nautilus setting
to use a name for $HOME which is consistent with the file manager.
But while nautilus was ported to GSettings a while ago, we are still
trying to access the old GConf setting.

https://bugzilla.gnome.org/show_bug.cgi?id=653511
2011-06-30 16:31:49 +02:00
Adel Gadllah
620330db8f StScrollViewFade: Fix scrollbar size handling
Only skip the areas of the scrollbars when they are invisible
and add take the horizontal scrollbar into account as well
when calculating the faded area.

https://bugzilla.gnome.org/show_bug.cgi?id=651866
2011-06-29 18:48:49 +02:00
Adel Gadllah
3765acc0a5 StScrollView: Expose scrollbars visibility as property
Add two boolean readonly properties that tell whether
the scrollbars are visible or not.

https://bugzilla.gnome.org/show_bug.cgi?id=651866
2011-06-29 18:44:25 +02:00
Dan Winship
bfec396ec2 shell-global: remove some cruft
Some of the bookkeeping associated with the
ShellGlobal::screen-size-changed signal didn't get removed when that
signal did.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2011-06-28 11:07:04 -04:00
Ray Strode
ff81659b9e gdm: ignore user-removed signals for untracked users
If we don't know about a user, we don't care if it goes away,
and we shouldn't try to remove it from the book keeping.

https://bugzilla.gnome.org/show_bug.cgi?id=647893
2011-06-27 17:18:20 -04:00
Colin Walters
1fc1282fad Fix various srcdir!=builddir issues
jhbuild will default to srcdir != builddir in the future for various
reasons.

The enum generation rules were just broken and both did
cd $(srcdir) and $(addprefix $(srcdir)).

Also, remove an unnecessary $(addprefix) from the GIR sources; thanks
to Dan Winship for pointing out that make will look in both srcdir and
builddir, so it's not necessary to add a prefix explicitly.  Doing so
breaks obviously when adding the sourcedir to a builddir file.

https://bugzilla.gnome.org/show_bug.cgi?id=653199
2011-06-23 10:15:17 -04:00
Colin Walters
26aa4333a5 shell_global_set_property_mutable: Remove
All introspection properties are now writable;
See https://bugzilla.gnome.org/show_bug.cgi?id=646633

https://bugzilla.gnome.org/show_bug.cgi?id=652597
2011-06-20 17:58:40 -04:00
Giovanni Campagna
2674d96e54 StTheme: retrive the list of custom stylesheets and use it in loadTheme()
Using the list of stylesheets loaded with st_theme_load_stylesheet(),
one can build an StTheme that is completely identical to the previous
one, except for one property (application-stylesheet).
This allows rt and the user-theme extension to work while respecting
the theming of other extensions.

https://bugzilla.gnome.org/show_bug.cgi?id=650971
2011-06-15 21:56:37 +02:00
Adel Gadllah
1309b64c33 shell-window-tracker: Fix signal handler leak
Disconnect the on_wm_class_changed handler when removing a window
in disassociate_window().

https://bugzilla.gnome.org/show_bug.cgi?id=652388
2011-06-13 17:04:22 +02:00
Guillaume Desmottes
60c88612f7 Implement a Telepathy Approver and Handler (#643594)
As the Shell does more than observing channels (users can interact with them),
it has to be an Handler as well. We have to make sure that all the new
incoming text channels are handled by the Shell by default, so we make it an
Approver as well.

From an user point of view, the only difference is that Empathy's tray icon
will stop blicking when receiving new channels.

We rely on ChannelDispatcher.DelegateChannels() and PresentChannel() to
interact with Empathy. Those methods have been implemented in
telepathy-mission-control 5.9.0 and telepathy-glib 0.15.0.
2011-06-09 13:57:18 +02:00
Colin Walters
aa03734d39 Add "Memory" tab to lg
shell_global_get_memory_info() is a new function which extracts a few
global counters we have already, namely glibc's mallinfo, spidermonkey's
JSGC_BYTES, and gjs' counters for boxed/object/etc wrappers.

There is some slight overlap with perf; ultimately though I'd
like this function to do some more extensive analysis, so it wouldn't
be quite the same.

perf is going to be mainly concerned with how big the whole process
over time is; memory_info is for debugging memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=650692
2011-06-07 14:44:35 -04:00
Jasper St. Pierre
e7289378b7 st-scroll-view: Make the fade effect and offset themable
Theme authors now have the power (and responsibility) of creating fade
effects with the new CSS length property '-st-fade-offset'. A value of
0 disables the effect.

This new CSS approach replaces the current programmatic toggle of
the 'vfade' property. A new CSS style class name 'vfade' is used as
a replacement for the old property.

https://bugzilla.gnome.org/show_bug.cgi?id=651813
2011-06-04 15:43:49 -04:00
Florian Müllner
af51e8df7b st-shadow: Use non-deprecated GAtomic API 2011-06-02 23:06:38 +02:00
Colin Walters
22ef63cc44 st-icon-colors: Use non-deprecated GAtomic API 2011-06-02 16:22:28 -04:00
Maxim Ermilov
88df183450 shell-recorder: missing XFree
https://bugzilla.gnome.org/show_bug.cgi?id=650934
2011-05-26 00:52:04 +04:00
Colin Walters
4cab0c95d3 ShellWindowTracker: Remove title tracking workarounds for OO.org and Firefox
LibreOffice does WM_CLASS correctly as of recently, and Firefox has for
some time.  Strip out the title pattern workarounds.

https://bugzilla.gnome.org/show_bug.cgi?id=651015
2011-05-25 12:11:09 -04:00
Colin Walters
d51e79d483 Track changes to WM_CLASS
LibreOffice changes applications dynamically; we should support this.

https://bugzilla.gnome.org/show_bug.cgi?id=649315
2011-05-25 12:09:52 -04:00
Ionut Biru
eb54662098 Require startup-notification >= 0.11
sn_startup_sequence_get_application_id appeared first in this release

Signed-off-by: Ionut Biru <ibiru@archlinux.org>
2011-05-24 17:07:32 -04:00
Colin Walters
fdefb317cb StTextureCache: Fix leak of key string
Also micro-optimize by avoiding another strdup(), instead pass
ownership of the string when we can.

https://bugzilla.gnome.org/show_bug.cgi?id=649508
2011-05-24 13:00:46 -04:00
Dan Winship
619a44a499 ShellRecorder: Use cogl_read_pixels()
cogl_read_pixels() used to only support a useless pixel format, but it
will do our preferred format now, so use it rather than doing GL stuff
by hand.

https://bugzilla.gnome.org/show_bug.cgi?id=648758
2011-05-23 10:51:23 -04:00
Dan Winship
c5ca4e3ff0 StImText: remove two references to old clutter bugs
Remove a workaround for clutter_actor_get_transformed_position() not
working inside paint(), and remove a comment about
ClutterText::position not being properly notified, since it is now.
(However, it doesn't seem worth it to rewrite the code to use
notification, since that would actually end up being more complicated
than the current solution.)

https://bugzilla.gnome.org/show_bug.cgi?id=648758
2011-05-23 10:51:23 -04:00
Dan Winship
55771b437b StScrollBar: use clutter_actor_has_allocation()
StScrollBar was tracking whether or not it currently had a valid
allocation, but since Clutter 1.4 there is a method it can call to get
that information instead.

https://bugzilla.gnome.org/show_bug.cgi?id=648758
2011-05-23 10:51:23 -04:00
Colin Walters
a8baf4a2a2 Change 'debugexit' to quit main loop rather than exit(), add cleanup
A new envrionment variable GNOME_SHELL_ENABLE_CLEANUP is added which
causes us to attempt freeing global data.  The reason this isn't
enabled by default is that it's a waste of time at best, and at
worst in corner cases could cause crashes which would fill up
crash databases.  Better to leave it as a developer-only tool.

Start stubbing out some cleanup in ShellGlobal.

https://bugzilla.gnome.org/show_bug.cgi?id=649517
2011-05-19 15:35:04 -04:00
Ionut Biru
48acc41698 Don't crash when removing nameless user
https://bugzilla.gnome.org/show_bug.cgi?id=647893
2011-05-19 12:07:20 -04:00
Dan Winship
4bfc3bafcb main: make "gnome-shell" the default gettext domain
Since libmutter uses dgettext(), we can take over the default domain

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:31 -04:00
Dan Winship
7921954a31 environment: move more init stuff here from main.js
Move some more environment-initializationy stuff from main.js to
environment.js, and be more careful about not importing shell JS
modules until after the environment has been fully patched.

Change gnome-shell-plugin to call Environment.init() before
Main.start(); this means that Environment.init() now runs before any
shell JS modules (besides environment itself) have been imported.

Make run-js-test create a ShellGlobal and use its js_context, so that
the shell_global_set_property_mutable() stuff in Environment.init()
will work correctly in tests as well.

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:56:27 -04:00
Dan Winship
0e42de9149 run-js-test: link to libgnome-shell.la
The tests were broken again, because since Shell-0.1.gir now has
'shared-library="libgnome-shell.so"', the references to Shell.PerfLog
ended up pulling in libgnome-shell in addition to the copy of
shell-perf-log.c that libjs-test was built with.

Fix all this hopefully forever by just making run-js-test link to
libgnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:54:04 -04:00
Dan Winship
8e4a5f1ac5 Shell: sort, align, clean up shell-global.h and shell-util.h
https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-05-16 14:51:35 -04:00
Dan Winship
61577e176e shell: move non-ShellGlobal functions from shell-global to shell-util
shell-global had become a dumping ground for functions that didn't
have anywhere else to be. Make shell-util the dumping ground instead,
and have shell-global only have methods that involve the ShellGlobal
object.

https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-05-16 14:51:35 -04:00
Dan Winship
4b008b1ada shell-global: Remove unused ShellGlobal parameters
Remove the ShellGlobal parameter from any method that isn't actually
ShellGlobal-related (and rename them to not have "global" in the
name).

https://bugzilla.gnome.org/show_bug.cgi?id=648755
2011-05-16 14:51:35 -04:00
Jasper St. Pierre
fb384fc291 shell-tp-client: enable client recovery
This makes sure that we get any channels that existed at the time the shell
started, otherwise some chats may never appear.

https://bugzilla.gnome.org/show_bug.cgi?id=649633
2011-05-11 21:01:03 -04:00
Christopher Aillon
73cae8ce9a st-scroll-view: remove spurious assignment of uninitialized data
https://bugzilla.gnome.org/show_bug.cgi?id=649596
2011-05-11 16:19:00 -04:00
Colin Walters
dcd07eb23f StTextureCache: plug leak in not-found icon case
Need to free the key too.

https://bugzilla.gnome.org/show_bug.cgi?id=649508
2011-05-11 16:18:10 -04:00
Colin Walters
c975740f92 st-private: Correct fix for memory leak
The previous fix in 72f9f482d was wrong; we need to keep around
the buffer until cairo is done with the pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-11 11:23:53 -04:00
Colin Walters
72f9f482d6 st-private: Fix memory leak
==13810== 11,360 bytes in 1 blocks are definitely lost in loss record 18,574 of 18,765
==13810==    at 0x4005447: calloc (vg_replace_malloc.c:467)
==13810==    by 0x5191882: standard_calloc (gmem.c:107)
==13810==    by 0x51920A7: g_malloc0 (gmem.c:196)
==13810==    by 0x4056201: blur_pixels (st-private.c:466)
==13810==    by 0x40573B4: _st_create_shadow_cairo_pattern (st-private.c:710)
==13810==    by 0x4070746: st_theme_node_paint (st-theme-node-drawing.c:856)
==13810==    by 0x3FEFFFFF: ???

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-05 16:02:00 -04:00
Maxim Ermilov
88de26138a shell-xfixes-cursor: missing XFree
memory returned by XFixesGetCursorImage should be freed after usage.
https://bugzilla.gnome.org/show_bug.cgi?id=642652
2011-05-05 23:49:57 +04:00
Jasper St. Pierre
74a39ae57c shell-app: Fix a case where last_user_time isn't updated.
When activating an uninteresting window, the last_user_time isn't updated,
because we aren't tracking the window that the user_time gets updated on.
Hack around this by setting the last_user_time in shell_app_activate when
activating an uninteresting window.

https://bugzilla.gnome.org/show_bug.cgi?id=643302
2011-05-04 12:10:52 -04:00