Compare commits

..

28 Commits
3.5.2 ... 3.4.2

Author SHA1 Message Date
36eb51b594 Bump version to 3.4.2
Updated NEWS
2012-07-20 20:03:44 +02:00
04f03ee7d8 Assamese translation reviewed 2012-07-05 20:28:30 +05:30
d144f5d7df Assamese translation reviewed 2012-07-05 15:33:02 +05:30
aec4c6a388 Assamese translation reviewed 2012-07-04 21:52:41 +05:30
63f6800115 Assamese translation reviewed 2012-07-04 21:40:56 +05:30
f52c5fc4fe mount-operation: fix exceptions when showing password entry
This is a fallout from some changes in MessageTray.Source, which now
requires either defining the iconName/iconType properties on it, or
implementing createNotificationIcon, and we're not doing any of those.
Fix it by storing the gicon of the source object and using a helper
method to create the icon actor on demand, to avoid any case when the
same actor might be added twice to different containers.

https://bugzilla.gnome.org/show_bug.cgi?id=678428
2012-06-20 10:13:18 -04:00
717aedec5d popupMenu: do not overflow the currentItems
Do not overflow currentItems array. If the Menu section is filled
via model items-changed callback the position in the model passed to
the RemoteMenu _modelChanged can be a to be added asynchronously
action-added. Thus the item does not yet exists in the currentItems.

https://bugzilla.gnome.org/show_bug.cgi?id=676447
2012-06-18 10:05:18 +02:00
66fa24c340 popupMenu: bypass changeSignal callback if action is already handled
https://bugzilla.gnome.org/show_bug.cgi?id=676447
2012-06-18 10:05:18 +02:00
7e73a52505 telepathyClient: ignore invalidated channels
There is a race if a channel is invalidated during its preparation: the
'invalidated' signal is already emitted so the Shell will never notice.
We fix this by simply checking if the channel is already invalidated when
receiving it from telepathy-glib.

In the approving case, we reject the full ChannelDispatchOperation as we only
support approving one channel at the time.

https://bugzilla.gnome.org/show_bug.cgi?id=677457
2012-06-18 09:47:18 +02:00
42366ab025 telepathyClient: decline dispatch op when approving unsupported channel type
It shouldn't happen in theory but best to be safe than sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=677457
2012-06-18 09:45:42 +02:00
69a63f208e notificationDaemon: Fix copy-paste typo
Since this line was introduced in 7458d3e, "Approve file transfer channels",
it's quite obvious that the line was meant to filter out transfer channel
notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=676175
2012-06-06 16:28:00 +02:00
98c3f6b3bf add missing _shell_link_to_shell_js() declaration
Fix missing-prototypes warning.

https://bugzilla.gnome.org/show_bug.cgi?id=677441
2012-06-05 09:38:35 +02:00
406db1902c notificationDaemon.js: convert the hints dict at the beginning of the function
It's used right away to discard some Empathy notifications.

This regression has been introduced during the 3.4 cycle when 'hints' has been
turned to a GVariant.

https://bugzilla.gnome.org/show_bug.cgi?id=675370
2012-05-31 11:30:24 +02:00
37c7c04efb Updated Lithuanian translation 2012-05-26 23:13:38 +03:00
af0ec7e089 Updated Korean translation 2012-05-19 22:57:53 +09:00
ae28bf7c25 [l10n] Really update Indonesian translation 2012-05-19 16:31:47 +07:00
29c8add696 [l10n] Updated Indonesian translation 2012-05-19 16:20:51 +07:00
ecb9c881be Prevent the link to libgnome-shell-js.so from being removed
Add a dummy call to shell_js_add_extension_importer() to ensure that the
link to libgnome-shell-js.so is not removed when using -Wl,--as-needed,
which is the default on many distros.

https://bugzilla.gnome.org/show_bug.cgi?id=670477
2012-05-18 18:35:07 -04:00
4cf79088a5 Link the gnome-shell binary to libgnome-shell-js.so
Depending on the exact linker options and versions, rpath's written
into the binary may, or may not, be honored by dlopen(). Work around
this by simply linking the gnome-shell binary to gnome-shell-js, since
then dlopen() doesn't need to search paths.

https://bugzilla.gnome.org/show_bug.cgi?id=670477
2012-05-18 18:35:07 -04:00
05800773bc Updated Japanese translation. 2012-05-15 00:52:42 +09:00
2237f66c44 Updated Marathi Translations 2012-05-10 10:09:59 +05:30
2c51d42acf gdm: don't fail if fprintd unavailable
fingerprint support is optional so we shouldn't try to start
fprintd upfront and croak if it fails.

https://bugzilla.gnome.org/show_bug.cgi?id=675006
(cherry picked from commit e333263fd6)
2012-05-07 15:09:54 -04:00
49809d1e64 l10n: Updated Italian translation 2012-04-30 15:33:44 +02:00
2605e49591 Updated Brazilian Portuguese translation 2012-04-28 10:46:14 -03:00
40abd98840 data: Add Evolution calendar settings gschema to EXTRA_DIST
3d95e7bb11 forgot to add this
gschema file to dist
2012-04-26 08:46:04 +02:00
a64c84395f Mirror Evolution calendar settings into our own schema
Right now, we are hard-depending on the presence of Evolution by
using its settings schemas. This is likely to be unpopular, and
also causes instability if someone happens not to have Evolution
installed, so install a schema that has the same data path as
the Evolution schema, but a different name and install that
for the keys we need.

To avoid a string-freeze break, we rely on the translations in
Evolution - if Evolution isn't installed, the key descriptions
will be untranslated in dconf-editor.

https://bugzilla.gnome.org/show_bug.cgi?id=674424
2012-04-25 14:39:38 -04:00
39d2202521 Updated Korean translation 2012-04-26 01:06:12 +09:00
4edd77cd1f [l10n] Update Japanese translation
Fix a typo
2012-04-21 22:41:26 +09:00
94 changed files with 4668 additions and 4985 deletions

3
.gitignore vendored
View File

@ -23,8 +23,6 @@ data/gnome-shell-extension-prefs.desktop.in
data/gschemas.compiled
data/org.gnome.shell.gschema.xml
data/org.gnome.shell.gschema.valid
data/org.gnome.shell.evolution.calendar.gschema.xml
data/org.gnome.shell.evolution.calendar.gschema.valid
docs/reference/*/*.args
docs/reference/*/*.bak
docs/reference/*/*.hierarchy
@ -70,7 +68,6 @@ src/gnome-shell-extension-prefs
src/gnome-shell-hotplug-sniffer
src/gnome-shell-jhbuild
src/gnome-shell-perf-helper
src/gnome-shell-perf-tool
src/gnome-shell-real
src/hotplug-sniffer/org.gnome.Shell.HotplugSniffer.service
src/run-js-test

77
NEWS
View File

@ -1,73 +1,22 @@
3.5.2
3.4.2
=====
* main: Move 'toggle-recording' binding into the shell [Florian; #674377]
* popupMenu: make sure to break the grab when the slider is not visible
[Stefano; #672713]
* st-theme-node-drawing: Don't use GL types [Neil; #672711]
* Mirror Evolution calendar settings into our own schema [Owen; #674424]
* shell-network-agent: don't crash if a request isn't found [Dan; #674961]
* notificationDaemon: Match app based on WM_CLASS [Jasper; #673761]
* NetworkMenu: use network-offline while loading [Giovanni; #674426]
* lookingGlass: Remove the Errors tab [Jasper; #675104]
* searchDisplay: Reset keyboard focus after displaying async results
[Rui; #675078]
* gdm: don't fail if fprintd is unavailable [Ray; #675006]
* messageTray: Fix scrolling up [Jasper; #661615]
* main: Close the recorder instead of pausing it [Rui; #675128]
* Accessibility [Alejandro]
- Use the proper label_actor for date menu on top panel [#675307]
- Set the proper role/label_actor for SearchResult.content [#672242]
- do not expose a label text if 'hidden' style class is used [#675341]
* Magnifier: Add brightness and contrast functionality [Joseph; #639851]
* theme: use a smaller border-radius for top bar [Jakub; #672430]
* placeDisplay: use new bookmark file location [Matthias; #675443]
* port all synchronous search providers to the async API [Jasper, Rui; #675328]
* NetworkAgent: disallow multiple requests for the same connection/setting
[Giovanni; #674961]
* userMenu: Update to latest mockups [Florian; #675802]
* util: Don't double-fork when spawning from Alt-F2 [Colin; #675789]
* messageTray: Make Source usable without subclassing [Jasper; #661236]
* panel: Check for appMenu button's reactivity before opening [Florian; #676316]
* Fix formatting of bluetooth passkey [Florian; #651251]
* notificationDaemon: Filter out file-transfer notifications [Jasper; #676175]
* Don't use global.log() [Jasper; #675790]
* Fix broken extension loading in some distributions [Owen, Alexandre; #670477]
* shell-app: Raise windows in reverse order to preserve the stacking
[Rui; #676371]
* Generalize gdm-mode [Florian; #676156]
* Switch string formatting to the one inside gjs [Jasper; #675479]
* extensionUtils: Support subdirectories in getCurrentExtension
[Jasper; #677001]
* panel: Refuse to add (legacy) status icons not part of the session mode
[Florian; #677058]
* Add an initial-setup mode [Matthias; #676697]
* status/keyboard: Port to the new input sources settings [Rui; #641531]
* NetworkMenu: show notifications for failed VPN connections [Giovanni; #676330]
* userMenu: Indicate progress on status changes [Florian; #659067]
* recorder: Honor "disable-save-to-disk" lockdown key [Rūdolfs; #673630]
* searchDisplay: Use the rowLimit we pass to the IconGrid [Christian; #675527]
* endSessionDialog: Factor out _updateDescription from _updateContent
[Alejandro; #674210]
* Fix empathy's appMenu freezing the shell [Alban; #676447]
* Code cleanups [Florian, Giovanni, Jasper; #672807, #672413, #676837, #676850,
#672272]
* Misc bug fixes [Alban, Florian, Giovanni, Guillaume, Jasper, Piotr, Rico,
Ron, Rui, Stefano; #659968, #672192, #673177, #673198, #674323, #675301,
#675370, #676347, #676806, #677097]
* gdm: don't fail if fprintd unavailable [Ray; #675006]
* Fix broken extension loading [Owen, Alexandre; #670477]
* Fix filtering of Empathy notifications [Guillaume; #675370]
* telepathyClient: Ignore invalidated channels [Guillaume; #677457]
* popupMenu: Fix freeze when appMenu is not populated in one go [Alban; #676447]
* mount-operation: fix exceptions when showing password entry [Cosimo; #678428]
* Misc. fixes [Guillaume, Jasper, Rico; #677441, #676175]
Contributors:
Alban Browaeys, Giovanni Campagna, Matthias Clasen, Guillaume Desmottes,
Piotr Drąg, Stefano Facchini, Rui Matos, Rūdolfs Mazurs, Florian Müllner,
Alejandro Piñeiro, Neil Roberts, Alexandre Rostovtsev, Joseph Scheuhammer,
Jakub Steiner, Jasper St. Pierre, Ray Strode, Owen Taylor, Rico Tzschichholz,
Colin Walters, Dan Winship, Ron Yorston
Alban Browaeys, Cosimo Cecchi, Guillaume Desmottes, Alexandre Rostovtsev,
Jasper St. Pierre, Ray Strode, Owen Taylor, Rico Tzschichholz
Translations:
OKANO Takayoshi [ja], Daniel Mustieles [es], Changwoo Ryu [ko],
Yaron Shahrabani [he], Fran Diéguez [gl], Jonh Wendell [pt_BR],
Kjartan Maraas [nb], Luca Ferretti [it], Tom Tryfonidis [el],
Sandeep Sheshrao Shedmake [mr], Takanori MATSUURA [ja], Dirgita [id],
Mantas Kriaučiūnas [lt], Matej Urbančič [sl], Jiro Matsuzawa [ja]
OKANO Takayoshi [ja], Changwoo Ryu [ko], Jonh Wendell [pt_BR],
Luca Ferretti [it], Sandeep Sheshrao Shedmake [mr], Takanori MATSUURA [ja],
Andika Triwidada [id], Mantas Kriaučiūnas [lt], Nilamdyuti Goswami [as]
3.4.1
=====

View File

@ -41,7 +41,7 @@
"It can be used only by extensions.gnome.org"
#define PLUGIN_MIME_STRING "application/x-gnome-shell-integration::Gnome Shell Integration Dummy Content-Type";
#define PLUGIN_API_VERSION 4
#define PLUGIN_API_VERSION 3
typedef struct {
GDBusProxy *proxy;
@ -163,7 +163,6 @@ NP_Initialize(NPNetscapeFuncs *pfuncs, NPPluginFuncs *plugin)
plugin->newp = NPP_New;
plugin->destroy = NPP_Destroy;
plugin->getvalue = NPP_GetValue;
plugin->setwindow = NPP_SetWindow;
return NPERR_NO_ERROR;
}
@ -268,7 +267,6 @@ typedef struct {
NPObject parent;
NPP instance;
GDBusProxy *proxy;
GSettings *settings;
NPObject *listener;
NPObject *restart_listener;
gint signal_id;
@ -325,9 +323,6 @@ on_shell_appeared (GDBusConnection *connection,
}
}
#define SHELL_SCHEMA "org.gnome.shell"
#define ENABLED_EXTENSIONS_KEY "enabled-extensions"
static NPObject *
plugin_object_allocate (NPP instance,
NPClass *klass)
@ -337,7 +332,6 @@ plugin_object_allocate (NPP instance,
obj->instance = instance;
obj->proxy = g_object_ref (data->proxy);
obj->settings = g_settings_new (SHELL_SCHEMA);
obj->signal_id = g_signal_connect (obj->proxy, "g-signal",
G_CALLBACK (on_shell_signal), obj);
@ -498,61 +492,7 @@ plugin_enable_extension (PluginObject *obj,
NPString uuid,
gboolean enabled)
{
gboolean ret;
gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
gsize length;
gchar **uuids;
const gchar **new_uuids;
if (!uuid_is_valid (uuid_str))
{
g_free (uuid_str);
return FALSE;
}
uuids = g_settings_get_strv (obj->settings, ENABLED_EXTENSIONS_KEY);
length = g_strv_length (uuids);
if (enabled)
{
new_uuids = g_new (const gchar *, length + 2); /* New key, NULL */
memcpy (new_uuids, uuids, length * sizeof (*new_uuids));
new_uuids[length] = uuid_str;
new_uuids[length + 1] = NULL;
}
else
{
gsize i = 0, j = 0;
new_uuids = g_new (const gchar *, length);
for (i = 0; i < length; i ++)
{
if (g_str_equal (uuids[i], uuid_str))
continue;
new_uuids[j] = uuids[i];
j++;
}
new_uuids[j] = NULL;
}
ret = g_settings_set_strv (obj->settings,
ENABLED_EXTENSIONS_KEY,
new_uuids);
g_strfreev (uuids);
g_free (new_uuids);
g_free (uuid_str);
return ret;
}
static gboolean
plugin_install_extension (PluginObject *obj,
NPString uuid)
{
gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
if (!uuid_is_valid (uuid_str))
{
g_free (uuid_str);
@ -560,7 +500,7 @@ plugin_install_extension (PluginObject *obj,
}
g_dbus_proxy_call (obj->proxy,
"InstallRemoteExtension",
(enabled ? "EnableExtension" : "DisableExtension"),
g_variant_new ("(s)", uuid_str),
G_DBUS_CALL_FLAGS_NONE,
-1, /* timeout */
@ -573,6 +513,40 @@ plugin_install_extension (PluginObject *obj,
return TRUE;
}
static gboolean
plugin_install_extension (PluginObject *obj,
NPString uuid,
NPString version_tag)
{
gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
gchar *version_tag_str;
if (!uuid_is_valid (uuid_str))
{
g_free (uuid_str);
return FALSE;
}
version_tag_str = g_strndup (version_tag.UTF8Characters,
version_tag.UTF8Length);
g_dbus_proxy_call (obj->proxy,
"InstallRemoteExtension",
g_variant_new ("(ss)",
uuid_str,
version_tag_str),
G_DBUS_CALL_FLAGS_NONE,
-1, /* timeout */
NULL, /* cancellable */
NULL, /* callback */
NULL /* user_data */);
g_free (uuid_str);
g_free (version_tag_str);
return TRUE;
}
static gboolean
plugin_uninstall_extension (PluginObject *obj,
NPString uuid,
@ -797,9 +771,11 @@ plugin_object_invoke (NPObject *npobj,
else if (name == install_extension_id)
{
if (!NPVARIANT_IS_STRING(args[0])) return FALSE;
if (!NPVARIANT_IS_STRING(args[1])) return FALSE;
return plugin_install_extension (obj,
NPVARIANT_TO_STRING(args[0]));
NPVARIANT_TO_STRING(args[0]),
NPVARIANT_TO_STRING(args[1]));
}
else if (name == uninstall_extension_id)
{
@ -970,12 +946,3 @@ NPP_GetValue(NPP instance,
return NPERR_NO_ERROR;
}
/* Opera tries to call NPP_SetWindow without checking the
* NULL pointer beforehand. */
NPError
NPP_SetWindow(NPP instance,
NPWindow *window)
{
return NPERR_NO_ERROR;
}

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.5.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_INIT([gnome-shell],[3.4.2],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
@ -63,7 +63,7 @@ AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
CLUTTER_MIN_VERSION=1.9.16
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
GJS_MIN_VERSION=1.29.18
MUTTER_MIN_VERSION=3.5.2
MUTTER_MIN_VERSION=3.4.1
FOLKS_MIN_VERSION=0.5.2
GTK_MIN_VERSION=3.3.9
GIO_MIN_VERSION=2.31.6
@ -75,7 +75,6 @@ TELEPATHY_LOGGER_MIN_VERSION=0.2.4
POLKIT_MIN_VERSION=0.100
STARTUP_NOTIFICATION_MIN_VERSION=0.11
GCR_MIN_VERSION=3.3.90
GNOME_DESKTOP_REQUIRED_VERSION=3.5.1
# Collect more than 20 libraries for a prize!
PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
@ -96,8 +95,7 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
libnm-glib libnm-util gnome-keyring-1
gcr-3 >= $GCR_MIN_VERSION
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
gcr-3 >= $GCR_MIN_VERSION)
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
@ -110,6 +108,8 @@ AC_DEFINE_UNQUOTED([GJS_VERSION], ["$GJS_VERSION"], [The version of GJS we're li
AC_SUBST([GJS_VERSION], ["$GJS_VERSION"])
GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
JHBUILD_TYPELIBDIR="$INTROSPECTION_TYPELIBDIR"
AC_SUBST(JHBUILD_TYPELIBDIR)
saved_CFLAGS=$CFLAGS
saved_LIBS=$LIBS
@ -123,7 +123,7 @@ PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION)
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.2 x11)
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.5.1)
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 0.1.7)
AC_MSG_CHECKING([for bluetooth support])
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
@ -239,6 +239,31 @@ AC_ARG_ENABLE(jhbuild-wrapper-script,
AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no)
AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes)
AC_MSG_CHECKING([location of system Certificate Authority list])
AC_ARG_WITH(ca-certificates,
[AC_HELP_STRING([--with-ca-certificates=@<:@path@:>@],
[path to system Certificate Authority list])])
if test "$with_ca_certificates" = "no"; then
AC_MSG_RESULT([disabled])
else
if test -z "$with_ca_certificates"; then
for f in /etc/pki/tls/certs/ca-bundle.crt \
/etc/ssl/certs/ca-certificates.crt; do
if test -f "$f"; then
with_ca_certificates="$f"
fi
done
if test -z "$with_ca_certificates"; then
AC_MSG_ERROR([could not find. Use --with-ca-certificates=path to set, or --without-ca-certificates to disable])
fi
fi
AC_MSG_RESULT($with_ca_certificates)
AC_DEFINE_UNQUOTED(SHELL_SYSTEM_CA_FILE, ["$with_ca_certificates"], [The system TLS CA list])
fi
AC_SUBST(SHELL_SYSTEM_CA_FILE,["$with_ca_certificates"])
BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])

View File

@ -88,13 +88,6 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
Keybinding to open the application menu.
</_description>
</key>
<key name="toggle-recording" type="as">
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
<_summary>Keybinding to toggle the screen recorder</_summary>
<_description>
Keybinding to start/stop the builtin screen recorder.
</_description>
</key>
</schema>
<schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"

View File

@ -328,11 +328,6 @@ StScrollBar StButton#vhandle:hover
background-gradient-end: rgba(255, 255, 255, 0.2);
}
.notification-icon-button:insensitive,
.notification-button:insensitive {
color: #9f9f9f;
}
/* Panel */
#panel {
@ -362,7 +357,7 @@ StScrollBar StButton#vhandle:hover
}
.panel-corner {
-panel-corner-radius: 6px;
-panel-corner-radius: 10px;
-panel-corner-background-color: black;
-panel-corner-border-width: 2px;
-panel-corner-border-color: transparent;
@ -414,7 +409,7 @@ StScrollBar StButton#vhandle:hover
.panel-button:active,
.panel-button:overview,
.panel-button:focus {
border-image: url("panel-button-border.svg") 6 10 0 2;
border-image: url("panel-button-border.svg") 10 10 0 2;
background-image: url("panel-button-highlight-wide.svg");
color: white;
text-shadow: black 0px 2px 2px;
@ -1208,8 +1203,7 @@ StScrollBar StButton#vhandle:hover
height: 36px;
}
.notification {
font-size: 11pt;
#notification {
border-radius: 10px 10px 0px 0px;
background: rgba(0,0,0,0.8);
padding: 8px 8px 4px 8px;
@ -1218,7 +1212,7 @@ StScrollBar StButton#vhandle:hover
width: 34em;
}
.notification.multi-line-notification {
#notification.multi-line-notification {
padding-bottom: 8px;
}
@ -1240,7 +1234,7 @@ StScrollBar StButton#vhandle:hover
color: white;
}
.summary-boxpointer .notification {
.summary-boxpointer #notification {
border-radius: 9px;
background: rgba(0,0,0,0) !important;
padding-bottom: 12px;
@ -1257,6 +1251,10 @@ StScrollBar StButton#vhandle:hover
padding-bottom: 6px;
}
#summary-notification-stack-scrollview > .top-shadow, #summary-notification-stack-scrollview > .bottom-shadow {
height: 1em;
}
#summary-notification-stack-scrollview:ltr {
padding-right: 8px;
}
@ -1265,24 +1263,28 @@ StScrollBar StButton#vhandle:hover
padding-left: 8px;
}
.notification-scrollview {
#notification-scrollview {
max-height: 10em;
-st-vfade-offset: 24px;
}
.notification-scrollview:ltr > StScrollBar {
#notification-scrollview > .top-shadow, #notification-scrollview > .bottom-shadow {
height: 1em;
}
#notification-scrollview:ltr > StScrollBar {
padding-left: 6px;
}
.notification-scrollview:rtl > StScrollBar {
#notification-scrollview:rtl > StScrollBar {
padding-right: 6px;
}
.notification-body {
#notification-body {
spacing: 5px;
}
.notification-actions {
#notification-actions {
spacing: 10px;
}
@ -1409,7 +1411,7 @@ StScrollBar StButton#vhandle:hover
font-style: italic;
}
.notification StEntry {
#notification StEntry {
padding: 4px;
border-radius: 4px;
color: #a8a8a8;
@ -1425,7 +1427,7 @@ StScrollBar StButton#vhandle:hover
caret-size: 1px;
}
.notification StEntry:focus {
#notification StEntry:focus {
border: 1px solid #8b8b8b;
color: #333333;
background-gradient-direction: vertical;
@ -1948,12 +1950,10 @@ StScrollBar StButton#vhandle:hover
padding-bottom: 8px;
}
.hidden {
color: rgba(0,0,0,0);
}
/* intentionally left transparent to avoid dialog changing size */
.prompt-dialog-null-label {
font-size: 10pt;
color: rgba(0,0,0,0);
padding-bottom: 8px;
}

View File

@ -9,7 +9,7 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="17"
width="21"
height="10"
id="svg2"
version="1.1"
@ -66,9 +66,9 @@
<rect
style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke-width:0.43599999;stroke-miterlimit:4;stroke-dasharray:none"
id="rect3796"
width="7"
width="3"
height="2"
x="5"
x="9"
y="8" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -28,6 +28,7 @@ nobase_dist_js_DATA = \
misc/config.js \
misc/extensionUtils.js \
misc/fileUtils.js \
misc/format.js \
misc/gnomeSession.js \
misc/history.js \
misc/jsParse.js \
@ -66,7 +67,6 @@ nobase_dist_js_DATA = \
ui/messageTray.js \
ui/modalDialog.js \
ui/networkAgent.js \
ui/sessionMode.js \
ui/shellEntry.js \
ui/shellMountOperation.js \
ui/notificationDaemon.js \

View File

@ -6,11 +6,11 @@ const GObject = imports.gi.GObject;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Pango = imports.gi.Pango;
const Format = imports.format;
const _ = Gettext.gettext;
const Config = imports.misc.config;
const Format = imports.misc.format;
const ExtensionUtils = imports.misc.extensionUtils;
@ -210,7 +210,7 @@ const Application = new Lang.Class({
try {
extension = ExtensionUtils.createExtensionObject(uuid, dir, type);
} catch(e) {
logError(e, 'Could not create extensions object');
global.logError('' + e);
return;
}
@ -257,7 +257,7 @@ function initEnvironment() {
},
logError: function(s) {
log('ERROR: ' + s);
global.log('ERROR: ' + s);
},
userdatadir: GLib.build_filenamev([GLib.get_user_data_dir(), 'gnome-shell'])

View File

@ -60,8 +60,10 @@ const PowerMenuButton = new Lang.Class({
},
_updateVisibility: function() {
let shouldBeVisible = (this._haveSuspend || this._haveShutdown || this._haveRestart);
this.actor.visible = shouldBeVisible;
if (!this._haveSuspend && !this._haveShutdown && !this._haveRestart)
this.actor.hide();
else
this.actor.show();
},
_updateHaveShutdown: function() {
@ -74,7 +76,11 @@ const PowerMenuButton = new Lang.Class({
else
this._haveShutdown = false;
this._powerOffItem.actor.visible = this._haveShutdown;
if (this._haveShutdown)
this._powerOffItem.actor.show();
else
this._powerOffItem.actor.hide();
this._updateVisibility();
}));
} else {
@ -85,7 +91,12 @@ const PowerMenuButton = new Lang.Class({
else
this._haveShutdown = false;
this._powerOffItem.actor.visible = this._haveShutdown;
if (this._haveShutdown) {
this._powerOffItem.actor.show();
} else {
this._powerOffItem.actor.hide();
}
this._updateVisibility();
}));
}
@ -101,7 +112,11 @@ const PowerMenuButton = new Lang.Class({
else
this._haveRestart = false;
this._restartItem.actor.visible = this._haveRestart;
if (this._haveRestart)
this._restartItem.actor.show();
else
this._restartItem.actor.hide();
this._updateVisibility();
}));
} else {
@ -112,7 +127,12 @@ const PowerMenuButton = new Lang.Class({
else
this._haveRestart = false;
this._restartItem.actor.visible = this._haveRestart;
if (this._haveRestart) {
this._restartItem.actor.show();
} else {
this._restartItem.actor.hide();
}
this._updateVisibility();
}));
}
@ -120,7 +140,12 @@ const PowerMenuButton = new Lang.Class({
_updateHaveSuspend: function() {
this._haveSuspend = this._upClient.get_can_suspend();
this._suspendItem.actor.visible = this._haveSuspend;
if (this._haveSuspend)
this._suspendItem.actor.show();
else
this._suspendItem.actor.hide();
this._updateVisibility();
},

View File

@ -8,6 +8,8 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@';
const GJS_VERSION = '@GJS_VERSION@';
/* 1 if gnome-bluetooth is available, 0 otherwise */
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
/* The system TLS CA list */
const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
/* gettext package */
const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
/* locale dir */

View File

@ -40,18 +40,13 @@ function getCurrentExtension() {
throw new Error('Could not find current extension');
let path = match[1];
let file = Gio.File.new_for_path(path);
let uuid = GLib.path_get_basename(GLib.path_get_dirname(path));
// Walk up the directory tree, looking for an extesion with
// the same UUID as a directory name.
while (file != null) {
let extension = extensions[file.get_basename()];
if (extension !== undefined)
return extension;
file = file.get_parent();
}
let extension = extensions[uuid];
if (extension === undefined)
throw new Error('Could not find current extension');
throw new Error('Could not find current extension');
return extension;
}
/**
@ -125,7 +120,7 @@ function createExtensionObject(uuid, dir, type) {
// Encourage people to add this
if (!meta.url) {
log('Warning: Missing "url" property in %s/metadata.json'.format(uuid));
global.log('Warning: Missing "url" property in metadata.json');
}
if (uuid != meta.uuid) {
@ -162,7 +157,7 @@ function init() {
if (!userExtensionsDir.query_exists(null))
userExtensionsDir.make_directory_with_parents(null);
} catch (e) {
logError(e, 'Could not create extensions directory');
global.logError('' + e);
}
}
@ -172,7 +167,7 @@ function scanExtensionsInDirectory(callback, dir, type) {
try {
fileEnum = dir.enumerate_children('standard::*', Gio.FileQueryInfoFlags.NONE, null);
} catch(e) {
logError(e, 'Could not enumerate extensions directory');
global.logError('' + e);
return;
}

71
js/misc/format.js Normal file
View File

@ -0,0 +1,71 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const ShellJS = imports.gi.ShellJS;
/*
* This function is intended to extend the String object and provide
* an String.format API for string formatting.
* It has to be set up using String.prototype.format = Format.format;
* Usage:
* "somestring %s %d".format('hello', 5);
* It supports %s, %d, %x and %f, for %f it also support precisions like
* "%.2f".format(1.526). All specifiers can be prefixed with a minimum
* field width, e.g. "%5s".format("foo"). Unless the width is prefixed
* with '0', the formatted string will be padded with spaces.
*/
function format() {
let str = this;
let i = 0;
let args = arguments;
return str.replace(/%(I+)?([0-9]+)?(?:\.([0-9]+))?(.)/g, function (str, flagsGroup, widthGroup, precisionGroup, genericGroup) {
if (precisionGroup != '' && genericGroup != 'f')
throw new Error("Precision can only be specified for 'f'");
let hasAlternativeIntFlag = (flagsGroup.indexOf('I') != -1);
if (hasAlternativeIntFlag && genericGroup != 'd')
throw new Error("Alternative output digits can only be specfied for 'd'");
let fillChar = (widthGroup[0] == '0') ? '0' : ' ';
let width = parseInt(widthGroup, 10) || 0;
function fillWidth(s, c, w) {
let fill = '';
for (let i = 0; i < w; i++)
fill += c;
return fill.substr(s.length) + s;
}
let s = '';
switch (genericGroup) {
case '%':
return '%';
break;
case 's':
s = args[i++].toString();
break;
case 'd':
let intV = parseInt(args[i++]);
if (hasAlternativeIntFlag)
s = ShellJS.format_int_alternative_output(intV);
else
s = intV.toString();
break;
case 'x':
s = parseInt(args[i++]).toString(16);
break;
case 'f':
if (precisionGroup == '')
s = parseFloat(args[i++]).toString();
else
s = parseFloat(args[i++]).toFixed(parseInt(precisionGroup));
break;
default:
throw new Error('Unsupported conversion character %' + genericGroup);
}
return fillWidth(s, fillChar, width);
});
}

View File

@ -83,11 +83,10 @@ function spawnCommandLine(command_line) {
// this will throw an error.
function trySpawn(argv)
{
var success, pid;
try {
[success, pid] = GLib.spawn_async(null, argv, null,
GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD,
null, null);
GLib.spawn_async(null, argv, null,
GLib.SpawnFlags.SEARCH_PATH,
null, null);
} catch (err) {
if (err.code == GLib.SpawnError.G_SPAWN_ERROR_NOENT) {
err.message = _("Command not found");
@ -102,10 +101,6 @@ function trySpawn(argv)
throw err;
}
// Dummy child watch; we don't want to double-fork internally
// because then we lose the parent-child relationship, which
// can break polkit. See https://bugzilla.redhat.com//show_bug.cgi?id=819275
GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, function () {}, null);
}
// trySpawnCommandLine:

View File

@ -312,10 +312,11 @@ const AppSearchProvider = new Lang.Class({
_init: function() {
this.parent(_("APPLICATIONS"));
this._appSys = Shell.AppSystem.get_default();
},
getResultMetas: function(apps, callback) {
getResultMetas: function(apps) {
let metas = [];
for (let i = 0; i < apps.length; i++) {
let app = apps[i];
@ -326,15 +327,15 @@ const AppSearchProvider = new Lang.Class({
}
});
}
callback(metas);
return metas;
},
getInitialResultSet: function(terms) {
this.searchSystem.pushResults(this, this._appSys.initial_search(terms));
return this._appSys.initial_search(terms);
},
getSubsearchResultSet: function(previousResults, terms) {
this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
return this._appSys.subsearch(previousResults, terms);
},
activateResult: function(app, params) {
@ -377,7 +378,7 @@ const SettingsSearchProvider = new Lang.Class({
this._gnomecc = this._appSys.lookup_app('gnome-control-center.desktop');
},
getResultMetas: function(prefs, callback) {
getResultMetas: function(prefs) {
let metas = [];
for (let i = 0; i < prefs.length; i++) {
let pref = prefs[i];
@ -388,15 +389,15 @@ const SettingsSearchProvider = new Lang.Class({
}
});
}
callback(metas);
return metas;
},
getInitialResultSet: function(terms) {
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
return this._appSys.search_settings(terms);
},
getSubsearchResultSet: function(previousResults, terms) {
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
return this._appSys.search_settings(terms);
},
activateResult: function(pref, params) {

View File

@ -262,11 +262,12 @@ const AutorunResidentSource = new Lang.Class({
Extends: MessageTray.Source,
_init: function() {
this.parent(_("Removable Devices"), 'media-removable', St.IconType.FULLCOLOR);
this.parent(_("Removable Devices"));
this._mounts = [];
this._notification = new AutorunResidentNotification(this);
this._setSummaryIcon(this.createNotificationIcon());
},
addMount: function(mount, apps) {
@ -309,6 +310,12 @@ const AutorunResidentSource = new Lang.Class({
Main.messageTray.add(this);
this.pushNotification(this._notification);
}
},
createNotificationIcon: function() {
return new St.Icon ({ icon_name: 'media-removable',
icon_type: St.IconType.FULLCOLOR,
icon_size: this.ICON_SIZE });
}
});
@ -493,11 +500,11 @@ const AutorunTransientSource = new Lang.Class({
Extends: MessageTray.Source,
_init: function(mount, apps) {
this.parent(mount.get_name());
this.mount = mount;
this.apps = apps;
this.parent(mount.get_name());
this._notification = new AutorunTransientNotification(this);
this._setSummaryIcon(this.createNotificationIcon());

View File

@ -63,7 +63,7 @@ const Contact = new Lang.Class({
this.individual.full_name ||
this.individual.nickname ||
email ||
C_("contact", "Unknown");
_("Unknown");
let aliasLabel = new St.Label({ text: aliasText,
style_class: 'contact-details-alias' });
details.add(aliasLabel, { x_fill: true,
@ -154,7 +154,7 @@ const ContactSearchProvider = new Lang.Class({
this._contactSys = Shell.ContactSystem.get_default();
},
getResultMetas: function(ids, callback) {
getResultMetas: function(ids) {
let metas = [];
for (let i = 0; i < ids.length; i++) {
let contact = new Contact(ids[i]);
@ -165,15 +165,15 @@ const ContactSearchProvider = new Lang.Class({
}
});
}
callback(metas);
return metas;
},
getInitialResultSet: function(terms) {
this.searchSystem.pushResults(this, this._contactSys.initial_search(terms));
return this._contactSys.initial_search(terms);
},
getSubsearchResultSet: function(previousResults, terms) {
this.searchSystem.pushResults(this, this._contactSys.subsearch(previousResults, terms));
return this._contactSys.subsearch(previousResults, terms);
},
createResultActor: function(resultMeta, terms) {

View File

@ -168,17 +168,7 @@ const DashItemContainer = new Lang.Class({
});
},
destroy: function() {
if (this.label)
this.label.destroy();
this.actor.destroy();
},
animateOutAndDestroy: function() {
if (this.label)
this.label.destroy();
if (this.child == null) {
this.actor.destroy();
return;
@ -701,7 +691,7 @@ const Dash = new Lang.Class({
if (Main.overview.visible)
item.animateOutAndDestroy();
else
item.destroy();
item.actor.destroy();
}
this._adjustIconSize();

View File

@ -45,7 +45,9 @@ const DateMenuButton = new Lang.Class({
Name: 'DateMenuButton',
Extends: PanelMenu.Button,
_init: function() {
_init: function(params) {
params = Params.parse(params, { showEvents: true });
let item;
let hbox;
let vbox;
@ -73,11 +75,11 @@ const DateMenuButton = new Lang.Class({
// Date
this._date = new St.Label();
this.actor.label_actor = this._clock;
this.actor.label_actor = this._date;
this._date.style_class = 'datemenu-date-label';
vbox.add(this._date);
if (Main.sessionMode.showCalendarEvents) {
if (params.showEvents) {
this._eventSource = new Calendar.DBusEventSource();
this._eventList = new Calendar.EventsList(this._eventSource);
} else {
@ -108,7 +110,7 @@ const DateMenuButton = new Lang.Class({
item.actor.reparent(vbox);
}
if (Main.sessionMode.showCalendarEvents) {
if (params.showEvents) {
// Add vertical separator
item = new St.DrawingArea({ style_class: 'calendar-vertical-separator',

View File

@ -342,7 +342,7 @@ const EndSessionDialog = new Lang.Class({
}
},
_updateDescription: function() {
_updateContent: function() {
if (this.state != ModalDialog.State.OPENING &&
this.state != ModalDialog.State.OPENED)
return;
@ -352,6 +352,17 @@ const EndSessionDialog = new Lang.Class({
let subject = dialogContent.subject;
let description;
if (this._user.is_loaded && !dialogContent.iconName) {
let iconFile = this._user.get_icon_file();
if (GLib.file_test(iconFile, GLib.FileTest.EXISTS))
this._setIconFromFile(iconFile, dialogContent.iconStyleClass);
else
this._setIconFromName('avatar-default', dialogContent.iconStyleClass);
} else if (dialogContent.iconName) {
this._setIconFromName(dialogContent.iconName,
dialogContent.iconStyleClass);
}
if (this._inhibitors.length > 0) {
this._stopTimer();
description = dialogContent.inhibitedDescription;
@ -384,27 +395,6 @@ const EndSessionDialog = new Lang.Class({
_setLabelText(this._descriptionLabel, description);
},
_updateContent: function() {
if (this.state != ModalDialog.State.OPENING &&
this.state != ModalDialog.State.OPENED)
return;
let dialogContent = DialogContent[this._type];
if (this._user.is_loaded && !dialogContent.iconName) {
let iconFile = this._user.get_icon_file();
if (GLib.file_test(iconFile, GLib.FileTest.EXISTS))
this._setIconFromFile(iconFile, dialogContent.iconStyleClass);
else
this._setIconFromName('avatar-default', dialogContent.iconStyleClass);
} else if (dialogContent.iconName) {
this._setIconFromName(dialogContent.iconName,
dialogContent.iconStyleClass);
}
this._updateDescription();
},
_updateButtons: function() {
let dialogContent = DialogContent[this._type];
let buttons = [{ action: Lang.bind(this, this.cancel),
@ -451,7 +441,7 @@ const EndSessionDialog = new Lang.Class({
{ _secondsLeft: 0,
time: this._secondsLeft,
transition: 'linear',
onUpdate: Lang.bind(this, this._updateDescription),
onUpdate: Lang.bind(this, this._updateContent),
onComplete: Lang.bind(this, function() {
let dialogContent = DialogContent[this._type];
let button = dialogContent.confirmButtons[dialogContent.confirmButtons.length - 1];

View File

@ -39,19 +39,11 @@ function _patchContainerClass(containerClass) {
};
}
function _makeLoggingFunc(func) {
return function() {
return func([].join.call(arguments, ', '));
};
}
function init() {
// Add some bindings to the global JS namespace; (gjs keeps the web
// browser convention of having that namespace be called 'window'.)
window.global = Shell.Global.get();
window.log = _makeLoggingFunc(window.log);
window._ = Gettext.gettext;
window.C_ = Gettext.pgettext;
window.ngettext = Gettext.ngettext;
@ -90,7 +82,7 @@ function init() {
}
// OK, now things are initialized enough that we can import shell JS
const Format = imports.format;
const Format = imports.misc.format;
const Tweener = imports.ui.tweener;
Tweener.init();

View File

@ -34,11 +34,24 @@ const REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
const REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
const REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
const _httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });
const _httpSession = new Soup.SessionAsync();
// The unfortunate state of gjs, gobject-introspection and libsoup
// means that I have to do a hack to add a feature.
// See: https://bugzilla.gnome.org/show_bug.cgi?id=655189 for context.
// _httpSession.add_feature(new Soup.ProxyResolverDefault());
Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());
if (Soup.Session.prototype.add_feature != null)
Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());
function _getCertFile() {
let localCert = GLib.build_filenamev([global.userdatadir, 'extensions.gnome.org.crt']);
if (GLib.file_test(localCert, GLib.FileTest.EXISTS))
return localCert;
else
return Config.SHELL_SYSTEM_CA_FILE;
}
_httpSession.ssl_ca_file = _getCertFile();
// Arrays of uuids
var enabledExtensions;
@ -56,16 +69,18 @@ const disconnect = Lang.bind(_signals, _signals.disconnect);
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
function installExtensionFromUUID(uuid) {
function installExtensionFromUUID(uuid, version_tag) {
let params = { uuid: uuid,
shell_version: Config.PACKAGE_VERSION };
version_tag: version_tag,
shell_version: Config.PACKAGE_VERSION,
api_version: API_VERSION.toString() };
let message = Soup.form_request_new_from_hash('GET', REPOSITORY_URL_INFO, params);
_httpSession.queue_message(message,
function(session, message) {
let info = JSON.parse(message.response_body.data);
let dialog = new InstallExtensionDialog(uuid, info);
let dialog = new InstallExtensionDialog(uuid, version_tag, info.name);
dialog.open(global.get_current_time());
});
}
@ -100,13 +115,21 @@ function gotExtensionZipFile(session, message, uuid) {
return;
}
let [file, stream] = Gio.File.new_tmp('XXXXXX.shell-extension.zip');
// FIXME: use a GFile mkstemp-type method once one exists
let fd, tmpzip;
try {
[fd, tmpzip] = GLib.file_open_tmp('XXXXXX.shell-extension.zip');
} catch (e) {
logExtensionError(uuid, 'tempfile: ' + e.toString());
return;
}
let stream = new Gio.UnixOutputStream({ fd: fd });
let dir = ExtensionUtils.userExtensionsDir.get_child(uuid);
let contents = message.response_body.flatten().as_bytes();
stream.output_stream.write_bytes(contents, null);
Shell.write_soup_message_to_stream(stream, message);
stream.close(null);
let [success, pid] = GLib.spawn_async(null,
['unzip', '-uod', dir.get_path(), '--', file.get_path()],
['unzip', '-uod', dir.get_path(), '--', tmpzip],
null,
GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD,
null);
@ -214,7 +237,7 @@ function logExtensionError(uuid, message, state) {
extension.errors = [];
extension.errors.push(message);
log('Extension "%s" had error: %s'.format(uuid, message));
global.logError('Extension "%s" had error: %s'.format(uuid, message));
state = state || ExtensionState.ERROR;
_signals.emit('extension-state-changed', { uuid: uuid,
error: message,
@ -226,7 +249,7 @@ function loadExtension(dir, type, enabled) {
let extension;
if (ExtensionUtils.extensions[uuid] != undefined) {
log('Extension "%s" is already loaded'.format(uuid));
global.logError('Extension "%s" is already loaded'.format(uuid));
return;
}
@ -255,6 +278,7 @@ function loadExtension(dir, type, enabled) {
}
_signals.emit('extension-state-changed', extension);
global.log('Loaded extension ' + uuid);
}
function initExtension(uuid) {
@ -366,11 +390,12 @@ const InstallExtensionDialog = new Lang.Class({
Name: 'InstallExtensionDialog',
Extends: ModalDialog.ModalDialog,
_init: function(uuid, info) {
_init: function(uuid, version_tag, name) {
this.parent({ styleClass: 'extension-dialog' });
this._uuid = uuid;
this._info = info;
this._version_tag = version_tag;
this._name = name;
this.setButtons([{ label: _("Cancel"),
action: Lang.bind(this, this._onCancelButtonPressed),
@ -380,17 +405,13 @@ const InstallExtensionDialog = new Lang.Class({
action: Lang.bind(this, this._onInstallButtonPressed)
}]);
let message = _("Download and install '%s' from extensions.gnome.org?").format(info.name);
let message = _("Download and install '%s' from extensions.gnome.org?").format(name);
let box = new St.BoxLayout();
this.contentLayout.add(box);
this._descriptionLabel = new St.Label({ text: message });
let gicon = new Gio.FileIcon({ file: Gio.File.new_for_uri(REPOSITORY_URL_BASE + info.icon) })
let icon = new St.Icon({ gicon: gicon });
box.add(icon);
let label = new St.Label({ text: message });
box.add(label);
this.contentLayout.add(this._descriptionLabel,
{ y_fill: true,
y_align: St.Align.START });
},
_onCancelButtonPressed: function(button, event) {
@ -414,7 +435,9 @@ const InstallExtensionDialog = new Lang.Class({
_signals.emit('extension-state-changed', state);
let params = { shell_version: Config.PACKAGE_VERSION };
let params = { version_tag: this._version_tag,
shell_version: Config.PACKAGE_VERSION,
api_version: API_VERSION.toString() };
let url = REPOSITORY_URL_DOWNLOAD.format(this._uuid);
let message = Soup.form_request_new_from_hash('GET', url, params);

View File

@ -282,10 +282,6 @@ const IconGrid = new Lang.Class({
return this._computeLayout(rowWidth)[0];
},
getRowLimit: function() {
return this._rowLimit;
},
_computeLayout: function (forWidth) {
let nColumns = 0;
let usedWidth = 0;

View File

@ -541,8 +541,16 @@ const KeyboardSource = new Lang.Class({
Extends: MessageTray.Source,
_init: function(keyboard) {
this.parent(_("Keyboard"));
this._keyboard = keyboard;
this.parent(_("Keyboard"), 'input-keyboard', St.IconType.SYMBOLIC);
this._setSummaryIcon(this.createNotificationIcon());
},
createNotificationIcon: function() {
return new St.Icon({ icon_name: 'input-keyboard',
icon_type: St.IconType.SYMBOLIC,
icon_size: this.ICON_SIZE });
},
handleSummaryClick: function() {

View File

@ -634,6 +634,45 @@ const Inspector = new Lang.Class({
Signals.addSignalMethods(Inspector.prototype);
const ErrorLog = new Lang.Class({
Name: 'ErrorLog',
_init: function() {
this.actor = new St.BoxLayout();
this.text = new St.Label();
this.actor.add(this.text);
// We need to override StLabel's default ellipsization when
// using line_wrap; otherwise ClutterText's layout is going
// to constrain both the width and height, which prevents
// scrolling.
this.text.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this.text.clutter_text.line_wrap = true;
this.actor.connect('notify::mapped', Lang.bind(this, this._renderText));
},
_formatTime: function(d){
function pad(n) { return n < 10 ? '0' + n : n; }
return d.getUTCFullYear()+'-'
+ pad(d.getUTCMonth()+1)+'-'
+ pad(d.getUTCDate())+'T'
+ pad(d.getUTCHours())+':'
+ pad(d.getUTCMinutes())+':'
+ pad(d.getUTCSeconds())+'Z';
},
_renderText: function() {
if (!this.actor.mapped)
return;
let text = this.text.text;
let stack = Main._getAndClearErrorStack();
for (let i = 0; i < stack.length; i++) {
let logItem = stack[i];
text += logItem.category + ' t=' + this._formatTime(new Date(logItem.timestamp)) + ' ' + logItem.message + '\n';
}
this.text.text = text;
}
});
const Memory = new Lang.Class({
Name: 'Memory',
@ -908,6 +947,9 @@ const LookingGlass = new Lang.Class({
}));
notebook.appendPage('Windows', this._windowList.actor);
this._errorLog = new ErrorLog();
notebook.appendPage('Errors', this._errorLog.actor);
this._memory = new Memory();
notebook.appendPage('Memory', this._memory.actor);

View File

@ -16,7 +16,6 @@ const Params = imports.misc.params;
const MOUSE_POLL_FREQUENCY = 50;
const CROSSHAIRS_CLIP_SIZE = [100, 100];
const NO_CHANGE = 0.0;
// Settings
const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
@ -25,13 +24,6 @@ const SHOW_KEY = 'screen-magnifier-enabled';
const MAGNIFIER_SCHEMA = 'org.gnome.desktop.a11y.magnifier';
const SCREEN_POSITION_KEY = 'screen-position';
const MAG_FACTOR_KEY = 'mag-factor';
const INVERT_LIGHTNESS_KEY = 'invert-lightness';
const BRIGHT_RED_KEY = 'brightness-red';
const BRIGHT_GREEN_KEY = 'brightness-green';
const BRIGHT_BLUE_KEY = 'brightness-blue';
const CONTRAST_RED_KEY = 'contrast-red';
const CONTRAST_GREEN_KEY = 'contrast-green';
const CONTRAST_BLUE_KEY = 'contrast-blue';
const LENS_MODE_KEY = 'lens-mode';
const CLAMP_MODE_KEY = 'scroll-at-edges';
const MOUSE_TRACKING_KEY = 'mouse-tracking';
@ -451,21 +443,6 @@ const Magnifier = new Lang.Class({
aPref = this._settings.get_enum(MOUSE_TRACKING_KEY);
if (aPref)
zoomRegion.setMouseTrackingMode(aPref);
aPref = this._settings.get_boolean(INVERT_LIGHTNESS_KEY);
if (aPref)
zoomRegion.setInvertLightness(aPref);
let bc = {};
bc.r = this._settings.get_double(BRIGHT_RED_KEY);
bc.g = this._settings.get_double(BRIGHT_GREEN_KEY);
bc.b = this._settings.get_double(BRIGHT_BLUE_KEY);
zoomRegion.setBrightness(bc);
bc.r = this._settings.get_double(CONTRAST_RED_KEY);
bc.g = this._settings.get_double(CONTRAST_GREEN_KEY);
bc.b = this._settings.get_double(CONTRAST_BLUE_KEY);
zoomRegion.setContrast(bc);
}
let showCrosshairs = this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY);
@ -488,23 +465,6 @@ const Magnifier = new Lang.Class({
this._settings.connect('changed::' + MOUSE_TRACKING_KEY,
Lang.bind(this, this._updateMouseTrackingMode));
this._settings.connect('changed::' + INVERT_LIGHTNESS_KEY,
Lang.bind(this, this._updateInvertLightness));
this._settings.connect('changed::' + BRIGHT_RED_KEY,
Lang.bind(this, this._updateBrightness));
this._settings.connect('changed::' + BRIGHT_GREEN_KEY,
Lang.bind(this, this._updateBrightness));
this._settings.connect('changed::' + BRIGHT_BLUE_KEY,
Lang.bind(this, this._updateBrightness));
this._settings.connect('changed::' + CONTRAST_RED_KEY,
Lang.bind(this, this._updateContrast));
this._settings.connect('changed::' + CONTRAST_GREEN_KEY,
Lang.bind(this, this._updateContrast));
this._settings.connect('changed::' + CONTRAST_BLUE_KEY,
Lang.bind(this, this._updateContrast));
this._settings.connect('changed::' + SHOW_CROSS_HAIRS_KEY,
Lang.bind(this, function() {
this.setCrosshairsVisible(this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY));
@ -580,38 +540,7 @@ const Magnifier = new Lang.Class({
this._settings.get_enum(MOUSE_TRACKING_KEY)
);
}
},
_updateInvertLightness: function() {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
this._zoomRegions[0].setInvertLightness(
this._settings.get_boolean(INVERT_LIGHTNESS_KEY)
);
}
},
_updateBrightness: function() {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
let brightness = {};
brightness.r = this._settings.get_double(BRIGHT_RED_KEY);
brightness.g = this._settings.get_double(BRIGHT_GREEN_KEY);
brightness.b = this._settings.get_double(BRIGHT_BLUE_KEY);
this._zoomRegions[0].setBrightness(brightness);
}
},
_updateContrast: function() {
// Applies only to the first zoom region.
if (this._zoomRegions.length) {
let contrast = {};
contrast.r = this._settings.get_double(CONTRAST_RED_KEY);
contrast.g = this._settings.get_double(CONTRAST_GREEN_KEY);
contrast.b = this._settings.get_double(CONTRAST_BLUE_KEY);
this._zoomRegions[0].setContrast(contrast);
}
},
}
});
Signals.addSignalMethods(Magnifier.prototype);
@ -625,9 +554,6 @@ const ZoomRegion = new Lang.Class({
this._clampScrollingAtEdges = false;
this._lensMode = false;
this._screenPosition = GDesktopEnums.MagnifierScreenPosition.FULL_SCREEN;
this._invertLightness = false;
this._brightness = { r: NO_CHANGE, g: NO_CHANGE, b: NO_CHANGE };
this._contrast = { r: NO_CHANGE, g: NO_CHANGE, b: NO_CHANGE };
this._magView = null;
this._background = null;
@ -953,86 +879,6 @@ const ZoomRegion = new Lang.Class({
}
},
/**
* setInvertLightness:
* Set whether to invert the lightness of the magnified view.
* @flag Boolean to either invert brightness (true), or not (false).
*/
setInvertLightness: function(flag) {
this._invertLightness = flag;
if (this._magShaderEffects)
this._magShaderEffects.setInvertLightness(this._invertLightness);
},
/**
* getInvertLightness:
* Retrieve whether the lightness is inverted.
* @return Boolean indicating inversion (true), or not (false).
*/
getInvertLightness: function() {
return this._invertLightness;
},
/**
* setBrightness:
* Alter the brightness of the magnified view.
* @brightness Object containing the contrast for the red, green,
* and blue channels. Values of 0.0 represent "standard"
* brightness (no change), whereas values less or greater than
* 0.0 indicate decreased or incresaed brightness, respectively.
*/
setBrightness: function(brightness) {
this._brightness.r = brightness.r;
this._brightness.g = brightness.g;
this._brightness.b = brightness.b;
if (this._magShaderEffects)
this._magShaderEffects.setBrightness(this._brightness);
},
/**
* getBrightness:
* Retrive the current brightness of the Zoom Region.
* @return Object containing the brightness change for the red, green,
* and blue channels.
*/
getBrightness: function() {
let brightness = {};
brightness.r = this._brightness.r;
brightness.g = this._brightness.g;
brightness.b = this._brightness.b;
return brightness;
},
/**
* setContrast:
* Alter the contrast of the magnified view.
* @contrast Object containing the contrast for the red, green,
* and blue channels. Values of 0.0 represent "standard"
* contrast (no change), whereas values less or greater than
* 0.0 indicate decreased or incresaed contrast, respectively.
*/
setContrast: function(contrast) {
this._contrast.r = contrast.r;
this._contrast.g = contrast.g;
this._contrast.b = contrast.b;
if (this._magShaderEffects)
this._magShaderEffects.setContrast(this._contrast);
},
/**
* getContrast:
* Retreive the contrast of the magnified view.
* @return Object containing the contrast for the red, green,
* and blue channels.
*/
getContrast: function() {
let contrast = {};
contrast.r = this._contrast.r;
contrast.g = this._contrast.g;
contrast.b = this._contrast.b;
return contrast;
},
//// Private methods ////
_createActors: function() {
@ -1071,12 +917,6 @@ const ZoomRegion = new Lang.Class({
this._crossHairsActor = this._crossHairs.addToZoomRegion(this, this._mouseActor);
else
this._crossHairsActor = null;
// Contrast and brightness effects.
this._magShaderEffects = new MagShaderEffects(this._uiGroupClone);
this._magShaderEffects.setInvertLightness(this._invertLightness);
this._magShaderEffects.setBrightness(this._brightness);
this._magShaderEffects.setContrast(this._contrast);
},
_destroyActors: function() {
@ -1085,8 +925,6 @@ const ZoomRegion = new Lang.Class({
if (this._crossHairs)
this._crossHairs.removeFromParent(this._crossHairsActor);
this._magShaderEffects.destroyEffects();
this._magShaderEffects = null;
this._magView.destroy();
this._magView = null;
this._background = null;
@ -1390,7 +1228,10 @@ const Crosshairs = new Lang.Class({
crosshairsActor = new Clutter.Clone({ source: this._actor });
this._clones.push(crosshairsActor);
}
crosshairsActor.visible = this._actor.visible;
if (this._actor.visible)
crosshairsActor.show();
else
crosshairsActor.hide();
container.add_actor(crosshairsActor);
container.raise_child(magnifiedMouse, crosshairsActor);
@ -1595,133 +1436,3 @@ const Crosshairs = new Lang.Class({
this._vertBottomHair.set_position((groupWidth - thickness) / 2, bottom);
}
});
const MagShaderEffects = new Lang.Class({
Name: 'MagShaderEffects',
_init: function(uiGroupClone) {
this._inverse = new Shell.InvertLightnessEffect();
this._brightnessContrast = new Clutter.BrightnessContrastEffect();
this._inverse.set_enabled(false);
this._brightnessContrast.set_enabled(false);
this._magView = uiGroupClone;
this._magView.add_effect(this._inverse);
this._magView.add_effect(this._brightnessContrast);
},
/**
* destroyEffects:
* Remove contrast and brightness effects from the magnified view, and
* lose the reference to the actor they were applied to. Don't use this
* object after calling this.
*/
destroyEffects: function() {
this._magView.clear_effects();
this._brightnessContrast = null;
this._inverse = null;
this._magView = null;
},
/**
* setInvertLightness:
* Enable/disable invert lightness effect.
* @invertFlag: Enabled flag.
*/
setInvertLightness: function(invertFlag) {
this._inverse.set_enabled(invertFlag);
},
/**
* getInvertLightness:
* Report whether the inversion effect is enabled.
* @return: Boolean.
*/
getInvertLightness: function() {
return this._inverse.get_enabled();
},
/**
* setBrightness:
* Set the brightness of the magnified view.
* @brightness: Object containing the brightness for the red, green,
* and blue channels. Values of 0.0 represent "standard"
* brightness (no change), whereas values less or greater than
* 0.0 indicate decreased or incresaed brightness,
* respectively.
*/
setBrightness: function(brightness) {
let bRed = brightness.r;
let bGreen = brightness.g;
let bBlue = brightness.b;
this._brightnessContrast.set_brightness_full(bRed, bGreen, bBlue);
// Enable the effect if the brightness OR contrast change are such that
// it modifies the brightness and/or contrast.
let [cRed, cGreen, cBlue] = this._brightnessContrast.get_contrast();
this._brightnessContrast.set_enabled(
(bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE ||
cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE)
);
},
/**
* getBrightness:
* Retrieve current brightness of the magnified view.
* @return: Object containing the brightness for the red, green,
* and blue channels. Values of 0.0 represent "standard"
* brightness (no change), whereas values less or greater than
* 0.0 indicate decreased or incresaed brightness, respectively.
*/
getBrightness: function() {
let result = {};
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
result.r = bRed;
result.g = bGreen;
result.b = bBlue;
return result;
},
/**
* Set the contrast of the magnified view.
* @contrast: Object containing the contrast for the red, green,
* and blue channels. Values of 0.0 represent "standard"
* contrast (no change), whereas values less or greater than
* 0.0 indicate decreased or incresaed contrast, respectively.
*/
setContrast: function(contrast) {
let cRed = contrast.r;
let cGreen = contrast.g;
let cBlue = contrast.b;
this._brightnessContrast.set_contrast_full(cRed, cGreen, cBlue);
// Enable the effect if the contrast OR brightness change are such that
// it modifies the brightness and/or contrast.
// should be able to use Clutter.color_equal(), but that complains of
// a null first argument.
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
this._brightnessContrast.set_enabled(
cRed != NO_CHANGE || cGreen != NO_CHANGE || cBlue != NO_CHANGE ||
bRed != NO_CHANGE || bGreen != NO_CHANGE || bBlue != NO_CHANGE
);
},
/**
* Retrieve current contrast of the magnified view.
* @return: Object containing the contrast for the red, green,
* and blue channels. Values of 0.0 represent "standard"
* contrast (no change), whereas values less or greater than
* 0.0 indicate decreased or incresaed contrast, respectively.
*/
getContrast: function() {
let resutl = {};
let [cRed, cGreen, cBlue] = this._brightnessContrast.get_contrast();
result.r = cRed;
result.g = cGreen;
result.b = cBlue;
return result;
}
});

View File

@ -30,7 +30,6 @@ const NetworkAgent = imports.ui.networkAgent;
const NotificationDaemon = imports.ui.notificationDaemon;
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
const Scripting = imports.ui.scripting;
const SessionMode = imports.ui.sessionMode;
const ShellDBus = imports.ui.shellDBus;
const TelepathyClient = imports.ui.telepathyClient;
const WindowManager = imports.ui.windowManager;
@ -47,6 +46,7 @@ let automountManager = null;
let autorunManager = null;
let panel = null;
let hotCorners = [];
let placesManager = null;
let overview = null;
let runDialog = null;
let lookingGlass = null;
@ -57,7 +57,6 @@ let windowAttentionHandler = null;
let telepathyClient = null;
let ctrlAltTabManager = null;
let recorder = null;
let sessionMode = null;
let shellDBusService = null;
let modalCount = 0;
let modalActorFocusStack = [];
@ -68,27 +67,28 @@ let statusIconDispatcher = null;
let keyboard = null;
let layoutManager = null;
let networkAgent = null;
let _errorLogStack = [];
let _startDate;
let _defaultCssStylesheet = null;
let _cssStylesheet = null;
let _gdmCssStylesheet = null;
let _overridesSettings = null;
let background = null;
function createUserSession() {
function _createUserSession() {
// Load the calendar server. Note that we are careful about
// not loading any events until the user presses the clock
global.launch_calendar_server();
placesManager = new PlaceDisplay.PlacesManager();
telepathyClient = new TelepathyClient.Client();
automountManager = new AutomountManager.AutomountManager();
autorunManager = new AutorunManager.AutorunManager();
networkAgent = new NetworkAgent.NetworkAgent();
_initRecorder();
}
function createGDMSession() {
function _createGDMSession() {
// We do this this here instead of at the top to prevent GDM
// related code from getting loaded in normal user sessions
const LoginDialog = imports.gdm.loginDialog;
@ -99,26 +99,18 @@ function createGDMSession() {
});
}
function createInitialSetupSession() {
networkAgent = new NetworkAgent.NetworkAgent();
}
function _initRecorder() {
let recorderSettings = new Gio.Settings({ schema: 'org.gnome.shell.recorder' });
let desktopLockdownSettings = new Gio.Settings({ schema: 'org.gnome.desktop.lockdown' });
let bindingSettings = new Gio.Settings({ schema: 'org.gnome.shell.keybindings' });
global.display.add_keybinding('toggle-recording',
bindingSettings,
Meta.KeyBindingFlags.NONE, function() {
global.screen.connect('toggle-recording', function() {
if (recorder == null) {
recorder = new Shell.Recorder({ stage: global.stage });
}
if (recorder.is_recording()) {
recorder.close();
recorder.pause();
Meta.enable_unredirect_for_screen(global.screen);
} else if (!desktopLockdownSettings.get_boolean('disable-save-to-disk')) {
} else {
// read the parameters from GSettings always in case they have changed
recorder.set_framerate(recorderSettings.get_int('framerate'));
/* Translators: this is a filename used for screencast recording */
@ -137,17 +129,38 @@ function _initRecorder() {
});
}
function _initUserSession() {
_initRecorder();
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
ExtensionSystem.init();
ExtensionSystem.loadExtensions();
Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
getRunDialog().open();
});
Meta.keybindings_set_custom_handler('panel-main-menu', function () {
overview.toggle();
});
global.display.connect('overlay-key', Lang.bind(overview, overview.toggle));
}
function start() {
// These are here so we don't break compatibility.
global.logError = window.log;
global.log = window.log;
// Monkey patch utility functions into the global proxy;
// This is easier and faster than indirecting down into global
// if we want to call back up into JS.
global.logError = _logError;
global.log = _logDebug;
// Chain up async errors reported from C
global.connect('notify-error', function (global, msg, detail) { notifyError(msg, detail); });
Gio.DesktopAppInfo.set_desktop_env('GNOME');
sessionMode = new SessionMode.SessionMode();
shellDBusService = new ShellDBus.GnomeShell();
// Ensure ShellWindowTracker and ShellAppUsage are initialized; this will
@ -170,6 +183,7 @@ function start() {
global.stage.no_clear_hint = true;
_defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css';
_gdmCssStylesheet = global.datadir + '/theme/gdm.css';
loadTheme();
// Set up stage hierarchy to group all UI actors under one container.
@ -197,7 +211,8 @@ function start() {
layoutManager = new Layout.LayoutManager();
xdndHandler = new XdndHandler.XdndHandler();
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();
overview = new Overview.Overview();
// This overview object is just a stub for non-user sessions
overview = new Overview.Overview({ isDummy: global.session_type != Shell.SessionType.USER });
magnifier = new Magnifier.Magnifier();
statusIconDispatcher = new StatusIconDispatcher.StatusIconDispatcher();
panel = new Panel.Panel();
@ -207,7 +222,10 @@ function start() {
notificationDaemon = new NotificationDaemon.NotificationDaemon();
windowAttentionHandler = new WindowAttentionHandler.WindowAttentionHandler();
sessionMode.createSession();
if (global.session_type == Shell.SessionType.USER)
_createUserSession();
else if (global.session_type == Shell.SessionType.GDM)
_createGDMSession();
panel.startStatusArea();
@ -215,30 +233,8 @@ function start() {
keyboard.init();
overview.init();
if (sessionMode.hasWorkspaces)
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
false, -1, 1);
if (sessionMode.allowExtensions) {
ExtensionSystem.init();
ExtensionSystem.loadExtensions();
}
if (sessionMode.hasRunDialog) {
Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
getRunDialog().open();
});
}
if (sessionMode.hasOverview) {
Meta.keybindings_set_custom_handler('panel-main-menu', function () {
overview.toggle();
});
global.display.connect('overlay-key',
Lang.bind(overview, overview.toggle));
}
if (global.session_type == Shell.SessionType.USER)
_initUserSession();
statusIconDispatcher.start(messageTray.actor);
// Provide the bus object for gnome-session to
@ -255,6 +251,7 @@ function start() {
global.stage.connect('captured-event', _globalKeyPressHandler);
_log('info', 'loaded at ' + _startDate);
log('GNOME Shell started at ' + _startDate);
let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
@ -497,8 +494,8 @@ function loadTheme() {
let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
if (sessionMode.extraStylesheet)
theme.load_stylesheet(sessionMode.extraStylesheet);
if (global.session_type == Shell.SessionType.GDM)
theme.load_stylesheet(_gdmCssStylesheet);
if (previousTheme) {
let customStylesheets = previousTheme.get_custom_stylesheets();
@ -540,6 +537,59 @@ function notifyError(msg, details) {
notify(msg, details);
}
/**
* _log:
* @category: string message type ('info', 'error')
* @msg: A message string
* ...: Any further arguments are converted into JSON notation,
* and appended to the log message, separated by spaces.
*
* Log a message into the LookingGlass error
* stream. This is primarily intended for use by the
* extension system as well as debugging.
*/
function _log(category, msg) {
let text = msg;
if (arguments.length > 2) {
text += ': ';
for (let i = 2; i < arguments.length; i++) {
text += JSON.stringify(arguments[i]);
if (i < arguments.length - 1)
text += ' ';
}
}
_errorLogStack.push({timestamp: new Date().getTime(),
category: category,
message: text });
}
function _logError(msg) {
return _log('error', msg);
}
function _logDebug(msg) {
return _log('debug', msg);
}
// Used by the error display in lookingGlass.js
function _getAndClearErrorStack() {
let errors = _errorLogStack;
_errorLogStack = [];
return errors;
}
function logStackTrace(msg) {
try {
throw new Error();
} catch (e) {
// e.stack must have at least two lines, with the first being
// logStackTrace() (which we strip off), and the second being
// our caller.
let trace = e.stack.substr(e.stack.indexOf('\n') + 1);
log(msg ? (msg + '\n' + trace) : trace);
}
}
function isWindowActorDisplayedOnWorkspace(win, workspaceIndex) {
return win.get_workspace() == workspaceIndex ||
(win.get_meta_window() && win.get_meta_window().is_on_all_workspaces());
@ -562,11 +612,6 @@ function _globalKeyPressHandler(actor, event) {
if (event.type() != Clutter.EventType.KEY_PRESS)
return false;
if (!sessionMode.allowKeybindingsWhenModal) {
if (modalCount > (overview.visible ? 1 : 0))
return false;
}
let symbol = event.get_key_symbol();
let keyCode = event.get_key_code();
let ignoredModifiers = global.display.get_ignored_modifier_mask();
@ -575,6 +620,11 @@ function _globalKeyPressHandler(actor, event) {
// This relies on the fact that Clutter.ModifierType is the same as Gdk.ModifierType
let action = global.display.get_keybinding_action(keyCode, modifierState);
// Other bindings are only available to the user session when the overview is up and
// no modal dialog is present.
if (global.session_type == Shell.SessionType.USER && (!overview.visible || modalCount > 1))
return false;
// This isn't a Meta.KeyBindingAction yet
if (symbol == Clutter.Super_L || symbol == Clutter.Super_R) {
overview.hide();
@ -587,39 +637,28 @@ function _globalKeyPressHandler(actor, event) {
return true;
}
// None of the other bindings are relevant outside of the user's session
if (global.session_type != Shell.SessionType.USER)
return false;
switch (action) {
// left/right would effectively act as synonyms for up/down if we enabled them;
// but that could be considered confusing; we also disable them in the main view.
//
// case Meta.KeyBindingAction.WORKSPACE_LEFT:
// if (!sessionMode.hasWorkspaces)
// return false;
//
// wm.actionMoveWorkspaceLeft();
// return true;
// case Meta.KeyBindingAction.WORKSPACE_RIGHT:
// if (!sessionMode.hasWorkspaces)
// return false;
//
// wm.actionMoveWorkspaceRight();
// return true;
case Meta.KeyBindingAction.WORKSPACE_UP:
if (!sessionMode.hasWorkspaces)
return false;
wm.actionMoveWorkspaceUp();
return true;
case Meta.KeyBindingAction.WORKSPACE_DOWN:
if (!sessionMode.hasWorkspaces)
return false;
wm.actionMoveWorkspaceDown();
return true;
case Meta.KeyBindingAction.PANEL_RUN_DIALOG:
case Meta.KeyBindingAction.COMMAND_2:
if (!sessionMode.hasRunDialog)
return false;
getRunDialog().open();
return true;
case Meta.KeyBindingAction.PANEL_MAIN_MENU:
@ -892,8 +931,7 @@ function initializeDeferredWork(actor, callback, props) {
function queueDeferredWork(workId) {
let data = _deferredWorkData[workId];
if (!data) {
let message = 'Invalid work id %d'.format(workId);
logError(new Error(message), message);
global.logError('invalid work id ', workId);
return;
}
if (_deferredWorkQueue.indexOf(workId) < 0)

View File

@ -441,7 +441,7 @@ const Notification = new Lang.Class({
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
this._table = new St.Table({ style_class: 'notification',
this._table = new St.Table({ name: 'notification',
reactive: true });
this._table.connect('style-changed', Lang.bind(this, this._styleChanged));
this.actor.set_child(this._table);
@ -586,21 +586,19 @@ const Notification = new Lang.Class({
enableScrolling: function(enableScrolling) {
this._scrollPolicy = enableScrolling ? Gtk.PolicyType.AUTOMATIC : Gtk.PolicyType.NEVER;
if (this._scrollArea) {
if (this._scrollArea)
this._scrollArea.vscrollbar_policy = this._scrollPolicy;
this._scrollArea.enable_mouse_scrolling = enableScrolling;
}
},
_createScrollArea: function() {
this._table.add_style_class_name('multi-line-notification');
this._scrollArea = new St.ScrollView({ style_class: 'notification-scrollview',
this._scrollArea = new St.ScrollView({ name: 'notification-scrollview',
vscrollbar_policy: this._scrollPolicy,
hscrollbar_policy: Gtk.PolicyType.NEVER });
this._table.add(this._scrollArea, { row: 1,
col: 2 });
this._updateLastColumnSettings();
this._contentArea = new St.BoxLayout({ style_class: 'notification-body',
this._contentArea = new St.BoxLayout({ name: 'notification-body',
vertical: true });
this._scrollArea.add_actor(this._contentArea);
// If we know the notification will be expandable, we need to add
@ -736,7 +734,7 @@ const Notification = new Lang.Class({
addButton: function(id, label) {
if (!this._buttonBox) {
let box = new St.BoxLayout({ style_class: 'notification-actions' });
let box = new St.BoxLayout({ name: 'notification-actions' });
this.setActionArea(box, { x_expand: false,
y_expand: false,
x_fill: false,
@ -746,7 +744,6 @@ const Notification = new Lang.Class({
}
let button = new St.Button({ can_focus: true });
button._actionId = id;
if (this._useActionIcons && Gtk.IconTheme.get_default().has_icon(id)) {
button.add_style_class_name('notification-icon-button');
@ -766,31 +763,6 @@ const Notification = new Lang.Class({
this.updated();
},
// setButtonSensitive:
// @id: the action ID
// @sensitive: whether the button should be sensitive
//
// If the notification contains a button with action ID @id,
// its sensitivity will be set to @sensitive. Insensitive
// buttons cannot be clicked.
setButtonSensitive: function(id, sensitive) {
if (!this._buttonBox)
return;
let button = this._buttonBox.get_children().filter(function(b) {
return b._actionId == id;
})[0];
if (!button || button.reactive == sensitive)
return;
button.reactive = sensitive;
if (sensitive)
button.remove_style_pseudo_class('insensitive');
else
button.add_style_pseudo_class('insensitive');
},
setUrgency: function(urgency) {
this.urgency = urgency;
},
@ -986,10 +958,8 @@ const Source = new Lang.Class({
ICON_SIZE: 24,
_init: function(title, iconName, iconType) {
_init: function(title) {
this.title = title;
this.iconName = iconName;
this.iconType = iconType;
this.actor = new Shell.GenericContainer();
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
@ -1019,8 +989,6 @@ const Source = new Lang.Class({
this.isMuted = false;
this.notifications = [];
this._setSummaryIcon(this.createNotificationIcon());
},
_getPreferredWidth: function (actor, forHeight, alloc) {
@ -1091,12 +1059,10 @@ const Source = new Lang.Class({
},
// Called to create a new icon actor (of size this.ICON_SIZE).
// Provides a sane default implementation, override if you need
// something more fancy.
// Must be overridden by the subclass if you do not pass icons
// explicitly to the Notification() constructor.
createNotificationIcon: function() {
return new St.Icon({ icon_name: this.iconName,
icon_type: this.iconType,
icon_size: this.ICON_SIZE });
throw new Error('no implementation of createNotificationIcon in ' + this);
},
// Unlike createNotificationIcon, this always returns the same actor;
@ -1147,14 +1113,16 @@ const Source = new Lang.Class({
},
//// Protected methods ////
// The subclass must call this at least once to set the summary icon.
_setSummaryIcon: function(icon) {
if (this._iconBin.child)
this._iconBin.child.destroy();
this._iconBin.child = icon;
},
// Default implementation is to do nothing, but subclasses can override
open: function(notification) {
this.emit('opened', notification);
},
destroyNonResidentNotifications: function() {
@ -2519,7 +2487,15 @@ const SystemNotificationSource = new Lang.Class({
Extends: Source,
_init: function() {
this.parent(_("System Information"), 'dialog-information', St.IconType.SYMBOLIC);
this.parent(_("System Information"));
this._setSummaryIcon(this.createNotificationIcon());
},
createNotificationIcon: function() {
return new St.Icon({ icon_name: 'dialog-information',
icon_type: St.IconType.SYMBOLIC,
icon_size: this.ICON_SIZE });
},
open: function() {

View File

@ -483,7 +483,7 @@ const NotificationDaemon = new Lang.Class({
},
_onTrayIconAdded: function(o, icon) {
let source = this._getSource(icon.title || icon.wm_class || C_("program", "Unknown"), icon.pid, null, null, icon);
let source = this._getSource(icon.title || icon.wm_class || _("Unknown"), icon.pid, null, null, icon);
},
_onTrayIconRemoved: function(o, icon) {
@ -578,27 +578,11 @@ const Source = new Lang.Class({
return true;
},
_getApp: function() {
let app;
app = Shell.WindowTracker.get_default().get_app_from_pid(this.pid);
if (app != null)
return app;
if (this.trayIcon) {
app = Shell.AppSystem.get_default().lookup_wmclass(this.trayIcon.wmclass);
if (app != null)
return app;
}
return null;
},
_setApp: function() {
if (this.app)
return;
this.app = this._getApp();
this.app = Shell.WindowTracker.get_default().get_app_from_pid(this.pid);
if (!this.app)
return;
@ -638,10 +622,5 @@ const Source = new Lang.Class({
}
this.parent();
},
createNotificationIcon: function() {
// We set the summary icon ourselves.
return null;
}
});

View File

@ -99,8 +99,10 @@ const ShellInfo = new Lang.Class({
const Overview = new Lang.Class({
Name: 'Overview',
_init : function() {
this.isDummy = !Main.sessionMode.hasOverview;
_init : function(params) {
params = Params.parse(params, { isDummy: false });
this.isDummy = params.isDummy;
// We only have an overview in user sessions, so
// create a dummy overview in other cases

View File

@ -14,6 +14,7 @@ const St = imports.gi.St;
const Signals = imports.signals;
const Atk = imports.gi.Atk;
const Config = imports.misc.config;
const CtrlAltTab = imports.ui.ctrlAltTab;
const DND = imports.ui.dnd;
const Layout = imports.ui.layout;
@ -31,6 +32,33 @@ const BUTTON_DND_ACTIVATION_TIMEOUT = 250;
const ANIMATED_ICON_UPDATE_TIMEOUT = 100;
const SPINNER_ANIMATION_TIME = 0.2;
const STANDARD_STATUS_AREA_ORDER = ['a11y', 'keyboard', 'volume', 'bluetooth', 'network', 'battery', 'userMenu'];
const STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION = {
'a11y': imports.ui.status.accessibility.ATIndicator,
'volume': imports.ui.status.volume.Indicator,
'battery': imports.ui.status.power.Indicator,
'keyboard': imports.ui.status.keyboard.XKBIndicator,
'userMenu': imports.ui.userMenu.UserMenuButton
};
if (Config.HAVE_BLUETOOTH)
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['bluetooth'] = imports.ui.status.bluetooth.Indicator;
try {
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
} catch(e) {
log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
}
const GDM_STATUS_AREA_ORDER = ['a11y', 'display', 'keyboard', 'volume', 'battery', 'powerMenu'];
const GDM_STATUS_AREA_SHELL_IMPLEMENTATION = {
'a11y': imports.ui.status.accessibility.ATIndicator,
'volume': imports.ui.status.volume.Indicator,
'battery': imports.ui.status.power.Indicator,
'keyboard': imports.ui.status.keyboard.XKBIndicator,
'powerMenu': imports.gdm.powerMenu.PowerMenuButton
};
// To make sure the panel corners blend nicely with the panel,
// we draw background and borders the same way, e.g. drawing
// them as filled shapes from the outside inwards instead of
@ -934,7 +962,7 @@ const Panel = new Lang.Class({
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
/* Button on the left side of the panel. */
if (Main.sessionMode.hasOverview) {
if (global.session_type == Shell.SessionType.USER) {
this._activitiesButton = new ActivitiesButton();
this._activities = this._activitiesButton.actor;
this._leftBox.add(this._activities);
@ -942,19 +970,28 @@ const Panel = new Lang.Class({
// The activities button has a pretend menu, so as to integrate
// more cleanly with the rest of the panel
this._menus.addMenu(this._activitiesButton.menu);
}
if (Main.sessionMode.hasAppMenu) {
this._appMenu = new AppMenuButton(this._menus);
this._leftBox.add(this._appMenu.actor);
}
/* center */
this._dateMenu = new DateMenu.DateMenuButton();
if (global.session_type == Shell.SessionType.USER)
this._dateMenu = new DateMenu.DateMenuButton({ showEvents: true });
else
this._dateMenu = new DateMenu.DateMenuButton({ showEvents: false });
this._centerBox.add(this._dateMenu.actor, { y_fill: true });
this._menus.addMenu(this._dateMenu.menu);
/* right */
if (global.session_type == Shell.SessionType.GDM) {
this._status_area_order = GDM_STATUS_AREA_ORDER;
this._status_area_shell_implementation = GDM_STATUS_AREA_SHELL_IMPLEMENTATION;
} else {
this._status_area_order = STANDARD_STATUS_AREA_ORDER;
this._status_area_shell_implementation = STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION;
}
Main.statusIconDispatcher.connect('status-icon-added', Lang.bind(this, this._onTrayIconAdded));
Main.statusIconDispatcher.connect('status-icon-removed', Lang.bind(this, this._onTrayIconRemoved));
@ -1078,17 +1115,17 @@ const Panel = new Lang.Class({
openAppMenu: function() {
let menu = this._appMenu.menu;
if (!this._appMenu.actor.reactive || menu.isOpen)
return;
if (Main.overview.visible || menu.isOpen)
return;
menu.open();
menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
},
startStatusArea: function() {
for (let i = 0; i < Main.sessionMode.statusArea.order.length; i++) {
let role = Main.sessionMode.statusArea.order[i];
let constructor = Main.sessionMode.statusArea.implementation[role];
for (let i = 0; i < this._status_area_order.length; i++) {
let role = this._status_area_order[i];
let constructor = this._status_area_shell_implementation[role];
if (!constructor) {
// This icon is not implemented (this is a bug)
continue;
@ -1138,21 +1175,18 @@ const Panel = new Lang.Class({
},
_onTrayIconAdded: function(o, icon, role) {
if (Main.sessionMode.statusArea.implementation[role]) {
if (this._status_area_shell_implementation[role]) {
// This icon is legacy, and replaced by a Shell version
// Hide it
return;
}
if (Main.sessionMode.statusArea.order.indexOf(role) == -1)
return;
icon.height = PANEL_ICON_SIZE;
let buttonBox = new PanelMenu.ButtonBox();
let box = buttonBox.actor;
box.add_actor(icon);
this._insertStatusItem(box, Main.sessionMode.statusArea.order.indexOf(role));
this._insertStatusItem(box, this._status_area_order.indexOf(role));
},
_onTrayIconRemoved: function(o, icon) {

View File

@ -189,7 +189,7 @@ const PlacesManager = new Lang.Class({
this._volumeMonitor.connect('drive-changed', Lang.bind(this, this._updateDevices));
this._updateDevices();
this._bookmarksPath = GLib.build_filenamev([GLib.get_user_config_dir(), 'gtk-3.0', 'bookmarks']);
this._bookmarksPath = GLib.build_filenamev([GLib.get_home_dir(), '.gtk-bookmarks']);
this._bookmarksFile = Gio.file_new_for_path(this._bookmarksPath);
this._monitor = this._bookmarksFile.monitor_file(Gio.FileMonitorFlags.NONE, null);
this._bookmarkTimeoutId = 0;
@ -365,13 +365,12 @@ const PlaceSearchProvider = new Lang.Class({
_init: function() {
this.parent(_("PLACES & DEVICES"));
this.placesManager = new PlacesManager();
},
getResultMetas: function(resultIds, callback) {
getResultMetas: function(resultIds) {
let metas = [];
for (let i = 0; i < resultIds.length; i++) {
let placeInfo = this.placesManager.lookupPlaceById(resultIds[i]);
let placeInfo = Main.placesManager.lookupPlaceById(resultIds[i]);
if (!placeInfo)
metas.push(null);
else
@ -382,22 +381,24 @@ const PlaceSearchProvider = new Lang.Class({
}
});
}
callback(metas);
return metas;
},
activateResult: function(id, params) {
let placeInfo = this.placesManager.lookupPlaceById(id);
let placeInfo = Main.placesManager.lookupPlaceById(id);
placeInfo.launch(params);
},
_compareResultMeta: function (idA, idB) {
let infoA = this.placesManager.lookupPlaceById(idA);
let infoB = this.placesManager.lookupPlaceById(idB);
let infoA = Main.placesManager.lookupPlaceById(idA);
let infoB = Main.placesManager.lookupPlaceById(idB);
return infoA.name.localeCompare(infoB.name);
},
_searchPlaces: function(places, terms) {
let multiplePrefixResults = [];
let prefixResults = [];
let multipleSubstringResults = [];
let substringResults = [];
terms = terms.map(String.toLowerCase);
@ -405,26 +406,29 @@ const PlaceSearchProvider = new Lang.Class({
for (let i = 0; i < places.length; i++) {
let place = places[i];
let mtype = place.matchTerms(terms);
if (mtype == Search.MatchType.PREFIX)
if (mtype == Search.MatchType.MULTIPLE_PREFIX)
multiplePrefixResults.push(place.id);
else if (mtype == Search.MatchType.PREFIX)
prefixResults.push(place.id);
else if (mtype == Search.MatchType.MULTIPLE_SUBSTRING)
multipleSubstringResults.push(place.id);
else if (mtype == Search.MatchType.SUBSTRING)
substringResults.push(place.id);
}
prefixResults.sort(Lang.bind(this, this._compareResultMeta));
substringResults.sort(Lang.bind(this, this._compareResultMeta));
this.searchSystem.pushResults(this, prefixResults.concat(substringResults));
multiplePrefixResults.sort(this._compareResultMeta);
prefixResults.sort(this._compareResultMeta);
multipleSubstringResults.sort(this._compareResultMeta);
substringResults.sort(this._compareResultMeta);
return multiplePrefixResults.concat(prefixResults.concat(multipleSubstringResults.concat(substringResults)));
},
getInitialResultSet: function(terms) {
let places = this.placesManager.getAllPlaces();
this._searchPlaces(places, terms);
let places = Main.placesManager.getAllPlaces();
return this._searchPlaces(places, terms);
},
getSubsearchResultSet: function(previousResults, terms) {
let places = previousResults.map(Lang.bind(this, function(id) {
return this.placesManager.lookupPlaceById(id);
}));
this._searchPlaces(places, terms);
let places = previousResults.map(function (id) { return Main.placesManager.lookupPlaceById(id); });
return this._searchPlaces(places, terms);
}
});

View File

@ -167,7 +167,6 @@ const AuthenticationDialog = new Lang.Class({
*/
this._nullMessageLabel = new St.Label({ style_class: 'prompt-dialog-null-label',
text: 'abc'});
this._nullMessageLabel.add_style_class_name('hidden');
this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._nullMessageLabel.clutter_text.line_wrap = true;
messageBox.add(this._nullMessageLabel);

View File

@ -546,10 +546,6 @@ const PopupSliderMenuItem = new Lang.Class({
this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint));
this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
this.actor.connect('notify::mapped', Lang.bind(this, function() {
if (!this.actor.mapped)
this._endDragging();
}));
this._releaseId = this._motionId = 0;
this._dragging = false;
@ -888,7 +884,8 @@ const PopupMenuBase = new Lang.Class({
},
addSettingsAction: function(title, desktopFile) {
if (!Main.sessionMode.allowSettings)
// Don't allow user settings to get edited unless we're in a user session
if (global.session_type != Shell.SessionType.USER)
return null;
let menuItem = this.addAction(title, function() {

View File

@ -91,6 +91,7 @@ const RemoteSearchProvider = new Lang.Class({
dbusName, dbusPath);
this.parent(title.toUpperCase());
this.async = true;
this._cancellable = new Gio.Cancellable();
},
@ -119,7 +120,7 @@ const RemoteSearchProvider = new Lang.Class({
this.searchSystem.pushResults(this, results[0]);
},
getInitialResultSet: function(terms) {
getInitialResultSetAsync: function(terms) {
this._cancellable.cancel();
this._cancellable.reset();
try {
@ -132,7 +133,7 @@ const RemoteSearchProvider = new Lang.Class({
}
},
getSubsearchResultSet: function(previousResults, newTerms) {
getSubsearchResultSetAsync: function(previousResults, newTerms) {
this._cancellable.cancel();
this._cancellable.reset();
try {
@ -163,7 +164,7 @@ const RemoteSearchProvider = new Lang.Class({
callback(resultMetas);
},
getResultMetas: function(ids, callback) {
getResultMetasAsync: function(ids, callback) {
this._cancellable.cancel();
this._cancellable.reset();
try {

View File

@ -18,7 +18,9 @@ const DISABLED_OPEN_SEARCH_PROVIDERS_KEY = 'disabled-open-search-providers';
const MatchType = {
NONE: 0,
SUBSTRING: 1,
PREFIX: 2
MULTIPLE_SUBSTRING: 2,
PREFIX: 3,
MULTIPLE_PREFIX: 4
};
const SearchResultDisplay = new Lang.Class({
@ -70,8 +72,11 @@ const SearchResultDisplay = new Lang.Class({
* Subclass this object to add a new result type
* to the search system, then call registerProvider()
* in SearchSystem with an instance.
* Search is asynchronous and uses the
* By default, search is synchronous and uses the
* getInitialResultSet()/getSubsearchResultSet() methods.
* For asynchronous search, set the async property to true
* and implement getInitialResultSetAsync()/getSubsearchResultSetAsync()
* instead.
*/
const SearchProvider = new Lang.Class({
Name: 'SearchProvider',
@ -79,6 +84,7 @@ const SearchProvider = new Lang.Class({
_init: function(title) {
this.title = title;
this.searchSystem = null;
this.async = false;
},
/**
@ -89,7 +95,7 @@ const SearchProvider = new Lang.Class({
* therefore a single term of length one or two), or when
* a new term is added.
*
* Should "return" an array of result identifier strings representing
* Should return an array of result identifier strings representing
* items which match the given search terms. This
* is expected to be a substring match on the metadata for a given
* item. Ordering of returned results is up to the discretion of the provider,
@ -99,9 +105,6 @@ const SearchProvider = new Lang.Class({
* description) before single matches
* * Put items which match on a prefix before non-prefix substring matches
*
* We say "return" above, but in order to make the query asynchronous, use
* this.searchSystem.pushResults();. The return value should be ignored.
*
* This function should be fast; do not perform unindexed full-text searches
* or network queries.
*/
@ -109,6 +112,18 @@ const SearchProvider = new Lang.Class({
throw new Error('Not implemented');
},
/**
* getInitialResultSetAsync:
* @terms: Array of search terms, treated as logical AND
*
* Like getInitialResultSet(), but the method should return immediately
* without a return value - use SearchSystem.pushResults() when the
* corresponding results are ready.
*/
getInitialResultSetAsync: function(terms) {
throw new Error('Not implemented');
},
/**
* getSubsearchResultSet:
* @previousResults: Array of item identifiers
@ -121,23 +136,46 @@ const SearchProvider = new Lang.Class({
*
* This allows search providers to only search through the previous
* result set, rather than possibly performing a full re-query.
*
* Similar to getInitialResultSet, the return value for this will
* be ignored; use this.searchSystem.pushResults();.
*/
getSubsearchResultSet: function(previousResults, newTerms) {
throw new Error('Not implemented');
},
/**
* getSubsearchResultSetAsync:
* @previousResults: Array of item identifiers
* @newTerms: Updated search terms
*
* Like getSubsearchResultSet(), but the method should return immediately
* without a return value - use SearchSystem.pushResults() when the
* corresponding results are ready.
*/
getSubsearchResultSetAsync: function(previousResults, newTerms) {
throw new Error('Not implemented');
},
/**
* getResultMetas:
* @ids: Result identifier strings
*
* Call callback with array of objects with 'id', 'name', (both strings) and
* Return an array of objects with 'id', 'name', (both strings) and
* 'createIcon' (function(size) returning a Clutter.Texture) properties
* with the same number of members as @ids
*/
getResultMetas: function(ids, callback) {
getResultMetas: function(ids) {
throw new Error('Not implemented');
},
/**
* getResultMetasAsync:
* @ids: Result identifier strings
* @callback: callback to pass the results to when ready
*
* Like getResultMetas(), but the method should return immediately
* without a return value - pass the results to the provided @callback
* when ready.
*/
getResultMetasAsync: function(ids, callback) {
throw new Error('Not implemented');
},
@ -341,33 +379,42 @@ const SearchSystem = new Lang.Class({
}
}
let previousResultsArr = this._previousResults;
let results = [];
this._previousTerms = terms;
this._previousResults = results;
if (isSubSearch) {
for (let i = 0; i < this._providers.length; i++) {
let [provider, previousResults] = previousResultsArr[i];
let [provider, previousResults] = this._previousResults[i];
try {
results.push([provider, []]);
provider.getSubsearchResultSet(previousResults, terms);
if (provider.async) {
provider.getSubsearchResultSetAsync(previousResults, terms);
results.push([provider, []]);
} else {
let providerResults = provider.getSubsearchResultSet(previousResults, terms);
results.push([provider, providerResults]);
}
} catch (error) {
log('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
global.log ('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
}
}
} else {
for (let i = 0; i < this._providers.length; i++) {
let provider = this._providers[i];
try {
results.push([provider, []]);
provider.getInitialResultSet(terms);
if (provider.async) {
provider.getInitialResultSetAsync(terms);
results.push([provider, []]);
} else {
let providerResults = provider.getInitialResultSet(terms);
results.push([provider, providerResults]);
}
} catch (error) {
log('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
global.log ('A ' + error.name + ' has occured in ' + provider.title + ': ' + error.message);
}
}
}
this._previousTerms = terms;
this._previousResults = results;
this.emit('search-completed', results);
},
});
Signals.addSignalMethods(SearchSystem.prototype);

View File

@ -5,7 +5,6 @@ const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
const Atk = imports.gi.Atk;
const DND = imports.ui.dnd;
const IconGrid = imports.ui.iconGrid;
@ -34,13 +33,12 @@ const SearchResult = new Lang.Class({
content = new St.Bin({ style_class: 'search-result-content',
reactive: true,
can_focus: true,
track_hover: true,
accessible_role: Atk.Role.PUSH_BUTTON });
track_hover: true });
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
{ createIcon: this.metaInfo['createIcon'] });
content.set_child(icon.actor);
this._dragActorSource = icon.icon;
content.label_actor = icon.label;
this.actor.label_actor = icon.label;
} else {
if (content._delegate && content._delegate.getDragActorSource)
this._dragActorSource = content._delegate.getDragActorSource();
@ -121,7 +119,13 @@ const GridSearchResults = new Lang.Class({
if (results.length == 0)
return;
provider.getResultMetas(results, Lang.bind(this, this.renderResults));
if (provider.async) {
provider.getResultMetasAsync(results,
Lang.bind(this, this.renderResults));
} else {
let metas = provider.getResultMetas(results);
this.renderResults(metas);
}
}));
}));
this._notDisplayedResult = [];
@ -131,7 +135,7 @@ const GridSearchResults = new Lang.Class({
getResultsForDisplay: function() {
let alreadyVisible = this._pendingClear ? 0 : this._grid.visibleItemsCount();
let canDisplay = this._grid.childrenInRow(this._width) * this._grid.getRowLimit()
let canDisplay = this._grid.childrenInRow(this._width) * MAX_SEARCH_RESULTS_ROWS
- alreadyVisible;
let numResults = Math.min(this._notDisplayedResult.length, canDisplay);
@ -175,7 +179,8 @@ const SearchResults = new Lang.Class({
_init: function(searchSystem, openSearchSystem) {
this._searchSystem = searchSystem;
this._searchSystem.connect('search-updated', Lang.bind(this, this._updateResults));
this._searchSystem.connect('search-updated', Lang.bind(this, this._updateCurrentResults));
this._searchSystem.connect('search-completed', Lang.bind(this, this._updateResults));
this._openSearchSystem = openSearchSystem;
this.actor = new St.BoxLayout({ name: 'searchResults',
@ -209,8 +214,10 @@ const SearchResults = new Lang.Class({
this._content.add(this._statusText);
this._providers = this._searchSystem.getProviders();
this._providerMeta = [];
this._providerMetaResults = {};
for (let i = 0; i < this._providers.length; i++) {
this.createProviderMeta(this._providers[i]);
this._providerMetaResults[this.providers[i].title] = [];
}
this._searchProvidersBox = new St.BoxLayout({ style_class: 'search-providers-box' });
this.actor.add(this._searchProvidersBox);
@ -283,7 +290,8 @@ const SearchResults = new Lang.Class({
this._providerMeta.push({ provider: provider,
actor: providerBox,
resultDisplay: resultDisplay });
resultDisplay: resultDisplay,
hasPendingResults: false });
this._content.add(providerBox);
},
@ -299,6 +307,7 @@ const SearchResults = new Lang.Class({
},
_clearDisplay: function() {
this._visibleResultsCount = 0;
for (let i = 0; i < this._providerMeta.length; i++) {
let meta = this._providerMeta[i];
meta.resultDisplay.clear();
@ -326,8 +335,6 @@ const SearchResults = new Lang.Class({
doSearch: function (searchString) {
this._searchSystem.updateSearch(searchString);
let terms = this._searchSystem.getTerms();
this._openSearchSystem.setSearchTerms(terms);
},
_metaForProvider: function(provider) {
@ -339,6 +346,8 @@ const SearchResults = new Lang.Class({
for (let i = 0; i < this._providerMeta.length; i++) {
let meta = this._providerMeta[i];
if (meta.hasPendingResults)
return;
if (!meta.actor.visible)
continue;
@ -363,57 +372,71 @@ const SearchResults = new Lang.Class({
}
},
_updateStatusText: function () {
let haveResults = false;
_updateCurrentResults: function(searchSystem, results) {
let terms = searchSystem.getTerms();
let [provider, providerResults] = results;
let meta = this._metaForProvider(provider);
meta.hasPendingResults = false;
this._updateProviderResults(provider, providerResults, terms);
},
for (let i = 0; i < this._providerMeta.length; ++i)
if (this._providerMeta[i].resultDisplay.getFirstResult()) {
haveResults = true;
break;
_updateProviderResults: function(provider, providerResults, terms) {
let meta = this._metaForProvider(provider);
if (providerResults.length == 0) {
this._clearDisplayForProvider(provider);
meta.resultDisplay.setResults([], []);
} else {
this._providerMetaResults[provider.title] = providerResults;
meta.resultDisplay.setResults(providerResults, terms);
let results = meta.resultDisplay.getResultsForDisplay();
if (provider.async) {
provider.getResultMetasAsync(results, Lang.bind(this,
function(metas) {
this._clearDisplayForProvider(provider);
meta.actor.show();
this._content.hide();
meta.resultDisplay.renderResults(metas);
this._maybeSetInitialSelection();
this._content.show();
}));
} else {
let metas = provider.getResultMetas(results);
this._clearDisplayForProvider(provider);
meta.actor.show();
meta.resultDisplay.renderResults(metas);
}
}
this._maybeSetInitialSelection();
},
if (!haveResults) {
_updateResults: function(searchSystem, results) {
if (results.length == 0) {
this._statusText.set_text(_("No matching results."));
this._statusText.show();
} else {
this._statusText.hide();
}
},
_updateResults: function(searchSystem, results) {
let terms = searchSystem.getTerms();
let [provider, providerResults] = results;
let meta = this._metaForProvider(provider);
this._openSearchSystem.setSearchTerms(terms);
if (providerResults.length == 0) {
this._clearDisplayForProvider(provider);
meta.resultDisplay.setResults([], []);
this._maybeSetInitialSelection();
this._updateStatusText();
} else {
meta.resultDisplay.setResults(providerResults, terms);
let results = meta.resultDisplay.getResultsForDisplay();
// To avoid CSS transitions causing flickering when the first search
// result stays the same, we hide the content while filling in the
// results.
this._content.hide();
provider.getResultMetas(results, Lang.bind(this, function(metas) {
this._clearDisplayForProvider(provider);
meta.actor.show();
// Hiding drops the key focus if we have it
let focus = global.stage.get_key_focus();
// To avoid CSS transitions causing flickering when
// the first search result stays the same, we hide the
// content while filling in the results.
this._content.hide();
meta.resultDisplay.renderResults(metas);
this._maybeSetInitialSelection();
this._updateStatusText();
this._content.show();
if (this._content.contains(focus))
global.stage.set_key_focus(focus);
}));
for (let i = 0; i < results.length; i++) {
let [provider, providerResults] = results[i];
let meta = this._metaForProvider(provider);
meta.hasPendingResults = provider.async;
if (!meta.hasPendingResults)
this._updateProviderResults(provider, providerResults, terms);
}
this._content.show();
return true;
},
activateDefault: function() {

View File

@ -1,124 +0,0 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Lang = imports.lang;
const Config = imports.misc.config;
const Main = imports.ui.main;
const Params = imports.misc.params;
const STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION = {
'a11y': imports.ui.status.accessibility.ATIndicator,
'volume': imports.ui.status.volume.Indicator,
'battery': imports.ui.status.power.Indicator,
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
'userMenu': imports.ui.userMenu.UserMenuButton
};
if (Config.HAVE_BLUETOOTH)
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['bluetooth'] =
imports.ui.status.bluetooth.Indicator;
try {
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] =
imports.ui.status.network.NMApplet;
} catch(e) {
log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
}
const DEFAULT_MODE = 'user';
const _modes = {
'gdm': { hasOverview: false,
hasAppMenu: false,
showCalendarEvents: false,
allowSettings: false,
allowExtensions: false,
allowKeybindingsWhenModal: true,
hasRunDialog: false,
hasWorkspaces: false,
createSession: Main.createGDMSession,
extraStylesheet: global.datadir + '/theme/gdm.css',
statusArea: {
order: [
'a11y', 'display', 'keyboard',
'volume', 'battery', 'powerMenu'
],
implementation: {
'a11y': imports.ui.status.accessibility.ATIndicator,
'volume': imports.ui.status.volume.Indicator,
'battery': imports.ui.status.power.Indicator,
'keyboard': imports.ui.status.keyboard.InputSourceIndicator,
'powerMenu': imports.gdm.powerMenu.PowerMenuButton
}
}
},
'initial-setup': { hasOverview: false,
hasAppMenu: false,
showCalendarEvents: false,
allowSettings: false,
allowExtensions: false,
allowKeybindingsWhenModal: false,
hasRunDialog: false,
hasWorkspaces: false,
createSession: Main.createInitialSetupSession,
extraStylesheet: null,
statusArea: {
order: [
'a11y', 'keyboard', 'volume'
],
implementation: {
'a11y': imports.ui.status.accessibility.ATIndicator,
'keyboard': imports.ui.status.keyboard.XKBIndicator,
'volume': imports.ui.status.volume.Indicator
}
}
},
'user': { hasOverview: true,
hasAppMenu: true,
showCalendarEvents: true,
allowSettings: true,
allowExtensions: true,
allowKeybindingsWhenModal: false,
hasRunDialog: true,
hasWorkspaces: true,
createSession: Main.createUserSession,
extraStylesheet: null,
statusArea: {
order: [
'input-method', 'a11y', 'keyboard', 'volume', 'bluetooth',
'network', 'battery', 'userMenu'
],
implementation: STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION
}
}
};
function listModes() {
let modes = Object.getOwnPropertyNames(_modes);
for (let i = 0; i < modes.length; i++)
print(modes[i]);
}
const SessionMode = new Lang.Class({
Name: 'SessionMode',
_init: function() {
let params = _modes[global.session_mode];
params = Params.parse(params, _modes[DEFAULT_MODE]);
this._createSession = params.createSession;
delete params.createSession;
Lang.copyProperties(params, this);
},
createSession: function() {
if (this._createSession)
this._createSession();
}
});

View File

@ -56,8 +56,15 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
<arg type="i" direction="in" name="width"/>
<arg type="i" direction="in" name="height"/>
</method>
<method name="EnableExtension">
<arg type="s" direction="in" name="uuid"/>
</method>
<method name="DisableExtension">
<arg type="s" direction="in" name="uuid"/>
</method>
<method name="InstallRemoteExtension">
<arg type="s" direction="in" name="uuid"/>
<arg type="s" direction="in" name="version"/>
</method>
<method name="UninstallExtension">
<arg type="s" direction="in" name="uuid"/>
@ -253,8 +260,22 @@ const GnomeShell = new Lang.Class({
return extension.errors;
},
InstallRemoteExtension: function(uuid) {
ExtensionSystem.installExtensionFromUUID(uuid);
EnableExtension: function(uuid) {
let enabledExtensions = global.settings.get_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY);
if (enabledExtensions.indexOf(uuid) == -1)
enabledExtensions.push(uuid);
global.settings.set_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY, enabledExtensions);
},
DisableExtension: function(uuid) {
let enabledExtensions = global.settings.get_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY);
while (enabledExtensions.indexOf(uuid) != -1)
enabledExtensions.splice(enabledExtensions.indexOf(uuid), 1);
global.settings.set_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY, enabledExtensions);
},
InstallRemoteExtension: function(uuid, version_tag) {
ExtensionSystem.installExtensionFromUUID(uuid, version_tag);
},
UninstallExtension: function(uuid) {

View File

@ -48,6 +48,11 @@ function _setLabelsForMessage(dialog, message) {
_setLabelText(dialog.descriptionLabel, labels[1]);
}
function _createIcon(gicon) {
return new St.Icon({ gicon: gicon,
style_class: 'shell-mount-operation-icon' })
}
/* -------------------------------------------------------- */
const ListItem = new Lang.Class({
@ -109,12 +114,11 @@ const ShellMountOperation = new Lang.Class({
this.mountOp.connect('aborted',
Lang.bind(this, this._onAborted));
this._icon = new St.Icon({ gicon: source.get_icon(),
style_class: 'shell-mount-operation-icon' });
this._gicon = source.get_icon();
},
_onAskQuestion: function(op, message, choices) {
this._dialog = new ShellMountQuestionDialog(this._icon);
this._dialog = new ShellMountQuestionDialog(this._gicon);
this._dialog.connect('response',
Lang.bind(this, function(object, choice) {
@ -131,7 +135,7 @@ const ShellMountOperation = new Lang.Class({
_onAskPassword: function(op, message) {
this._notificationShowing = true;
this._source = new ShellMountPasswordSource(message, this._icon, this._reaskPassword);
this._source = new ShellMountPasswordSource(message, this._gicon, this._reaskPassword);
this._source.connect('password-ready',
Lang.bind(this, function(source, password) {
@ -166,7 +170,7 @@ const ShellMountOperation = new Lang.Class({
let message = op.get_show_processes_message();
if (!this._processesDialog) {
this._processesDialog = new ShellProcessesDialog(this._icon);
this._processesDialog = new ShellProcessesDialog(this._gicon);
this._dialog = this._processesDialog;
this._processesDialog.connect('response',
@ -192,14 +196,14 @@ const ShellMountQuestionDialog = new Lang.Class({
Name: 'ShellMountQuestionDialog',
Extends: ModalDialog.ModalDialog,
_init: function(icon) {
_init: function(gicon) {
this.parent({ styleClass: 'mount-question-dialog' });
let mainContentLayout = new St.BoxLayout();
this.contentLayout.add(mainContentLayout, { x_fill: true,
y_fill: false });
this._iconBin = new St.Bin({ child: icon });
this._iconBin = new St.Bin({ child: _createIcon(gicon) });
mainContentLayout.add(this._iconBin,
{ x_fill: true,
y_fill: false,
@ -238,17 +242,21 @@ const ShellMountPasswordSource = new Lang.Class({
Name: 'ShellMountPasswordSource',
Extends: MessageTray.Source,
_init: function(message, icon, reaskPassword) {
_init: function(message, gicon, reaskPassword) {
this._gicon = gicon;
let strings = message.split('\n');
this.parent(strings[0]);
this._notification = new ShellMountPasswordNotification(this, strings, icon, reaskPassword);
this._setSummaryIcon(icon);
this._notification = new ShellMountPasswordNotification(this, strings, reaskPassword);
// add ourselves as a source, and popup the notification
Main.messageTray.add(this);
this.notify(this._notification);
},
createNotificationIcon: function() {
return _createIcon(this._gicon);
},
});
Signals.addSignalMethods(ShellMountPasswordSource.prototype);
@ -256,8 +264,8 @@ const ShellMountPasswordNotification = new Lang.Class({
Name: 'ShellMountPasswordNotification',
Extends: MessageTray.Notification,
_init: function(source, strings, icon, reaskPassword) {
this.parent(source, strings[0], null, { customContent: true, icon: icon });
_init: function(source, strings, reaskPassword) {
this.parent(source, strings[0], null, { customContent: true });
// set the notification to transient and urgent, so that it
// expands out
@ -298,14 +306,14 @@ const ShellProcessesDialog = new Lang.Class({
Name: 'ShellProcessesDialog',
Extends: ModalDialog.ModalDialog,
_init: function(icon) {
_init: function(gicon) {
this.parent({ styleClass: 'show-processes-dialog' });
let mainContentLayout = new St.BoxLayout();
this.contentLayout.add(mainContentLayout, { x_fill: true,
y_fill: false });
this._iconBin = new St.Bin({ child: icon });
this._iconBin = new St.Bin({ child: _createIcon(gicon) });
mainContentLayout.add(this._iconBin,
{ x_fill: true,
y_fill: false,

View File

@ -106,7 +106,10 @@ const Indicator = new Lang.Class({
/* TRANSLATORS: this means that bluetooth was disabled by hardware rfkill */
this._killswitch.setStatus(_("hardware disabled"));
this.actor.visible = has_adapter;
if (has_adapter)
this.actor.show();
else
this.actor.hide();
if (on) {
this._discoverable.actor.show();
@ -305,7 +308,7 @@ const Indicator = new Lang.Class({
_ensureSource: function() {
if (!this._source) {
this._source = new MessageTray.Source(_("Bluetooth"), 'bluetooth-active', St.IconType.SYMBOLIC);
this._source = new Source();
Main.messageTray.add(this._source);
}
},
@ -330,6 +333,35 @@ const Indicator = new Lang.Class({
}
});
const Source = new Lang.Class({
Name: 'BluetoothSource',
Extends: MessageTray.Source,
_init: function() {
this.parent(_("Bluetooth"));
this._setSummaryIcon(this.createNotificationIcon());
},
notify: function(notification) {
this._private_destroyId = notification.connect('destroy', Lang.bind(this, function(notification) {
if (this.notification == notification) {
// the destroyed notification is the last for this source
this.notification.disconnect(this._private_destroyId);
this.destroy();
}
}));
this.parent(notification);
},
createNotificationIcon: function() {
return new St.Icon({ icon_name: 'bluetooth-active',
icon_type: St.IconType.SYMBOLIC,
icon_size: this.ICON_SIZE });
}
});
const AuthNotification = new Lang.Class({
Name: 'AuthNotification',
Extends: MessageTray.Notification,
@ -380,7 +412,7 @@ const ConfirmNotification = new Lang.Class({
this._applet = applet;
this._devicePath = device_path;
this.addBody(_("Device %s wants to pair with this computer").format(long_name));
this.addBody(_("Please confirm whether the PIN '%06d' matches the one on the device.").format(pin));
this.addBody(_("Please confirm whether the PIN '%s' matches the one on the device.").format(pin));
this.addButton('matches', _("Matches"));
this.addButton('does-not-match', _("Does not match"));
@ -416,8 +448,7 @@ const PinNotification = new Lang.Class({
this._entry.connect('key-release-event', Lang.bind(this, function(entry, event) {
let key = event.get_key_symbol();
if (key == Clutter.KEY_Return) {
if (this._canActivateOkButton())
this.emit('action-invoked', 'ok');
this.emit('action-invoked', 'ok');
return true;
} else if (key == Clutter.KEY_Escape) {
this.emit('action-invoked', 'cancel');
@ -430,12 +461,6 @@ const PinNotification = new Lang.Class({
this.addButton('ok', _("OK"));
this.addButton('cancel', _("Cancel"));
this.setButtonSensitive('ok', this._canActivateOkButton());
this._entry.clutter_text.connect('text-changed', Lang.bind(this,
function() {
this.setButtonSensitive('ok', this._canActivateOkButton());
}));
this.connect('action-invoked', Lang.bind(this, function(self, action) {
if (action == 'ok') {
if (this._numeric) {
@ -458,11 +483,6 @@ const PinNotification = new Lang.Class({
}));
},
_canActivateOkButton: function() {
// PINs have a fixed length of 6
return this._entry.clutter_text.text.length == 6;
},
grabFocus: function(lockTray) {
this.parent(lockTray);
global.stage.set_key_focus(this._entry);

View File

@ -2,9 +2,9 @@
const Clutter = imports.gi.Clutter;
const GdkPixbuf = imports.gi.GdkPixbuf;
const Gkbd = imports.gi.Gkbd;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const GnomeDesktop = imports.gi.GnomeDesktop;
const Lang = imports.lang;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
@ -14,28 +14,30 @@ const PopupMenu = imports.ui.popupMenu;
const PanelMenu = imports.ui.panelMenu;
const Util = imports.misc.util;
const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources';
const KEY_CURRENT_INPUT_SOURCE = 'current';
const KEY_INPUT_SOURCES = 'sources';
const INPUT_SOURCE_TYPE_XKB = 'xkb';
const LayoutMenuItem = new Lang.Class({
Name: 'LayoutMenuItem',
Extends: PopupMenu.PopupBaseMenuItem,
_init: function(displayName, shortName) {
_init: function(config, id, indicator, long_name) {
this.parent();
this.label = new St.Label({ text: displayName });
this.indicator = new St.Label({ text: shortName });
this._config = config;
this._id = id;
this.label = new St.Label({ text: long_name });
this.indicator = indicator;
this.addActor(this.label);
this.addActor(this.indicator);
},
activate: function(event) {
this.parent(event);
this._config.lock_group(this._id);
}
});
const InputSourceIndicator = new Lang.Class({
Name: 'InputSourceIndicator',
const XKBIndicator = new Lang.Class({
Name: 'XKBIndicator',
Extends: PanelMenu.Button,
_init: function() {
@ -48,144 +50,122 @@ const InputSourceIndicator = new Lang.Class({
this.actor.add_actor(this._container);
this.actor.add_style_class_name('panel-status-button');
this._labelActors = {};
this._layoutItems = {};
this._iconActor = new St.Icon({ icon_name: 'keyboard', icon_type: St.IconType.SYMBOLIC, style_class: 'system-status-icon' });
this._container.add_actor(this._iconActor);
this._labelActors = [ ];
this._layoutItems = [ ];
this._settings = new Gio.Settings({ schema: DESKTOP_INPUT_SOURCES_SCHEMA });
this._settings.connect('changed::' + KEY_CURRENT_INPUT_SOURCE, Lang.bind(this, this._currentInputSourceChanged));
this._settings.connect('changed::' + KEY_INPUT_SOURCES, Lang.bind(this, this._inputSourcesChanged));
this._showFlags = false;
this._config = Gkbd.Configuration.get();
this._config.connect('changed', Lang.bind(this, this._syncConfig));
this._config.connect('group-changed', Lang.bind(this, this._syncGroup));
this._config.start_listen();
this._currentSourceIndex = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
this._xkbInfo = new GnomeDesktop.XkbInfo();
this._syncConfig();
this._inputSourcesChanged();
// re-using "allowSettings" for the keyboard layout is a bit shady,
// but at least for now it is used as "allow popping up windows
// from shell menus"; we can always add a separate sessionMode
// option if need arises.
if (Main.sessionMode.allowSettings) {
if (global.session_type == Shell.SessionType.USER) {
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, this._showLayout));
this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
Main.overview.hide();
Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
}));
}
this.menu.addSettingsAction(_("Region and Language Settings"), 'gnome-region-panel.desktop');
},
_currentInputSourceChanged: function() {
let nVisibleSources = Object.keys(this._layoutItems).length;
if (nVisibleSources < 2)
return;
_adjustGroupNames: function(names) {
// Disambiguate duplicate names with a subscript
// This is O(N^2) to avoid sorting names
// but N <= 4 so who cares?
let nSources = this._settings.get_value(KEY_INPUT_SOURCES).n_children();
let newCurrentSourceIndex = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
if (newCurrentSourceIndex >= nSources)
return;
if (!this._layoutItems[newCurrentSourceIndex]) {
// This source index is invalid as we weren't able to
// build a menu item for it, so we hide ourselves since we
// can't fix it here. *shrug*
this.menu.close();
this.actor.hide();
return;
} else {
this.actor.show();
for (let i = 0; i < names.length; i++) {
let name = names[i];
let cnt = 0;
for (let j = i + 1; j < names.length; j++) {
if (names[j] == name) {
cnt++;
// U+2081 SUBSCRIPT ONE
names[j] = name + String.fromCharCode(0x2081 + cnt);
}
}
if (cnt != 0)
names[i] = name + '\u2081';
}
if (this._layoutItems[this._currentSourceIndex]) {
this._layoutItems[this._currentSourceIndex].setShowDot(false);
this._container.set_skip_paint(this._labelActors[this._currentSourceIndex], true);
}
this._layoutItems[newCurrentSourceIndex].setShowDot(true);
this._container.set_skip_paint(this._labelActors[newCurrentSourceIndex], false);
this._currentSourceIndex = newCurrentSourceIndex;
return names;
},
_inputSourcesChanged: function() {
let sources = this._settings.get_value(KEY_INPUT_SOURCES);
let nSources = sources.n_children();
for (let i in this._layoutItems)
this._layoutItems[i].destroy();
for (let i in this._labelActors)
this._labelActors[i].destroy();
this._layoutItems = {};
this._labelActors = {};
let infos = [];
let infosByShortName = {};
for (let i = 0; i < nSources; i++) {
let [type, id] = sources.get_child_value(i).deep_unpack();
if (type != INPUT_SOURCE_TYPE_XKB)
continue;
let info = {};
[info.exists, info.displayName, info.shortName, , ] =
this._xkbInfo.get_layout_info(id);
if (!info.exists)
continue;
info.sourceIndex = i;
if (!(info.shortName in infosByShortName))
infosByShortName[info.shortName] = [];
infosByShortName[info.shortName].push(info);
infos.push(info);
_syncConfig: function() {
this._showFlags = this._config.if_flags_shown();
if (this._showFlags) {
this._container.set_skip_paint(this._iconActor, false);
} else {
this._container.set_skip_paint(this._iconActor, true);
}
if (infos.length > 1) {
let groups = this._config.get_group_names();
if (groups.length > 1) {
this.actor.show();
} else {
this.menu.close();
this.actor.hide();
}
for (let i = 0; i < infos.length; i++) {
let info = infos[i];
if (infosByShortName[info.shortName].length > 1) {
let sub = infosByShortName[info.shortName].indexOf(info) + 1;
info.shortName += String.fromCharCode(0x2080 + sub);
}
for (let i = 0; i < this._layoutItems.length; i++)
this._layoutItems[i].destroy();
let item = new LayoutMenuItem(info.displayName, info.shortName);
this._layoutItems[info.sourceIndex] = item;
for (let i = 0; i < this._labelActors.length; i++)
this._labelActors[i].destroy();
let short_names = this._adjustGroupNames(this._config.get_short_group_names());
this._selectedLayout = null;
this._layoutItems = [ ];
this._selectedLabel = null;
this._labelActors = [ ];
for (let i = 0; i < groups.length; i++) {
let icon_name = this._config.get_group_name(i);
let actor;
if (this._showFlags)
actor = new St.Icon({ icon_name: icon_name, icon_type: St.IconType.SYMBOLIC, style_class: 'popup-menu-icon' });
else
actor = new St.Label({ text: short_names[i] });
let item = new LayoutMenuItem(this._config, i, actor, groups[i]);
item._short_group_name = short_names[i];
item._icon_name = icon_name;
this._layoutItems.push(item);
this.menu.addMenuItem(item, i);
item.connect('activate', Lang.bind(this, function() {
this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
GLib.Variant.new_uint32(info.sourceIndex));
}));
let shortLabel = new St.Label({ text: info.shortName });
this._labelActors[info.sourceIndex] = shortLabel;
let shortLabel = new St.Label({ text: short_names[i] });
this._labelActors.push(shortLabel);
this._container.add_actor(shortLabel);
this._container.set_skip_paint(shortLabel, true);
}
this._currentInputSourceChanged();
this._syncGroup();
},
_showLayout: function() {
Main.overview.hide();
_syncGroup: function() {
let selected = this._config.get_current_group();
let sources = this._settings.get_value(KEY_INPUT_SOURCES);
let current = this._settings.get_uint(KEY_CURRENT_INPUT_SOURCE);
let id = sources.get_child_value(current).deep_unpack()[1];
let [, , , xkbLayout, xkbVariant] = this._xkbInfo.get_layout_info(id);
if (this._selectedLayout) {
this._selectedLayout.setShowDot(false);
this._selectedLayout = null;
}
if (!xkbLayout || xkbLayout.length == 0)
return;
if (this._selectedLabel) {
this._container.set_skip_paint(this._selectedLabel, true);
this._selectedLabel = null;
}
let description = xkbLayout;
if (xkbVariant.length > 0)
description = description + '\t' + xkbVariant;
let item = this._layoutItems[selected];
item.setShowDot(true);
Util.spawn(['gkbd-keyboard-display', '-l', description]);
this._iconActor.icon_name = item._icon_name;
this._selectedLabel = this._labelActors[selected];
this._container.set_skip_paint(this._selectedLabel, this._showFlags);
this._selectedLayout = item;
},
_containerGetPreferredWidth: function(container, for_height, alloc) {
@ -193,11 +173,15 @@ const InputSourceIndicator = new Lang.Class({
// for the height of all children, but we ignore the results
// for those we don't actually display.
let max_min_width = 0, max_natural_width = 0;
if (this._showFlags)
[max_min_width, max_natural_width] = this._iconActor.get_preferred_width(for_height);
for (let i in this._labelActors) {
for (let i = 0; i < this._labelActors.length; i++) {
let [min_width, natural_width] = this._labelActors[i].get_preferred_width(for_height);
max_min_width = Math.max(max_min_width, min_width);
max_natural_width = Math.max(max_natural_width, natural_width);
if (!this._showFlags) {
max_min_width = Math.max(max_min_width, min_width);
max_natural_width = Math.max(max_natural_width, natural_width);
}
}
alloc.min_size = max_min_width;
@ -206,11 +190,15 @@ const InputSourceIndicator = new Lang.Class({
_containerGetPreferredHeight: function(container, for_width, alloc) {
let max_min_height = 0, max_natural_height = 0;
for (let i in this._labelActors) {
if (this._showFlags)
[max_min_height, max_natural_height] = this._iconActor.get_preferred_height(for_width);
for (let i = 0; i < this._labelActors.length; i++) {
let [min_height, natural_height] = this._labelActors[i].get_preferred_height(for_width);
max_min_height = Math.max(max_min_height, min_height);
max_natural_height = Math.max(max_natural_height, natural_height);
if (!this._showFlags) {
max_min_height = Math.max(max_min_height, min_height);
max_natural_height = Math.max(max_natural_height, natural_height);
}
}
alloc.min_size = max_min_height;
@ -224,7 +212,8 @@ const InputSourceIndicator = new Lang.Class({
box.y2 -= box.y1;
box.y1 = 0;
for (let i in this._labelActors)
this._iconActor.allocate_align_fill(box, 0.5, 0, false, false, flags);
for (let i = 0; i < this._labelActors.length; i++)
this._labelActors[i].allocate_align_fill(box, 0.5, 0, false, false, flags);
}
});

View File

@ -304,10 +304,9 @@ const NMDevice = new Lang.Class({
// record the connection
let obj = {
connection: connections[i],
name: connections[i].get_id(),
uuid: connections[i].get_uuid(),
name: connections[i]._name,
uuid: connections[i]._uuid,
timestamp: connections[i]._timestamp,
item: null,
};
this._connections.push(obj);
}
@ -402,46 +401,48 @@ const NMDevice = new Lang.Class({
},
checkConnection: function(connection) {
let pos = this._findConnection(connection.get_uuid());
let pos = this._findConnection(connection._uuid);
let exists = pos != -1;
let valid = this.connectionValid(connection);
let similar = false;
if (exists) {
let existing = this._connections[pos];
// Check if connection changed name or id
similar = existing.name == connection.get_id() &&
existing.timestamp == connection._timestamp;
}
if (exists && valid && similar) {
// Nothing to do
return;
}
if (exists)
if (exists && !valid)
this.removeConnection(connection);
if (valid)
else if (!exists && valid)
this.addConnection(connection);
else if (exists && valid) {
// propagate changes and update the UI
if (this._connections[pos].timestamp != connection._timestamp) {
this._connections[pos].timestamp = connection._timestamp;
this._connections.sort(this._connectionSortFunction);
this._clearSection();
this._queueCreateSection();
}
}
},
addConnection: function(connection) {
// record the connection
let obj = {
connection: connection,
name: connection.get_id(),
uuid: connection.get_uuid(),
name: connection._name,
uuid: connection._uuid,
timestamp: connection._timestamp,
item: null,
};
Util.insertSorted(this._connections, obj, this._connectionSortFunction);
this._connections.push(obj);
this._connections.sort(this._connectionSortFunction);
this._clearSection();
this._queueCreateSection();
},
removeConnection: function(connection) {
let pos = this._findConnection(connection.get_uuid());
if (!connection._uuid) {
log('Cannot remove a connection without an UUID');
return;
}
let pos = this._findConnection(connection._uuid);
if (pos == -1) {
// this connection was never added, nothing to do here
return;
@ -706,15 +707,18 @@ const NMDeviceWired = new Lang.Class({
// the device
// we can do it here because addConnection and removeConnection
// both call _createSection at some point
this.section.actor.visible = this._connections.length > 1;
if (this._connections.length <= 1)
this.section.actor.hide();
else
this.section.actor.show();
},
_createAutomaticConnection: function() {
let connection = new NetworkManager.Connection();
let uuid = NetworkManager.utils_uuid_generate();
connection._uuid = NetworkManager.utils_uuid_generate();
connection.add_setting(new NetworkManager.SettingWired());
connection.add_setting(new NetworkManager.SettingConnection({
uuid: uuid,
uuid: connection._uuid,
id: this._autoConnectionName,
type: NetworkManager.SETTING_WIRED_SETTING_NAME,
autoconnect: true
@ -858,10 +862,10 @@ const NMDeviceBluetooth = new Lang.Class({
_createAutomaticConnection: function() {
let connection = new NetworkManager.Connection;
let uuid = NetworkManager.utils_uuid_generate();
connection._uuid = NetworkManager.utils_uuid_generate();
connection.add_setting(new NetworkManager.SettingBluetooth);
connection.add_setting(new NetworkManager.SettingConnection({
uuid: uuid,
uuid: connection._uuid,
id: this._autoConnectionName,
type: NetworkManager.SETTING_BLUETOOTH_SETTING_NAME,
autoconnect: false
@ -896,12 +900,12 @@ const NMDeviceVPN = new Lang.Class({
Name: 'NMDeviceVPN',
Extends: NMDevice,
_init: function(client, device, connections) {
_init: function(client) {
// Disable autoconnections
this._autoConnectionName = null;
this.category = NMConnectionCategory.VPN;
this.parent(client, null, connections);
this.parent(client, null, [ ]);
},
connectionValid: function(connection) {
@ -913,24 +917,13 @@ const NMDeviceVPN = new Lang.Class({
},
get connected() {
if (!this._activeConnection)
return false;
return this._activeConnection.vpn_state == NetworkManager.VPNConnectionState.ACTIVATED;
return !!this._activeConnection;
},
setActiveConnection: function(activeConnection) {
if (this._stateChangeId)
this._activeConnection.disconnect(this._stateChangeId);
this._stateChangeId = 0;
this.parent(activeConnection);
if (this._activeConnection)
this._stateChangeId = this._activeConnection.connect('vpn-state-changed',
Lang.bind(this, this._connectionStateChanged));
this.emit('state-changed');
this.emit('active-connection-changed');
},
_shouldShowConnectionList: function() {
@ -943,39 +936,7 @@ const NMDeviceVPN = new Lang.Class({
},
getStatusLabel: function() {
if (!this._activeConnection) // Same as DISCONNECTED
return null;
switch(this._activeConnection.vpn_state) {
case NetworkManager.VPNConnectionState.DISCONNECTED:
case NetworkManager.VPNConnectionState.ACTIVATED:
return null;
case NetworkManager.VPNConnectionState.PREPARE:
case NetworkManager.VPNConnectionState.CONNECT:
case NetworkManager.VPNConnectionState.IP_CONFIG_GET:
return _("connecting...");
case NetworkManager.VPNConnectionState.NEED_AUTH:
/* Translators: this is for network connections that require some kind of key or password */
return _("authentication required");
case NetworkManager.VPNConnectionState.FAILED:
return _("connection failed");
default:
log('VPN connection state invalid, is %d'.format(this.device.state));
return 'invalid';
}
},
_connectionStateChanged: function(connection, newstate, reason) {
if (newstate == NetworkManager.VPNConnectionState.FAILED) {
// FIXME: if we ever want to show something based on reason,
// we need to convert from NetworkManager.VPNConnectionStateReason
// to NetworkManager.DeviceStateReason
this.emit('activation-failed', reason);
}
// Differently from real NMDevices, there is no need to queue
// an update of the menu section, contents wouldn't change anyway
this.emit('state-changed');
return null;
}
});
@ -1077,8 +1038,13 @@ const NMDeviceWireless = new Lang.Class({
},
setEnabled: function(enabled) {
this.statusItem.actor.visible = enabled;
this.section.actor.visible = enabled;
if (enabled) {
this.statusItem.actor.show();
this.section.actor.show();
} else {
this.statusItem.actor.hide();
this.section.actor.hide();
}
},
activate: function() {
@ -1365,7 +1331,9 @@ const NMDeviceWireless = new Lang.Class({
},
removeConnection: function(connection) {
let pos = this._findConnection(connection.get_uuid());
if (!connection._uuid)
return;
let pos = this._findConnection(connection._uuid);
if (pos == -1) {
// removing connection that was never added
return;
@ -1379,7 +1347,7 @@ const NMDeviceWireless = new Lang.Class({
let apObj = this._networks[i];
let connections = apObj.connections;
for (let k = 0; k < connections.length; k++) {
if (connections[k].get_uuid() == connection.get_uuid()) {
if (connections[k]._uuid == connection._uuid) {
// remove the connection from the access point group
connections.splice(k);
forceupdate = forceupdate || connections.length == 0;
@ -1395,7 +1363,7 @@ const NMDeviceWireless = new Lang.Class({
forceupdate = true;
} else {
for (let j = 0; j < items.length; j++) {
if (items[j]._connection.get_uuid() == connection.get_uuid()) {
if (items[j]._connection._uuid == connection._uuid) {
items[j].destroy();
break;
}
@ -1422,8 +1390,8 @@ const NMDeviceWireless = new Lang.Class({
// record the connection
let obj = {
connection: connection,
name: connection.get_id(),
uuid: connection.get_uuid(),
name: connection._name,
uuid: connection._uuid,
};
this._connections.push(obj);
@ -1570,7 +1538,7 @@ const NMApplet = new Lang.Class({
Extends: PanelMenu.SystemStatusButton,
_init: function() {
this.parent('network-offline', _("Network"));
this.parent('network-error', _("Network"));
this._client = NMClient.Client.new();
@ -1584,15 +1552,6 @@ const NMApplet = new Lang.Class({
this.menu.addMenuItem(this._statusSection);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this._activeConnections = [ ];
this._connections = [ ];
this._mainConnection = null;
this._activeAccessPointUpdateId = 0;
this._activeAccessPoint = null;
this._mobileUpdateId = 0;
this._mobileUpdateDevice = null;
this._devices = { };
this._devices.wired = {
@ -1628,9 +1587,13 @@ const NMApplet = new Lang.Class({
this._devices.vpn = {
section: new PopupMenu.PopupMenuSection(),
device: this._makeWrapperDevice(NMDeviceVPN, null),
device: new NMDeviceVPN(this._client),
item: new NMWiredSectionTitleMenuItem(_("VPN Connections"))
};
this._devices.vpn.device.connect('active-connection-changed', Lang.bind(this, function() {
this._devices.vpn.item.updateForDevice(this._devices.vpn.device);
}));
this._devices.vpn.item.updateForDevice(this._devices.vpn.device);
this._devices.vpn.section.addMenuItem(this._devices.vpn.item);
this._devices.vpn.section.addMenuItem(this._devices.vpn.device.section);
this._devices.vpn.section.actor.hide();
@ -1638,6 +1601,15 @@ const NMApplet = new Lang.Class({
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addSettingsAction(_("Network Settings"), 'gnome-network-panel.desktop');
this._activeConnections = [ ];
this._connections = [ ];
this._mainConnection = null;
this._activeAccessPointUpdateId = 0;
this._activeAccessPoint = null;
this._mobileUpdateId = 0;
this._mobileUpdateDevice = null;
// Device types
this._dtypes = { };
this._dtypes[NetworkManager.DeviceType.ETHERNET] = NMDeviceWired;
@ -1680,10 +1652,7 @@ const NMApplet = new Lang.Class({
_ensureSource: function() {
if (!this._source) {
this._source = new MessageTray.Source(_("Network Manager"),
'network-transmit-receive',
St.IconType.SYMBOLIC);
this._source = new NMMessageTraySource();
this._source.connect('destroy', Lang.bind(this, function() {
this._source = null;
}));
@ -1704,18 +1673,6 @@ const NMApplet = new Lang.Class({
},
_syncSectionTitle: function(category) {
if (category == NMConnectionCategory.VPN) {
// Special case VPN: it's only one device (and a fake one
// actually), and we don't show it if empty
let device = this._devices.vpn.device;
let section = this._devices.vpn.section;
let item = this._devices.vpn.item;
section.actor.visible = !device.empty;
item.updateForDevice(device);
return;
}
let devices = this._devices[category].devices;
let item = this._devices[category].item;
let section = this._devices[category].section;
@ -1766,29 +1723,6 @@ const NMApplet = new Lang.Class({
this._source.notify(device._notification);
},
_makeWrapperDevice: function(wrapperClass, device) {
let wrapper = new wrapperClass(this._client, device, this._connections);
wrapper._activationFailedId = wrapper.connect('activation-failed', Lang.bind(this, function(device, reason) {
// XXX: nm-applet has no special text depending on reason
// but I'm not sure of this generic message
this._notifyForDevice(device, 'network-error',
_("Connection failed"),
_("Activation of network connection failed"),
MessageTray.Urgency.HIGH);
}));
wrapper._deviceStateChangedId = wrapper.connect('state-changed', Lang.bind(this, function(dev) {
this._syncSectionTitle(dev.category);
}));
wrapper._destroyId = wrapper.connect('destroy', function(wrapper) {
wrapper.disconnect(wrapper._activationFailedId);
wrapper.disconnect(wrapper._deviceStateChangedId);
wrapper.disconnect(wrapper._destroyId);
});
return wrapper;
},
_deviceAdded: function(client, device) {
if (device._delegate) {
// already seen, not adding again
@ -1796,8 +1730,24 @@ const NMApplet = new Lang.Class({
}
let wrapperClass = this._dtypes[device.get_device_type()];
if (wrapperClass) {
let wrapper = this._makeWrapperDevice(wrapperClass, device);
let wrapper = new wrapperClass(this._client, device, this._connections);
wrapper._activationFailedId = wrapper.connect('activation-failed', Lang.bind(this, function(device, reason) {
// XXX: nm-applet has no special text depending on reason
// but I'm not sure of this generic message
this._notifyForDevice(device, 'network-error',
_("Connection failed"),
_("Activation of network connection failed"),
MessageTray.Urgency.HIGH);
}));
wrapper._deviceStateChangedId = wrapper.connect('state-changed', Lang.bind(this, function(dev) {
this._syncSectionTitle(dev.category);
}));
wrapper._destroyId = wrapper.connect('destroy', function(wrapper) {
wrapper.disconnect(wrapper._activationFailedId);
wrapper.disconnect(wrapper._deviceStateChangedId);
wrapper.disconnect(wrapper._destroyId);
});
let section = this._devices[wrapper.category].section;
let devices = this._devices[wrapper.category].devices;
@ -1933,7 +1883,7 @@ const NMApplet = new Lang.Class({
let connections = this._settings.list_connections();
for (let i = 0; i < connections.length; i++) {
let connection = connections[i];
if (connection._updatedId) {
if (connection._uuid) {
// connection was already seen (for example because NetworkManager was restarted)
continue;
}
@ -1946,7 +1896,7 @@ const NMApplet = new Lang.Class({
},
_newConnection: function(settings, connection) {
if (connection._updatedId) {
if (connection._uuid) {
// connection was already seen
return;
}
@ -1969,31 +1919,35 @@ const NMApplet = new Lang.Class({
if (section == NMConnectionCategory.VPN) {
this._devices.vpn.device.removeConnection(connection);
this._syncSectionTitle(section);
if (this._devices.vpn.device.empty)
this._devices.vpn.section.actor.hide();
} else if (section != NMConnectionCategory.INVALID) {
let devices = this._devices[section].devices;
for (let i = 0; i < devices.length; i++)
devices[i].removeConnection(connection);
}
connection._uuid = null;
connection.disconnect(connection._removedId);
connection.disconnect(connection._updatedId);
connection._removedId = connection._updatedId = 0;
},
_updateConnection: function(connection) {
let connectionSettings = connection.get_setting_by_name(NetworkManager.SETTING_CONNECTION_SETTING_NAME);
connection._type = connectionSettings.type;
connection._section = this._ctypes[connection._type] || NMConnectionCategory.INVALID;
connection._name = connectionSettings.id;
connection._uuid = connectionSettings.uuid;
connection._timestamp = connectionSettings.timestamp;
let section = connection._section;
if (section == NMConnectionCategory.INVALID)
if (connection._section == NMConnectionCategory.INVALID)
return;
if (section == NMConnectionCategory.VPN) {
this._devices.vpn.device.checkConnection(connection);
this._syncSectionTitle(section);
this._devices.vpn.section.actor.show();
} else {
let devices = this._devices[section].devices;
for (let i = 0; i < devices.length; i++) {
@ -2016,10 +1970,12 @@ const NMApplet = new Lang.Class({
this._statusSection.actor.hide();
this._syncSectionTitle(NMConnectionCategory.WIRED);
this._syncSectionTitle(NMConnectionCategory.WIRELESS);
this._syncSectionTitle(NMConnectionCategory.WWAN);
this._syncSectionTitle(NMConnectionCategory.VPN);
this._syncSectionTitle('wired');
this._syncSectionTitle('wireless');
this._syncSectionTitle('wwan');
if (!this._devices.vpn.device.empty)
this._devices.vpn.section.actor.show();
},
_syncNMState: function() {
@ -2152,3 +2108,18 @@ const NMApplet = new Lang.Class({
}
}
});
const NMMessageTraySource = new Lang.Class({
Name: 'NMMessageTraySource',
Extends: MessageTray.Source,
_init: function() {
this.parent(_("Network Manager"));
let icon = new St.Icon({ icon_name: 'network-transmit-receive',
icon_type: St.IconType.SYMBOLIC,
icon_size: this.ICON_SIZE
});
this._setSummaryIcon(icon);
}
});

View File

@ -212,7 +212,7 @@ const DeviceItem = new Lang.Class({
case UPDeviceType.COMPUTER:
return _("Computer");
default:
return C_("device", "Unknown");
return _("Unknown");
}
}
});

View File

@ -149,9 +149,13 @@ const Indicator = new Lang.Class({
}
}
}
this._inputTitle.actor.visible = showInput;
this._inputSlider.actor.visible = showInput;
if (showInput) {
this._inputTitle.actor.show();
this._inputSlider.actor.show();
} else {
this._inputTitle.actor.hide();
this._inputSlider.actor.hide();
}
},
_volumeToIcon: function(volume) {

View File

@ -132,6 +132,9 @@ const Client = new Lang.Class({
let channel = channels[i];
let [targetHandle, targetHandleType] = channel.get_handle();
if (Shell.is_channel_invalidated(channel))
continue;
/* Only observe contact text channels */
if ((!(channel instanceof Tp.TextChannel)) ||
targetHandleType != Tp.HandleType.CONTACT)
@ -181,6 +184,9 @@ const Client = new Lang.Class({
continue;
}
if (Shell.is_channel_invalidated(channel))
continue;
// 'notify' will be true when coming from an actual HandleChannels
// call, and not when from a successful Claim call. The point is
// we don't want to notify for a channel we just claimed which
@ -231,12 +237,19 @@ const Client = new Lang.Class({
let channel = channels[0];
let chanType = channel.get_channel_type();
if (Shell.is_channel_invalidated(channel)) {
Shell.decline_dispatch_op(context, 'Channel is invalidated');
return;
}
if (chanType == Tp.IFACE_CHANNEL_TYPE_TEXT)
this._approveTextChannel(account, conn, channel, dispatchOp, context);
else if (chanType == Tp.IFACE_CHANNEL_TYPE_CALL)
this._approveCall(account, conn, channel, dispatchOp, context);
else if (chanType == Tp.IFACE_CHANNEL_TYPE_FILE_TRANSFER)
this._approveFileTransfer(account, conn, channel, dispatchOp, context);
else
Shell.decline_dispatch_op(context, 'Unsupported channel type');
},
_approveTextChannel: function(account, conn, channel, dispatchOp, context) {
@ -365,9 +378,8 @@ const Client = new Lang.Class({
_ensureSubscriptionSource: function() {
if (this._subscriptionSource == null) {
this._subscriptionSource = new MessageTray.Source(_("Subscription request"),
'gtk-dialog-question',
St.IconType.FULLCOLOR);
this._subscriptionSource = new MultiNotificationSource(
_("Subscription request"), 'gtk-dialog-question');
Main.messageTray.add(this._subscriptionSource);
this._subscriptionSource.connect('destroy', Lang.bind(this, function () {
this._subscriptionSource = null;
@ -402,9 +414,8 @@ const Client = new Lang.Class({
_ensureAccountSource: function() {
if (this._accountSource == null) {
this._accountSource = new MessageTray.Source(_("Connection error"),
'gtk-dialog-error',
St.IconType.FULLCOLOR);
this._accountSource = new MultiNotificationSource(
_("Connection error"), 'gtk-dialog-error');
Main.messageTray.add(this._accountSource);
this._accountSource.connect('destroy', Lang.bind(this, function () {
this._accountSource = null;
@ -420,13 +431,14 @@ const ChatSource = new Lang.Class({
Extends: MessageTray.Source,
_init: function(account, conn, channel, contact, client) {
this.parent(contact.get_alias());
this.isChat = true;
this._account = account;
this._contact = contact;
this._client = client;
this.parent(contact.get_alias());
this.isChat = true;
this._pendingMessages = [];
this._conn = conn;
@ -447,6 +459,8 @@ const ChatSource = new Lang.Class({
this._receivedId = this._channel.connect('message-received', Lang.bind(this, this._messageReceived));
this._pendingId = this._channel.connect('pending-message-removed', Lang.bind(this, this._pendingRemoved));
this._setSummaryIcon(this.createNotificationIcon());
this._notifyAliasId = this._contact.connect('notify::alias', Lang.bind(this, this._updateAlias));
this._notifyAvatarId = this._contact.connect('notify::avatar-file', Lang.bind(this, this._updateAvatarIcon));
this._presenceChangedId = this._contact.connect('presence-changed', Lang.bind(this, this._presenceChanged));
@ -509,10 +523,10 @@ const ChatSource = new Lang.Class({
_getLogMessages: function() {
let logManager = Tpl.LogManager.dup_singleton();
let entity = Tpl.Entity.new_from_tp_contact(this._contact, Tpl.EntityType.CONTACT);
logManager.get_filtered_events_async(this._account, entity,
Tpl.EventTypeMask.TEXT, SCROLLBACK_HISTORY_LINES,
null, Lang.bind(this, this._displayPendingMessages));
Shell.get_contact_events(logManager,
this._account, entity,
SCROLLBACK_HISTORY_LINES,
Lang.bind(this, this._displayPendingMessages));
},
_displayPendingMessages: function(logManager, result) {
@ -1001,10 +1015,11 @@ const ApproverSource = new Lang.Class({
Extends: MessageTray.Source,
_init: function(dispatchOp, text, gicon) {
this._gicon = gicon;
this.parent(text);
this._gicon = gicon;
this._setSummaryIcon(this.createNotificationIcon());
this._dispatchOp = dispatchOp;
// Destroy the source if the channel dispatch operation is invalidated
@ -1026,6 +1041,7 @@ const ApproverSource = new Lang.Class({
createNotificationIcon: function() {
return new St.Icon({ gicon: this._gicon,
icon_type: St.IconType.FULLCOLOR,
icon_size: this.ICON_SIZE });
}
});
@ -1148,6 +1164,40 @@ const FileTransferNotification = new Lang.Class({
}
});
// A notification source that can embed multiple notifications
const MultiNotificationSource = new Lang.Class({
Name: 'MultiNotificationSource',
Extends: MessageTray.Source,
_init: function(title, icon) {
this.parent(title);
this._icon = icon;
this._setSummaryIcon(this.createNotificationIcon());
this._nbNotifications = 0;
},
notify: function(notification) {
this.parent(notification);
this._nbNotifications += 1;
// Display the source while there is at least one notification
notification.connect('destroy', Lang.bind(this, function () {
this._nbNotifications -= 1;
if (this._nbNotifications == 0)
this.destroy();
}));
},
createNotificationIcon: function() {
return new St.Icon({ gicon: Gio.icon_new_for_string(this._icon),
icon_type: St.IconType.FULLCOLOR,
icon_size: this.ICON_SIZE });
}
});
// Subscription request
const SubscriptionRequestNotification = new Lang.Class({
Name: 'SubscriptionRequestNotification',

View File

@ -1,7 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const AccountsService = imports.gi.AccountsService;
const GdmGreeter = imports.gi.GdmGreeter;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
@ -474,22 +473,13 @@ const UserMenuButton = new Lang.Class({
style_class: 'popup-menu-icon' });
this._idleIcon = new St.Icon({ icon_name: 'user-idle',
style_class: 'popup-menu-icon' });
this._pendingIcon = new St.Icon({ icon_name: 'user-status-pending',
style_class: 'popup-menu-icon' });
this._accountMgr.connect('most-available-presence-changed',
Lang.bind(this, this._updatePresenceIcon));
this._accountMgr.connect('account-enabled',
Lang.bind(this, this._onAccountEnabled));
this._accountMgr.connect('account-disabled',
Lang.bind(this, this._onAccountDisabled));
this._accountMgr.connect('account-removed',
Lang.bind(this, this._onAccountDisabled));
this._accountMgr.prepare_async(null, Lang.bind(this,
function(mgr) {
let [presence, s, msg] = mgr.get_most_available_presence();
this._updatePresenceIcon(mgr, presence, s, msg);
this._setupAccounts();
}));
this._name = new St.Label();
@ -507,13 +497,13 @@ const UserMenuButton = new Lang.Class({
}));
this._userManager.connect('notify::is-loaded',
Lang.bind(this, this._updateMultiUser));
Lang.bind(this, this._updateSwitchUser));
this._userManager.connect('notify::has-multiple-users',
Lang.bind(this, this._updateMultiUser));
Lang.bind(this, this._updateSwitchUser));
this._userManager.connect('user-added',
Lang.bind(this, this._updateMultiUser));
Lang.bind(this, this._updateSwitchUser));
this._userManager.connect('user-removed',
Lang.bind(this, this._updateMultiUser));
Lang.bind(this, this._updateSwitchUser));
this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY,
Lang.bind(this, this._updateSwitchUser));
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
@ -552,32 +542,30 @@ const UserMenuButton = new Lang.Class({
this._name.set_text("");
},
_updateMultiUser: function() {
this._updateSwitchUser();
this._updateLogout();
},
_updateSwitchUser: function() {
let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users;
let multiSession = GdmGreeter.get_session_ids().length > 1;
this._loginScreenItem.label.set_text(multiUser ? _("Switch User")
: _("Switch Session"));
this._loginScreenItem.actor.visible = allowSwitch && (multiUser || multiSession);
if (allowSwitch &&
this._userManager.can_switch() &&
this._userManager.has_multiple_users)
this._loginScreenItem.actor.show();
else
this._loginScreenItem.actor.hide();
},
_updateLogout: function() {
let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
let multiUser = this._userManager.has_multiple_users;
let multiSession = GdmGreeter.get_session_ids().length > 1;
this._logoutItem.actor.visible = allowLogout && (multiUser || multiSession);
if (allowLogout)
this._logoutItem.actor.show();
else
this._logoutItem.actor.hide();
},
_updateLockScreen: function() {
let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
this._lockScreenItem.actor.visible = allowLockScreen;
if (allowLockScreen)
this._lockScreenItem.actor.show();
else
this._lockScreenItem.actor.hide();
},
_updateHaveShutdown: function() {
@ -596,16 +584,19 @@ const UserMenuButton = new Lang.Class({
if (!this._suspendOrPowerOffItem)
return;
this._suspendOrPowerOffItem.actor.visible = this._haveShutdown || this._haveSuspend;
if (!this._haveShutdown && !this._haveSuspend)
this._suspendOrPowerOffItem.actor.hide();
else
this._suspendOrPowerOffItem.actor.show();
// If we can't power off show Suspend instead
// If we can't suspend show Power Off... instead
// and disable the alt key
if (!this._haveShutdown) {
if (!this._haveSuspend) {
this._suspendOrPowerOffItem.updateText(_("Power Off..."), null);
} else if (!this._haveShutdown) {
this._suspendOrPowerOffItem.updateText(_("Suspend"), null);
} else if (!this._haveSuspend) {
this._suspendOrPowerOffItem.updateText(_("Power Off"), null);
} else {
this._suspendOrPowerOffItem.updateText(_("Power Off"), _("Suspend"));
this._suspendOrPowerOffItem.updateText(_("Suspend"), _("Power Off..."));
}
},
@ -629,52 +620,11 @@ const UserMenuButton = new Lang.Class({
this._iconBox.child = this._offlineIcon;
},
_setupAccounts: function() {
let accounts = this._accountMgr.get_valid_accounts();
for (let i = 0; i < accounts.length; i++) {
accounts[i]._changingId = accounts[i].connect('notify::connection-status',
Lang.bind(this, this._updateChangingPresence));
}
this._updateChangingPresence();
},
_onAccountEnabled: function(accountMgr, account) {
if (!account._changingId)
account._changingId = account.connect('notify::connection-status',
Lang.bind(this, this._updateChangingPresence));
this._updateChangingPresence();
},
_onAccountDisabled: function(accountMgr, account) {
account.disconnect(account._changingId);
account._changingId = 0;
this._updateChangingPresence();
},
_updateChangingPresence: function() {
let accounts = this._accountMgr.get_valid_accounts();
let changing = false;
for (let i = 0; i < accounts.length; i++) {
if (accounts[i].connection_status == Tp.ConnectionStatus.CONNECTING) {
changing = true;
break;
}
}
if (changing) {
this._iconBox.child = this._pendingIcon;
} else {
let [presence, s, msg] = this._accountMgr.get_most_available_presence();
this._updatePresenceIcon(this._accountMgr, presence, s, msg);
}
},
_createSubMenu: function() {
let item;
item = new IMStatusChooserItem();
if (Main.sessionMode.allowSettings)
item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
this.menu.addMenuItem(item);
this._statusChooser = item;
@ -686,28 +636,28 @@ const UserMenuButton = new Lang.Class({
item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item);
if (Main.sessionMode.allowSettings) {
item = new PopupMenu.PopupMenuItem(_("System Settings"));
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this.menu.addMenuItem(item);
}
item = new PopupMenu.PopupAlternatingMenuItem(_("Power Off"),
_("Suspend"));
item = new PopupMenu.PopupMenuItem(_("Online Accounts"));
item.connect('activate', Lang.bind(this, this._onOnlineAccountsActivate));
this.menu.addMenuItem(item);
item = new PopupMenu.PopupMenuItem(_("System Settings"));
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this.menu.addMenuItem(item);
item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
this._suspendOrPowerOffItem = item;
this._updateSuspendOrPowerOff();
item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item);
item = new PopupMenu.PopupMenuItem(_("Lock Screen"));
item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
this.menu.addMenuItem(item);
this._lockScreenItem = item;
item = new PopupMenu.PopupMenuItem(_("Switch User"));
item.connect('activate', Lang.bind(this, this._onLoginScreenActivate));
this.menu.addMenuItem(item);
this._loginScreenItem = item;
item = new PopupMenu.PopupMenuItem(_("Log Out"));
item = new PopupMenu.PopupMenuItem(_("Log Out..."));
item.connect('activate', Lang.bind(this, this._onQuitSessionActivate));
this.menu.addMenuItem(item);
this._logoutItem = item;
@ -715,10 +665,12 @@ const UserMenuButton = new Lang.Class({
item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item);
item = new PopupMenu.PopupMenuItem(_("Lock"));
item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
item = new PopupMenu.PopupAlternatingMenuItem(_("Suspend"),
_("Power Off..."));
this.menu.addMenuItem(item);
this._lockScreenItem = item;
this._suspendOrPowerOffItem = item;
item.connect('activate', Lang.bind(this, this._onSuspendOrPowerOffActivate));
this._updateSuspendOrPowerOff();
},
_updatePresenceStatus: function(item, event) {
@ -746,6 +698,12 @@ const UserMenuButton = new Lang.Class({
app.activate();
},
_onOnlineAccountsActivate: function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().lookup_setting('gnome-online-accounts-panel.desktop');
app.activate(-1);
},
_onPreferencesActivate: function() {
Main.overview.hide();
let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop');
@ -774,14 +732,14 @@ const UserMenuButton = new Lang.Class({
_onSuspendOrPowerOffActivate: function() {
Main.overview.hide();
if (this._haveShutdown &&
if (this._haveSuspend &&
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
this._session.ShutdownRemote();
} else {
// Ensure we only suspend after locking the screen
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
this._upClient.suspend_sync(null);
}));
} else {
this._session.ShutdownRemote();
}
}
});

View File

@ -168,35 +168,34 @@ const WandaSearchProvider = new Lang.Class({
this.parent(_("Your favorite Easter Egg"));
},
getResultMetas: function(fish, callback) {
callback([{ 'id': fish[0], // there may be many fish in the sea, but
// only one which speaks the truth!
'name': capitalize(fish[0]),
'createIcon': function(iconSize) {
// for DND only (maybe could be improved)
// DON'T use St.Icon here, it crashes the shell
// (dnd.js code assumes it can query the actor size
// without parenting it, while StWidget accesses
// StThemeNode in get_preferred_width/height, which
// triggers an assertion failure)
return St.TextureCache.get_default().load_icon_name(null,
'face-smile',
St.IconType.FULLCOLOR,
iconSize);
}
}]);
getResultMetas: function(fish) {
return [{ 'id': fish[0], // there may be many fish in the sea, but
// only one which speaks the truth!
'name': capitalize(fish[0]),
'createIcon': function(iconSize) {
// for DND only (maybe could be improved)
// DON'T use St.Icon here, it crashes the shell
// (dnd.js code assumes it can query the actor size
// without parenting it, while StWidget accesses
// StThemeNode in get_preferred_width/height, which
// triggers an assertion failure)
return St.TextureCache.get_default().load_icon_name(null,
'face-smile',
St.IconType.FULLCOLOR,
iconSize);
}
}];
},
getInitialResultSet: function(terms) {
if (terms.join(' ') == MAGIC_FISH_KEY) {
this.searchSystem.pushResults(this, [ FISH_NAME ]);
} else {
this.searchSystem.pushResults(this, []);
return [ FISH_NAME ];
}
return [];
},
getSubsearchResultSet: function(previousResults, terms) {
this.getInitialResultSet(terms);
return this.getInitialResultSet(terms);
},
activateResult: function(fish, params) {

View File

@ -53,10 +53,10 @@ const Source = new Lang.Class({
Extends: MessageTray.Source,
_init: function(app, window) {
this.parent(app.get_name());
this._window = window;
this._app = app;
this.parent(app.get_name());
this._setSummaryIcon(this.createNotificationIcon());
this.signalIDs = [];
this.signalIDs.push(this._window.connect('notify::demands-attention', Lang.bind(this, function() { this.destroy(); })));

View File

@ -1134,6 +1134,7 @@ const Workspace = new Lang.Class({
_hideAllOverlays: function() {
for (let i = 0; i < this._windows.length; i++) {
let clone = this._windows[i];
Tweener.removeTweens(clone.actor);
let overlay = this._windowOverlays[i];
if (overlay)
overlay.hide();
@ -1251,7 +1252,7 @@ const Workspace = new Lang.Class({
if (!this._isMyWindow(win) || !this._isOverviewWindow(win))
return;
let [clone, overlay] = this._addWindowClone(win);
let clone = this._addWindowClone(win);
if (win._overviewHint) {
let x = win._overviewHint.x - this.actor.x;
@ -1261,7 +1262,6 @@ const Workspace = new Lang.Class({
clone.actor.set_position (x, y);
clone.actor.set_scale (scale, scale);
this._updateWindowOverlayPositions(clone, overlay, x, y, scale, false);
} else {
// Position new windows at the top corner of the workspace rather
// than where they were placed for real to avoid the window
@ -1321,10 +1321,7 @@ const Workspace = new Lang.Class({
this.leavingOverview = true;
for (let i = 0; i < this._windows.length; i++) {
let clone = this._windows[i];
Tweener.removeTweens(clone.actor);
}
this._hideAllOverlays();
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
@ -1364,7 +1361,6 @@ const Workspace = new Lang.Class({
}
}
this._hideAllOverlays();
},
destroy : function() {
@ -1455,7 +1451,7 @@ const Workspace = new Lang.Class({
this._windows.push(clone);
this._windowOverlays.push(overlay);
return [clone, overlay];
return clone;
},
_onShowOverlayClose: function (windowOverlay) {

View File

@ -529,11 +529,9 @@ const WorkspacesDisplay = new Lang.Class({
this._updateAlwaysZoom();
}));
global.screen.connect('notify::n-workspaces',
Lang.bind(this, this._workspacesChanged));
this._switchWorkspaceNotifyId = 0;
this._nWorkspacesChangedId = 0;
this._itemDragBeginId = 0;
this._itemDragCancelledId = 0;
this._itemDragEndId = 0;
@ -572,6 +570,9 @@ const WorkspacesDisplay = new Lang.Class({
global.screen.connect('restacked',
Lang.bind(this, this._onRestacked));
if (this._nWorkspacesChangedId == 0)
this._nWorkspacesChangedId = global.screen.connect('notify::n-workspaces',
Lang.bind(this, this._workspacesChanged));
if (this._itemDragBeginId == 0)
this._itemDragBeginId = Main.overview.connect('item-drag-begin',
Lang.bind(this, this._dragBegin));
@ -843,7 +844,10 @@ const WorkspacesDisplay = new Lang.Class({
if (!primaryView)
return;
primaryView.actor.opacity = opacity;
primaryView.actor.visible = opacity != 0;
if (opacity == 0)
primaryView.actor.hide();
else
primaryView.actor.show();
}));
}));
},
@ -924,16 +928,19 @@ const WorkspacesDisplay = new Lang.Class({
},
_workspacesChanged: function() {
let oldNumWorkspaces = this._workspaces[0].length;
let newNumWorkspaces = global.screen.n_workspaces;
let active = global.screen.get_active_workspace_index();
if (oldNumWorkspaces == newNumWorkspaces)
return;
this._updateAlwaysZoom();
this._updateZoom();
if (this._workspacesViews == null)
return;
let oldNumWorkspaces = this._workspaces[0].length;
let newNumWorkspaces = global.screen.n_workspaces;
let active = global.screen.get_active_workspace_index();
let lostWorkspaces = [];
if (newNumWorkspaces > oldNumWorkspaces) {
let monitors = Main.layoutManager.monitors;

311
po/as.po
View File

@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
"cgi?product=gnome-shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2012-03-19 14:09+0000\n"
"PO-Revision-Date: 2012-03-19 20:17+0530\n"
"POT-Creation-Date: 2012-04-19 21:14+0000\n"
"PO-Revision-Date: 2012-07-05 20:28+0530\n"
"Last-Translator: Nilamdyuti Goswami <ngoswami@redhat.com>\n"
"Language-Team: as_IN <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
@ -39,7 +39,7 @@ msgstr "GNOME শ্বেল সম্প্ৰসাৰনসমূহ সং
#: ../data/org.gnome.shell.gschema.xml.in.h:1
msgid "Enable internal tools useful for developers and testers from Alt-F2"
msgstr ""
"Alt-F2 -ৰ পৰা উন্নয়নকাৰী আৰু পৰীক্ষকসমূহৰ কাৰণে লাভদায়ক অভ্যন্তৰীক সঁজুলিসমূহ "
"Alt-F2 ৰ পৰা উন্নয়নকাৰী আৰু পৰীক্ষকসমূহৰ কাৰণে লাভদায়ক অভ্যন্তৰীক সঁজুলিসমূহ "
"সামৰ্থবান কৰক"
#: ../data/org.gnome.shell.gschema.xml.in.h:2
@ -61,7 +61,7 @@ msgid ""
"list. You can also manipulate this list with the EnableExtension and "
"DisableExtension DBus methods on org.gnome.Shell."
msgstr ""
"GNOME শ্বেল সম্প্ৰসাৰণসমূহৰ এটা uuid বৈশিষ্ট আছে; এই চাবিয়ে ল'ড হব লগিয়া "
"GNOME শ্বেল সম্প্ৰসাৰণসমূহৰ এটা uuid বৈশিষ্ট আছে; এই কি'য়ে ল'ড হব লগিয়া "
"সমপ্ৰসাৰণসমূহ তালিকাভুক্ত কৰে। যিকোনো সম্প্ৰসাৰন যি ল'ড হব বিচাৰে এই তালিকাত থাকিব "
"লাগিব। আপুনি এই তালিকাক org.gnome.Shell ত EnableExtension আৰু DisableExtension "
"DBus পদ্ধতিসমূহৰ সৈতে সলনি কৰিব পাৰিব।"
@ -77,7 +77,7 @@ msgid ""
"want to disable this for privacy reasons. Please note that doing so won't "
"remove already saved data."
msgstr ""
"শ্বেলে সাধাৰত সক্ৰিয় অনুপ্ৰয়োগসমূহ মনিটৰ কৰে যাতে সকলোতকৈ অধিক ব্যৱহৃতসমূহ "
"শ্বেলে সাধাৰত সক্ৰিয় অনুপ্ৰয়োগসমূহ মনিটৰ কৰে যাতে সকলোতকৈ অধিক ব্যৱহৃতসমূহ "
"(উদাহৰনস্বৰুপে লঞ্চাৰসমূহত) ক দেখুৱাব পাৰে। যত এই তথ্য গোপন ৰখা হব, আপুনি ইয়াক "
"গোপনীয়তা কাৰণসমূহৰ কাৰণে অসামৰ্থবান কৰিব পাৰে। অনুগ্ৰহ কৰি মন কৰিব যে এনেকুৱা "
"কৰাত ইতিমধ্যে সংৰক্ষীত তথ্য আতৰি নাযায়।"
@ -129,46 +129,54 @@ msgid "If true, display the ISO week date in the calendar."
msgstr "যদি সত্য, ISO সপ্তাহ তাৰিখক কেলেণ্ডাৰত দেখুৱাওক।"
#: ../data/org.gnome.shell.gschema.xml.in.h:16
msgid "Keybinding to open the application menu"
msgstr "অনুপ্ৰয়োগ মেনু খোলিবলে Keybinding"
#: ../data/org.gnome.shell.gschema.xml.in.h:17
msgid "Keybinding to open the application menu."
msgstr "অনুপ্ৰয়োগ মেনু খোলিবলে Keybinding।"
#: ../data/org.gnome.shell.gschema.xml.in.h:18
msgid "Which keyboard to use"
msgstr "কোনটো কিবৰ্ড ব্যৱহাৰ কৰা হব"
#: ../data/org.gnome.shell.gschema.xml.in.h:17
#: ../data/org.gnome.shell.gschema.xml.in.h:19
msgid "The type of keyboard to use."
msgstr "ব্যৱহাৰ কৰিব লগিয়া কিবৰ্ডৰ ধৰণ।"
#: ../data/org.gnome.shell.gschema.xml.in.h:18
#: ../data/org.gnome.shell.gschema.xml.in.h:20
msgid "Show time with seconds"
msgstr "সময়ক ছেকেণ্ডসমূহৰ সৈতে দেখুৱাওক"
#: ../data/org.gnome.shell.gschema.xml.in.h:19
#: ../data/org.gnome.shell.gschema.xml.in.h:21
msgid "If true, display seconds in time."
msgstr "যদি সত্য, ছেকেণ্ডসমূহ সময়ত দেখুৱাওক।"
#: ../data/org.gnome.shell.gschema.xml.in.h:20
#: ../data/org.gnome.shell.gschema.xml.in.h:22
msgid "Show date in clock"
msgstr "ঘড়িত তাৰিখ দেখুৱাওক"
#: ../data/org.gnome.shell.gschema.xml.in.h:21
#: ../data/org.gnome.shell.gschema.xml.in.h:23
msgid "If true, display date in the clock, in addition to time."
msgstr "যদি সত্য, ঘড়িত তাৰিখ প্ৰদৰ্শন কৰক, সময়ৰ অতিৰিক্তভাৱে।"
#: ../data/org.gnome.shell.gschema.xml.in.h:22
#: ../data/org.gnome.shell.gschema.xml.in.h:24
msgid "Framerate used for recording screencasts."
msgstr "screencasts ৰেকৰ্ড কৰাৰ কাৰণে ব্যৱহৃত Framerate"
#: ../data/org.gnome.shell.gschema.xml.in.h:23
#: ../data/org.gnome.shell.gschema.xml.in.h:25
msgid ""
"The framerate of the resulting screencast recordered by GNOME Shell's "
"screencast recorder in frames-per-second."
msgstr ""
"GNOME শ্বেলৰ screencast ৰেকৰ্ডাৰে ফ্ৰেইম-প্ৰতি ছেকেণ্ডত ৰেকৰ্ড কৰা পৰিণাম "
"screencast -ৰ framerate।"
#: ../data/org.gnome.shell.gschema.xml.in.h:24
msgid "The gstreamer pipeline used to encode the screencast"
msgstr "screencast এনকোড কৰিবলে ব্যৱহাৰ কৰা gstreamer পাইপলাইন"
"screencast ৰ framerate।"
#: ../data/org.gnome.shell.gschema.xml.in.h:26
msgid "The gstreamer pipeline used to encode the screencast"
msgstr "screencast এনক'ড কৰিবলে ব্যৱহাৰ কৰা gstreamer পাইপলাইন"
#: ../data/org.gnome.shell.gschema.xml.in.h:28
#, no-c-format
msgid ""
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
@ -182,29 +190,29 @@ msgid ""
"using the VP8 codec. %T is used as a placeholder for a guess at the optimal "
"thread count on the system."
msgstr ""
"ৰেকৰ্ডিংসমূহ এনকড কৰোতে ব্যৱহৃত GStreamer পাইপলাইন সংহতি কৰে। ই gst-launch -ৰ "
"ৰেকৰ্ডিংসমূহ এনক'ড কৰোতে ব্যৱহৃত GStreamer পাইপলাইন সংহতি কৰে। ই gst-launch ৰ "
"কাৰণে ব্যৱহৃত বাক্যবিন্যাস অনুকৰন কৰে। পাইপলাইনৰ এটা অসংযোগিত চিঙ্ক পেড থাকিব লাগে "
"যত ৰেকৰ্ড কৰা ভিডিঅ' ৰেকৰ্ড কৰা হয়। ইয়াৰ সাধাৰত এটা অসংযোগিত উৎস পেড থাকিব; "
"যত ৰেকৰ্ড কৰা ভিডিঅ' ৰেকৰ্ড কৰা হয়। ইয়াৰ সাধাৰত এটা অসংযোগিত উৎস পেড থাকিব; "
"সেই পেডৰ পৰা আউটপুট এটা আউটপুট নথিপত্ৰলে লিখা হব। যি কি নহওক পাইপলাইনে নিজৰ "
"আউটপুটৰ যত্ন লব পাৰে - ইয়াৰ হওতো আউটপুটক shout2send অথবা সমসাময়িকৰে এটা icecast "
"চাৰ্ভাৰত পঠাবলে ব্যৱহাৰ হব পাৰে। যেতিয়া এটা ৰিক্ত মানলে অসংহিত বা সংহিত, "
"অবিকল্পিত পাইপলাইন ব্যৱহাৰ কৰা হব। এইটো বৰ্তমানত 'vp8enc quality=8 speed=6 "
"threads=%T ! queue ! webmmux' আৰু VP8 কডেক ব্যৱহাৰ কৰি WEBM -ত ৰেকৰ্ড কৰে। %T -"
"threads=%T ! queue ! webmmux' আৰু VP8 কডেক ব্যৱহাৰ কৰি WEBM ত ৰেকৰ্ড কৰে। %T -"
"ক চিস্টেমত অনুকূলিত থ্ৰেড কাওন্টত এটা অনুমানৰ প্লেইচহল্ডাৰ হিচাপে ব্যৱহাৰ কৰা হয়। "
#: ../data/org.gnome.shell.gschema.xml.in.h:27
#: ../data/org.gnome.shell.gschema.xml.in.h:29
msgid "File extension used for storing the screencast"
msgstr "screencast সংৰক্ষণ কৰাৰ কাৰণে লথিপত্ৰ সম্প্ৰসাৰন"
#: ../data/org.gnome.shell.gschema.xml.in.h:28
#: ../data/org.gnome.shell.gschema.xml.in.h:30
msgid ""
"The filename for recorded screencasts will be a unique filename based on the "
"current date, and use this extension. It should be changed when recording to "
"a different container format."
msgstr ""
"ৰেকৰ্ড কৰা screencasts -ৰ কাৰণে নথিপত্ৰ নাম বৰ্তমান তাৰিখৰ উপৰত ভিত্তি কৰি এটা "
"ৰেকৰ্ড কৰা screencasts ৰ কাৰণে নথিপত্ৰ নাম বৰ্তমান তাৰিখৰ উপৰত ভিত্তি কৰি এটা "
"অবিকল্প নথিপত্ৰ নাম হব, আৰু এই সম্প্ৰসাৰন ব্যৱহাৰ কৰিব। ইয়াক এটা ভিন্ন অন্তৰ্ভুক্তক "
"বিন্যাসত েকৰ্ড কৰোতে পৰিৱৰ্তন কৰিব লাগিব।"
"বিন্যাসত েকৰ্ড কৰোতে পৰিৱৰ্তন কৰিব লাগিব।"
#: ../js/extensionPrefs/main.js:125
#, c-format
@ -219,40 +227,40 @@ msgstr "<b>সম্প্ৰসাৰন</b>"
msgid "Select an extension to configure using the combobox above."
msgstr "উপৰত দিয়া কম্বোবাকচ ব্যৱহাৰ কৰি সংৰূপণ কৰিবলে এটা সম্প্ৰসাৰন বাছক।"
#: ../js/gdm/loginDialog.js:624
#: ../js/gdm/loginDialog.js:627
msgid "Session..."
msgstr "অধিবেশন..."
#: ../js/gdm/loginDialog.js:786
#: ../js/gdm/loginDialog.js:789
msgctxt "title"
msgid "Sign In"
msgstr "ছাইন ইন কৰক"
#. Translators: this message is shown below the password entry field
#. to indicate the user can swipe their finger instead
#: ../js/gdm/loginDialog.js:831
#: ../js/gdm/loginDialog.js:834
msgid "(or swipe finger)"
msgstr "(অথবা আঙুলি স্বাইপ কৰক)"
#. translators: this message is shown below the user list on the
#. login screen. It can be activated to reveal an entry for
#. manually entering the username.
#: ../js/gdm/loginDialog.js:852
#: ../js/gdm/loginDialog.js:855
msgid "Not listed?"
msgstr "তালিকাভুক্ত নহয়?"
#: ../js/gdm/loginDialog.js:1020 ../js/ui/endSessionDialog.js:401
#: ../js/ui/extensionSystem.js:399 ../js/ui/networkAgent.js:153
#: ../js/gdm/loginDialog.js:1023 ../js/ui/endSessionDialog.js:401
#: ../js/ui/extensionSystem.js:400 ../js/ui/networkAgent.js:153
#: ../js/ui/polkitAuthenticationAgent.js:175 ../js/ui/status/bluetooth.js:462
msgid "Cancel"
msgstr "বাতিল কৰক"
#: ../js/gdm/loginDialog.js:1025
#: ../js/gdm/loginDialog.js:1028
msgctxt "button"
msgid "Sign In"
msgstr "ছাইন ইন কৰক"
#: ../js/gdm/loginDialog.js:1377
#: ../js/gdm/loginDialog.js:1380
msgid "Login Window"
msgstr "লগিন উইন্ডো"
@ -282,7 +290,7 @@ msgstr "কমান্ড বিশ্লেষন কৰিব নোৱাৰ
#: ../js/misc/util.js:127
#, c-format
msgid "Execution of '%s' failed:"
msgstr "'%s' -ৰ প্ৰেৰণ ব্যৰ্থ হল:"
msgstr "'%s' ৰ প্ৰেৰণ ব্যৰ্থ হল:"
#. Translators: Filter to display all applications
#: ../js/ui/appDisplay.js:255
@ -312,12 +320,12 @@ msgstr "পছন্দলে যোগ কৰক"
#: ../js/ui/appFavorites.js:87
#, c-format
msgid "%s has been added to your favorites."
msgstr "%s -ক আপোনাৰ পছন্দলে যোগ কৰা হৈছে।"
msgstr "%s ক আপোনাৰ পছন্দলে যোগ কৰা হৈছে।"
#: ../js/ui/appFavorites.js:118
#, c-format
msgid "%s has been removed from your favorites."
msgstr "%s -ক আপোনাৰ পছন্দৰ পৰা আতৰোৱা হৈছে।"
msgstr "%s ক আপোনাৰ পছন্দৰ পৰা আতৰোৱা হৈছে।"
#: ../js/ui/autorunManager.js:265
msgid "Removable Devices"
@ -326,7 +334,7 @@ msgstr "আতৰাব পৰা ডিভাইচসমূহ"
#: ../js/ui/autorunManager.js:560
#, c-format
msgid "Open with %s"
msgstr "%s -ৰ সৈতে খোলক"
msgstr "%s ৰ সৈতে খোলক"
#: ../js/ui/autorunManager.js:586
msgid "Eject"
@ -588,8 +596,8 @@ msgstr[1] "%s স্বচালিতভাৱে %d ছেকেণ্ডৰ
#, c-format
msgid "You will be logged out automatically in %d second."
msgid_plural "You will be logged out automatically in %d seconds."
msgstr[0] "আপুনি স্বচালিতভাৱে %d ছেকেণ্ডসমূহৰ পিছত লগ আউট হৈ যাব।"
msgstr[1] "আপুনি স্বচালিতভাৱে %d ছেকেণ্ড পিছত লগ আউট হৈ যাব।"
msgstr[0] "আপুনি স্বচালিতভাৱে %d ছেকেণ্ডৰ পিছত লগ আউট হৈ যাব।"
msgstr[1] "আপুনি স্বচালিতভাৱে %d ছেকেণ্ড পিছত লগ আউট হৈ যাব।"
#: ../js/ui/endSessionDialog.js:74
msgid "Logging out of the system."
@ -613,7 +621,7 @@ msgstr "এই অনুপ্ৰয়োগসমূহক প্ৰস্থা
#, c-format
msgid "The system will power off automatically in %d second."
msgid_plural "The system will power off automatically in %d seconds."
msgstr[0] "চিস্টেম %d ছেকেণ্ডসমূহৰ পিছত স্বচালিতভাৱে পাৱাৰ অফ হব। "
msgstr[0] "চিস্টেম %d ছেকেণ্ড পিছত স্বচালিতভাৱে পাৱাৰ অফ হব। "
msgstr[1] "চিস্টেম %d ছেকেণ্ডৰ পিছত স্বচালিতভাৱে বন্ধ হব। "
#: ../js/ui/endSessionDialog.js:88
@ -643,27 +651,28 @@ msgstr "এই অনুপ্ৰয়োগসমূহক প্ৰস্থা
#, c-format
msgid "The system will restart automatically in %d second."
msgid_plural "The system will restart automatically in %d seconds."
msgstr[0] "চিস্টেম %d ছেকেণ্ডসমূহত স্বচালিতভাৱে পুনৰাম্ভ হব।"
msgstr[0] "চিস্টেম %d ছেকেণ্ডত স্বচালিতভাৱে পুনৰাম্ভ হব।"
msgstr[1] "চিস্টেম %d ছেকেণ্ডত স্বচালিতভাৱে পুনৰাম্ভ হব।"
#: ../js/ui/endSessionDialog.js:105
msgid "Restarting the system."
msgstr "চিস্টেম পুনৰাম্ভ কৰা হৈ আছে।"
#: ../js/ui/extensionSystem.js:403
#: ../js/ui/extensionSystem.js:404
msgid "Install"
msgstr "ইনস্টল কৰক"
#: ../js/ui/extensionSystem.js:407
#: ../js/ui/extensionSystem.js:408
#, c-format
msgid "Download and install '%s' from extensions.gnome.org?"
msgstr "extensions.gnome.org -ৰ পৰা '%s' -ক ডাউনল'ড আৰু ইনস্টল কৰিব নে?"
msgstr "extensions.gnome.org ৰ পৰা '%s' ক ডাউনল'ড আৰু ইনস্টল কৰিব নে?"
#: ../js/ui/keyboard.js:327
msgid "tray"
msgstr "ট্ৰে"
#: ../js/ui/keyboard.js:544 ../js/ui/status/power.js:203
#: ../js/ui/keyboard.js:544 ../js/ui/status/keyboard.js:44
#: ../js/ui/status/power.js:203
msgid "Keyboard"
msgstr "কিবৰ্ড"
@ -675,51 +684,51 @@ msgstr "পাছৱাৰ্ড:"
msgid "Type again:"
msgstr "আকৌ টাইপ কৰক:"
#: ../js/ui/lookingGlass.js:725
#: ../js/ui/lookingGlass.js:732
msgid "No extensions installed"
msgstr "কোনো সম্প্ৰসাৰন ইনস্টল কৰা হোৱা নাই"
#. Translators: argument is an extension UUID.
#: ../js/ui/lookingGlass.js:779
#: ../js/ui/lookingGlass.js:786
#, c-format
msgid "%s has not emitted any errors."
msgstr "%s এ কোনো ত্ৰুটি প্ৰেৰণ কৰা নাই।"
#: ../js/ui/lookingGlass.js:785
#: ../js/ui/lookingGlass.js:792
msgid "Hide Errors"
msgstr "ত্ৰুটিসমূহ লুকুৱাওক"
#: ../js/ui/lookingGlass.js:789 ../js/ui/lookingGlass.js:840
#: ../js/ui/lookingGlass.js:796 ../js/ui/lookingGlass.js:847
msgid "Show Errors"
msgstr "ত্ৰুটিসমূহ দেখুৱাওক"
#: ../js/ui/lookingGlass.js:798
#: ../js/ui/lookingGlass.js:805
msgid "Enabled"
msgstr "সামৰ্থবান কৰা আছে"
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:801 ../src/gvc/gvc-mixer-control.c:1093
#: ../js/ui/lookingGlass.js:808 ../src/gvc/gvc-mixer-control.c:1082
msgid "Disabled"
msgstr "অসামৰ্থবান কৰা আছে"
#: ../js/ui/lookingGlass.js:803
#: ../js/ui/lookingGlass.js:810
msgid "Error"
msgstr "ত্ৰুটি"
#: ../js/ui/lookingGlass.js:805
#: ../js/ui/lookingGlass.js:812
msgid "Out of date"
msgstr "পুৰনি"
#: ../js/ui/lookingGlass.js:807
#: ../js/ui/lookingGlass.js:814
msgid "Downloading"
msgstr "ডাউনলড কৰা হৈ আছে"
msgstr "ডাউনল'ড কৰা হৈ আছে"
#: ../js/ui/lookingGlass.js:828
#: ../js/ui/lookingGlass.js:835
msgid "View Source"
msgstr "উৎস দৰ্শন কৰক"
#: ../js/ui/lookingGlass.js:834
#: ../js/ui/lookingGlass.js:841
msgid "Web Page"
msgstr "ৱেব পৃষ্ঠা"
@ -759,7 +768,7 @@ msgstr "পাছৱাৰ্ড: "
#. static WEP
#: ../js/ui/networkAgent.js:248
msgid "Key: "
msgstr "চাবি: "
msgstr "কি': "
#. TTLS and PEAP are actually much more complicated, but this complication
#. is not visible here since we only care about phase2 authentication
@ -774,7 +783,7 @@ msgstr "পৰিচয়: "
#: ../js/ui/networkAgent.js:288
msgid "Private key password: "
msgstr "ব্যক্তিগত চাবি পাছৱাৰ্ড: "
msgstr "ব্যক্তিগত কি' পাছৱাৰ্ড: "
#: ../js/ui/networkAgent.js:300
msgid "Service: "
@ -790,7 +799,7 @@ msgid ""
"Passwords or encryption keys are required to access the wireless network '%"
"s'."
msgstr ""
"বেতাঁৰ নেটৱাৰ্ক '%s' অভিগম কৰিবলে পাছৱাৰ্ডসমূহ অথবা ইনক্ৰিপষণ চাবিসমূহৰ প্ৰয়োজন।"
"বেতাঁৰ নেটৱাৰ্ক '%s' অভিগম কৰিবলে পাছৱাৰ্ডসমূহ অথবা ইনক্ৰিপষণ কি'সমূহৰ প্ৰয়োজন।"
#: ../js/ui/networkAgent.js:334
msgid "Wired 802.1X authentication"
@ -806,11 +815,11 @@ msgstr "DSL প্ৰমাণীকৰণ"
#: ../js/ui/networkAgent.js:348
msgid "PIN code required"
msgstr "PIN কডৰ প্ৰয়োজন"
msgstr "PIN ক'ডৰ প্ৰয়োজন"
#: ../js/ui/networkAgent.js:349
msgid "PIN code is needed for the mobile broadband device"
msgstr "মবাইল ব্ৰডবেণ্ড সেৱাৰ বাবে PIN কডৰ প্ৰয়োজন"
msgstr "মবাইল ব্ৰডবেণ্ড সেৱাৰ বাবে PIN ক'ডৰ প্ৰয়োজন"
#: ../js/ui/networkAgent.js:350
msgid "PIN: "
@ -823,7 +832,7 @@ msgstr "মবাইল ব্ৰডবেণ্ড নেটৱাৰ্ক প
#: ../js/ui/networkAgent.js:357
#, c-format
msgid "A password is required to connect to '%s'."
msgstr "'%s' -লে সংযোগ কৰিবলে এটা পাছৱাৰ্ডৰ প্ৰয়োজন।"
msgstr "'%s' লে সংযোগ কৰিবলে এটা পাছৱাৰ্ডৰ প্ৰয়োজন।"
#: ../js/ui/overview.js:90
msgid "Undo"
@ -847,17 +856,17 @@ msgstr "অনুপ্ৰয়োগসমূহ"
msgid "Dash"
msgstr "ডেশ"
#: ../js/ui/panel.js:591
#: ../js/ui/panel.js:592
msgid "Quit"
msgstr "প্ৰস্থান কৰক"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: ../js/ui/panel.js:623
#: ../js/ui/panel.js:624
msgid "Activities"
msgstr "কাৰ্য্যসমূহ"
#: ../js/ui/panel.js:998
#: ../js/ui/panel.js:999
msgid "Top Bar"
msgstr "উপৰৰ বাৰ"
@ -872,7 +881,7 @@ msgstr "পুনৰ চেষ্টা কৰক"
#: ../js/ui/placeDisplay.js:156
msgid "Connect to..."
msgstr "-লে সংযোগ কৰক..."
msgstr "লে সংযোগ কৰক..."
#: ../js/ui/placeDisplay.js:367
msgid "PLACES & DEVICES"
@ -909,13 +918,13 @@ msgstr "toggle-switch-us"
#: ../js/ui/runDialog.js:205
msgid "Please enter a command:"
msgstr "অনুগ্ৰহ কৰি এটা কমান্ড সোমাওক:"
msgstr "অনুগ্ৰহ কৰি এটা কমান্ড সুমুৱাওক:"
#: ../js/ui/searchDisplay.js:331
#: ../js/ui/searchDisplay.js:332
msgid "Searching..."
msgstr "বিচৰা হৈছে..."
msgstr "সন্ধান কৰা হৈছে..."
#: ../js/ui/searchDisplay.js:413
#: ../js/ui/searchDisplay.js:415
msgid "No matching results."
msgstr "কোনো মিল থকা ফলাফল নাই।"
@ -960,19 +969,19 @@ msgstr "চক্ষ সতৰ্কবাৰ্তাসমূহ"
#: ../js/ui/status/accessibility.js:70
msgid "Sticky Keys"
msgstr "স্টিকি চাবিসমূহ"
msgstr "স্টিকি কি'সমূহ"
#: ../js/ui/status/accessibility.js:73
msgid "Slow Keys"
msgstr "মন্থৰ চাবিসমূহ"
msgstr "মন্থৰ কি'সমূহ"
#: ../js/ui/status/accessibility.js:76
msgid "Bounce Keys"
msgstr "বাউঞ্চ চাবিসমূহ"
msgstr "বাউঞ্চ কি'সমূহ"
#: ../js/ui/status/accessibility.js:79
msgid "Mouse Keys"
msgstr "মাউচ চাবিসমূহ"
msgstr "মাউছ কি'সমূহ"
#: ../js/ui/status/accessibility.js:83
msgid "Universal Access Settings"
@ -1049,7 +1058,7 @@ msgstr "কিবৰ্ড সংহতিসমূহ"
#: ../js/ui/status/bluetooth.js:271
msgid "Mouse Settings"
msgstr "মাউ আৰু টাচপেড সংহতিসমূহ"
msgstr "মাউ আৰু টাচপেড সংহতিসমূহ"
#: ../js/ui/status/bluetooth.js:276 ../js/ui/status/volume.js:59
msgid "Sound Settings"
@ -1058,12 +1067,12 @@ msgstr "শব্দ সংহতিসমূহ"
#: ../js/ui/status/bluetooth.js:372
#, c-format
msgid "Authorization request from %s"
msgstr "%s -ৰ পৰা প্ৰমাণীকৰণ অনুৰোধ"
msgstr "%s ৰ পৰা প্ৰমাণীকৰণ অনুৰোধ"
#: ../js/ui/status/bluetooth.js:378
#, c-format
msgid "Device %s wants access to the service '%s'"
msgstr "ডিভাইচ %s -এ সেৱা '%s' -লে অভিগম বিচাৰে"
msgstr "ডিভাইচ %s এ সেৱা '%s' লে অভিগম বিচাৰে"
#: ../js/ui/status/bluetooth.js:380
msgid "Always grant access"
@ -1073,24 +1082,24 @@ msgstr "সদায় অভিগম প্ৰদান কৰক"
msgid "Grant this time only"
msgstr "কেৱল এইবাৰৰ কাৰণে প্ৰদান কৰক"
#: ../js/ui/status/bluetooth.js:382 ../js/ui/telepathyClient.js:1091
#: ../js/ui/status/bluetooth.js:382 ../js/ui/telepathyClient.js:1093
msgid "Reject"
msgstr "নাকচ কৰক"
#: ../js/ui/status/bluetooth.js:408
#, c-format
msgid "Pairing confirmation for %s"
msgstr "%s -ৰ কাৰণে যোৰ প্ৰতিশ্ৰুতি"
msgstr "%s ৰ কাৰণে যোৰ প্ৰতিশ্ৰুতি"
#: ../js/ui/status/bluetooth.js:414 ../js/ui/status/bluetooth.js:444
#, c-format
msgid "Device %s wants to pair with this computer"
msgstr "ডিভাইচ %s -এ এই কমপিউটাৰৰ লগত সংযোগ কৰিব বিচাৰে"
msgstr "ডিভাইচ %s এ এই কমপিউটাৰৰ লগত সংযোগ কৰিব বিচাৰে"
#: ../js/ui/status/bluetooth.js:415
#, c-format
msgid "Please confirm whether the PIN '%s' matches the one on the device."
msgstr "অনুগ্ৰহ কৰি সুনিশ্চিত কৰক যে PIN '%s' ডিভাইচত থকাটোৰ লগত মিল খায়।"
msgstr "অনুগ্ৰহ কৰি সুনিশ্চিত কৰক যে PIN '%s' ডিভাইচত থকাটোৰ সৈতে মিল খায়।"
#: ../js/ui/status/bluetooth.js:417
msgid "Matches"
@ -1103,11 +1112,11 @@ msgstr "মিল নাখায়"
#: ../js/ui/status/bluetooth.js:437
#, c-format
msgid "Pairing request for %s"
msgstr "%s -ৰ কাৰণে যোৰ অনুৰোধ"
msgstr "%s ৰ কাৰণে যোৰ অনুৰোধ"
#: ../js/ui/status/bluetooth.js:445
msgid "Please enter the PIN mentioned on the device."
msgstr "অনুগ্ৰহ কৰি ডিভাইচত উল্লেখ কৰা PIN সোমাওক।"
msgstr "অনুগ্ৰহ কৰি ডিভাইচত উল্লেখ কৰা PIN সুমুৱাওক।"
#: ../js/ui/status/bluetooth.js:461
msgid "OK"
@ -1261,7 +1270,7 @@ msgstr "অনুমান কৰা হৈ আছে..."
msgid "%d hour remaining"
msgid_plural "%d hours remaining"
msgstr[0] "%d ঘন্টা অৱশিষ্ট"
msgstr[1] "%d ঘন্টাসমূহ অৱশিষ্ট"
msgstr[1] "%d ঘন্টা অৱশিষ্ট"
#. TRANSLATORS: this is a time string, as in "%d hours %d minutes remaining"
#: ../js/ui/status/power.js:108
@ -1273,20 +1282,20 @@ msgstr "%d %s %d %s অৱশিষ্ট"
msgid "hour"
msgid_plural "hours"
msgstr[0] "ঘন্টা"
msgstr[1] "ঘন্টাসমূহ"
msgstr[1] "ঘন্টা"
#: ../js/ui/status/power.js:110
msgid "minute"
msgid_plural "minutes"
msgstr[0] "মিনিট"
msgstr[1] "মিনিটসমূহ"
msgstr[1] "মিনিট"
#: ../js/ui/status/power.js:113
#, c-format
msgid "%d minute remaining"
msgid_plural "%d minutes remaining"
msgstr[0] "%d মিনিট অৱশিষ্ট"
msgstr[1] "%d মিনিটসমূহ অৱশিষ্ট"
msgstr[1] "%d মিনিট অৱশিষ্ট"
#: ../js/ui/status/power.js:116 ../js/ui/status/power.js:186
#, c-format
@ -1337,7 +1346,7 @@ msgstr "কমপিউটাৰ"
#. Translators: This is the label for audio volume
#: ../js/ui/status/volume.js:25 ../js/ui/status/volume.js:39
msgid "Volume"
msgstr "আয়তন"
msgstr "ভলিউম"
#: ../js/ui/status/volume.js:51
msgid "Microphone"
@ -1390,71 +1399,71 @@ msgstr "%s ব্যস্ত আছে।"
#. Translators: this is a time format string followed by a date.
#. If applicable, replace %X with a strftime format valid for your
#. locale, without seconds.
#: ../js/ui/telepathyClient.js:887
#: ../js/ui/telepathyClient.js:889
#, no-c-format
msgid "Sent at <b>%X</b> on <b>%A</b>"
msgstr "<b>%X</b> on <b>%A</b> -ত পঠোৱা হৈছে"
msgstr "<b>%X</b> on <b>%A</b> ত পঠোৱা হৈছে"
#. Translators: this is a time format in the style of "Wednesday, May 25",
#. shown when you get a chat message in the same year.
#: ../js/ui/telepathyClient.js:893
#: ../js/ui/telepathyClient.js:895
#, no-c-format
msgid "Sent on <b>%A</b>, <b>%B %d</b>"
msgstr "<b>%A</b> -ত পঠোৱা হৈছে, <b>%B %d</b>"
msgstr "<b>%A</b> ত পঠোৱা হৈছে, <b>%B %d</b>"
#. Translators: this is a time format in the style of "Wednesday, May 25, 2012",
#. shown when you get a chat message in a different year.
#: ../js/ui/telepathyClient.js:898
#: ../js/ui/telepathyClient.js:900
#, no-c-format
msgid "Sent on <b>%A</b>, <b>%B %d</b>, %Y"
msgstr "<b>%A</b> -ত পঠোৱা হৈছে, <b>%B %d</b>, %Y"
msgstr "<b>%A</b> ত পঠোৱা হৈছে, <b>%B %d</b>, %Y"
#. Translators: this is the other person changing their old IM name to their new
#. IM name.
#: ../js/ui/telepathyClient.js:940
#: ../js/ui/telepathyClient.js:942
#, c-format
msgid "%s is now known as %s"
msgstr "%s এতিয়া %s হিচাপে জনাজাত"
#. translators: argument is a room name like
#. * room@jabber.org for example.
#: ../js/ui/telepathyClient.js:1042
#: ../js/ui/telepathyClient.js:1044
#, c-format
msgid "Invitation to %s"
msgstr "%s -লে নিমন্ত্ৰণ"
msgstr "%s লে নিমন্ত্ৰণ"
#. translators: first argument is the name of a contact and the second
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
#. * for example.
#: ../js/ui/telepathyClient.js:1050
#: ../js/ui/telepathyClient.js:1052
#, c-format
msgid "%s is inviting you to join %s"
msgstr "%s -এ আপোনাক %s -ত অংশগ্ৰহণ কৰিবলে আমন্ত্ৰণ জনাইছে"
msgstr "%s এ আপোনাক %s ত অংশগ্ৰহণ কৰিবলে আমন্ত্ৰণ জনাইছে"
#: ../js/ui/telepathyClient.js:1052 ../js/ui/telepathyClient.js:1131
#: ../js/ui/telepathyClient.js:1229
#: ../js/ui/telepathyClient.js:1054 ../js/ui/telepathyClient.js:1133
#: ../js/ui/telepathyClient.js:1231
msgid "Decline"
msgstr "নাকচ কৰক"
#: ../js/ui/telepathyClient.js:1053 ../js/ui/telepathyClient.js:1132
#: ../js/ui/telepathyClient.js:1230
#: ../js/ui/telepathyClient.js:1055 ../js/ui/telepathyClient.js:1134
#: ../js/ui/telepathyClient.js:1232
msgid "Accept"
msgstr "গ্ৰহন কৰক"
#. translators: argument is a contact name like Alice for example.
#: ../js/ui/telepathyClient.js:1083
#: ../js/ui/telepathyClient.js:1085
#, c-format
msgid "Video call from %s"
msgstr "%s -ৰ পৰা ভিডিঅ' কল"
msgstr "%s ৰ পৰা ভিডিঅ' কল"
#. translators: argument is a contact name like Alice for example.
#: ../js/ui/telepathyClient.js:1086
#: ../js/ui/telepathyClient.js:1088
#, c-format
msgid "Call from %s"
msgstr "%s - পৰা কল"
#. translators: this is a button label (verb), not a noun
#: ../js/ui/telepathyClient.js:1093
#: ../js/ui/telepathyClient.js:1095
msgid "Answer"
msgstr "উত্তৰ"
@ -1463,107 +1472,107 @@ msgstr "উত্তৰ"
#. * file name. The string will be something
#. * like: "Alice is sending you test.ogg"
#.
#: ../js/ui/telepathyClient.js:1125
#: ../js/ui/telepathyClient.js:1127
#, c-format
msgid "%s is sending you %s"
msgstr "%s -এ আপোনাক %s পঠাই আছে"
msgstr "%s এ আপোনাক %s পঠাই আছে"
#. To translators: The parameter is the contact's alias
#: ../js/ui/telepathyClient.js:1194
#: ../js/ui/telepathyClient.js:1196
#, c-format
msgid "%s would like permission to see when you are online"
msgstr "আপুনি কেতিয়া অনলাইন আছে চাবলে %s -এ অনুমতি বিচাৰিব"
msgstr "আপুনি কেতিয়া অনলাইন আছে চাবলে %s এ অনুমতি বিচাৰিব"
#: ../js/ui/telepathyClient.js:1287
#: ../js/ui/telepathyClient.js:1289
msgid "Network error"
msgstr "নেটৱাৰ্ক ত্ৰুটি"
#: ../js/ui/telepathyClient.js:1289
#: ../js/ui/telepathyClient.js:1291
msgid "Authentication failed"
msgstr "প্ৰমাণীকৰণ ব্যৰ্থ"
#: ../js/ui/telepathyClient.js:1291
#: ../js/ui/telepathyClient.js:1293
msgid "Encryption error"
msgstr "ইনক্ৰিপষণ ত্ৰুটি"
#: ../js/ui/telepathyClient.js:1293
#: ../js/ui/telepathyClient.js:1295
msgid "Certificate not provided"
msgstr "প্ৰমাণপত্ৰ প্ৰদান কৰা হোৱা নাই"
#: ../js/ui/telepathyClient.js:1295
#: ../js/ui/telepathyClient.js:1297
msgid "Certificate untrusted"
msgstr "প্ৰমাণপত্ৰক ভৰষা কৰিব নোৱাৰি"
#: ../js/ui/telepathyClient.js:1297
#: ../js/ui/telepathyClient.js:1299
msgid "Certificate expired"
msgstr "প্ৰমাণপত্ৰৰ অৱসান ঘটিছে"
#: ../js/ui/telepathyClient.js:1299
#: ../js/ui/telepathyClient.js:1301
msgid "Certificate not activated"
msgstr "প্ৰমাণপত্ৰ সক্ৰিয় কৰা হোৱা নাই"
#: ../js/ui/telepathyClient.js:1301
#: ../js/ui/telepathyClient.js:1303
msgid "Certificate hostname mismatch"
msgstr "প্ৰমাণপত্ৰ হস্টনাম অমিল"
#: ../js/ui/telepathyClient.js:1303
msgid "Certificate fingerprint mismatch"
msgstr "প্ৰমাণপত্ৰ ফিন্গাৰপ্ৰিন্ট অমিল"
#: ../js/ui/telepathyClient.js:1305
msgid "Certificate self-signed"
msgstr "প্ৰমাণপত্ৰ স্বস্বাক্ষৰীত"
msgid "Certificate fingerprint mismatch"
msgstr "প্ৰমাণপত্ৰ ফিংগাৰপ্ৰিন্ট অমিল"
#: ../js/ui/telepathyClient.js:1307
msgid "Certificate self-signed"
msgstr "প্ৰমাণপত্ৰ স্ব-স্বাক্ষৰীত"
#: ../js/ui/telepathyClient.js:1309
msgid "Status is set to offline"
msgstr "অৱস্থা অফলাইনলে সংহতি কৰা হৈছে"
#: ../js/ui/telepathyClient.js:1309
#: ../js/ui/telepathyClient.js:1311
msgid "Encryption is not available"
msgstr "ইনক্ৰিপষণ উপলব্ধ নহয়"
#: ../js/ui/telepathyClient.js:1311
#: ../js/ui/telepathyClient.js:1313
msgid "Certificate is invalid"
msgstr "প্ৰমাণপত্ৰ অবৈধ"
#: ../js/ui/telepathyClient.js:1313
#: ../js/ui/telepathyClient.js:1315
msgid "Connection has been refused"
msgstr "সংযোগ নাকচ কৰা হৈছে"
#: ../js/ui/telepathyClient.js:1315
#: ../js/ui/telepathyClient.js:1317
msgid "Connection can't be established"
msgstr "সংযোগ স্থাপন কৰিব নোৱাৰি"
#: ../js/ui/telepathyClient.js:1317
#: ../js/ui/telepathyClient.js:1319
msgid "Connection has been lost"
msgstr "সংযোগ হেৰাইছে"
#: ../js/ui/telepathyClient.js:1319
#: ../js/ui/telepathyClient.js:1321
msgid "This account is already connected to the server"
msgstr "এই একাওন্ট ইতিমধ্যে চাৰ্ভাৰৰ সৈতে সংযোগিত"
#: ../js/ui/telepathyClient.js:1321
#: ../js/ui/telepathyClient.js:1323
msgid "Connection has been replaced by a new connection using the same resource"
msgstr "সংযোগক একে সম্পদ ব্যৱহাৰ কৰি এটা নতুন সংযোগৰে প্ৰতিস্থাপন কৰা হৈছে"
#: ../js/ui/telepathyClient.js:1323
#: ../js/ui/telepathyClient.js:1325
msgid "The account already exists on the server"
msgstr "একাওন্ট ইতিমধ্যে চাৰ্ভাৰত উপস্থিত"
#: ../js/ui/telepathyClient.js:1325
#: ../js/ui/telepathyClient.js:1327
msgid "Server is currently too busy to handle the connection"
msgstr "চাৰ্ভাৰ সংযোগ ব্যৱস্থাপনা কৰিবলে বৰ্তমানে অতি ব্যস্ত"
#: ../js/ui/telepathyClient.js:1327
#: ../js/ui/telepathyClient.js:1329
msgid "Certificate has been revoked"
msgstr "প্ৰমাণপত্ৰ প্ৰত্যাহাৰ কৰা হৈছে"
#: ../js/ui/telepathyClient.js:1329
#: ../js/ui/telepathyClient.js:1331
msgid "Certificate uses an insecure cipher algorithm or is cryptographically weak"
msgstr ""
"প্ৰমাণপত্ৰয় এটা অসুৰক্ষিত চিফাৰ এলগৰিথম ব্যৱহাৰ কৰে অথবা ক্ৰিপ্টোগ্ৰাফিয়ভাৱে দুৰ্বল"
#: ../js/ui/telepathyClient.js:1331
#: ../js/ui/telepathyClient.js:1333
msgid ""
"The length of the server certificate, or the depth of the server certificate "
"chain, exceed the limits imposed by the cryptography library"
@ -1571,26 +1580,26 @@ msgstr ""
"চাৰ্ভাৰ প্ৰমাণপত্ৰৰ দৈৰ্ঘ, অথবা চাৰ্ভাৰ প্ৰমাণপত্ৰ শৃংখলৰ গভীৰতা, ক্ৰিপ্টোগ্ৰাফী "
"লাইব্ৰেৰীয়ে প্ৰণয়ন কৰা সীমাসমূহত অতিক্ৰম কৰে"
#: ../js/ui/telepathyClient.js:1333
#: ../js/ui/telepathyClient.js:1335
msgid "Internal error"
msgstr "অভ্যন্তৰীক ত্ৰুটি"
#. translators: argument is the account name, like
#. * name@jabber.org for example.
#: ../js/ui/telepathyClient.js:1343
#: ../js/ui/telepathyClient.js:1345
#, c-format
msgid "Connection to %s failed"
msgstr "%s -লে সংযোগ ব্যৰ্থ"
msgstr "%s লে সংযোগ ব্যৰ্থ"
#: ../js/ui/telepathyClient.js:1352
#: ../js/ui/telepathyClient.js:1354
msgid "Reconnect"
msgstr "পুনৰ সংযোগ কৰক"
#: ../js/ui/telepathyClient.js:1353
#: ../js/ui/telepathyClient.js:1355
msgid "Edit account"
msgstr "একাওন্ট সম্পাদন কৰক"
#: ../js/ui/telepathyClient.js:1399
#: ../js/ui/telepathyClient.js:1401
msgid "Unknown reason"
msgstr "অজ্ঞাত কাৰণ"
@ -1608,7 +1617,7 @@ msgstr "উপলব্ধ নাই"
#: ../js/ui/userMenu.js:595 ../js/ui/userMenu.js:599 ../js/ui/userMenu.js:669
msgid "Power Off..."
msgstr ""
msgstr "পাৱাৰ অফ"
#: ../js/ui/userMenu.js:631
msgid "Notifications"
@ -1628,11 +1637,11 @@ msgstr "পৰ্দা লক কৰক"
#: ../js/ui/userMenu.js:655
msgid "Switch User"
msgstr "ব্যৱহাৰকাৰী অদল বদল কৰক"
msgstr "ব্যৱহাৰকাৰী পৰিবৰ্তন কৰক"
#: ../js/ui/userMenu.js:660
msgid "Log Out..."
msgstr "লগ আউট..."
msgstr "লগ আউট কৰক..."
#: ../js/ui/userMenu.js:688
msgid "Your chat status will be set to busy"
@ -1653,7 +1662,7 @@ msgstr ""
#. characters.
#: ../js/ui/viewSelector.js:113
msgid "Type to search..."
msgstr "বিচাৰিবলে টাইপ কৰক..."
msgstr "সন্ধান কৰিবলে টাইপ কৰক..."
#: ../js/ui/viewSelector.js:131 ../src/shell-util.c:252
msgid "Search"
@ -1684,7 +1693,7 @@ msgstr "'%s' প্ৰস্তুত"
#. translators:
#. * The number of sound outputs on a particular device
#: ../src/gvc/gvc-mixer-control.c:1100
#: ../src/gvc/gvc-mixer-control.c:1089
#, c-format
msgid "%u Output"
msgid_plural "%u Outputs"
@ -1693,14 +1702,14 @@ msgstr[1] "%u আউটপুটসমূহ"
#. translators:
#. * The number of sound inputs on a particular device
#: ../src/gvc/gvc-mixer-control.c:1110
#: ../src/gvc/gvc-mixer-control.c:1099
#, c-format
msgid "%u Input"
msgid_plural "%u Inputs"
msgstr[0] "%u ইনপুট"
msgstr[1] "%u ইনপুটসমূহ"
#: ../src/gvc/gvc-mixer-control.c:1408
#: ../src/gvc/gvc-mixer-control.c:1397
msgid "System Sounds"
msgstr "চিস্টেম শব্দসমূহ"
@ -1766,7 +1775,7 @@ msgstr "%1$s: %2$s"
#~ msgstr "পাছৱাৰ্ড দেখুৱাওক"
#~ msgid "%s has finished starting"
#~ msgstr "%s -এ আৰম্ভ কৰা সমাপ্ত কৰিছে"
#~ msgstr "%s এ আৰম্ভ কৰা সমাপ্ত কৰিছে"
#~ msgid "Home Folder"
#~ msgstr "ঘৰ ফোল্ডাৰ"

746
po/el.po

File diff suppressed because it is too large Load Diff

482
po/es.po

File diff suppressed because it is too large Load Diff

478
po/gl.po

File diff suppressed because it is too large Load Diff

673
po/he.po

File diff suppressed because it is too large Load Diff

594
po/id.po

File diff suppressed because it is too large Load Diff

238
po/it.po
View File

@ -8,15 +8,16 @@
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-05-12 20:08+0200\n"
"PO-Revision-Date: 2012-05-12 20:09+0200\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2012-04-28 13:41+0000\n"
"PO-Revision-Date: 2012-04-30 15:32+0200\n"
"Last-Translator: Luca Ferretti <lferrett@gnome.org>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: ../data/gnome-shell.desktop.in.in.h:1
@ -143,42 +144,34 @@ msgid "Keybinding to open the application menu."
msgstr "Associazione di tasti per aprire il menù delle applicazioni."
#: ../data/org.gnome.shell.gschema.xml.in.h:18
msgid "Keybinding to toggle the screen recorder"
msgstr "Associazione tasti per commutare registrazione schermo"
#: ../data/org.gnome.shell.gschema.xml.in.h:19
msgid "Keybinding to start/stop the builtin screen recorder."
msgstr "Associazione di tasti per avviare/fermare il registratore di schermo incorporato."
#: ../data/org.gnome.shell.gschema.xml.in.h:20
msgid "Which keyboard to use"
msgstr "Quale tastiera usare"
#: ../data/org.gnome.shell.gschema.xml.in.h:21
#: ../data/org.gnome.shell.gschema.xml.in.h:19
msgid "The type of keyboard to use."
msgstr "Il tipo di tastiera da usare."
#: ../data/org.gnome.shell.gschema.xml.in.h:22
#: ../data/org.gnome.shell.gschema.xml.in.h:20
msgid "Show time with seconds"
msgstr "Mostra l'ora con i secondi"
#: ../data/org.gnome.shell.gschema.xml.in.h:23
#: ../data/org.gnome.shell.gschema.xml.in.h:21
msgid "If true, display seconds in time."
msgstr "Se VERO, mostra i secondi nell'orario."
#: ../data/org.gnome.shell.gschema.xml.in.h:24
#: ../data/org.gnome.shell.gschema.xml.in.h:22
msgid "Show date in clock"
msgstr "Mostra la data nell'orologio"
#: ../data/org.gnome.shell.gschema.xml.in.h:25
#: ../data/org.gnome.shell.gschema.xml.in.h:23
msgid "If true, display date in the clock, in addition to time."
msgstr "Se VERO, mostra nell'orologio la data, oltre all'orario."
#: ../data/org.gnome.shell.gschema.xml.in.h:26
#: ../data/org.gnome.shell.gschema.xml.in.h:24
msgid "Framerate used for recording screencasts."
msgstr "Framerate per la registrazione di screencast."
#: ../data/org.gnome.shell.gschema.xml.in.h:27
#: ../data/org.gnome.shell.gschema.xml.in.h:25
msgid ""
"The framerate of the resulting screencast recordered by GNOME Shell's "
"screencast recorder in frames-per-second."
@ -186,11 +179,11 @@ msgstr ""
"Il framerate in fotogrammi al secondo dello screencast registrato attraverso "
"il registratore della GNOME Shell."
#: ../data/org.gnome.shell.gschema.xml.in.h:28
#: ../data/org.gnome.shell.gschema.xml.in.h:26
msgid "The gstreamer pipeline used to encode the screencast"
msgstr "La pipeline di gstreamer utilizzata per codificare lo screencast"
#: ../data/org.gnome.shell.gschema.xml.in.h:30
#: ../data/org.gnome.shell.gschema.xml.in.h:28
#, no-c-format
msgid ""
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
@ -216,11 +209,11 @@ msgstr ""
"WEBM usando il codec VP8. %T è usato come un segnaposto per una stima del "
"valore di thread ottimale per il sistema in uso."
#: ../data/org.gnome.shell.gschema.xml.in.h:31
#: ../data/org.gnome.shell.gschema.xml.in.h:29
msgid "File extension used for storing the screencast"
msgstr "Estensione del file utilizzato per salvare lo screencast"
#: ../data/org.gnome.shell.gschema.xml.in.h:32
#: ../data/org.gnome.shell.gschema.xml.in.h:30
msgid ""
"The filename for recorded screencasts will be a unique filename based on the "
"current date, and use this extension. It should be changed when recording to "
@ -270,7 +263,7 @@ msgstr "Non elencato?"
#: ../js/gdm/loginDialog.js:1023 ../js/ui/endSessionDialog.js:401
#: ../js/ui/extensionSystem.js:400 ../js/ui/networkAgent.js:153
#: ../js/ui/polkitAuthenticationAgent.js:175 ../js/ui/status/bluetooth.js:459
#: ../js/ui/polkitAuthenticationAgent.js:175 ../js/ui/status/bluetooth.js:462
msgid "Cancel"
msgstr "Annulla"
@ -283,31 +276,30 @@ msgstr "Accedi"
msgid "Login Window"
msgstr "Finestra di accesso"
#: ../js/gdm/powerMenu.js:130 ../js/ui/userMenu.js:588
#: ../js/ui/userMenu.js:592 ../js/ui/userMenu.js:637
#: ../js/gdm/powerMenu.js:155 ../js/ui/userMenu.js:597
#: ../js/ui/userMenu.js:599 ../js/ui/userMenu.js:668
msgid "Suspend"
msgstr "Sospendi"
#: ../js/gdm/powerMenu.js:135
#: ../js/gdm/powerMenu.js:160
msgid "Restart"
msgstr "Riavvia"
#: ../js/gdm/powerMenu.js:140 ../js/ui/userMenu.js:590
#: ../js/ui/userMenu.js:592 ../js/ui/userMenu.js:636
#: ../js/gdm/powerMenu.js:165
msgid "Power Off"
msgstr "Spegni"
#: ../js/misc/util.js:93
#: ../js/misc/util.js:92
msgid "Command not found"
msgstr "Comando non trovato"
#. Replace "Error invoking GLib.shell_parse_argv: " with
#. something nicer
#: ../js/misc/util.js:124
#: ../js/misc/util.js:119
msgid "Could not parse command:"
msgstr "Impossibile analizzare il comando:"
#: ../js/misc/util.js:132
#: ../js/misc/util.js:127
#, c-format
msgid "Execution of '%s' failed:"
msgstr "Esecuzione di «%s» non riuscita:"
@ -321,19 +313,19 @@ msgstr "Tutte"
msgid "APPLICATIONS"
msgstr "APPLICAZIONI"
#: ../js/ui/appDisplay.js:374
#: ../js/ui/appDisplay.js:375
msgid "SETTINGS"
msgstr "IMPOSTAZIONI"
#: ../js/ui/appDisplay.js:679
#: ../js/ui/appDisplay.js:680
msgid "New Window"
msgstr "Nuova finestra"
#: ../js/ui/appDisplay.js:682
#: ../js/ui/appDisplay.js:683
msgid "Remove from Favorites"
msgstr "Rimuovi dai preferiti"
#: ../js/ui/appDisplay.js:683
#: ../js/ui/appDisplay.js:684
msgid "Add to Favorites"
msgstr "Aggiungi ai preferiti"
@ -533,7 +525,7 @@ msgstr "Fuori rete"
msgid "CONTACTS"
msgstr "CONTATTI"
#: ../js/ui/dash.js:239 ../js/ui/messageTray.js:1209
#: ../js/ui/dash.js:229 ../js/ui/messageTray.js:1207
msgid "Remove"
msgstr "Rimuovi"
@ -715,53 +707,53 @@ msgstr "Password:"
msgid "Type again:"
msgstr "Inserire di nuovo:"
#: ../js/ui/lookingGlass.js:693
#: ../js/ui/lookingGlass.js:732
msgid "No extensions installed"
msgstr "Nessuna estensione installata"
#. Translators: argument is an extension UUID.
#: ../js/ui/lookingGlass.js:747
#: ../js/ui/lookingGlass.js:786
#, c-format
msgid "%s has not emitted any errors."
msgstr "%s non ha emesso alcun errore."
#: ../js/ui/lookingGlass.js:753
#: ../js/ui/lookingGlass.js:792
msgid "Hide Errors"
msgstr "Nascondi errori"
#: ../js/ui/lookingGlass.js:757 ../js/ui/lookingGlass.js:808
#: ../js/ui/lookingGlass.js:796 ../js/ui/lookingGlass.js:847
msgid "Show Errors"
msgstr "Mostra errori"
# (ndt) o abilitata?
#: ../js/ui/lookingGlass.js:766
#: ../js/ui/lookingGlass.js:805
msgid "Enabled"
msgstr "Abilitato"
# (ndt) o disabilitata?
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:769 ../src/gvc/gvc-mixer-control.c:1082
#: ../js/ui/lookingGlass.js:808 ../src/gvc/gvc-mixer-control.c:1082
msgid "Disabled"
msgstr "Disabilitato"
#: ../js/ui/lookingGlass.js:771
#: ../js/ui/lookingGlass.js:810
msgid "Error"
msgstr "Errore"
#: ../js/ui/lookingGlass.js:773
#: ../js/ui/lookingGlass.js:812
msgid "Out of date"
msgstr "Non aggiornato"
#: ../js/ui/lookingGlass.js:775
#: ../js/ui/lookingGlass.js:814
msgid "Downloading"
msgstr "Scaricamento"
#: ../js/ui/lookingGlass.js:796
#: ../js/ui/lookingGlass.js:835
msgid "View Source"
msgstr "Visualizza sorgente"
#: ../js/ui/lookingGlass.js:802
#: ../js/ui/lookingGlass.js:841
msgid "Web Page"
msgstr "Pagina web"
@ -771,19 +763,19 @@ msgstr "Pagina web"
msgid "Screencast from %d %t"
msgstr "Screencast da %d %t"
#: ../js/ui/messageTray.js:1202
#: ../js/ui/messageTray.js:1200
msgid "Open"
msgstr "Apri"
#: ../js/ui/messageTray.js:1219
#: ../js/ui/messageTray.js:1217
msgid "Unmute"
msgstr "Attiva audio"
#: ../js/ui/messageTray.js:1219
#: ../js/ui/messageTray.js:1217
msgid "Mute"
msgstr "Escludi audio"
#: ../js/ui/messageTray.js:2492
#: ../js/ui/messageTray.js:2490
msgid "System Information"
msgstr "Informazione di sistema"
@ -829,8 +821,8 @@ msgstr "Richiesta autenticazione dalla rete wireless"
#: ../js/ui/networkAgent.js:330
#, c-format
msgid ""
"Passwords or encryption keys are required to access the wireless network "
"'%s'."
"Passwords or encryption keys are required to access the wireless network '%"
"s'."
msgstr ""
"È richiesta una password o una chiave di cifratura per accedere alla rete "
"wireless «%s»."
@ -948,7 +940,7 @@ msgstr "Errore nell'autenticazione. Provare di nuovo."
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
#. switches containing "◯" and "|"). Other values will
#. simply result in invisible toggle switches.
#: ../js/ui/popupMenu.js:728
#: ../js/ui/popupMenu.js:724
msgid "toggle-switch-us"
msgstr "toggle-switch-us"
@ -956,11 +948,11 @@ msgstr "toggle-switch-us"
msgid "Please enter a command:"
msgstr "Inserire un comando:"
#: ../js/ui/searchDisplay.js:321
#: ../js/ui/searchDisplay.js:332
msgid "Searching..."
msgstr "Ricerca..."
#: ../js/ui/searchDisplay.js:374
#: ../js/ui/searchDisplay.js:415
msgid "No matching results."
msgstr "Nessun risultato corrispondente."
@ -1033,9 +1025,9 @@ msgid "Large Text"
msgstr "Caratteri grandi"
#: ../js/ui/status/bluetooth.js:31 ../js/ui/status/bluetooth.js:35
#: ../js/ui/status/bluetooth.js:255 ../js/ui/status/bluetooth.js:338
#: ../js/ui/status/bluetooth.js:368 ../js/ui/status/bluetooth.js:404
#: ../js/ui/status/bluetooth.js:433 ../js/ui/status/network.js:890
#: ../js/ui/status/bluetooth.js:258 ../js/ui/status/bluetooth.js:341
#: ../js/ui/status/bluetooth.js:371 ../js/ui/status/bluetooth.js:407
#: ../js/ui/status/bluetooth.js:436 ../js/ui/status/network.js:893
msgid "Bluetooth"
msgstr "Bluetooth"
@ -1063,102 +1055,102 @@ msgstr "hardware disabilitato"
# indica lo stato del device BT, per esempio gli auricolari
# credo sia meglio l'aggettivo che il sostantivo
#: ../js/ui/status/bluetooth.js:200
#: ../js/ui/status/bluetooth.js:203
msgid "Connection"
msgstr "Collegato"
#: ../js/ui/status/bluetooth.js:211 ../js/ui/status/network.js:491
#: ../js/ui/status/bluetooth.js:214 ../js/ui/status/network.js:491
msgid "disconnecting..."
msgstr "disconnessione..."
#: ../js/ui/status/bluetooth.js:224 ../js/ui/status/network.js:497
#: ../js/ui/status/bluetooth.js:227 ../js/ui/status/network.js:497
msgid "connecting..."
msgstr "connessione..."
#: ../js/ui/status/bluetooth.js:242
#: ../js/ui/status/bluetooth.js:245
msgid "Send Files..."
msgstr "Invia file..."
#: ../js/ui/status/bluetooth.js:247
#: ../js/ui/status/bluetooth.js:250
msgid "Browse Files..."
msgstr "Esplora file..."
#: ../js/ui/status/bluetooth.js:256
#: ../js/ui/status/bluetooth.js:259
msgid "Error browsing device"
msgstr "Errore nell'esplorare il dispositivo"
#: ../js/ui/status/bluetooth.js:257
#: ../js/ui/status/bluetooth.js:260
#, c-format
msgid "The requested device cannot be browsed, error is '%s'"
msgstr "Non è possibile esplorare il dispositivo richiesto, l'errore è «%s»"
#: ../js/ui/status/bluetooth.js:265
#: ../js/ui/status/bluetooth.js:268
msgid "Keyboard Settings"
msgstr "Impostazioni tastiera"
#: ../js/ui/status/bluetooth.js:268
#: ../js/ui/status/bluetooth.js:271
msgid "Mouse Settings"
msgstr "Impostazioni mouse"
#: ../js/ui/status/bluetooth.js:273 ../js/ui/status/volume.js:59
#: ../js/ui/status/bluetooth.js:276 ../js/ui/status/volume.js:59
msgid "Sound Settings"
msgstr "Impostazioni audio"
#: ../js/ui/status/bluetooth.js:369
#: ../js/ui/status/bluetooth.js:372
#, c-format
msgid "Authorization request from %s"
msgstr "Richesta autorizzazione da %s"
#: ../js/ui/status/bluetooth.js:375
#: ../js/ui/status/bluetooth.js:378
#, c-format
msgid "Device %s wants access to the service '%s'"
msgstr "Il dispositivo %s vuole accedere al servizio «%s»"
#: ../js/ui/status/bluetooth.js:377
#: ../js/ui/status/bluetooth.js:380
msgid "Always grant access"
msgstr "Accorda sempre l'accesso"
#: ../js/ui/status/bluetooth.js:378
#: ../js/ui/status/bluetooth.js:381
msgid "Grant this time only"
msgstr "Accorda solo stavolta"
#: ../js/ui/status/bluetooth.js:379 ../js/ui/telepathyClient.js:1093
#: ../js/ui/status/bluetooth.js:382 ../js/ui/telepathyClient.js:1093
msgid "Reject"
msgstr "Rifiuta"
#: ../js/ui/status/bluetooth.js:405
#: ../js/ui/status/bluetooth.js:408
#, c-format
msgid "Pairing confirmation for %s"
msgstr "Conferma associazione per %s"
#: ../js/ui/status/bluetooth.js:411 ../js/ui/status/bluetooth.js:441
#: ../js/ui/status/bluetooth.js:414 ../js/ui/status/bluetooth.js:444
#, c-format
msgid "Device %s wants to pair with this computer"
msgstr "Il dispositivo %s vuole associarsi con questo computer"
#: ../js/ui/status/bluetooth.js:412
#: ../js/ui/status/bluetooth.js:415
#, c-format
msgid "Please confirm whether the PIN '%s' matches the one on the device."
msgstr "Confermare la corrispondenza del PIN «%s» con quello sul dispositivo."
#: ../js/ui/status/bluetooth.js:414
#: ../js/ui/status/bluetooth.js:417
msgid "Matches"
msgstr "Corrisponde"
#: ../js/ui/status/bluetooth.js:415
#: ../js/ui/status/bluetooth.js:418
msgid "Does not match"
msgstr "Non corrisponde"
#: ../js/ui/status/bluetooth.js:434
#: ../js/ui/status/bluetooth.js:437
#, c-format
msgid "Pairing request for %s"
msgstr "Richiesta di associazione per %s"
#: ../js/ui/status/bluetooth.js:442
#: ../js/ui/status/bluetooth.js:445
msgid "Please enter the PIN mentioned on the device."
msgstr "Inserire il PIN indicato sul dispositivo."
#: ../js/ui/status/bluetooth.js:458
#: ../js/ui/status/bluetooth.js:461
msgid "OK"
msgstr "OK"
@ -1212,13 +1204,13 @@ msgstr "non disponibile"
msgid "connection failed"
msgstr "connessione non riuscita"
#: ../js/ui/status/network.js:585 ../js/ui/status/network.js:1497
#: ../js/ui/status/network.js:585 ../js/ui/status/network.js:1505
msgid "More..."
msgstr "Altro..."
#. TRANSLATORS: this is the indication that a connection for another logged in user is active,
#. and we cannot access its settings (including the name)
#: ../js/ui/status/network.js:621 ../js/ui/status/network.js:1432
#: ../js/ui/status/network.js:621 ../js/ui/status/network.js:1440
msgid "Connected (private)"
msgstr "Connessa (privata)"
@ -1226,69 +1218,69 @@ msgstr "Connessa (privata)"
msgid "Auto Ethernet"
msgstr "Ethernet automatica"
#: ../js/ui/status/network.js:754
#: ../js/ui/status/network.js:757
msgid "Auto broadband"
msgstr "Banda larga automatica"
#: ../js/ui/status/network.js:757
#: ../js/ui/status/network.js:760
msgid "Auto dial-up"
msgstr "Dial-up automatica"
#. TRANSLATORS: this the automatic wireless connection name (including the network name)
#: ../js/ui/status/network.js:876 ../js/ui/status/network.js:1444
#: ../js/ui/status/network.js:879 ../js/ui/status/network.js:1452
#, c-format
msgid "Auto %s"
msgstr "%s automatica"
#: ../js/ui/status/network.js:878
#: ../js/ui/status/network.js:881
msgid "Auto bluetooth"
msgstr "Bluetooth automatica"
#: ../js/ui/status/network.js:1446
#: ../js/ui/status/network.js:1454
msgid "Auto wireless"
msgstr "Wireless automatica"
#: ../js/ui/status/network.js:1533
#: ../js/ui/status/network.js:1541
msgid "Network"
msgstr "Rete"
#: ../js/ui/status/network.js:1540
#: ../js/ui/status/network.js:1548
msgid "Enable networking"
msgstr "Abilita rete"
#: ../js/ui/status/network.js:1552
#: ../js/ui/status/network.js:1560
msgid "Wired"
msgstr "Via cavo"
#: ../js/ui/status/network.js:1563
#: ../js/ui/status/network.js:1571
msgid "Wireless"
msgstr "Wireless"
#: ../js/ui/status/network.js:1573
#: ../js/ui/status/network.js:1581
msgid "Mobile broadband"
msgstr "Banda larga mobile"
#: ../js/ui/status/network.js:1583
#: ../js/ui/status/network.js:1591
msgid "VPN Connections"
msgstr "Connessioni VPN"
#: ../js/ui/status/network.js:1594
#: ../js/ui/status/network.js:1602
msgid "Network Settings"
msgstr "Impostazioni rete"
#: ../js/ui/status/network.js:1731
#: ../js/ui/status/network.js:1739
msgid "Connection failed"
msgstr "Connessione non riuscita"
#: ../js/ui/status/network.js:1732
#: ../js/ui/status/network.js:1740
msgid "Activation of network connection failed"
msgstr "Attivazione della connessione di rete non riuscita"
#: ../js/ui/status/network.js:1985
#: ../js/ui/status/network.js:1993
msgid "Networking is disabled"
msgstr "Rete disabilitata"
#: ../js/ui/status/network.js:2109
#: ../js/ui/status/network.js:2117
msgid "Network Manager"
msgstr "Gestore reti"
@ -1668,32 +1660,40 @@ msgstr "Inattivo"
msgid "Unavailable"
msgstr "Non disponibile"
#: ../js/ui/userMenu.js:624
#: ../js/ui/userMenu.js:595 ../js/ui/userMenu.js:599 ../js/ui/userMenu.js:669
msgid "Power Off..."
msgstr "Spegni..."
#: ../js/ui/userMenu.js:631
msgid "Notifications"
msgstr "Notifiche"
#: ../js/ui/userMenu.js:632
#: ../js/ui/userMenu.js:639
msgid "Online Accounts"
msgstr "Account online"
#: ../js/ui/userMenu.js:643
msgid "System Settings"
msgstr "Impostazioni di sistema"
#: ../js/ui/userMenu.js:646
#: ../js/ui/userMenu.js:650
msgid "Lock Screen"
msgstr "Blocca schermo"
#: ../js/ui/userMenu.js:655
msgid "Switch User"
msgstr "Cambia utente"
#: ../js/ui/userMenu.js:651
msgid "Log Out"
msgstr "Termina sessione"
#: ../js/ui/userMenu.js:659
msgid "Lock"
msgstr "Blocca"
#: ../js/ui/userMenu.js:660
msgid "Log Out..."
msgstr "Termina sessione..."
# accorciato, altrimenti non si legge...
#: ../js/ui/userMenu.js:677
#: ../js/ui/userMenu.js:688
msgid "Your chat status will be set to busy"
msgstr "Stato per chat impostato a non disponibile"
#: ../js/ui/userMenu.js:678
#: ../js/ui/userMenu.js:689
msgid ""
"Notifications are now disabled, including chat messages. Your online status "
"has been adjusted to let others know that you might not see their messages."
@ -1817,18 +1817,6 @@ msgstr "File system"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
#~ msgid "Power Off..."
#~ msgstr "Spegni..."
#~ msgid "Online Accounts"
#~ msgstr "Account online"
#~ msgid "Lock Screen"
#~ msgstr "Blocca schermo"
#~ msgid "Log Out..."
#~ msgstr "Termina sessione..."
#~ msgid "RECENT ITEMS"
#~ msgstr "ELEMENTI RECENTI"

562
po/ja.po

File diff suppressed because it is too large Load Diff

274
po/mr.po
View File

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: mr\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2012-04-24 15:39+0000\n"
"PO-Revision-Date: 2012-05-10 09:57+0530\n"
"POT-Creation-Date: 2012-03-30 17:59+0000\n"
"PO-Revision-Date: 2012-04-02 11:33+0530\n"
"Last-Translator: Sandeep Shedmake <sshedmak@redhat.com>\n"
"Language-Team: Marathi <fedora-trans-mr@redhat.com>\n"
"MIME-Version: 1.0\n"
@ -47,6 +47,7 @@ msgid ""
msgstr "आंतरिक डिबगिंग व Alt-F2 संवादचा वापर करून निंयत्रणकरीता प्रवेश देतो."
#: ../data/org.gnome.shell.gschema.xml.in.h:3
#| msgid "Uuids of extensions to disable"
msgid "Uuids of extensions to enable"
msgstr "सुरू करण्याजोगी एक्सटेंशन्स्चे Uuids"
@ -58,10 +59,10 @@ msgid ""
"DisableExtension DBus methods on org.gnome.Shell."
msgstr ""
"GNOME शेल एक्सटेंशन्सकडे uuid गुणधर्म असते; हि कि एक्सटेंशन्स् दाखवते ज्यास "
"लोड करणे आवश्यक "
"आहे. लोड करण्याजोगी कोणत्याहि एक्सटेंशला सूचीत असणे आवश्यक आहे. org.gnome."
"Shell वरील "
"EnableExtension व DisableExtension DBus मेथडससह या सूचीत बदल करणे शक्य आहे."
"लोड करणे आवश्यक आहे. "
"लोड करण्याजोगी कोणत्याहि एक्सटेंशला सूचीत असणे आवश्यक आहे. "
"org.gnome.Shell वरील EnableExtension व DisableExtension DBus मेथडससह या सूचीत "
"बदल करणे शक्य आहे."
#: ../data/org.gnome.shell.gschema.xml.in.h:5
msgid "Whether to collect stats about applications usage"
@ -109,8 +110,7 @@ msgid ""
"The value here is from the TpConnectionPresenceType enumeration."
msgstr ""
"वापरकर्तातर्फे ठरवलेले शेवटचे IM हाजेरी साठवण्याकरीता आंतरिकपणे वापरले जाते. "
"येथील मूल्य "
"TpConnectionPresenceType एन्युमरेशनपासूनचे आहे."
"येथील मूल्य TpConnectionPresenceType एन्युमरेशनपासूनचे आहे."
#: ../data/org.gnome.shell.gschema.xml.in.h:13
msgid ""
@ -118,8 +118,8 @@ msgid ""
"value here is from the GsmPresenceStatus enumeration."
msgstr ""
"वापरकर्तातर्फे ठरवलेले शेवटचे सत्र हाजेरी साठवण्याकरीता आंतरिकपणे वापरले जाते."
" येथील मूल्य "
"GsmPresenceStatus एन्युमरेशनपासूनचे आहे."
" "
"येथील मूल्य GsmPresenceStatus एन्युमरेशनपासूनचे आहे."
#: ../data/org.gnome.shell.gschema.xml.in.h:14
msgid "Show the week date in the calendar"
@ -138,44 +138,34 @@ msgid "Keybinding to open the application menu."
msgstr "ॲप्लिकेशन मेन्यु उघडण्यासाठी किबाइंडिंग."
#: ../data/org.gnome.shell.gschema.xml.in.h:18
#| msgid "Keybinding to open the application menu"
msgid "Keybinding to toggle the screen recorder"
msgstr "स्क्रीन रेकॉर्डरमधील बदलसाठी किबाइंडिंग"
#: ../data/org.gnome.shell.gschema.xml.in.h:19
#| msgid "Keybinding to open the application menu."
msgid "Keybinding to start/stop the builtin screen recorder."
msgstr "बिल्टइन स्क्रीन रेकॉर्डर सुरू किंवा थांबवण्यासाठी किबाइंडिंग."
#: ../data/org.gnome.shell.gschema.xml.in.h:20
msgid "Which keyboard to use"
msgstr "कुठले किबोर्ड वापरायचे"
#: ../data/org.gnome.shell.gschema.xml.in.h:21
#: ../data/org.gnome.shell.gschema.xml.in.h:19
msgid "The type of keyboard to use."
msgstr "वापरण्याजोगी किबोर्डचे प्रकार."
#: ../data/org.gnome.shell.gschema.xml.in.h:22
#: ../data/org.gnome.shell.gschema.xml.in.h:20
msgid "Show time with seconds"
msgstr "सेकंदात वेळ दाखवा"
#: ../data/org.gnome.shell.gschema.xml.in.h:23
#: ../data/org.gnome.shell.gschema.xml.in.h:21
msgid "If true, display seconds in time."
msgstr "खरे असल्यास, वेळेत सेकंद दाखवा."
#: ../data/org.gnome.shell.gschema.xml.in.h:24
#: ../data/org.gnome.shell.gschema.xml.in.h:22
msgid "Show date in clock"
msgstr "घड्याळात दिनांक दाखवा"
#: ../data/org.gnome.shell.gschema.xml.in.h:25
#: ../data/org.gnome.shell.gschema.xml.in.h:23
msgid "If true, display date in the clock, in addition to time."
msgstr "खरे असल्यास,वेळेबरोबर तारीख पण घड्याळात दाखवा."
#: ../data/org.gnome.shell.gschema.xml.in.h:26
#: ../data/org.gnome.shell.gschema.xml.in.h:24
msgid "Framerate used for recording screencasts."
msgstr "स्क्रिनकास्ट्स् रेकॉर्ड करण्यासाठी वापरलेले फ्रेमरेट."
#: ../data/org.gnome.shell.gschema.xml.in.h:27
#: ../data/org.gnome.shell.gschema.xml.in.h:25
msgid ""
"The framerate of the resulting screencast recordered by GNOME Shell's "
"screencast recorder in frames-per-second."
@ -184,12 +174,24 @@ msgstr ""
"केलेल्या परिणामक "
"सक्रीनकास्टचा फ्रेमरेट."
#: ../data/org.gnome.shell.gschema.xml.in.h:28
#: ../data/org.gnome.shell.gschema.xml.in.h:26
msgid "The gstreamer pipeline used to encode the screencast"
msgstr "स्क्रीनकास्ट एंकोड करण्यासाठी वापरलेले gstreamer पाइपलाइन"
#: ../data/org.gnome.shell.gschema.xml.in.h:30
#: ../data/org.gnome.shell.gschema.xml.in.h:28
#, no-c-format
#| msgid ""
#| "Sets the GStreamer pipeline used to encode recordings. It follows the "
#| "syntax used for gst-launch. The pipeline should have an unconnected sink "
#| "pad where the recorded video is recorded. It will normally have a "
#| "unconnected source pad; output from that pad will be written into the "
#| "output file. However the pipeline can also take care of its own output - "
#| "this might be used to send the output to an icecast server via shout2send "
#| "or similar. When unset or set to an empty value, the default pipeline "
#| "will be used. This is currently 'videorate ! vp8enc quality=10 speed=2 "
#| "threads=%T ! queue ! webmmux' and records to WEBM using the VP8 codec. %T "
#| "is used as a placeholder for a guess at the optimal thread count on the "
#| "system."
msgid ""
"Sets the GStreamer pipeline used to encode recordings. It follows the syntax "
"used for gst-launch. The pipeline should have an unconnected sink pad where "
@ -203,26 +205,21 @@ msgid ""
"thread count on the system."
msgstr ""
"रेकॉर्डिंग्स् एंकोड करण्यासाठी GStreamer पाइपलाइन ठरवतो. gst-launch सुरू "
"करण्यासाठी "
"मांडणीचा वापर करतो. पाइपलाइनमध्ये जोडणी अशक्य सिंक पॅड असायला हवे जेथे "
"रेकॉर्डेड व्हिडीओ "
"रेकॉर्ड केले जाते. सहसा जोडणी अशक्य स्रोत पॅड असते; पॅडपासूनचे आऊटपुट, आऊटपुट "
"फाइलमध्ये लिहले "
"जाते. तरी पाइपलाइन स्वतःच्या आऊटपुटची काळजी घेतो - याचा वापर shout2send किंवा "
"समानतर्फे icecast सर्व्हरकरीता आऊटपुट पाठवण्याकरीता केला जातो. रिकामे "
"मूल्यकरीता सेट "
"अशक्य किंवा शक्य केल्यावर, मूळ पाइपलाइनचा वापर केला जातो. हे सध्या 'vp8enc "
"quality=8 "
"speed=6 threads=%T ! queue ! webmmux' आहे व VP8 कोडेकचा वापर करून WEBM करीता "
"रेकॉर्डिंग करतो. %T चा वापर प्रणालीवरील कमाल थ्रेड गणणा ओळखण्यासाठी "
"प्लेसहोल्डर म्हणून "
"केला जातो."
"करण्यासाठी मांडणीचा वापर करतो. पाइपलाइनमध्ये जोडणी अशक्य सिंक पॅड असायला हवे "
"जेथे रेकॉर्डेड व्हिडीओ रेकॉर्ड केले जाते. सहसा जोडणी अशक्य स्रोत पॅड असते; "
"पॅडपासूनचे आऊटपुट, आऊटपुट फाइलमध्ये लिहले जाते. तरी पाइपलाइन स्वतःच्या "
"आऊटपुटची काळजी घेतो - याचा वापर shout2send किंवा समानतर्फे icecast "
"सर्व्हरकरीता आऊटपुट पाठवण्याकरीता केला जातो. रिकामे मूल्यकरीता सेट अशक्य "
"किंवा शक्य केल्यावर, मूळ पाइपलाइनचा वापर केला जातो. हे सध्या 'vp8enc "
"quality=8 speed=6 threads=%T ! queue ! webmmux' आहे व VP8 कोडेकचा वापर करून "
"WEBM करीता रेकॉर्डिंग करतो. %T चा वापर प्रणालीवरील कमाल थ्रेड गणणा "
"ओळखण्यासाठी प्लेसहोल्डर म्हणून केला जातो."
#: ../data/org.gnome.shell.gschema.xml.in.h:31
#: ../data/org.gnome.shell.gschema.xml.in.h:29
msgid "File extension used for storing the screencast"
msgstr "स्क्रिनकास्ट साठवण्याकरीता वापरलेले फाइल एक्सटेंशन"
#: ../data/org.gnome.shell.gschema.xml.in.h:32
#: ../data/org.gnome.shell.gschema.xml.in.h:30
msgid ""
"The filename for recorded screencasts will be a unique filename based on the "
"current date, and use this extension. It should be changed when recording to "
@ -246,40 +243,42 @@ msgstr "<b>एक्सटेंशन</b>"
msgid "Select an extension to configure using the combobox above."
msgstr "वरील कॉम्बोबॉक्सचा वापर करून संरचनाकरीता एक्सटेंशनचा वापर करा."
#: ../js/gdm/loginDialog.js:627
#: ../js/gdm/loginDialog.js:624
#| msgid "Searching..."
msgid "Session..."
msgstr "सत्र..."
#: ../js/gdm/loginDialog.js:789
#: ../js/gdm/loginDialog.js:786
msgctxt "title"
msgid "Sign In"
msgstr "प्रवेश करा"
#. Translators: this message is shown below the password entry field
#. to indicate the user can swipe their finger instead
#: ../js/gdm/loginDialog.js:834
#: ../js/gdm/loginDialog.js:831
msgid "(or swipe finger)"
msgstr "(किंवा बोट फिरवा)"
#. translators: this message is shown below the user list on the
#. login screen. It can be activated to reveal an entry for
#. manually entering the username.
#: ../js/gdm/loginDialog.js:855
#: ../js/gdm/loginDialog.js:852
msgid "Not listed?"
msgstr "सूचीत नाही?"
#: ../js/gdm/loginDialog.js:1023 ../js/ui/endSessionDialog.js:401
#: ../js/ui/extensionSystem.js:400 ../js/ui/networkAgent.js:153
#: ../js/gdm/loginDialog.js:1020 ../js/ui/endSessionDialog.js:401
#: ../js/ui/extensionSystem.js:399 ../js/ui/networkAgent.js:153
#: ../js/ui/polkitAuthenticationAgent.js:175 ../js/ui/status/bluetooth.js:462
msgid "Cancel"
msgstr "रद्द करा"
#: ../js/gdm/loginDialog.js:1028
#: ../js/gdm/loginDialog.js:1025
msgctxt "button"
msgid "Sign In"
msgstr "प्रवेश करा"
#: ../js/gdm/loginDialog.js:1380
#: ../js/gdm/loginDialog.js:1377
#| msgid "New Window"
msgid "Login Window"
msgstr "प्रवेश पटल"
@ -356,6 +355,7 @@ msgid "Open with %s"
msgstr "%s सह उघडा"
#: ../js/ui/autorunManager.js:586
#| msgid "Reject"
msgid "Eject"
msgstr "बाहेर काढा"
@ -591,11 +591,13 @@ msgstr "%A %B %e, %Y"
#: ../js/ui/endSessionDialog.js:61
#, c-format
#| msgid "Log Out %s"
msgctxt "title"
msgid "Log Out %s"
msgstr "%s पासून बाहेर पडा"
#: ../js/ui/endSessionDialog.js:62
#| msgid "Log Out"
msgctxt "title"
msgid "Log Out"
msgstr "बाहेर पडा"
@ -607,6 +609,7 @@ msgstr ""
#: ../js/ui/endSessionDialog.js:65
#, c-format
#| msgid "%s will be logged out automatically in %d seconds."
msgid "%s will be logged out automatically in %d second."
msgid_plural "%s will be logged out automatically in %d seconds."
msgstr[0] "%s स्वयं, %d सेकंदात बाहेर पडेल."
@ -614,6 +617,7 @@ msgstr[1] "%s स्वयं, %d सेकंदात बाहेर पड
#: ../js/ui/endSessionDialog.js:70
#, c-format
#| msgid "You will be logged out automatically in %d seconds."
msgid "You will be logged out automatically in %d second."
msgid_plural "You will be logged out automatically in %d seconds."
msgstr[0] "%d सेकंदात तुम्ही स्वयं बाहेर पडाल."
@ -624,11 +628,13 @@ msgid "Logging out of the system."
msgstr "प्रणालीतून बाहेर पडत आहे."
#: ../js/ui/endSessionDialog.js:76
#| msgid "Log Out"
msgctxt "button"
msgid "Log Out"
msgstr "बाहेर पडा"
#: ../js/ui/endSessionDialog.js:81
#| msgid "Power Off"
msgctxt "title"
msgid "Power Off"
msgstr "बंद करा"
@ -639,6 +645,7 @@ msgstr "ॲप्लिकेशन्स् बंद करण्यासा
#: ../js/ui/endSessionDialog.js:84
#, c-format
#| msgid "The system will power off automatically in %d seconds."
msgid "The system will power off automatically in %d second."
msgid_plural "The system will power off automatically in %d seconds."
msgstr[0] "प्रणाली स्वयं %d सेकंदात बंद होईल."
@ -649,16 +656,19 @@ msgid "Powering off the system."
msgstr "प्रणाली बंद करत आहे."
#: ../js/ui/endSessionDialog.js:90 ../js/ui/endSessionDialog.js:107
#| msgid "Restart"
msgctxt "button"
msgid "Restart"
msgstr "पुनः सुरू करा"
#: ../js/ui/endSessionDialog.js:92
#| msgid "Power Off"
msgctxt "button"
msgid "Power Off"
msgstr "बंद करा"
#: ../js/ui/endSessionDialog.js:98
#| msgid "Restart"
msgctxt "title"
msgid "Restart"
msgstr "पुनः सुरू करा"
@ -670,6 +680,7 @@ msgstr ""
#: ../js/ui/endSessionDialog.js:101
#, c-format
#| msgid "The system will restart automatically in %d seconds."
msgid "The system will restart automatically in %d second."
msgid_plural "The system will restart automatically in %d seconds."
msgstr[0] "प्रणाली स्वयं %d सेकंदात पुनः सुरू होईल."
@ -679,21 +690,21 @@ msgstr[1] "प्रणाली स्वयं %d सेकंदामध्
msgid "Restarting the system."
msgstr "प्रणाली पुनःसुरू करत आहे."
#: ../js/ui/extensionSystem.js:404
#: ../js/ui/extensionSystem.js:403
msgid "Install"
msgstr "प्रतिष्ठापीत करा"
#: ../js/ui/extensionSystem.js:408
#: ../js/ui/extensionSystem.js:407
#, c-format
msgid "Download and install '%s' from extensions.gnome.org?"
msgstr " extensions.gnome.org पासून '%s' डाऊनलोड व प्रतिष्ठापीत करा?"
#: ../js/ui/keyboard.js:327
#| msgid "Retry"
msgid "tray"
msgstr "ट्रे"
#: ../js/ui/keyboard.js:544 ../js/ui/status/keyboard.js:44
#: ../js/ui/status/power.js:203
#: ../js/ui/keyboard.js:544 ../js/ui/status/power.js:203
msgid "Keyboard"
msgstr "कळफलक"
@ -716,10 +727,12 @@ msgid "%s has not emitted any errors."
msgstr "%s ने कोणत्याहि त्रुटी दाखवले नाही."
#: ../js/ui/lookingGlass.js:792
#| msgid "Error"
msgid "Hide Errors"
msgstr "त्रुटी लपवा"
#: ../js/ui/lookingGlass.js:796 ../js/ui/lookingGlass.js:847
#| msgid "Error"
msgid "Show Errors"
msgstr "त्रुटी दाखवा"
@ -729,7 +742,7 @@ msgstr "सुरू केले"
#. translators:
#. * The device has been disabled
#: ../js/ui/lookingGlass.js:808 ../src/gvc/gvc-mixer-control.c:1082
#: ../js/ui/lookingGlass.js:808 ../src/gvc/gvc-mixer-control.c:1093
msgid "Disabled"
msgstr "बंद केले"
@ -754,7 +767,7 @@ msgid "Web Page"
msgstr "वेब पृष्ठ"
#. Translators: this is a filename used for screencast recording
#: ../js/ui/main.js:121
#: ../js/ui/main.js:118
#, no-c-format
msgid "Screencast from %d %t"
msgstr "%d %t पासून स्क्रीनकास्ट"
@ -764,10 +777,13 @@ msgid "Open"
msgstr "उघडा"
#: ../js/ui/messageTray.js:1217
#| msgid "minute"
#| msgid_plural "minutes"
msgid "Unmute"
msgstr "बंद करणे अशक्य करा"
#: ../js/ui/messageTray.js:1217
#| msgid "Mouse"
msgid "Mute"
msgstr "बंद करा"
@ -776,6 +792,7 @@ msgid "System Information"
msgstr "प्रणाली माहिती"
#: ../js/ui/networkAgent.js:148
#| msgid "Connection"
msgid "Connect"
msgstr "जोडणी करा"
@ -783,6 +800,7 @@ msgstr "जोडणी करा"
#: ../js/ui/networkAgent.js:243 ../js/ui/networkAgent.js:255
#: ../js/ui/networkAgent.js:282 ../js/ui/networkAgent.js:302
#: ../js/ui/networkAgent.js:312
#| msgid "Password:"
msgid "Password: "
msgstr "पासवर्ड: "
@ -811,6 +829,7 @@ msgid "Service: "
msgstr "सर्व्हिस: "
#: ../js/ui/networkAgent.js:329
#| msgid "Authentication Required"
msgid "Authentication required by wireless network"
msgstr "वायरलेस नेटवर्कतर्फे आवश्यक ओळखपटवणे"
@ -826,10 +845,12 @@ msgid "Wired 802.1X authentication"
msgstr "वायर्ड 802.1X ओळखपटवणे"
#: ../js/ui/networkAgent.js:336
#| msgid "Network Manager"
msgid "Network name: "
msgstr "नेटवर्क नाव: "
#: ../js/ui/networkAgent.js:341
#| msgid "authentication required"
msgid "DSL authentication"
msgstr "DSL ओळख पटवणे"
@ -846,11 +867,13 @@ msgid "PIN: "
msgstr "PIN: "
#: ../js/ui/networkAgent.js:356
#| msgid "Mobile broadband"
msgid "Mobile broadband network password"
msgstr "मोबाईल ब्रॉडबँड नेटवर्क पासवर्ड"
#: ../js/ui/networkAgent.js:357
#, c-format
#| msgid "You're now connected to '%s'"
msgid "A password is required to connect to '%s'."
msgstr "'%s' सह जोडणीकरीता पासवर्ड आवश्यक आहे."
@ -877,6 +900,7 @@ msgid "Dash"
msgstr "डॅश"
#: ../js/ui/panel.js:592
#| msgid "Quit %s"
msgid "Quit"
msgstr "बाहेर पडा"
@ -944,7 +968,7 @@ msgstr "कृपया आदेश द्या:"
msgid "Searching..."
msgstr "शोधत आहे..."
#: ../js/ui/searchDisplay.js:415
#: ../js/ui/searchDisplay.js:414
msgid "No matching results."
msgstr "जुळवण्याजोगी परिणाम आढळले नाही."
@ -961,6 +985,7 @@ msgid "Show Text"
msgstr "मजकूर दाखवा"
#: ../js/ui/shellEntry.js:79
#| msgid "Large Text"
msgid "Hide Text"
msgstr "मजकूर लपवा"
@ -969,6 +994,7 @@ msgid "Wrong password, please try again"
msgstr "चुकिचा पासवर्ड, कृपया पुनः प्रयत्न करा"
#: ../js/ui/status/accessibility.js:47
#| msgid "Visibility"
msgid "Accessibility"
msgstr "ॲक्सेसिबिलिटि"
@ -980,6 +1006,7 @@ msgstr "झूम"
#. 'screen-reader-enabled');
#. this.menu.addMenuItem(screenReader);
#: ../js/ui/status/accessibility.js:63
#| msgid "Keyboard"
msgid "Screen Keyboard"
msgstr "स्क्रीन किबोर्ड"
@ -1031,6 +1058,7 @@ msgid "Send Files to Device..."
msgstr "फाइल्स्ना साधनावर पाठवा..."
#: ../js/ui/status/bluetooth.js:63
#| msgid "Setup a New Device..."
msgid "Set up a New Device..."
msgstr "नविन साधनची मांडणी करा..."
@ -1040,6 +1068,7 @@ msgstr "ब्ल्यूटूथ सेटिंग्स्"
#. TRANSLATORS: this means that bluetooth was disabled by hardware rfkill
#: ../js/ui/status/bluetooth.js:107 ../js/ui/status/network.js:256
#| msgid "disabled"
msgid "hardware disabled"
msgstr "हार्डवेअर बंद केले"
@ -1048,6 +1077,7 @@ msgid "Connection"
msgstr "जोडणी"
#: ../js/ui/status/bluetooth.js:214 ../js/ui/status/network.js:491
#| msgid "connecting..."
msgid "disconnecting..."
msgstr "जोडणी खंडीत करत आहे..."
@ -1102,7 +1132,7 @@ msgstr "नेहमी प्रवेश द्या"
msgid "Grant this time only"
msgstr "फक्त याचवेळी मान्य करा"
#: ../js/ui/status/bluetooth.js:382 ../js/ui/telepathyClient.js:1093
#: ../js/ui/status/bluetooth.js:382 ../js/ui/telepathyClient.js:1091
msgid "Reject"
msgstr "नकारा"
@ -1143,10 +1173,12 @@ msgid "OK"
msgstr "ठीक आहे"
#: ../js/ui/status/keyboard.js:68
#| msgid "Show Keyboard Layout..."
msgid "Show Keyboard Layout"
msgstr "किबोर्ड लेआऊट दाखवा"
#: ../js/ui/status/keyboard.js:73
#| msgid "Date and Time Settings"
msgid "Region and Language Settings"
msgstr "क्षेत्र व भाषा सेटिंग्स्"
@ -1228,6 +1260,7 @@ msgid "Auto wireless"
msgstr "स्वयं वायरलेस्"
#: ../js/ui/status/network.js:1541
#| msgid "Network Manager"
msgid "Network"
msgstr "नेटवर्क"
@ -1256,10 +1289,12 @@ msgid "Network Settings"
msgstr "जाळं संयोजना"
#: ../js/ui/status/network.js:1739
#| msgid "connection failed"
msgid "Connection failed"
msgstr "जोडणी अपयशी"
#: ../js/ui/status/network.js:1740
#| msgid "connection failed"
msgid "Activation of network connection failed"
msgstr "नेटवर्क जोडणी सुरू करणे अपयशी"
@ -1380,6 +1415,7 @@ msgstr "आमंत्रण"
#. We got the TpContact
#: ../js/ui/telepathyClient.js:271
#| msgid "Cancel"
msgid "Call"
msgstr "कॉल"
@ -1389,10 +1425,12 @@ msgid "File Transfer"
msgstr "फाइल स्थानांतरन"
#: ../js/ui/telepathyClient.js:369
#| msgid "Authorization request from %s"
msgid "Subscription request"
msgstr "सबस्क्रिप्शन विनंती"
#: ../js/ui/telepathyClient.js:405
#| msgid "Connection"
msgid "Connection error"
msgstr "जोडणी त्रुटी"
@ -1419,35 +1457,36 @@ msgstr "%s व्यग्र आहे."
#. Translators: this is a time format string followed by a date.
#. If applicable, replace %X with a strftime format valid for your
#. locale, without seconds.
#: ../js/ui/telepathyClient.js:889
#: ../js/ui/telepathyClient.js:887
#, no-c-format
#| msgid "Sent at %X on %A"
msgid "Sent at <b>%X</b> on <b>%A</b>"
msgstr "<b>%X</b> वेळी, <b>%A</b> ला पाठवले"
#. Translators: this is a time format in the style of "Wednesday, May 25",
#. shown when you get a chat message in the same year.
#: ../js/ui/telepathyClient.js:895
#: ../js/ui/telepathyClient.js:893
#, no-c-format
msgid "Sent on <b>%A</b>, <b>%B %d</b>"
msgstr "<b>%A</b> वेळी, <b>%B %d</b> ला पाठवले"
#. Translators: this is a time format in the style of "Wednesday, May 25, 2012",
#. shown when you get a chat message in a different year.
#: ../js/ui/telepathyClient.js:900
#: ../js/ui/telepathyClient.js:898
#, no-c-format
msgid "Sent on <b>%A</b>, <b>%B %d</b>, %Y"
msgstr "<b>%A</b>, <b>%B %d</b>, %Y वेळी पाठवले"
#. Translators: this is the other person changing their old IM name to their new
#. IM name.
#: ../js/ui/telepathyClient.js:942
#: ../js/ui/telepathyClient.js:940
#, c-format
msgid "%s is now known as %s"
msgstr "%s ला %s म्हणून ओळखले जाते"
#. translators: argument is a room name like
#. * room@jabber.org for example.
#: ../js/ui/telepathyClient.js:1044
#: ../js/ui/telepathyClient.js:1042
#, c-format
msgid "Invitation to %s"
msgstr "%s करीता आमंत्रण"
@ -1455,35 +1494,35 @@ msgstr "%s करीता आमंत्रण"
#. translators: first argument is the name of a contact and the second
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
#. * for example.
#: ../js/ui/telepathyClient.js:1052
#: ../js/ui/telepathyClient.js:1050
#, c-format
msgid "%s is inviting you to join %s"
msgstr "%s तुम्हाला %s सह जोडणीकरीता आमंत्रण देत आहे"
#: ../js/ui/telepathyClient.js:1054 ../js/ui/telepathyClient.js:1133
#: ../js/ui/telepathyClient.js:1231
#: ../js/ui/telepathyClient.js:1052 ../js/ui/telepathyClient.js:1131
#: ../js/ui/telepathyClient.js:1229
msgid "Decline"
msgstr "नकारा"
#: ../js/ui/telepathyClient.js:1055 ../js/ui/telepathyClient.js:1134
#: ../js/ui/telepathyClient.js:1232
#: ../js/ui/telepathyClient.js:1053 ../js/ui/telepathyClient.js:1132
#: ../js/ui/telepathyClient.js:1230
msgid "Accept"
msgstr "स्वीकारा"
#. translators: argument is a contact name like Alice for example.
#: ../js/ui/telepathyClient.js:1085
#: ../js/ui/telepathyClient.js:1083
#, c-format
msgid "Video call from %s"
msgstr "%s पासून व्हिडीओ कॉल्स्"
#. translators: argument is a contact name like Alice for example.
#: ../js/ui/telepathyClient.js:1088
#: ../js/ui/telepathyClient.js:1086
#, c-format
msgid "Call from %s"
msgstr "%s पासून कॉल"
#. translators: this is a button label (verb), not a noun
#: ../js/ui/telepathyClient.js:1095
#: ../js/ui/telepathyClient.js:1093
msgid "Answer"
msgstr "उत्तर"
@ -1492,138 +1531,147 @@ msgstr "उत्तर"
#. * file name. The string will be something
#. * like: "Alice is sending you test.ogg"
#.
#: ../js/ui/telepathyClient.js:1127
#: ../js/ui/telepathyClient.js:1125
#, c-format
msgid "%s is sending you %s"
msgstr "%s तुम्हाला %s पाठवत आहे"
#. To translators: The parameter is the contact's alias
#: ../js/ui/telepathyClient.js:1196
#: ../js/ui/telepathyClient.js:1194
#, c-format
msgid "%s would like permission to see when you are online"
msgstr "ऑनलाइन असल्यावर %s परवानगी दृष्यास्पद करायची"
#: ../js/ui/telepathyClient.js:1289
#: ../js/ui/telepathyClient.js:1287
#| msgid "Network Manager"
msgid "Network error"
msgstr "नेटवर्क त्रुटी"
#: ../js/ui/telepathyClient.js:1291
#: ../js/ui/telepathyClient.js:1289
#| msgid "Authentication Required"
msgid "Authentication failed"
msgstr "ओळख पटवणे अपयशी"
#: ../js/ui/telepathyClient.js:1293
#: ../js/ui/telepathyClient.js:1291
msgid "Encryption error"
msgstr "एंक्रिप्शन त्रुटी"
#: ../js/ui/telepathyClient.js:1295
#: ../js/ui/telepathyClient.js:1293
msgid "Certificate not provided"
msgstr "प्रमाणपत्र पुरवले नाही"
#: ../js/ui/telepathyClient.js:1297
#: ../js/ui/telepathyClient.js:1295
msgid "Certificate untrusted"
msgstr "प्रमाणपत्र अविश्वासर्ह आहे"
#: ../js/ui/telepathyClient.js:1299
#: ../js/ui/telepathyClient.js:1297
msgid "Certificate expired"
msgstr "प्रमाणपत्राची वेळसमाप्ति"
#: ../js/ui/telepathyClient.js:1301
#: ../js/ui/telepathyClient.js:1299
msgid "Certificate not activated"
msgstr "प्रमाणपत्र सुरू केले नाही"
#: ../js/ui/telepathyClient.js:1303
#: ../js/ui/telepathyClient.js:1301
msgid "Certificate hostname mismatch"
msgstr "प्रमाणपत्र यजमाननाव जुळत नाही"
#: ../js/ui/telepathyClient.js:1305
#: ../js/ui/telepathyClient.js:1303
msgid "Certificate fingerprint mismatch"
msgstr "प्रमाणपत्र फिंग्ररप्रिंट जुळत नाही"
#: ../js/ui/telepathyClient.js:1307
#: ../js/ui/telepathyClient.js:1305
msgid "Certificate self-signed"
msgstr "प्रमाणपत्र स्वयं स्वाक्षरि"
#: ../js/ui/telepathyClient.js:1309
#: ../js/ui/telepathyClient.js:1307
#| msgid "%s is offline."
msgid "Status is set to offline"
msgstr "स्थिती ऑफलाइनकरीता ठरवली आहे"
#: ../js/ui/telepathyClient.js:1311
#: ../js/ui/telepathyClient.js:1309
msgid "Encryption is not available"
msgstr "एंक्रिप्शन अनुपलब्ध"
#: ../js/ui/telepathyClient.js:1313
#: ../js/ui/telepathyClient.js:1311
msgid "Certificate is invalid"
msgstr "प्रमाणपत्र अवैध आहे"
#: ../js/ui/telepathyClient.js:1315
#: ../js/ui/telepathyClient.js:1313
#| msgid "Connection established"
msgid "Connection has been refused"
msgstr "जोडणी नकारली गेली"
#: ../js/ui/telepathyClient.js:1317
#: ../js/ui/telepathyClient.js:1315
#| msgid "Connection established"
msgid "Connection can't be established"
msgstr "जोडणी स्थापीत करणे अशक्य"
#: ../js/ui/telepathyClient.js:1319
#: ../js/ui/telepathyClient.js:1317
#| msgid "Connection established"
msgid "Connection has been lost"
msgstr "जोडणी खंडीत झाली"
#: ../js/ui/telepathyClient.js:1321
#: ../js/ui/telepathyClient.js:1319
msgid "This account is already connected to the server"
msgstr "हे खाते आधिपासूनच सर्व्हरसह जुळले आहे"
#: ../js/ui/telepathyClient.js:1323
#: ../js/ui/telepathyClient.js:1321
msgid ""
"Connection has been replaced by a new connection using the same resource"
msgstr "समान स्रोतचा वापर करून जोडणीला नविन जोडणीसह बदलाबदल केले आहे"
#: ../js/ui/telepathyClient.js:1325
#: ../js/ui/telepathyClient.js:1323
msgid "The account already exists on the server"
msgstr "खाते आधिपासूनच सर्व्हरवर अस्तित्वात आहे"
#: ../js/ui/telepathyClient.js:1327
#: ../js/ui/telepathyClient.js:1325
msgid "Server is currently too busy to handle the connection"
msgstr "जोडणी हाताळण्यासाठी सर्व्हर सध्या खूप व्यस्थ आहे"
#: ../js/ui/telepathyClient.js:1329
#: ../js/ui/telepathyClient.js:1327
msgid "Certificate has been revoked"
msgstr "प्रमाणपत्र रद्द केले"
#: ../js/ui/telepathyClient.js:1331
#: ../js/ui/telepathyClient.js:1329
msgid ""
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
msgstr ""
"प्रमाणपत्र असुरक्षित सिफर अल्गोरिदमचा वापर करते किंवा क्रिप्टोग्राफिकरित्या "
"खूप कमजोर आहे"
#: ../js/ui/telepathyClient.js:1333
#: ../js/ui/telepathyClient.js:1331
msgid ""
"The length of the server certificate, or the depth of the server certificate "
"chain, exceed the limits imposed by the cryptography library"
msgstr ""
"सर्व्हर प्रमाणपत्राची लांबी, किंवा सर्व्हर प्रमाणपत्र चैनचे गांभीर्य, "
"क्रिप्टोग्राफि "
"लाइब्ररितर्फे लादलेल्या मर्यादापेक्षा जास्त आहे"
"क्रिप्टोग्राफि लाइब्ररितर्फे लादलेल्या मर्यादापेक्षा जास्त आहे"
#: ../js/ui/telepathyClient.js:1335
#: ../js/ui/telepathyClient.js:1333
msgid "Internal error"
msgstr "आंतरिक त्रुटी"
#. translators: argument is the account name, like
#. * name@jabber.org for example.
#: ../js/ui/telepathyClient.js:1345
#: ../js/ui/telepathyClient.js:1343
#, c-format
#| msgid "connection failed"
msgid "Connection to %s failed"
msgstr "%s सह जोडणी अपयशी"
#: ../js/ui/telepathyClient.js:1354
#: ../js/ui/telepathyClient.js:1352
#| msgid "Reject"
msgid "Reconnect"
msgstr "पुनःजोडणी करा"
#: ../js/ui/telepathyClient.js:1355
#: ../js/ui/telepathyClient.js:1353
#| msgid "My Account"
msgid "Edit account"
msgstr "खाते संपादित करा"
#: ../js/ui/telepathyClient.js:1401
#: ../js/ui/telepathyClient.js:1399
#| msgid "Unknown"
msgid "Unknown reason"
msgstr "अपरिचीत कारण"
@ -1636,6 +1684,7 @@ msgid "Idle"
msgstr "रिकामे"
#: ../js/ui/userMenu.js:144
#| msgid "unavailable"
msgid "Unavailable"
msgstr "अनुपलब्ध"
@ -1644,10 +1693,12 @@ msgid "Power Off..."
msgstr "बंद करा..."
#: ../js/ui/userMenu.js:631
#| msgid "Applications"
msgid "Notifications"
msgstr "सूचना"
#: ../js/ui/userMenu.js:639
#| msgid "My Account"
msgid "Online Accounts"
msgstr "ऑनलाइन खाते"
@ -1677,8 +1728,7 @@ msgid ""
"has been adjusted to let others know that you might not see their messages."
msgstr ""
"सूचना आता बंद केले आहे, चॅट संदेश समाविष्टीत. इतरांना तुमचे संदेश दिसणार नाही "
"हे कळवण्यासाठी "
"ऑनलाइन स्थिती सुस्थीत केली आहे."
"हे कळवण्यासाठी ऑनलाइन स्थिती सुस्थीत केली आहे."
#. Translators: this is the text displayed
#. in the search entry when no search is
@ -1717,7 +1767,7 @@ msgstr "'%s' सज्ज आहे"
#. translators:
#. * The number of sound outputs on a particular device
#: ../src/gvc/gvc-mixer-control.c:1089
#: ../src/gvc/gvc-mixer-control.c:1100
#, c-format
msgid "%u Output"
msgid_plural "%u Outputs"
@ -1726,14 +1776,14 @@ msgstr[1] "%u आऊटपुट"
#. translators:
#. * The number of sound inputs on a particular device
#: ../src/gvc/gvc-mixer-control.c:1099
#: ../src/gvc/gvc-mixer-control.c:1110
#, c-format
msgid "%u Input"
msgid_plural "%u Inputs"
msgstr[0] "%u इंपुट"
msgstr[1] "%u इंपुट"
#: ../src/gvc/gvc-mixer-control.c:1397
#: ../src/gvc/gvc-mixer-control.c:1408
msgid "System Sounds"
msgstr "प्रणाली आवाज"
@ -1751,6 +1801,7 @@ msgid "Failed to launch '%s'"
msgstr "'%s' सुरू करण्यास अपयशी"
#: ../src/shell-keyring-prompt.c:708
#| msgid "Does not match"
msgid "Passwords do not match."
msgstr "पासवर्डस् जुळत नाही."
@ -1773,6 +1824,7 @@ msgstr "ओळख पटवा संवाद वापरकर्त्या
#. Translators: this is the same string as the one found in
#. * nautilus
#: ../src/shell-util.c:97
#| msgid "Volume"
msgid "Home"
msgstr "होम"

414
po/nb.po

File diff suppressed because it is too large Load Diff

473
po/sl.po

File diff suppressed because it is too large Load Diff

View File

@ -27,10 +27,8 @@ CLEANFILES += $(service_DATA)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
bin_SCRIPTS += gnome-shell-extension-tool gnome-shell-extension-prefs \
gnome-shell-perf-tool
EXTRA_DIST += gnome-shell-extension-tool.in gnome-shell-extension-prefs.in \
gnome-shell-perf-tool.in
bin_SCRIPTS += gnome-shell-extension-tool gnome-shell-extension-prefs
EXTRA_DIST += gnome-shell-extension-tool.in gnome-shell-extension-prefs.in
bin_PROGRAMS = gnome-shell-real
if USE_JHBUILD_WRAPPER_SCRIPT
@ -55,6 +53,7 @@ generated_script_substitutions = \
-e "s|@libexecdir[@]|$(libexecdir)|g" \
-e "s|@libdir[@]|$(libdir)|g" \
-e "s|@pkglibdir[@]|$(pkglibdir)|g" \
-e "s|@JHBUILD_TYPELIBDIR[@]|$(JHBUILD_TYPELIBDIR)|g" \
-e "s|@pkgdatadir[@]|$(pkgdatadir)|g" \
-e "s|@PYTHON[@]|$(PYTHON)|g" \
-e "s|@VERSION[@]|$(VERSION)|g" \
@ -72,9 +71,6 @@ gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile
gnome-shell-extension-prefs: gnome-shell-extension-prefs.in Makefile
$(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@
gnome-shell-perf-tool: gnome-shell-perf-tool.in Makefile
$(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@
CLEANFILES += gnome-shell $(bin_SCRIPTS)
include Makefile-st.am
@ -93,8 +89,7 @@ gnome_shell_cflags = \
-DGNOME_SHELL_LIBEXECDIR=\"$(libexecdir)\" \
-DGNOME_SHELL_DATADIR=\"$(pkgdatadir)\" \
-DGNOME_SHELL_PKGLIBDIR=\"$(pkglibdir)\" \
-DJSDIR=\"$(pkgdatadir)/js\" \
-DMUTTER_TYPELIB_DIR=\"$(MUTTER_TYPELIB_DIR)\"
-DJSDIR=\"$(pkgdatadir)/js\"
privlibdir = $(pkglibdir)
privlib_LTLIBRARIES = libgnome-shell.la libgnome-shell-js.la
@ -115,7 +110,6 @@ shell_public_headers_h = \
shell-gtk-embed.h \
shell-global.h \
shell-idle-monitor.h \
shell-invert-lightness-effect.h \
shell-mobile-providers.h \
shell-mount-operation.h \
shell-network-agent.h \
@ -163,7 +157,6 @@ libgnome_shell_la_SOURCES = \
shell-gtk-embed.c \
shell-global.c \
shell-idle-monitor.c \
shell-invert-lightness-effect.c \
shell-keyring-prompt.h \
shell-keyring-prompt.c \
shell-mobile-providers.c \

View File

@ -94,20 +94,8 @@ static gchar **
g_action_muxer_list_actions (GActionGroup *action_group)
{
GActionMuxer *muxer = G_ACTION_MUXER (action_group);
GHashTableIter iter;
gchar *key;
gchar **keys;
gsize i;
keys = g_new (gchar *, g_hash_table_size (muxer->actions) + 1);
i = 0;
g_hash_table_iter_init (&iter, muxer->actions);
while (g_hash_table_iter_next (&iter, (gpointer *) &key, NULL))
keys[i++] = g_strdup (key);
keys[i] = NULL;
return keys;
return (gchar **) muxer->groups;
}
static Group *

View File

@ -1,13 +1,30 @@
#!@PYTHON@
# -*- mode: Python; indent-tabs-mode: nil; -*-
import atexit
import datetime
import dbus
from dbus.mainloop.glib import DBusGMainLoop
import gobject
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
json = None
import optparse
import os
import random
import re
import shutil
import signal
import subprocess
import sys
import tempfile
import termios
import time
import errno
def show_version(option, opt_str, value, parser):
print "GNOME Shell @VERSION@"
@ -62,24 +79,168 @@ def get_running_session_environs():
result[key] = environs[key]
return result
def start_shell():
_bus = None
_bus_iface = None
_name_owner_changed_hook = None
def on_name_owner_changed(name, prev_owner, new_owner):
if _name_owner_changed_hook:
_name_owner_changed_hook(name, prev_owner, new_owner)
def get_bus():
global _bus
if _bus is None:
dbus_loop = DBusGMainLoop()
_bus = dbus.SessionBus(mainloop=dbus_loop)
return _bus
def get_bus_iface():
global _bus_iface
if _bus_iface is None:
bus = get_bus()
bus_proxy = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
_bus_iface = dbus.Interface(bus_proxy, 'org.freedesktop.DBus')
_bus_iface.connect_to_signal('NameOwnerChanged', on_name_owner_changed)
return _bus_iface
def wait_for_dbus_name(wait_name):
global _name_owner_changed_hook
bus_iface = get_bus_iface()
loop = gobject.MainLoop()
def on_name_owner_changed(name, prev_owner, new_owner):
if not (name == wait_name and new_owner != ''):
return
loop.quit()
return
_name_owner_changed_hook = on_name_owner_changed
def on_timeout():
print "\nFailed to start %s: timed out" % (wait_name,)
sys.exit(1)
gobject.timeout_add_seconds(7, on_timeout)
loop.run()
_name_owner_changed_hook = None
def start_dconf_await_service():
DCONF_NAME = 'ca.desrt.dconf'
bus = get_bus()
get_bus_iface() # connect to NameOwnerChanged signal
# See if the service is already running or normal D-Bus activation works
need_manual_activate = False
try:
dconf_proxy = bus.get_object(DCONF_NAME, '/')
dconf_proxy.Ping(dbus_interface='org.freedesktop.DBus.Peer')
except dbus.exceptions.DBusException, e:
if e.get_dbus_name() == 'org.freedesktop.DBus.Error.ServiceUnknown':
need_manual_activate = True
else:
raise e
if not need_manual_activate:
return
# At this point, it looks like we just have a jhbuild install
# of dconf, not known to the session dbus-daemon, so we start
# it manually and wait for it to join the bus
print "Starting dconf-service... ",
sys.stdout.flush()
# dconf is linked without libtool, so unlike other GNOME modules,
# won't have an embedded rpath for its library directory.
env = dict(os.environ)
if 'LD_LIBRARY_PATH' in env and env['LD_LIBRARY_PATH']:
ld_library_path = '@libdir@:' + env['LD_LIBRARY_PATH']
else:
ld_library_path = '@libdir@'
env['LD_LIBRARY_PATH'] = ld_library_path
dconf_path = os.path.join('@libexecdir@', 'dconf-service')
try:
subprocess.Popen([dconf_path, '--keep-alive'], env=env)
except OSError, e:
print "\nFailed to start %s: %s" % (dconf_path, e)
sys.exit(1)
wait_for_dbus_name (DCONF_NAME)
PERF_HELPER_NAME = "org.gnome.Shell.PerfHelper"
PERF_HELPER_IFACE = "org.gnome.Shell.PerfHelper"
PERF_HELPER_PATH = "/org/gnome/Shell/PerfHelper"
def start_perf_helper():
get_bus_iface() # connect to NameOwnerChanged signal
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
running_from_source_tree = os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in'))
if running_from_source_tree:
perf_helper_path = os.path.join(self_dir, "gnome-shell-perf-helper")
else:
perf_helper_path = "@libexecdir@/gnome-shell-perf-helper"
subprocess.Popen([perf_helper_path])
wait_for_dbus_name (PERF_HELPER_NAME)
def stop_perf_helper():
bus = get_bus()
proxy = bus.get_object(PERF_HELPER_NAME, PERF_HELPER_PATH)
proxy.Exit(dbus_interface=PERF_HELPER_IFACE)
def start_shell(perf_output=None):
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
if os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in')):
running_from_source_tree = True
top_dir = os.path.dirname(self_dir)
typelib_dir = '@JHBUILD_TYPELIBDIR@:' + os.path.join(top_dir, "src")
js_dir = os.path.join(top_dir, "js")
data_dir = os.path.join(top_dir, "data")
else:
running_from_source_tree = False
js_dir = os.path.join('@pkgdatadir@', 'js')
typelib_dir = '@JHBUILD_TYPELIBDIR@'
if os.environ.has_key('GI_TYPELIB_PATH'):
typelib_dir = typelib_dir + ":" + os.environ.get('GI_TYPELIB_PATH')
# Set up environment
env = dict(os.environ)
# TODO: Fix this, since nothing prevents it from propagating to child
# processes. Why is it even here?
env.update({'GNOME_DISABLE_CRASH_DIALOG' : '1'})
# This stuff should really should only happen when running
# uninstalled, i.e. it should be in the conditional
# below. Otherwise it's just a bad reimplementation of "jhbuild
# run". See bug #642084
env.update({'GNOME_SHELL_JS' : js_dir,
'PATH' : '@bindir@:' + os.environ.get('PATH', ''),
'GI_TYPELIB_PATH' : typelib_dir,
'XDG_CONFIG_DIRS' : '@sysconfdir@/xdg:' + (os.environ.get('XDG_CONFIG_DIRS') or '/etc/xdg'),
'XDG_DATA_DIRS' : '@datadir@:' + (os.environ.get('XDG_DATA_DIRS') or '/usr/local/share:/usr/share')})
if running_from_source_tree:
top_dir = os.path.dirname(self_dir)
env.update({'GNOME_SHELL_BINDIR' : self_dir,
'GNOME_SHELL_DATADIR' : data_dir,
'GSETTINGS_SCHEMA_DIR' : data_dir })
else:
# This is just broken to set in the installed case; see bug #642084
env.update({'GSETTINGS_SCHEMA_DIR' : os.path.join('@datadir@', 'glib-2.0', 'schemas')})
typelib_dir = os.path.join(top_dir, "src")
if 'GI_TYPELIB_PATH' in os.environ:
typelib_dir += ':%s' % (os.environ['GI_TYPELIB_PATH'],)
# Also plain broken to set in the normal installed case
jhbuild_gconf_source = os.path.join('@sysconfdir@', 'gconf/2/path.jhbuild')
if os.path.exists(jhbuild_gconf_source):
env['GCONF_DEFAULT_SOURCE_PATH'] = jhbuild_gconf_source
env.update({'GNOME_SHELL_JS' : os.path.join(top_dir, "js"),
'GNOME_SHELL_BINDIR' : self_dir,
'GI_TYPELIB_PATH' : typelib_dir,
'GNOME_SHELL_DATADIR' : os.path.join(top_dir, "data"),
'GSETTINGS_SCHEMA_DIR' : os.path.join(top_dir, "data") })
if options.perf is not None:
env['SHELL_PERF_MODULE'] = options.perf
env['MUTTER_WM_CLASS_FILTER'] = 'Gnome-shell-perf-helper'
if perf_output is not None:
env['SHELL_PERF_OUTPUT'] = perf_output
args = []
if options.debug:
@ -95,7 +256,22 @@ def start_shell():
args.append('--sync')
return subprocess.Popen(args, env=env)
def run_shell():
def _killall(processname):
subprocess.call(['pkill', '-u', '%d' % (os.getuid(), ),
'-f', r'^([^ ]*/)?' + re.escape(processname) + '($| )'])
def ensure_desktop_infrastructure_state():
# This is a collection of random hacks necessary to make sure
# that we can run in jhbuild scenarios or when dynamically
# replacing GNOME 2.
start_dconf_await_service()
# We need to terminate notification-daemon
_killall('notification-daemon')
_killall('notify-osd')
def run_shell(perf_output=None):
if options.debug:
# Record initial terminal state so we can reset it to that
# later, in case we kill gdb at a bad time
@ -106,9 +282,8 @@ def run_shell():
if options.verbose:
print "Starting shell"
shell = None
try:
shell = start_shell()
shell = start_shell(perf_output=perf_output)
# Wait for shell to exit
if options.verbose:
@ -142,6 +317,248 @@ def run_shell():
return normal_exit
def upload_performance_report(report_text):
# Local imports to avoid impacting gnome-shell startup time
import base64
from ConfigParser import RawConfigParser
import hashlib
import hmac
import httplib
import urlparse
import urllib
try:
config_home = os.environ['XDG_CONFIG_HOME']
except KeyError:
config_home = None
if not config_home:
config_home = os.path.expanduser("~/.config")
config_file = os.path.join(config_home, "gnome-shell/perf.ini")
try:
config = RawConfigParser()
f = open(config_file)
config.readfp(f)
f.close()
base_url = config.get('upload', 'url')
system_name = config.get('upload', 'name')
secret_key = config.get('upload', 'key')
except Exception, e:
print "Can't read upload configuration from %s: %s" % (config_file, str(e))
sys.exit(1)
# Determine host, port and upload URL from provided data, we're
# a bit extra-careful about normalization since the URL is part
# of the signature.
split = urlparse.urlsplit(base_url)
scheme = split[0].lower()
netloc = split[1]
base_path = split[2]
m = re.match(r'^(.*?)(?::(\d+))?$', netloc)
if m.group(2):
host, port = m.group(1), int(m.group(2))
else:
host, port = m.group(1), None
if scheme != "http":
print "'%s' is not a HTTP URL" % base_url
sys.exit(1)
if port is None:
port = 80
if base_path.endswith('/'):
base_path = base_path[:-1]
if port == 80:
normalized_base = "%s://%s%s" % (scheme, host, base_path)
else:
normalized_base = "%s://%s:%d%s" % (scheme, host, port, base_path)
upload_url = normalized_base + '/system/%s/upload' % system_name
upload_path = urlparse.urlsplit(upload_url)[2] # path portion
# Create signature based on upload URL and the report data
signature_data = 'POST&' + upload_url + "&&"
h = hmac.new(secret_key, digestmod=hashlib.sha1)
h.update(signature_data)
h.update(report_text)
signature = urllib.quote(base64.b64encode(h.digest()), "~")
headers = {
'User-Agent': 'gnome-shell',
'Content-Type': 'application/json',
'X-Shell-Signature': 'HMAC-SHA1 ' + signature
};
connection = httplib.HTTPConnection(host, port)
connection.request('POST', upload_path, report_text, headers)
response = connection.getresponse()
if response.status == 200:
print "Performance report upload succeeded"
else:
print "Performance report upload failed with status %d" % response.status
print response.read()
def run_performance_test():
iters = options.perf_iters
if options.perf_warmup:
iters += 1
logs = []
metric_summaries = {}
start_perf_helper()
for i in xrange(0, iters):
# We create an empty temporary file that the shell will overwrite
# with the contents.
handle, output_file = tempfile.mkstemp(".json", "gnome-shell-perf.")
os.close(handle)
# Run the performance test and collect the output as JSON
normal_exit = False
try:
normal_exit = run_shell(perf_output=output_file)
except:
stop_perf_helper()
raise
finally:
if not normal_exit:
os.remove(output_file)
if not normal_exit:
stop_perf_helper()
return False
try:
f = open(output_file)
output = json.load(f)
f.close()
except:
stop_perf_helper()
raise
finally:
os.remove(output_file)
# Grab the event definitions and monitor layout the first time around
if i == 0:
events = output['events']
monitors = output['monitors']
if options.perf_warmup and i == 0:
continue
for metric in output['metrics']:
name = metric['name']
if not name in metric_summaries:
summary = {}
summary['description'] = metric['description']
summary['units'] = metric['units']
summary['values'] = []
metric_summaries[name] = summary
else:
summary = metric_summaries[name]
summary['values'].append(metric['value'])
logs.append(output['log'])
stop_perf_helper()
if options.perf_output or options.perf_upload:
# Write a complete report, formatted as JSON. The Javascript/C code that
# generates the individual reports we are summarizing here is very careful
# to format them nicely, but we just dump out a compressed no-whitespace
# version here for simplicity. Using json.dump(indent=0) doesn't real
# improve the readability of the output much.
report = {
'date': datetime.datetime.utcnow().isoformat() + 'Z',
'events': events,
'monitors': monitors,
'metrics': metric_summaries,
'logs': logs
}
# Add the Git revision if available
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
if os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in')):
top_dir = os.path.dirname(self_dir)
git_dir = os.path.join(top_dir, '.git')
if os.path.exists(git_dir):
env = dict(os.environ)
env['GIT_DIR'] = git_dir
revision = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
env=env,
stdout=subprocess.PIPE).communicate()[0].strip()
report['revision'] = revision
if options.perf_output:
f = open(options.perf_output, 'w')
json.dump(report, f)
f.close()
if options.perf_upload:
upload_performance_report(json.dumps(report))
else:
# Write a human readable summary
print '------------------------------------------------------------';
for metric in sorted(metric_summaries.keys()):
summary = metric_summaries[metric]
print "#", summary['description']
print metric, ", ".join((str(x) for x in summary['values']))
print '------------------------------------------------------------';
return True
def restore_gnome():
# Do imports lazily to save time and memory
import gio
import gconf
# We don't want to start the new gnome-panel in the current
# directory; $HOME is better for stuff launched from it
os.chdir(os.path.expanduser("~"))
def launch_component(gconf_path):
client = gconf.client_get_default()
component = client.get_string(gconf_path)
if component == None or component == "":
return False
# See gnome-session/gsm-util.c:gsm_util_find_desktop_file_for_app_name()
# The one difference is that we don't search the autostart directories,
# and just search normal application search path. (Gio doesnt' know
# how to search the autostart dirs, so we'd have to do that ourselves.)
appinfo = None
try:
appinfo = gio.unix.DesktopAppInfo(component + ".desktop")
except:
try:
appinfo = gio.unix.DesktopAppInfo("gnome-" + component + ".desktop")
except:
pass
if appinfo:
appinfo.launch()
return True
return False
# GNOME2 fallback
wm = launch_component("/desktop/gnome/session/required_components/windowmanager")
panel = launch_component("/desktop/gnome/session/required_components/panel")
if not wm and not panel: # Probably GNOME3
subprocess.Popen(['gnome-shell'])
# Main program
parser = optparse.OptionParser()
@ -153,6 +570,17 @@ parser.add_option("", "--debug-command", metavar="COMMAND",
help="Command to use for debugging (defaults to 'gdb --args')")
parser.add_option("-v", "--verbose", action="store_true")
parser.add_option("", "--sync", action="store_true")
parser.add_option("", "--perf", metavar="PERF_MODULE",
help="Specify the name of a performance module to run")
parser.add_option("", "--perf-iters", type="int", metavar="ITERS",
help="Numbers of iterations of performance module to run",
default=1)
parser.add_option("", "--perf-warmup", action="store_true",
help="Run a dry run before performance tests")
parser.add_option("", "--perf-output", metavar="OUTPUT_FILE",
help="Output file to write performance report")
parser.add_option("", "--perf-upload", action="store_true",
help="Upload performance report to server")
parser.add_option("", "--version", action="callback", callback=show_version,
help="Display version and exit")
@ -162,6 +590,10 @@ if args:
parser.print_usage()
sys.exit(1)
if options.perf and json is None:
print 'The Python simplejson module is required for performance tests'
sys.exit(1)
# Handle ssh logins
if 'DISPLAY' not in os.environ:
running_env = get_running_session_environs()
@ -172,7 +604,21 @@ if options.debug_command:
elif options.debug:
options.debug_command = "gdb --args"
normal_exit = run_shell()
# We only respawn the previous environment on abnormal exit;
# for a clean exit, we assume that gnome-shell was replaced with
# something else.
normal_exit = False
try:
if options.perf:
normal_exit = run_performance_test()
else:
ensure_desktop_infrastructure_state()
normal_exit = run_shell()
finally:
if options.replace and (options.perf or not normal_exit):
restore_gnome()
if normal_exit:
sys.exit(0)
else:

View File

@ -1,310 +0,0 @@
#!@PYTHON@
# -*- mode: Python; indent-tabs-mode: nil; -*-
import datetime
from gi.repository import GLib, GObject, Gio
try:
import json
except ImportError:
import simplejson as json
import optparse
import os
import re
import subprocess
import sys
import tempfile
import base64
from ConfigParser import RawConfigParser
import hashlib
import hmac
import httplib
import urlparse
import urllib
def show_version(option, opt_str, value, parser):
print "GNOME Shell Performance Test @VERSION@"
sys.exit()
def wait_for_dbus_name(wait_name):
loop = GLib.MainLoop()
def on_name_appeared(connection, name, name_owner, *args):
if not (name == wait_name and new_owner != ''):
return
loop.quit()
return
watch_id = Gio.bus_watch_name(Gio.BusType.SESSION,
wait_name,
Gio.BusNameWatcherFlags.NONE,
on_name_appeared,
None)
def on_timeout():
print "\nFailed to start %s: timed out" % (wait_name,)
sys.exit(1)
GLib.timeout_add_seconds(7, on_timeout)
loop.run()
Gio.bus_unwatch_name(watch_id)
PERF_HELPER_NAME = "org.gnome.Shell.PerfHelper"
PERF_HELPER_IFACE = "org.gnome.Shell.PerfHelper"
PERF_HELPER_PATH = "/org/gnome/Shell/PerfHelper"
def start_perf_helper():
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
perf_helper_path = "@libexecdir@/gnome-shell-perf-helper"
subprocess.Popen([perf_helper_path])
wait_for_dbus_name (PERF_HELPER_NAME)
def stop_perf_helper():
proxy = Gio.DBusProxy(g_bus_type=Gio.BusType.SESSION,
g_name=PERF_HELPER_NAME,
g_interface=PERF_HELPER_IFACE,
g_object_path=PERF_HELPER_PATH)
proxy.Exit()
def start_shell(extra_args, perf_output=None):
# Set up environment
env = dict(os.environ)
env['SHELL_PERF_MODULE'] = options.perf
env['MUTTER_WM_CLASS_FILTER'] = 'Gnome-shell-perf-helper'
if perf_output is not None:
env['SHELL_PERF_OUTPUT'] = perf_output
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
args.append(os.path.join(self_dir, 'gnome-shell'))
# pass on any additional arguments
args += extra_args
return subprocess.Popen(args, env=env)
def run_shell(args, perf_output=None):
# we do no additional supervision of gnome-shell,
# beyond that of wait
# in particular, we don't kill the shell upon
# receving a KeyboardInterrupt, as we expect to be
# in the same process group
shell = start_shell(extra_args, perf_output=perf_output)
shell.wait()
return shell.returncode == 0
def upload_performance_report(report_text):
try:
config_home = os.environ['XDG_CONFIG_HOME']
except KeyError:
config_home = None
if not config_home:
config_home = os.path.expanduser("~/.config")
config_file = os.path.join(config_home, "gnome-shell/perf.ini")
try:
config = RawConfigParser()
f = open(config_file)
config.readfp(f)
f.close()
base_url = config.get('upload', 'url')
system_name = config.get('upload', 'name')
secret_key = config.get('upload', 'key')
except Exception, e:
print "Can't read upload configuration from %s: %s" % (config_file, str(e))
sys.exit(1)
# Determine host, port and upload URL from provided data, we're
# a bit extra-careful about normalization since the URL is part
# of the signature.
split = urlparse.urlsplit(base_url)
scheme = split[0].lower()
netloc = split[1]
base_path = split[2]
m = re.match(r'^(.*?)(?::(\d+))?$', netloc)
if m.group(2):
host, port = m.group(1), int(m.group(2))
else:
host, port = m.group(1), None
if scheme != "http":
print "'%s' is not a HTTP URL" % base_url
sys.exit(1)
if port is None:
port = 80
if base_path.endswith('/'):
base_path = base_path[:-1]
if port == 80:
normalized_base = "%s://%s%s" % (scheme, host, base_path)
else:
normalized_base = "%s://%s:%d%s" % (scheme, host, port, base_path)
upload_url = normalized_base + '/system/%s/upload' % system_name
upload_path = urlparse.urlsplit(upload_url)[2] # path portion
# Create signature based on upload URL and the report data
signature_data = 'POST&' + upload_url + "&&"
h = hmac.new(secret_key, digestmod=hashlib.sha1)
h.update(signature_data)
h.update(report_text)
signature = urllib.quote(base64.b64encode(h.digest()), "~")
headers = {
'User-Agent': 'gnome-shell-performance-tool/@VERSION@',
'Content-Type': 'application/json',
'X-Shell-Signature': 'HMAC-SHA1 ' + signature
};
connection = httplib.HTTPConnection(host, port)
connection.request('POST', upload_path, report_text, headers)
response = connection.getresponse()
if response.status == 200:
print "Performance report upload succeeded"
else:
print "Performance report upload failed with status %d" % response.status
print response.read()
def run_performance_test(args):
iters = options.perf_iters
if options.perf_warmup:
iters += 1
logs = []
metric_summaries = {}
start_perf_helper()
for i in xrange(0, iters):
# We create an empty temporary file that the shell will overwrite
# with the contents.
handle, output_file = tempfile.mkstemp(".json", "gnome-shell-perf.")
os.close(handle)
# Run the performance test and collect the output as JSON
normal_exit = False
try:
normal_exit = run_shell(args, perf_output=output_file)
except:
stop_perf_helper()
raise
finally:
if not normal_exit:
os.remove(output_file)
if not normal_exit:
stop_perf_helper()
return False
try:
f = open(output_file)
output = json.load(f)
f.close()
except:
stop_perf_helper()
raise
finally:
os.remove(output_file)
# Grab the event definitions and monitor layout the first time around
if i == 0:
events = output['events']
monitors = output['monitors']
if options.perf_warmup and i == 0:
continue
for metric in output['metrics']:
name = metric['name']
if not name in metric_summaries:
summary = {}
summary['description'] = metric['description']
summary['units'] = metric['units']
summary['values'] = []
metric_summaries[name] = summary
else:
summary = metric_summaries[name]
summary['values'].append(metric['value'])
logs.append(output['log'])
stop_perf_helper()
if options.perf_output or options.perf_upload:
# Write a complete report, formatted as JSON. The Javascript/C code that
# generates the individual reports we are summarizing here is very careful
# to format them nicely, but we just dump out a compressed no-whitespace
# version here for simplicity. Using json.dump(indent=0) doesn't real
# improve the readability of the output much.
report = {
'date': datetime.datetime.utcnow().isoformat() + 'Z',
'events': events,
'monitors': monitors,
'metrics': metric_summaries,
'logs': logs
}
# Add the Git revision if available
self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
if os.path.exists(os.path.join(self_dir, 'gnome-shell-jhbuild.in')):
top_dir = os.path.dirname(self_dir)
git_dir = os.path.join(top_dir, '.git')
if os.path.exists(git_dir):
env = dict(os.environ)
env['GIT_DIR'] = git_dir
revision = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
env=env,
stdout=subprocess.PIPE).communicate()[0].strip()
report['revision'] = revision
if options.perf_output:
f = open(options.perf_output, 'w')
json.dump(report, f)
f.close()
if options.perf_upload:
upload_performance_report(json.dumps(report))
else:
# Write a human readable summary
print '------------------------------------------------------------';
for metric in sorted(metric_summaries.keys()):
summary = metric_summaries[metric]
print "#", summary['description']
print metric, ", ".join((str(x) for x in summary['values']))
print '------------------------------------------------------------';
return True
# Main program
parser = optparse.OptionParser()
parser.add_option("", "--perf", metavar="PERF_MODULE",
help="Specify the name of a performance module to run")
parser.add_option("", "--perf-iters", type="int", metavar="ITERS",
help="Numbers of iterations of performance module to run",
default=1)
parser.add_option("", "--perf-warmup", action="store_true",
help="Run a dry run before performance tests")
parser.add_option("", "--perf-output", metavar="OUTPUT_FILE",
help="Output file to write performance report")
parser.add_option("", "--perf-upload", action="store_true",
help="Upload performance report to server")
parser.add_option("", "--version", action="callback", callback=show_version,
help="Display version and exit")
options, args = parser.parse_args()
normal_exit = run_performance_test(args)
if normal_exit:
sys.exit(0)
else:
sys.exit(1)

View File

@ -40,6 +40,9 @@
#include "shell-perf-log.h"
#include "shell-wm-private.h"
static void gnome_shell_plugin_dispose (GObject *object);
static void gnome_shell_plugin_finalize (GObject *object);
static void gnome_shell_plugin_start (MetaPlugin *plugin);
static void gnome_shell_plugin_minimize (MetaPlugin *plugin,
MetaWindowActor *actor);
@ -112,8 +115,12 @@ G_DEFINE_TYPE (GnomeShellPlugin, gnome_shell_plugin, META_TYPE_PLUGIN)
static void
gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
MetaPluginClass *plugin_class = META_PLUGIN_CLASS (klass);
gobject_class->dispose = gnome_shell_plugin_dispose;
gobject_class->finalize = gnome_shell_plugin_finalize;
plugin_class->start = gnome_shell_plugin_start;
plugin_class->map = gnome_shell_plugin_map;
plugin_class->minimize = gnome_shell_plugin_minimize;
@ -195,6 +202,18 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
}
}
static void
gnome_shell_plugin_dispose (GObject *object)
{
G_OBJECT_CLASS(gnome_shell_plugin_parent_class)->dispose (object);
}
static void
gnome_shell_plugin_finalize (GObject *object)
{
G_OBJECT_CLASS(gnome_shell_plugin_parent_class)->finalize (object);
}
static ShellWM *
get_shell_wm (void)
{

View File

@ -28,8 +28,6 @@
#include "shell-perf-log.h"
#include "st.h"
#include <jsapi.h>
extern GType gnome_shell_plugin_get_type (void);
#define SHELL_DBUS_SERVICE "org.gnome.Shell"
@ -38,7 +36,6 @@ extern GType gnome_shell_plugin_get_type (void);
#define OVERRIDES_SCHEMA "org.gnome.shell.overrides"
static gboolean is_gdm_mode = FALSE;
static char *session_mode = NULL;
#define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
#define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
@ -177,18 +174,6 @@ shell_prefs_init (void)
OVERRIDES_SCHEMA);
}
static void
shell_introspection_init (void)
{
g_irepository_prepend_search_path (MUTTER_TYPELIB_DIR);
g_irepository_prepend_search_path (GNOME_SHELL_PKGLIBDIR);
#if HAVE_BLUETOOTH
g_irepository_prepend_search_path (BLUETOOTH_DIR);
#endif
}
static void
malloc_statistics_callback (ShellPerfLog *perf_log,
gpointer data)
@ -254,48 +239,6 @@ default_log_handler (const char *log_domain,
g_log_default_handler (log_domain, log_level, message, data);
}
static void
shut_up (const char *domain,
GLogLevelFlags level,
const char *message,
gpointer user_data)
{
}
static gboolean
list_modes (const char *option_name,
const char *value,
gpointer data,
GError **error)
{
ShellGlobal *global;
GjsContext *context;
const char *script;
int status;
/* Many of our imports require global to be set, so rather than
* tayloring our imports carefully here to avoid that dependency,
* we just set it.
* ShellGlobal has some GTK+ dependencies, so initialize GTK+; we
* don't really care if it fails though (e.g. when running from a tty),
* so we mute all warnings */
g_log_set_default_handler (shut_up, NULL);
gtk_init_check (NULL, NULL);
_shell_global_init (NULL);
global = shell_global_get ();
context = _shell_global_get_gjs_context (global);
shell_introspection_init ();
script = "imports.ui.environment.init();"
"imports.ui.sessionMode.listModes();";
if (!gjs_context_eval (context, script, -1, "<main>", &status, NULL))
g_message ("Retrieving list of available modes failed.");
exit (status);
}
static gboolean
print_version (const gchar *option_name,
const gchar *value,
@ -314,23 +257,11 @@ GOptionEntry gnome_shell_options[] = {
NULL
},
{
"gdm-mode", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE,
"gdm-mode", 0, 0, G_OPTION_ARG_NONE,
&is_gdm_mode,
N_("Mode used by GDM for login screen"),
NULL
},
{
"mode", 0, 0, G_OPTION_ARG_STRING,
&session_mode,
N_("Use a specific mode, e.g. \"gdm\" for login screen"),
"MODE"
},
{
"list-modes", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
list_modes,
N_("List possible modes"),
NULL
},
{ NULL }
};
@ -339,6 +270,7 @@ main (int argc, char **argv)
{
GOptionContext *ctx;
GError *error = NULL;
ShellSessionType session_type;
int ecode;
TpDebugSender *sender;
@ -377,7 +309,11 @@ main (int argc, char **argv)
shell_a11y_init ();
shell_perf_log_init ();
shell_prefs_init ();
shell_introspection_init ();
g_irepository_prepend_search_path (GNOME_SHELL_PKGLIBDIR);
#if HAVE_BLUETOOTH
g_irepository_prepend_search_path (BLUETOOTH_DIR);
#endif
/* Turn on telepathy-glib debugging but filter it out in
* default_log_handler. This handler also exposes all the logs over D-Bus
@ -388,10 +324,12 @@ main (int argc, char **argv)
g_log_set_default_handler (default_log_handler, sender);
/* Initialize the global object */
if (session_mode == NULL)
session_mode = is_gdm_mode ? "gdm" : "user";
if (is_gdm_mode)
session_type = SHELL_SESSION_GDM;
else
session_type = SHELL_SESSION_USER;
_shell_global_init ("session-mode", session_mode, NULL);
_shell_global_init ("session-type", session_type, NULL);
ecode = meta_run ();
@ -412,6 +350,7 @@ main (int argc, char **argv)
This function is never actually called.
https://bugzilla.gnome.org/show_bug.cgi?id=670477
*/
void _shell_link_to_shell_js (void);
void

View File

@ -608,42 +608,6 @@ shell_app_system_lookup_heuristic_basename (ShellAppSystem *system,
return NULL;
}
/**
* shell_app_system_lookup_wmclass:
* @system: a #ShellAppSystem
* @wmclass: A WM_CLASS value
*
* Find a valid application corresponding to a WM_CLASS value.
*
* Returns: (transfer none): A #ShellApp for @wmclass
*/
ShellApp *
shell_app_system_lookup_wmclass (ShellAppSystem *system,
const char *wmclass)
{
char *canonicalized;
char *desktop_file;
ShellApp *app;
if (wmclass == NULL)
return NULL;
canonicalized = g_ascii_strdown (wmclass, -1);
/* This handles "Fedora Eclipse", probably others.
* Note g_strdelimit is modify-in-place. */
g_strdelimit (canonicalized, " ", '-');
desktop_file = g_strconcat (canonicalized, ".desktop", NULL);
app = shell_app_system_lookup_heuristic_basename (system, desktop_file);
g_free (canonicalized);
g_free (desktop_file);
return app;
}
/**
* shell_app_system_get_all:
* @system:

View File

@ -49,8 +49,7 @@ ShellApp *shell_app_system_lookup_app_for_path (ShellAppSystem *
const char *desktop_path);
ShellApp *shell_app_system_lookup_heuristic_basename (ShellAppSystem *system,
const char *id);
ShellApp *shell_app_system_lookup_wmclass (ShellAppSystem *system,
const char *wmclass);
GSList *shell_app_system_get_all (ShellAppSystem *system);

View File

@ -371,7 +371,7 @@ shell_app_get_name (ShellApp *app)
name = meta_window_get_wm_class (window);
if (!name)
name = C_("program", "Unknown");
name = _("Unknown");
return name;
}
}
@ -493,7 +493,7 @@ shell_app_activate_window (ShellApp *app,
return;
else
{
GSList *windows_reversed, *iter;
GSList *iter;
ShellGlobal *global = shell_global_get ();
MetaScreen *screen = shell_global_get_screen (global);
MetaDisplay *display = meta_screen_get_display (screen);
@ -511,16 +511,13 @@ shell_app_activate_window (ShellApp *app,
/* Now raise all the other windows for the app that are on
* the same workspace, in reverse order to preserve the stacking.
*/
windows_reversed = g_slist_copy (windows);
windows_reversed = g_slist_reverse (windows_reversed);
for (iter = windows_reversed; iter; iter = iter->next)
for (iter = windows; iter; iter = iter->next)
{
MetaWindow *other_window = iter->data;
if (other_window != window)
meta_window_raise (other_window);
}
g_slist_free (windows_reversed);
/* If we have a transient that the user's interacted with more recently than
* the window, pick that.

View File

@ -16,4 +16,7 @@ GjsContext *_shell_global_get_gjs_context (ShellGlobal *global);
gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
XEvent *xev);
void _shell_global_set_session_type (ShellGlobal *global,
ShellSessionType session_type);
#endif /* __SHELL_GLOBAL_PRIVATE_H__ */

View File

@ -59,7 +59,7 @@ struct _ShellGlobal {
MetaScreen *meta_screen;
GdkScreen *gdk_screen;
char *session_mode;
ShellSessionType session_type;
/* We use this window to get a notification from GTK+ when
* a widget in our process does a GTK+ grab. See
@ -97,7 +97,7 @@ struct _ShellGlobal {
enum {
PROP_0,
PROP_SESSION_MODE,
PROP_SESSION_TYPE,
PROP_OVERLAY_GROUP,
PROP_SCREEN,
PROP_GDK_SCREEN,
@ -143,9 +143,8 @@ shell_global_set_property(GObject *object,
case PROP_STAGE_INPUT_MODE:
shell_global_set_stage_input_mode (global, g_value_get_enum (value));
break;
case PROP_SESSION_MODE:
g_clear_pointer (&global->session_mode, g_free);
global->session_mode = g_ascii_strdown (g_value_get_string (value), -1);
case PROP_SESSION_TYPE:
global->session_type = g_value_get_enum (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@ -163,8 +162,8 @@ shell_global_get_property(GObject *object,
switch (prop_id)
{
case PROP_SESSION_MODE:
g_value_set_string (value, shell_global_get_session_mode (global));
case PROP_SESSION_TYPE:
g_value_set_enum (value, shell_global_get_session_type (global));
break;
case PROP_OVERLAY_GROUP:
g_value_set_object (value, meta_get_overlay_group_for_screen (global->meta_screen));
@ -344,12 +343,13 @@ shell_global_class_init (ShellGlobalClass *klass)
G_TYPE_STRING);
g_object_class_install_property (gobject_class,
PROP_SESSION_MODE,
g_param_spec_string ("session-mode",
"Session Mode",
"The session mode to use",
"user",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
PROP_SESSION_TYPE,
g_param_spec_enum ("session-type",
"Session Type",
"The type of session",
SHELL_TYPE_SESSION_TYPE,
SHELL_SESSION_USER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class,
PROP_OVERLAY_GROUP,
g_param_spec_object ("overlay-group",
@ -805,9 +805,90 @@ global_stage_after_paint (ClutterStage *stage,
"clutter.stagePaintDone");
}
static void
update_font_options (GtkSettings *settings,
ClutterStage *stage)
{
StThemeContext *context;
ClutterBackend *backend;
gint dpi;
gint hinting;
gchar *hint_style_str;
cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_NONE;
gint antialias;
cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_NONE;
cairo_font_options_t *options;
g_object_get (settings,
"gtk-xft-dpi", &dpi,
"gtk-xft-antialias", &antialias,
"gtk-xft-hinting", &hinting,
"gtk-xft-hintstyle", &hint_style_str,
NULL);
context = st_theme_context_get_for_stage (stage);
if (dpi != -1)
/* GTK stores resolution as 1024 * dots/inch */
st_theme_context_set_resolution (context, dpi / 1024);
else
st_theme_context_set_default_resolution (context);
/* Clutter (as of 0.9) passes comprehensively wrong font options
* override whatever set_font_flags() did above.
*
* http://bugzilla.openedhand.com/show_bug.cgi?id=1456
*/
backend = clutter_get_default_backend ();
options = cairo_font_options_create ();
cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_ON);
if (hinting >= 0 && !hinting)
{
hint_style = CAIRO_HINT_STYLE_NONE;
}
else if (hint_style_str)
{
if (strcmp (hint_style_str, "hintnone") == 0)
hint_style = CAIRO_HINT_STYLE_NONE;
else if (strcmp (hint_style_str, "hintslight") == 0)
hint_style = CAIRO_HINT_STYLE_SLIGHT;
else if (strcmp (hint_style_str, "hintmedium") == 0)
hint_style = CAIRO_HINT_STYLE_MEDIUM;
else if (strcmp (hint_style_str, "hintfull") == 0)
hint_style = CAIRO_HINT_STYLE_FULL;
}
g_free (hint_style_str);
cairo_font_options_set_hint_style (options, hint_style);
/* We don't want to turn on subpixel anti-aliasing; since Clutter
* doesn't currently have the code to support ARGB masks,
* generating them then squashing them back to A8 is pointless.
*/
antialias_mode = (antialias < 0 || antialias) ? CAIRO_ANTIALIAS_GRAY
: CAIRO_ANTIALIAS_NONE;
cairo_font_options_set_antialias (options, antialias_mode);
clutter_backend_set_font_options (backend, options);
cairo_font_options_destroy (options);
}
static void
settings_notify_cb (GtkSettings *settings,
GParamSpec *pspec,
gpointer data)
{
update_font_options (settings, CLUTTER_STAGE (data));
}
static void
shell_fonts_init (ClutterStage *stage)
{
GtkSettings *settings;
CoglPangoFontMap *fontmap;
/* Disable text mipmapping; it causes problems on pre-GEM Intel
@ -817,6 +898,19 @@ shell_fonts_init (ClutterStage *stage)
*/
fontmap = COGL_PANGO_FONT_MAP (clutter_get_font_map ());
cogl_pango_font_map_set_use_mipmapping (fontmap, FALSE);
settings = gtk_settings_get_default ();
g_object_connect (settings,
"signal::notify::gtk-xft-dpi",
G_CALLBACK (settings_notify_cb), stage,
"signal::notify::gtk-xft-antialias",
G_CALLBACK (settings_notify_cb), stage,
"signal::notify::gtk-xft-hinting",
G_CALLBACK (settings_notify_cb), stage,
"signal::notify::gtk-xft-hintstyle",
G_CALLBACK (settings_notify_cb), stage,
NULL);
update_font_options (settings, stage);
}
/* This is an IBus workaround. The flow of events with IBus is that every time
@ -1776,10 +1870,31 @@ shell_global_launch_calendar_server (ShellGlobal *global)
g_free (calendar_server_exe);
}
const char *
shell_global_get_session_mode (ShellGlobal *global)
/**
* shell_global_get_session_type:
* @global: The #ShellGlobal.
*
* Gets the type of session gnome-shell provides.
*
* The type determines what UI elements are displayed,
* what keybindings work, and generally how the shell
* behaves.
*
* A session type of #SHELL_SESSION_USER means gnome-shell
* will enable the activities overview, status menu, run dialog,
* etc. This is the default.
*
* A session type of #SHELL_SESSION_GDM means gnome-shell
* will enable a login dialog and run in a more confined
* way. This type is suitable for the display manager.
*
* Returns: the type of session gnome-shell is providing.
*/
ShellSessionType
shell_global_get_session_type (ShellGlobal *global)
{
g_return_val_if_fail (SHELL_IS_GLOBAL (global), "user");
g_return_val_if_fail (SHELL_IS_GLOBAL (global),
SHELL_SESSION_USER);
return global->session_mode;
return global->session_type;
}

View File

@ -141,7 +141,12 @@ void shell_global_reexec_self (ShellGlobal *global);
void shell_global_launch_calendar_server (ShellGlobal *global);
const char * shell_global_get_session_mode (ShellGlobal *global);
typedef enum {
SHELL_SESSION_USER,
SHELL_SESSION_GDM
} ShellSessionType;
ShellSessionType shell_global_get_session_type (ShellGlobal *global);
G_END_DECLS

View File

@ -1,214 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2010-2012 Inclusive Design Research Centre, OCAD University.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author:
* Joseph Scheuhammer <clown@alum.mit.edu>
*/
/**
* SECTION:shell-invert-lightness-effect
* @short_description: A colorization effect where lightness is inverted but
* color is not.
* @see_also: #ClutterEffect, #ClutterOffscreenEffect
*
* #ShellInvertLightnessEffect is a sub-class of #ClutterEffect that enhances
* the appearance of a clutter actor. Specifically it inverts the lightness
* of a #ClutterActor (e.g., darker colors become lighter, white becomes black,
* and white, black).
*/
#define SHELL_INVERT_LIGHTNESS_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_INVERT_LIGHTNESS_EFFECT, ShellInvertLightnessEffectClass))
#define SHELL_IS_INVERT_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_INVERT_LIGHTNESS_EFFECT))
#define SHELL_INVERT_LIGHTNESS_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_INVERT_LIGHTNESS_EFFEC, ShellInvertLightnessEffectClass))
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "shell-invert-lightness-effect.h"
#include <cogl/cogl.h>
struct _ShellInvertLightnessEffect
{
ClutterOffscreenEffect parent_instance;
gint tex_width;
gint tex_height;
CoglPipeline *pipeline;
};
struct _ShellInvertLightnessEffectClass
{
ClutterOffscreenEffectClass parent_class;
CoglPipeline *base_pipeline;
};
/* Lightness inversion in GLSL.
*/
static const gchar *invert_lightness_source =
"cogl_texel = texture2D (cogl_sampler, cogl_tex_coord.st);\n"
"vec3 effect = vec3 (cogl_texel);\n"
"\n"
"float maxColor = max (cogl_texel.r, max (cogl_texel.g, cogl_texel.b));\n"
"float minColor = min (cogl_texel.r, min (cogl_texel.g, cogl_texel.b));\n"
"float lightness = (maxColor + minColor) / 2.0;\n"
"\n"
"float delta = (1.0 - lightness) - lightness;\n"
"effect.rgb = (effect.rgb + delta);\n"
"\n"
"cogl_texel = vec4 (effect, cogl_texel.a);\n";
G_DEFINE_TYPE (ShellInvertLightnessEffect,
shell_invert_lightness_effect,
CLUTTER_TYPE_OFFSCREEN_EFFECT);
static gboolean
shell_invert_lightness_effect_pre_paint (ClutterEffect *effect)
{
ShellInvertLightnessEffect *self = SHELL_INVERT_LIGHTNESS_EFFECT (effect);
ClutterEffectClass *parent_class;
if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (effect)))
return FALSE;
if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
{
/* if we don't have support for GLSL shaders then we
* forcibly disable the ActorMeta
*/
g_warning ("Unable to use the ShellInvertLightnessEffect: the "
"graphics hardware or the current GL driver does not "
"implement support for the GLSL shading language.");
clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (self), FALSE);
return FALSE;
}
parent_class =
CLUTTER_EFFECT_CLASS (shell_invert_lightness_effect_parent_class);
if (parent_class->pre_paint (effect))
{
ClutterOffscreenEffect *offscreen_effect =
CLUTTER_OFFSCREEN_EFFECT (effect);
CoglHandle texture;
texture = clutter_offscreen_effect_get_texture (offscreen_effect);
self->tex_width = cogl_texture_get_width (texture);
self->tex_height = cogl_texture_get_height (texture);
cogl_pipeline_set_layer_texture (self->pipeline, 0, texture);
return TRUE;
}
else
return FALSE;
}
static void
shell_invert_lightness_effect_paint_target (ClutterOffscreenEffect *effect)
{
ShellInvertLightnessEffect *self = SHELL_INVERT_LIGHTNESS_EFFECT (effect);
ClutterActor *actor;
guint8 paint_opacity;
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (effect));
paint_opacity = clutter_actor_get_paint_opacity (actor);
cogl_pipeline_set_color4ub (self->pipeline,
paint_opacity,
paint_opacity,
paint_opacity,
paint_opacity);
cogl_push_source (self->pipeline);
cogl_rectangle (0, 0, self->tex_width, self->tex_height);
cogl_pop_source ();
}
static void
shell_invert_lightness_effect_dispose (GObject *gobject)
{
ShellInvertLightnessEffect *self = SHELL_INVERT_LIGHTNESS_EFFECT (gobject);
if (self->pipeline != NULL)
{
cogl_object_unref (self->pipeline);
self->pipeline = NULL;
}
G_OBJECT_CLASS (shell_invert_lightness_effect_parent_class)->dispose (gobject);
}
static void
shell_invert_lightness_effect_class_init (ShellInvertLightnessEffectClass *klass)
{
ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterOffscreenEffectClass *offscreen_class;
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
offscreen_class->paint_target = shell_invert_lightness_effect_paint_target;
effect_class->pre_paint = shell_invert_lightness_effect_pre_paint;
gobject_class->dispose = shell_invert_lightness_effect_dispose;
}
static void
shell_invert_lightness_effect_init (ShellInvertLightnessEffect *self)
{
ShellInvertLightnessEffectClass *klass;
klass = SHELL_INVERT_LIGHTNESS_EFFECT_GET_CLASS (self);
if (G_UNLIKELY (klass->base_pipeline == NULL))
{
CoglSnippet *snippet;
CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ());
klass->base_pipeline = cogl_pipeline_new (ctx);
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_TEXTURE_LOOKUP,
NULL,
NULL);
cogl_snippet_set_replace (snippet, invert_lightness_source);
cogl_pipeline_add_layer_snippet (klass->base_pipeline, 0, snippet);
cogl_object_unref (snippet);
cogl_pipeline_set_layer_null_texture (klass->base_pipeline,
0, /* layer number */
COGL_TEXTURE_TYPE_2D);
}
self->pipeline = cogl_pipeline_copy (klass->base_pipeline);
}
/**
* shell_invert_lightness_effect_new:
*
* Creates a new #ShellInvertLightnessEffect to be used with
* clutter_actor_add_effect()
*
* Return value: (transfer full): the newly created
* #ShellInvertLightnessEffect or %NULL. Use g_object_unref() when done.
*/
ClutterEffect *
shell_invert_lightness_effect_new (void)
{
return g_object_new (SHELL_TYPE_INVERT_LIGHTNESS_EFFECT, NULL);
}

View File

@ -1,42 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright © 2010-2012 Inclusive Design Research Centre, OCAD University.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Author:
* Joseph Scheuhammer <clown@alum.mit.edu>
*/
#ifndef __SHELL_INVERT_LIGHTNESS_EFFECT_H__
#define __SHELL_INVERT_LIGHTNESS_EFFECT_H__
#define COGL_ENABLE_EXPERIMENTAL_API
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define SHELL_TYPE_INVERT_LIGHTNESS_EFFECT (shell_invert_lightness_effect_get_type ())
#define SHELL_INVERT_LIGHTNESS_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_INVERT_LIGHTNESS_EFFECT, ShellInvertLightnessEffect))
#define SHELL_IS_INVERT_LIGHTNESS_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_INVERT_LIGHTNESS_EFFECT))
typedef struct _ShellInvertLightnessEffect ShellInvertLightnessEffect;
typedef struct _ShellInvertLightnessEffectClass ShellInvertLightnessEffectClass;
GType shell_invert_lightness_effect_get_type (void) G_GNUC_CONST;
ClutterEffect *shell_invert_lightness_effect_new (void);
G_END_DECLS
#endif /* __SHELL_INVERT_LIGHTNESS_EFFECT_H__ */

View File

@ -79,3 +79,15 @@ shell_js_add_extension_importer (const char *target_object_script,
JS_EndRequest (context);
return ret;
}
/**
* shell_js_format_int_alternative_output:
* @intval:
*
* Returns: (transfer full):
*/
gchar *
shell_js_format_int_alternative_output (gint intval)
{
return g_strdup_printf ("%Id", intval);
}

View File

@ -11,6 +11,8 @@ gboolean shell_js_add_extension_importer (const char *target_object_script,
const char *directory,
GError **error);
gchar *shell_js_format_int_alternative_output (gint intval);
G_BEGIN_DECLS
#endif /* __SHELL_JS_H__ */

View File

@ -76,26 +76,6 @@ shell_agent_request_free (gpointer data)
g_slice_free (ShellAgentRequest, request);
}
static void
shell_agent_request_cancel (ShellAgentRequest *request)
{
GError *error;
ShellNetworkAgent *self;
self = request->self;
error = g_error_new (NM_SECRET_AGENT_ERROR,
NM_SECRET_AGENT_ERROR_AGENT_CANCELED,
"Canceled by NetworkManager");
request->callback (NM_SECRET_AGENT (self), request->connection,
NULL, error, request->callback_data);
g_signal_emit (self, signals[SIGNAL_CANCEL_REQUEST], 0, request->request_id);
g_hash_table_remove (self->priv->requests, request->request_id);
g_error_free (error);
}
static void
shell_network_agent_init (ShellNetworkAgent *agent)
{
@ -361,17 +341,6 @@ shell_network_agent_get_secrets (NMSecretAgent *agent,
ShellAgentRequest *request;
NMSettingConnection *setting_connection;
const char *connection_type;
char *request_id;
request_id = g_strdup_printf ("%s/%s", connection_path, setting_name);
if ((request = g_hash_table_lookup (self->priv->requests, request_id)) != NULL)
{
/* We already have a request pending for this (connection, setting)
* Cancel it before starting the new one.
* This will also free the request structure and associated resources.
*/
shell_agent_request_cancel (request);
}
setting_connection = nm_connection_get_setting_connection (connection);
connection_type = nm_setting_connection_get_connection_type (setting_connection);
@ -402,7 +371,7 @@ shell_network_agent_get_secrets (NMSecretAgent *agent,
else
request->vpn_entries = NULL;
request->request_id = request_id;
request->request_id = g_strdup_printf ("%s/%s", connection_path, setting_name);
g_hash_table_replace (self->priv->requests, request->request_id, request);
if ((flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW) ||
@ -440,7 +409,6 @@ shell_network_agent_set_password (ShellNetworkAgent *self,
priv = self->priv;
request = g_hash_table_lookup (priv->requests, request_id);
g_return_if_fail (request != NULL);
if (!request->is_vpn)
{
@ -470,7 +438,6 @@ shell_network_agent_respond (ShellNetworkAgent *self,
priv = self->priv;
request = g_hash_table_lookup (priv->requests, request_id);
g_return_if_fail (request != NULL);
if (response == SHELL_NETWORK_AGENT_USER_CANCELED)
{
@ -521,22 +488,20 @@ shell_network_agent_cancel_get_secrets (NMSecretAgent *agent,
{
ShellNetworkAgent *self = SHELL_NETWORK_AGENT (agent);
ShellNetworkAgentPrivate *priv = self->priv;
gchar *request_id;
ShellAgentRequest *request;
request_id = g_strdup_printf ("%s/%s", connection_path, setting_name);
request = g_hash_table_lookup (priv->requests, request_id);
gchar *request_id = g_strdup_printf ("%s/%s", connection_path, setting_name);
ShellAgentRequest *request = g_hash_table_lookup (priv->requests, request_id);
GError *error = g_error_new (NM_SECRET_AGENT_ERROR,
NM_SECRET_AGENT_ERROR_AGENT_CANCELED,
"Canceled by NetworkManager");
request->callback (agent, request->connection, NULL, error, request->callback_data);
g_signal_emit (self, signals[SIGNAL_CANCEL_REQUEST], 0, request_id);
g_hash_table_remove (priv->requests, request_id);
g_free (request_id);
if (!request)
{
/* We've already sent the result, but the caller cancelled the
* operation before receiving that result.
*/
return;
}
shell_agent_request_cancel (request);
g_error_free (error);
}
/************************* saving of secrets ****************************************/

View File

@ -330,6 +330,34 @@ shell_tp_client_grab_contact_list_changed (ShellTpClient *self,
/* Telepathy utility functions */
/**
* shell_get_contact_events:
* @log_manager: A #TplLogManager
* @account: A #TpAccount
* @entity: A #TplEntity
* @num_events: The number of events to retrieve
* @callback: (scope async): User callback to run when the contact is ready
*
* Wrap tpl_log_manager_get_filtered_events_async because gjs cannot support
* multiple callbacks in the same function call.
*/
void
shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback)
{
tpl_log_manager_get_filtered_events_async (log_manager,
account,
entity,
TPL_EVENT_MASK_TEXT,
num_events,
NULL, NULL,
callback, NULL);
}
/* gjs doesn't allow us to craft a GError so we need a C wrapper */
void
shell_decline_dispatch_op (TpAddDispatchOperationContext *context,
@ -341,3 +369,9 @@ shell_decline_dispatch_op (TpAddDispatchOperationContext *context,
tp_add_dispatch_operation_context_fail (context, error);
g_error_free (error);
}
/* gjs doesn't cope with tp_proxy_get_invalidated() returning a GError */
gboolean shell_is_channel_invalidated (TpChannel *channel)
{
return tp_proxy_get_invalidated (channel) != NULL;
}

View File

@ -7,6 +7,7 @@
#include <glib-object.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-logger/telepathy-logger.h>
G_BEGIN_DECLS
@ -102,8 +103,16 @@ void shell_tp_client_grab_contact_list_changed (ShellTpClient *self,
/* Telepathy utility functions */
void shell_get_contact_events (TplLogManager *log_manager,
TpAccount *account,
TplEntity *entity,
guint num_events,
GAsyncReadyCallback callback);
void shell_decline_dispatch_op (TpAddDispatchOperationContext *context,
const gchar *message);
gboolean shell_is_channel_invalidated (TpChannel *channel);
G_END_DECLS
#endif /* __SHELL_TP_CLIENT_H__ */

View File

@ -592,6 +592,29 @@ shell_util_get_week_start ()
return week_start;
}
/**
* shell_write_soup_message_to_stream:
* @stream: a #GOutputStream
* @message: a #SoupMessage
* @error: location to store GError
*
* Write a string to a GOutputStream as binary data. This is a
* workaround for the lack of proper binary strings in GJS.
*/
void
shell_write_soup_message_to_stream (GOutputStream *stream,
SoupMessage *message,
GError **error)
{
SoupMessageBody *body;
body = message->response_body;
g_output_stream_write_all (stream,
body->data, body->length,
NULL, NULL, error);
}
/**
* shell_write_string_to_stream:
* @stream: a #GOutputStream

View File

@ -25,6 +25,10 @@ char *shell_util_normalize_and_casefold (const char *str);
char *shell_util_format_date (const char *format,
gint64 time_ms);
void shell_write_soup_message_to_stream (GOutputStream *stream,
SoupMessage *message,
GError **error);
gboolean shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error);

View File

@ -126,6 +126,30 @@ shell_window_tracker_class_init (ShellWindowTrackerClass *klass)
G_TYPE_NONE, 0);
}
/**
* get_appid_from_window:
*
* Turn the WM_CLASS property into our best guess at a .desktop file id.
*/
static char *
get_appid_from_window (MetaWindow *window)
{
const char *wmclass;
char *appid_guess;
wmclass = meta_window_get_wm_class (window);
if (!wmclass)
return NULL;
appid_guess = g_ascii_strdown (wmclass, -1);
/* This handles "Fedora Eclipse", probably others.
* Note g_strdelimit is modify-in-place. */
g_strdelimit (appid_guess, " ", '-');
return appid_guess;
}
/**
* shell_window_tracker_is_window_interesting:
*
@ -177,6 +201,40 @@ shell_window_tracker_is_window_interesting (MetaWindow *window)
return TRUE;
}
/**
* get_app_from_window_wmclass:
*
* Looks only at the given window, and attempts to determine
* an application based on WM_CLASS. If one can't be determined,
* return %NULL.
*
* Return value: (transfer full): A newly-referenced #ShellApp, or %NULL
*/
static ShellApp *
get_app_from_window_wmclass (MetaWindow *window)
{
ShellApp *app;
ShellAppSystem *appsys;
char *wmclass;
char *with_desktop;
appsys = shell_app_system_get_default ();
wmclass = get_appid_from_window (window);
if (!wmclass)
return NULL;
with_desktop = g_strjoin (NULL, wmclass, ".desktop", NULL);
g_free (wmclass);
app = shell_app_system_lookup_heuristic_basename (appsys, with_desktop);
if (app != NULL)
g_object_ref (app);
g_free (with_desktop);
return app;
}
/**
* get_app_from_window_group:
* @monitor: a #ShellWindowTracker
@ -270,12 +328,9 @@ static ShellApp *
get_app_for_window (ShellWindowTracker *tracker,
MetaWindow *window)
{
ShellAppSystem *app_system;
ShellApp *result = NULL;
const char *startup_id;
app_system = shell_app_system_get_default ();
/* First, we check whether we already know about this window,
* if so, just return that.
*/
@ -296,8 +351,7 @@ get_app_for_window (ShellWindowTracker *tracker,
/* Check if the app's WM_CLASS specifies an app; this is
* canonical if it does.
*/
result = shell_app_system_lookup_wmclass (app_system,
meta_window_get_wm_class (window));
result = get_app_from_window_wmclass (window);
if (result != NULL)
return result;

View File

@ -85,11 +85,23 @@ st_bin_remove (ClutterContainer *container,
st_bin_set_child (ST_BIN (container), NULL);
}
static void
st_bin_foreach (ClutterContainer *container,
ClutterCallback callback,
gpointer user_data)
{
StBinPrivate *priv = ST_BIN (container)->priv;
if (priv->child)
callback (priv->child, user_data);
}
static void
clutter_container_iface_init (ClutterContainerIface *iface)
{
iface->add = st_bin_add;
iface->remove = st_bin_remove;
iface->foreach = st_bin_foreach;
}
static void

View File

@ -490,7 +490,7 @@ st_label_accessible_get_name (AtkObject *obj)
actor = CLUTTER_ACTOR (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj)));
if (actor == NULL || st_widget_has_style_class_name (ST_WIDGET (actor), "hidden"))
if (actor == NULL) /* State is defunct */
name = NULL;
else
name = st_label_get_text (ST_LABEL (actor));

View File

@ -444,12 +444,14 @@ st_scroll_bar_scroll_event (ClutterActor *actor,
ClutterScrollEvent *event)
{
StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;
gdouble step, value, delta_x, delta_y;
gdouble lower, step, upper, value, delta_x, delta_y;
if (priv->adjustment)
{
g_object_get (priv->adjustment,
"lower", &lower,
"step-increment", &step,
"upper", &upper,
"value", &value,
NULL);
}
@ -470,11 +472,17 @@ st_scroll_bar_scroll_event (ClutterActor *actor,
break;
case CLUTTER_SCROLL_UP:
case CLUTTER_SCROLL_LEFT:
st_adjustment_set_value (priv->adjustment, value - step);
if (value == lower)
return FALSE;
else
st_adjustment_set_value (priv->adjustment, value - step);
break;
case CLUTTER_SCROLL_DOWN:
case CLUTTER_SCROLL_RIGHT:
st_adjustment_set_value (priv->adjustment, value + step);
if (value == upper)
return FALSE;
else
st_adjustment_set_value (priv->adjustment, value + step);
break;
}

View File

@ -687,7 +687,7 @@ st_scroll_view_scroll_event (ClutterActor *self,
ClutterScrollEvent *event)
{
StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv;
gdouble value, step, hvalue, vvalue, delta_x, delta_y;
gdouble lower, value, upper, step, hvalue, vvalue, delta_x, delta_y;
/* don't handle scroll events if requested not to */
if (!priv->mouse_scroll)
@ -708,15 +708,19 @@ st_scroll_view_scroll_event (ClutterActor *self,
case CLUTTER_SCROLL_UP:
case CLUTTER_SCROLL_DOWN:
g_object_get (priv->vadjustment,
"lower", &lower,
"step-increment", &step,
"value", &value,
"upper", &upper,
NULL);
break;
case CLUTTER_SCROLL_LEFT:
case CLUTTER_SCROLL_RIGHT:
g_object_get (priv->hadjustment,
"lower", &lower,
"step-increment", &step,
"value", &value,
"upper", &upper,
NULL);
break;
}
@ -728,16 +732,28 @@ st_scroll_view_scroll_event (ClutterActor *self,
st_adjustment_set_value (priv->vadjustment, vvalue + delta_y);
break;
case CLUTTER_SCROLL_UP:
st_adjustment_set_value (priv->vadjustment, value - step);
if (value == lower)
return FALSE;
else
st_adjustment_set_value (priv->vadjustment, value - step);
break;
case CLUTTER_SCROLL_DOWN:
st_adjustment_set_value (priv->vadjustment, value + step);
if (value == upper)
return FALSE;
else
st_adjustment_set_value (priv->vadjustment, value + step);
break;
case CLUTTER_SCROLL_LEFT:
st_adjustment_set_value (priv->hadjustment, value - step);
if (value == lower)
return FALSE;
else
st_adjustment_set_value (priv->hadjustment, value - step);
break;
case CLUTTER_SCROLL_RIGHT:
st_adjustment_set_value (priv->hadjustment, value + step);
if (value == upper)
return FALSE;
else
st_adjustment_set_value (priv->hadjustment, value + step);
break;
}

View File

@ -28,6 +28,7 @@
struct _StThemeContext {
GObject parent;
double resolution;
PangoFontDescription *font;
StThemeNode *root_node;
StTheme *theme;
@ -37,6 +38,7 @@ struct _StThemeContextClass {
GObjectClass parent_class;
};
#define DEFAULT_RESOLUTION 96.
#define DEFAULT_FONT "sans-serif 10"
enum
@ -91,6 +93,7 @@ st_theme_context_class_init (StThemeContextClass *klass)
static void
st_theme_context_init (StThemeContext *context)
{
context->resolution = DEFAULT_RESOLUTION;
context->font = pango_font_description_from_string (DEFAULT_FONT);
g_signal_connect (st_texture_cache_get_default (),
@ -229,6 +232,66 @@ st_theme_context_get_theme (StThemeContext *context)
return context->theme;
}
/**
* st_theme_context_set_resolution:
* @context: a #StThemeContext
* @resolution: resolution of the context (number of pixels in an "inch")
*
* Sets the resolution of the theme context. This is the scale factor
* used to convert between points and the length units pt, in, and cm.
* This does not necessarily need to correspond to the actual number
* resolution of the device. A value of 72. means that points and
* pixels are identical. The default value is 96.
*/
void
st_theme_context_set_resolution (StThemeContext *context,
double resolution)
{
g_return_if_fail (ST_IS_THEME_CONTEXT (context));
if (resolution == context->resolution)
return;
context->resolution = resolution;
st_theme_context_changed (context);
}
/**
* st_theme_context_set_default_resolution:
* @context: a #StThemeContext
*
* Sets the resolution of the theme context to the default value of 96.
* See st_theme_context_set_resolution().
*/
void
st_theme_context_set_default_resolution (StThemeContext *context)
{
g_return_if_fail (ST_IS_THEME_CONTEXT (context));
if (context->resolution == DEFAULT_RESOLUTION)
return;
context->resolution = DEFAULT_RESOLUTION;
st_theme_context_changed (context);
}
/**
* st_theme_context_get_resolution:
* @context: a #StThemeContext
*
* Gets the current resolution of the theme context.
* See st_theme_context_set_resolution().
*
* Return value: the resolution (in dots-per-"inch")
*/
double
st_theme_context_get_resolution (StThemeContext *context)
{
g_return_val_if_fail (ST_IS_THEME_CONTEXT (context), DEFAULT_RESOLUTION);
return context->resolution;
}
/**
* st_theme_context_set_font:
* @context: a #StThemeContext

View File

@ -56,6 +56,10 @@ void st_theme_context_set_theme (StThemeContext
StTheme *theme);
StTheme * st_theme_context_get_theme (StThemeContext *context);
void st_theme_context_set_resolution (StThemeContext *context,
gdouble resolution);
void st_theme_context_set_default_resolution (StThemeContext *context);
double st_theme_context_get_resolution (StThemeContext *context);
void st_theme_context_set_font (StThemeContext *context,
const PangoFontDescription *font);
const PangoFontDescription *st_theme_context_get_font (StThemeContext *context);

View File

@ -1782,7 +1782,7 @@ st_theme_node_paint_sliced_border_image (StThemeNode *node,
cogl_set_source (material);
{
float rectangles[] =
GLfloat rectangles[] =
{
/* top left corner */
0, 0, border_left, border_top,

View File

@ -820,7 +820,7 @@ get_length_from_term (StThemeNode *node,
break;
case POINTS:
{
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
double resolution = st_theme_context_get_resolution (node->context);
*length = num->val * multiplier * (resolution / 72.);
}
break;
@ -842,7 +842,7 @@ get_length_from_term (StThemeNode *node,
}
else
{
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
double resolution = st_theme_context_get_resolution (node->context);
*length = num->val * multiplier * (resolution / 72.) * font_size;
}
}
@ -2139,7 +2139,7 @@ font_size_from_term (StThemeNode *node,
{
if (term->type == TERM_IDENT)
{
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
double resolution = st_theme_context_get_resolution (node->context);
/* We work in integers to avoid double comparisons when converting back
* from a size in pixels to a logical size.
*/
@ -2346,7 +2346,7 @@ st_theme_node_get_font (StThemeNode *node)
parent_size = pango_font_description_get_size (node->font_desc);
if (!pango_font_description_get_size_is_absolute (node->font_desc))
{
double resolution = clutter_backend_get_resolution (clutter_get_default_backend ());
double resolution = st_theme_context_get_resolution (node->context);
parent_size *= (resolution / 72.);
}

View File

@ -435,6 +435,7 @@ main (int argc, char **argv)
stage = clutter_stage_new ();
context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
st_theme_context_set_theme (context, theme);
st_theme_context_set_resolution (context, 96.);
st_theme_context_set_font (context,
pango_font_description_from_string ("sans-serif 12"));

View File

@ -7,19 +7,12 @@
/* Very simple test of the ShellRecorder class; shows some text strings
* moving around and records it.
*/
static ShellRecorder *recorder = NULL;
static ShellRecorder *recorder;
static gboolean
stop_recording_timeout (gpointer data)
{
if (recorder)
{
shell_recorder_close (recorder);
g_object_unref (recorder);
}
clutter_main_quit ();
shell_recorder_close (recorder);
return FALSE;
}
@ -29,15 +22,6 @@ on_animation_completed (ClutterAnimation *animation)
g_timeout_add (1000, stop_recording_timeout, NULL);
}
static void
on_stage_realized (ClutterActor *stage,
gpointer data)
{
recorder = shell_recorder_new (CLUTTER_STAGE (stage));
shell_recorder_set_filename (recorder, "test-recorder.ogg");
shell_recorder_record (recorder);
}
int main (int argc, char **argv)
{
ClutterActor *stage;
@ -64,8 +48,8 @@ int main (int argc, char **argv)
animation = clutter_actor_animate (text,
CLUTTER_EASE_IN_OUT_QUAD,
3000,
"x", 320.0,
"y", 240.0,
"x", 320,
"y", 240,
NULL);
g_signal_connect (animation, "completed",
G_CALLBACK (on_animation_completed), NULL);
@ -74,42 +58,41 @@ int main (int argc, char **argv)
"text", "Blue",
"font-name", "Sans 40px",
"color", &blue,
"x", 640.0,
"y", 0.0,
"x", 640,
"y", 0,
NULL);
clutter_actor_set_anchor_point_from_gravity (text, CLUTTER_GRAVITY_NORTH_EAST);
clutter_actor_add_child (stage, text);
animation = clutter_actor_animate (text,
CLUTTER_EASE_IN_OUT_QUAD,
3000,
"x", 320.0,
"y", 240.0,
"x", 320,
"y", 240,
NULL);
text = g_object_new (CLUTTER_TYPE_TEXT,
"text", "Green",
"font-name", "Sans 40px",
"color", &green,
"x", 0.0,
"y", 480.0,
"x", 0,
"y", 480,
NULL);
clutter_actor_set_anchor_point_from_gravity (text, CLUTTER_GRAVITY_SOUTH_WEST);
clutter_actor_add_child (stage, text);
animation = clutter_actor_animate (text,
CLUTTER_EASE_IN_OUT_QUAD,
3000,
"x", 320.0,
"y", 240.0,
"x", 320,
"y", 240,
NULL);
g_signal_connect_after (stage, "realize",
G_CALLBACK (on_stage_realized), NULL);
recorder = shell_recorder_new (CLUTTER_STAGE (stage));
shell_recorder_set_filename (recorder, "test-recorder.ogg");
clutter_actor_show (stage);
shell_recorder_record (recorder);
clutter_main ();
g_object_unref (stage);
return 0;
}