Commit Graph

3640 Commits

Author SHA1 Message Date
Florian Müllner
a92b7342ba message-tray: Move check for _actorDestroyed into _setCount()
As _updateCount has been designed to be overwritable by subclasses,
move the check for _actorDestroyed into _setCount(), to fix the
problem described in commit 5f6ac33d5 in derived types as well.
2011-07-13 22:27:15 +02:00
Florian Müllner
86818e9c52 autorun-manager: Fix 'destroy' handler of resident source
If the resident source is destroyed, it should be recreated
immediately, so that it is available when another volume is
mounted. However, we only connect to the 'destroy' signal
on the original source, not on newly created ones. As a result,
the resident source only works twice, after that it shows up
without icon and an empty notification.

Fix by always connecting to the source's 'destroy' signal.
2011-07-13 21:43:30 +02:00
Jasper St. Pierre
7a8a00c705 extension-tool: Clean up code creator, update sample
Update the sample to be more up to date with respect to Shell practices,
and make it look a bit prettier. Additionally, change the file extract
code so that it's easier to update and add new files later.

https://bugzilla.gnome.org/show_bug.cgi?id=653206
2011-07-13 15:02:49 -04:00
Jasper St. Pierre
c8d5e0a51c extension-tool: Use socket.gethostname() instead of an external process
Minor code cleanup.

https://bugzilla.gnome.org/show_bug.cgi?id=653206
2011-07-13 15:02:46 -04:00
Cosimo Cecchi
524a7ff6fb trivial: update .gitignore 2011-07-13 14:59:45 -04:00
Florian Müllner
5f6ac33d59 message-tray: Don't update message count after destruction
When trying to update the message count after a summary icon has
been destroyed, the label to display the count is no longer valid
and trying to set its text results in some Clutter warnings.
2011-07-13 20:48:44 +02:00
Cosimo Cecchi
b4f5e4206d automount: handle the drive-eject-button signal
The implementation is untested, as the signal is not emitted from the
Gdu GVfs volume monitor yet.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:36 -04:00
Cosimo Cecchi
5133c3e010 automount: emit sounds when a drive is connected/disconnected
https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:36 -04:00
Cosimo Cecchi
0b77ea422a mount-operation: implement ask-password for mounting encrypted volumes
https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:36 -04:00
Cosimo Cecchi
5c1dd4ea18 autorun: prefer Safe Removal over eject/unmount if possible
Basically do what NautilusPlacesSidebar does with the drive/volume/mount
eject/unmount/stop priorities.

We follow this pattern:
- always prefer Safely Remove if available (i.e. drive.stop())
- fallback to ejecting the mount/volume/drive if that's not possible
- finally, fallback to unmounting the mount if even eject is not
  available

This also means we don't care about the distinction between
Stop/Eject/Unmount at this level. Disk Utility (or Nautilus) are
available for those who want that degree of control, but the common case
here should do the most useful action without presenting the choice.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:36 -04:00
Cosimo Cecchi
e1c687184e mount-operation: implement ask-question
Use a system modal dialogs for mount operation questions.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:36 -04:00
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
98327b0c13 automount: only autorun volumes marked as allowed
Port code from g-s-d to mark volumes as allowed for autorun, and check
for it when running the notification.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -04:00
Cosimo Cecchi
6786aee5ed autorun: integrate with the shell sniffer process
If possible, use the results from the sniffer process in order to have
less-generic alternatives to the file manager in the proposed autorun
choices.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -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
Cosimo Cecchi
436dd6ee8c autorun: follow per content-type gsettings preferences for autorun
Autorun preferences can be fine-tweaked at the content-type level from
the System Settings 'Removable Media' panel.
Use those settings to figure out the default action for newly-mounted
mounts.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -04:00
Cosimo Cecchi
acc053302d automount: add an AutomountManager class
The AutomountManager class is the low-level counterpart of the
previously introduced AutorunManager, and takes care of extracting the
list of valid mounts from a GVolume or a GDrive and mounting them,
provided a number of conditions and requirements are met.

AutomountManager also keeps track of the current session availability
(using the ConsoleKit and gnome-screensaver DBus interfaces) and
inhibits mounting if the current session is locked, or another session
is in use instead.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -04:00
Cosimo Cecchi
534b371d42 autorun: add an AutorunManager class
AutorunManager is a class that takes care of displaying and managing
notifications and UI for storage devices.

When a mount appears and a number of conditions are satisified, a
transient notification will be displayed to immediately interact with
the device. AutorunTransientDispatcher is the object that takes care of
showing/hiding the notification sources as devices appear/disappear.

Likewise, current mounts are kept in a list and presented within a
list in a resident notification, handled by AutorunResidentSource.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -04:00
Cosimo Cecchi
6004e3d2e1 screensaver: factor out a ScreenSaverProxy helper class
This class will be shared between StatusMenu and the upcoming
AutomountManager classes.

https://bugzilla.gnome.org/show_bug.cgi?id=653520
2011-07-13 14:39:35 -04:00
Colin Walters
c632074ba7 statusMenu.js: Ensure screensaver is locked before switching users
Somewhat similar to (see bug 637540), we need to lock the screensaver
*before* asking GDM to switch.

https://bugzilla.gnome.org/show_bug.cgi?id=654565
2011-07-13 14:32:26 -04:00
Florian Müllner
664245d2a6 build: Remove gnome-power-manager
The DBus interface for the battery status is now provided by the
power plugin of gnome-settings-daemon, so there's real reason to
keep building gnome-power-manager.

https://bugzilla.gnome.org/show_bug.cgi?id=654300
2011-07-13 19:45:29 +02:00
Florian Müllner
fda4fc674d power: Remove _checkError()
On error, we tried to kill and respawn gnome-power-manager, but
as of commit c5676900 the DBus interface provided by g-s-d's power
plugin is used, so the respawning does not have any effect.

https://bugzilla.gnome.org/show_bug.cgi?id=654300
2011-07-13 19:45:29 +02:00
Florian Müllner
bf28c24c82 build: Remove upower from the moduleset
The upower version in the moduleset is too old for the power plugin
of gnome-settings-daemon. As at least Fedora and Ubuntu have a
recent enough version in their repositories, use that instead of
bumping the version in the moduleset.

https://bugzilla.gnome.org/show_bug.cgi?id=654300
2011-07-13 19:45:29 +02: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
Giovanni Campagna
5819dd3a5a NetworkMenu: take out an item from More... when another is destroyed
When one of the networks in the main menu is removed and we have
a More... submenu, we can take the first out from the submenu and
show it in the main menu.

https://bugzilla.gnome.org/show_bug.cgi?id=647175
2011-07-13 01:33:47 +02: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
5cb43b6bae theme: Add selected text color
This should improve readability of text that's selected.

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
Kjartan Maraas
0aa626b2fb Updated Norwegian bokmål translation 2011-07-12 20:00:31 +02:00
Rudolfs Mazurs
3ae1050f67 Updated Latvian translation. 2011-07-12 18:46:45 +03:00
Giovanni Campagna
67736642f3 Fix methods that take array arguments
Length parameter is no longer required in current GJS. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=654349
2011-07-11 20:13:35 +02:00
Guillaume Desmottes
09f3c87d20 Allow other clients to preempt the channels we are handling
This is needed if we are handling an incoming text channel and then user tries
to open a chat with the same contact using Empathy. In this case, the Shell
should delegate the channel back to Empathy and just continue observing it as
it does for usual outgoing channels.

Depends on telepathy-glib 0.15.3 as
tp_base_client_set_delegated_channels_callback() has been added in this
version.

https://bugzilla.gnome.org/show_bug.cgi?id=654237
2011-07-11 14:43:14 +02:00
A S Alam
9deca75de8 update Punjabi Translation 2011-07-10 16:37:37 +05:30
Jasper St. Pierre
5bc1dede81 tests: Add tests for large rounded corners
https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 20:13:47 -04:00
Marc-Antoine Perennou
6d53d43766 PopupSwitchMenuItem: don't override switch by creating it twice
Due to an accidental addition line in commit c8670819, all switches in popup
menus accidentally gave the appearance that they were turned off.

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

https://bugzilla.gnome.org/show_bug.cgi?id=654267
2011-07-09 19:26:24 -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
Neha Doijode
153768ef7f NotificationDaemon: remove source if notification sender is removed from DBus
We don't want sources that are no longer associated with a running application
to stick around in the message tray.

Message tray sources were removed when the associated application’s state
changed to Shell.AppState.STOPPED . This caused sources for applications
that were still running, but did not have any open windows to be removed.
Instead, we should use the notification’s sender removal from DBus as an
indicator for when to remove the associated source from the message tray.

https://bugzilla.gnome.org/show_bug.cgi?id=645764
2011-07-08 21:24:42 -04:00
Daniel Mustieles
7249a218ba Updated Spanish translation 2011-07-07 22:41:05 +02:00
Jonny Lamb
de348a4c49 telepathyClient: send typing notifications
If we're typing we want to send composing. If we empty the entry we
want to send active. If we're typing but don't type any more for
COMPOSING_STOP_TIMEOUT seconds, we want to send paused. Simple.

This behaviour was stolen from Empathy where it has won many awards.

https://bugzilla.gnome.org/show_bug.cgi?id=650196

Based on patch from Jonny Lamb <jonnylamb@gnome.org>
Signed-off-by: Alban Crequy <alban.crequy@collabora.co.uk>
2011-07-07 16:31:22 +01:00
Guillaume Desmottes
fda8ffd9ef Display the number of unread messages in the notification icon
https://bugzilla.gnome.org/show_bug.cgi?id=654139
2011-07-07 15:48:33 +02:00
Guillaume Desmottes
6cb707cc4f messageTray.js: raise an exception only if parseInt(count) returns NaN
0 is a valid value for count so we should accept it.

https://bugzilla.gnome.org/show_bug.cgi?id=654139
2011-07-07 15:47:12 +02: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
Siegfried-Angel Gevatter Pujals
c34b357051 gnome-shell-build-setup.sh: update libxcb dependency check on Debian
On Debian-based systems, the contents of libxcb-{event1,aux0}-dev
have been transitioned into a single libxcb-util0-dev package.
2011-07-07 01:01:41 +02:00
Jasper St. Pierre
40f4e92461 messageTray: Use the count to display the number of unread notifications
https://bugzilla.gnome.org/show_bug.cgi?id=649356
2011-07-06 18:43:39 -04:00
Jasper St. Pierre
c727da823b messageTray: Add an enumerable count for sources to use
https://bugzilla.gnome.org/show_bug.cgi?id=649356
2011-07-06 18:43:31 -04:00
Florian Müllner
8d1b7962d8 workspace: Fix layout errors caused by window zoom
Commit 64b2b4a7d4 changed the monitor layout handling, resulting
in some layout errors due to a subtle change in memory handling:
when zooming a window in the overview, the available zoom area is
calculated by subtracting the panel height from the primary monitor
area. This area used to be a copy of the monitor rect, but as now
the rect itself is returned, zooming a window on the primary monitor
repeatedly modifies the monitor rect, leading to layout errors in
various parts of the shell.
Fix by using a copy when calculating the available zoom area.

https://bugzilla.gnome.org/show_bug.cgi?id=654105
2011-07-06 22:06:45 +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