diff --git a/.gitignore b/.gitignore
index eca8c9034..f717e24bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,6 +46,7 @@ src/Makefile.in
src/gnomeshell-taskpanel
src/gnome-shell
src/gnome-shell-clock-preferences
+src/run-js-test
src/test-recorder
src/test-recorder.ogg
src/test-theme
diff --git a/configure.ac b/configure.ac
index d37abcb6d..7b5484558 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.63)
-AC_INIT([gnome-shell],[2.91.1],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
+AC_INIT([gnome-shell],[2.91.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])
@@ -95,6 +95,8 @@ PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-3.0)
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
+PKG_CHECK_MODULES(JS_TEST, clutter-x11-1.0 gjs-1.0 gobject-introspection-1.0 gtk+-3.0)
+
MUTTER_BIN_DIR=`$PKG_CONFIG --variable=exec_prefix mutter-plugins`/bin
# FIXME: metacity-plugins.pc should point directly to its .gir file
MUTTER_LIB_DIR=`$PKG_CONFIG --variable=libdir mutter-plugins`
diff --git a/data/gnome-shell.schemas b/data/gnome-shell.schemas
index 5798a3edb..1a887118a 100644
--- a/data/gnome-shell.schemas
+++ b/data/gnome-shell.schemas
@@ -62,5 +62,23 @@
+
+ /schemas/desktop/gnome/shell/windows/theme
+ /desktop/gnome/shell/windows/theme
+ gnome-shell
+ string
+ Adwaita
+
+ Current theme
+
+ The theme determines the appearance of window borders,
+ titlebar, and so forth.
+
+ This key overrides /apps/metacity/general/theme when
+ running GNOME Shell.
+
+
+
+
diff --git a/data/org.gnome.accessibility.magnifier.gschema.xml.in b/data/org.gnome.accessibility.magnifier.gschema.xml.in
index aa2d4fbcf..7958fcac9 100644
--- a/data/org.gnome.accessibility.magnifier.gschema.xml.in
+++ b/data/org.gnome.accessibility.magnifier.gschema.xml.in
@@ -27,7 +27,7 @@
- 'centered'
+ 'proportional'
<_summary>Mouse Tracking Mode
<_description>
Determines the position of the magnified mouse image within the
@@ -45,7 +45,7 @@
- 'bottom-half'
+ 'full-screen'
<_summary>Screen position
<_description>
The magnified view either fills the entire screen, or occupies the
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 74e74c3b0..5bd4864ed 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -153,6 +153,10 @@ StTooltip {
-slider-handle-radius: 0.5em;
}
+.popup-menu-icon {
+ icon-size: 1em;
+}
+
/* Switches (to be used in menus) */
.toggle-switch {
width: 4.5em;
@@ -240,6 +244,10 @@ StTooltip {
spacing: 8px;
}
+.system-status-icon {
+ icon-size: 1em;
+}
+
/* Overview */
.overview {
@@ -1018,6 +1026,10 @@ StTooltip {
background: rgba(128,128,128,0.7);
}
+.notification-icon-button > StIcon {
+ icon-size: 36px;
+}
+
.chat-received {
background-gradient-direction: horizontal;
background-gradient-start: rgba(255, 255, 255, 0.2);
@@ -1101,8 +1113,8 @@ StTooltip {
.switcher-list {
background: rgba(0,0,0,0.8);
border: 1px solid rgba(128,128,128,0.40);
- border-radius: 8px;
- padding: 18px;
+ border-radius: 24px;
+ padding: 20px;
font: 12px sans-serif;
color: white;
@@ -1116,7 +1128,9 @@ StTooltip {
background-gradient-direction: horizontal;
background-gradient-start: rgba(51, 51, 51, 1.0);
background-gradient-end: rgba(51, 51, 51, 0);
- border-radius: 8px;
+ border-radius: 24px;
+ border-radius-topright: 0px;
+ border-radius-bottomright: 0px;
width: 60px;
}
@@ -1124,13 +1138,15 @@ StTooltip {
background-gradient-direction: horizontal;
background-gradient-start: rgba(51, 51, 51, 0);
background-gradient-end: rgba(51, 51, 51, 1.0);
- border-radius: 8px;
+ border-radius: 24px;
+ border-radius-topleft: 0px;
+ border-radius-bottomleft: 0px;
width: 60px;
}
.switcher-list .item-box {
padding: 8px;
- border-radius: 4px;
+ border-radius: 8px;
}
.switcher-list .thumbnail-box {
@@ -1145,12 +1161,12 @@ StTooltip {
.switcher-list .outlined-item-box {
padding: 6px;
border: 2px solid rgba(85,85,85,1.0);
- border-radius: 4px;
+ border-radius: 8px;
}
.switcher-list .selected-item-box {
padding: 8px;
- border-radius: 4px;
+ border-radius: 8px;
background: rgba(255,255,255,0.33);
}
@@ -1183,16 +1199,16 @@ StTooltip {
.workspace-switcher-container {
background: rgba(0,0,0,0.8);
border: 1px solid rgba(128,128,128,0.40);
- border-radius: 8px;
- padding: 12px;
+ border-radius: 24px;
+ padding: 20px;
}
.workspace-switcher {
background: transparent;
border: 0px;
border-radius: 0px;
- padding: 4px;
- spacing: 4.5px;
+ padding: 0px;
+ spacing: 8px;
}
.ws-switcher-active-left {
@@ -1200,7 +1216,7 @@ StTooltip {
border: 0px;
background: rgba(255,255,255,0.5);
background-image: url("ws-switch-arrow-left.svg");
- border-radius: 4px;
+ border-radius: 8px;
}
.ws-switcher-active-right {
@@ -1208,14 +1224,14 @@ StTooltip {
border: 0px;
background: rgba(255,255,255,0.5);
background-image: url("ws-switch-arrow-right.svg");
- border-radius: 4px;
+ border-radius: 8px;
}
.ws-switcher-box {
height: 96px;
border: 2px solid rgba(85,85,85,0.5);
background: transparent;
- border-radius: 4px;
+ border-radius: 8px;
}
/* Run Dialog */
diff --git a/js/misc/telepathy.js b/js/misc/telepathy.js
index c1443fb30..3a8d7e809 100644
--- a/js/misc/telepathy.js
+++ b/js/misc/telepathy.js
@@ -2,20 +2,7 @@
const DBus = imports.dbus;
-// D-Bus utils; should eventually move to gjs.
-// https://bugzilla.gnome.org/show_bug.cgi?id=610859
-
-function makeProxyClass(iface) {
- let constructor = function() { this._init.apply(this, arguments); };
-
- constructor.prototype._init = function(bus, name, path) {
- bus.proxifyObject(this, name, path);
- };
-
- DBus.proxifyPrototype(constructor.prototype, iface);
- return constructor;
-}
-
+// D-Bus utils
function nameToPath(name) {
return '/' + name.replace(/\./g, '/');
};
@@ -118,7 +105,7 @@ const ChannelDispatchOperationIface = {
outSignature: '' }
]
};
-let ChannelDispatchOperation = makeProxyClass(ChannelDispatchOperationIface);
+let ChannelDispatchOperation = DBus.makeProxyClass(ChannelDispatchOperationIface);
const CONNECTION_NAME = TELEPATHY + '.Connection';
const ConnectionIface = {
@@ -128,7 +115,7 @@ const ConnectionIface = {
inSignature: 'uu' }
]
};
-let Connection = makeProxyClass(ConnectionIface);
+let Connection = DBus.makeProxyClass(ConnectionIface);
const ConnectionStatus = {
CONNECTED: 0,
@@ -150,7 +137,7 @@ const ConnectionAliasingIface = {
inSignature: 'a(us)' }
]
};
-let ConnectionAliasing = makeProxyClass(ConnectionAliasingIface);
+let ConnectionAliasing = DBus.makeProxyClass(ConnectionAliasingIface);
const CONNECTION_AVATARS_NAME = CONNECTION_NAME + '.Interface.Avatars';
const ConnectionAvatarsIface = {
@@ -174,7 +161,7 @@ const ConnectionAvatarsIface = {
}
]
};
-let ConnectionAvatars = makeProxyClass(ConnectionAvatarsIface);
+let ConnectionAvatars = DBus.makeProxyClass(ConnectionAvatarsIface);
const CONNECTION_CONTACTS_NAME = CONNECTION_NAME + '.Interface.Contacts';
const ConnectionContactsIface = {
@@ -186,7 +173,7 @@ const ConnectionContactsIface = {
}
]
};
-let ConnectionContacts = makeProxyClass(ConnectionContactsIface);
+let ConnectionContacts = DBus.makeProxyClass(ConnectionContactsIface);
const CONNECTION_REQUESTS_NAME = CONNECTION_NAME + '.Interface.Requests';
const ConnectionRequestsIface = {
@@ -215,7 +202,7 @@ const ConnectionRequestsIface = {
}
]
};
-let ConnectionRequests = makeProxyClass(ConnectionRequestsIface);
+let ConnectionRequests = DBus.makeProxyClass(ConnectionRequestsIface);
const CONNECTION_SIMPLE_PRESENCE_NAME = CONNECTION_NAME + '.Interface.SimplePresence';
const ConnectionSimplePresenceIface = {
@@ -234,7 +221,7 @@ const ConnectionSimplePresenceIface = {
inSignature: 'a{u(uss)}' }
]
};
-let ConnectionSimplePresence = makeProxyClass(ConnectionSimplePresenceIface);
+let ConnectionSimplePresence = DBus.makeProxyClass(ConnectionSimplePresenceIface);
const ConnectionPresenceType = {
UNSET: 0,
@@ -264,7 +251,7 @@ const ChannelIface = {
inSignature: '' }
]
};
-let Channel = makeProxyClass(ChannelIface);
+let Channel = DBus.makeProxyClass(ChannelIface);
const CHANNEL_TEXT_NAME = CHANNEL_NAME + '.Type.Text';
const ChannelTextIface = {
@@ -288,7 +275,7 @@ const ChannelTextIface = {
inSignature: 'uuuuus' }
]
};
-let ChannelText = makeProxyClass(ChannelTextIface);
+let ChannelText = DBus.makeProxyClass(ChannelTextIface);
const ChannelTextMessageType = {
NORMAL: 0,
@@ -315,7 +302,7 @@ const ChannelGroupIface = {
inSignature: 'sauauauauuu' }
]
};
-let ChannelGroup = makeProxyClass(ChannelGroupIface);
+let ChannelGroup = DBus.makeProxyClass(ChannelGroupIface);
const ACCOUNT_MANAGER_NAME = TELEPATHY + '.AccountManager';
const AccountManagerIface = {
@@ -330,7 +317,7 @@ const AccountManagerIface = {
inSignature: 'ob' }
]
};
-let AccountManager = makeProxyClass(AccountManagerIface);
+let AccountManager = DBus.makeProxyClass(AccountManagerIface);
const ACCOUNT_NAME = TELEPATHY + '.Account';
const AccountIface = {
@@ -341,7 +328,7 @@ const AccountIface = {
access: 'read' }
]
};
-let Account = makeProxyClass(AccountIface);
+let Account = DBus.makeProxyClass(AccountIface);
const CHANNEL_DISPATCHER_NAME = TELEPATHY + '.ChannelDispatcher';
const ChannelDispatcherIface = {
@@ -352,7 +339,7 @@ const ChannelDispatcherIface = {
outSignature: 'o' }
]
};
-let ChannelDispatcher = makeProxyClass(ChannelDispatcherIface);
+let ChannelDispatcher = DBus.makeProxyClass(ChannelDispatcherIface);
const CHANNEL_REQUEST_NAME = TELEPATHY + '.ChannelRequest';
const ChannelRequestIface = {
@@ -369,4 +356,4 @@ const ChannelRequestIface = {
signature: '' }
]
};
-let ChannelRequest = makeProxyClass(ChannelRequestIface);
+let ChannelRequest = DBus.makeProxyClass(ChannelRequestIface);
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 55d07685e..8c3330e19 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -501,11 +501,10 @@ AppWellIcon.prototype = {
}
}));
- this._menuManager.addMenu(this._menu, true);
+ this._menuManager.addMenu(this._menu);
}
this._menu.popup();
- this._menuManager.grab();
return false;
},
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index e6bc65b33..8daa9ff1a 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -678,9 +678,8 @@ LookingGlass.prototype = {
let toolbar = new St.BoxLayout({ name: 'Toolbar' });
this.actor.add_actor(toolbar);
- let inspectIcon = St.TextureCache.get_default().load_icon_name('gtk-color-picker',
- St.IconType.SYMBOLIC,
- 24);
+ let inspectIcon = new St.Icon({ icon_name: 'gtk-color-picker',
+ icon_size: 24 });
toolbar.add_actor(inspectIcon);
inspectIcon.reactive = true;
inspectIcon.connect('button-press-event', Lang.bind(this, function () {
@@ -940,7 +939,9 @@ LookingGlass.prototype = {
global.stage.set_key_focus(this._entry);
- Tweener.addTween(this.actor, { time: 0.5,
+ // We inverse compensate for the slow-down so you can change the factor
+ // through LookingGlass without long waits.
+ Tweener.addTween(this.actor, { time: 0.5 / St.get_slow_down_factor(),
transition: 'easeOutQuad',
y: this._targetY
});
@@ -967,7 +968,7 @@ LookingGlass.prototype = {
Main.popModal(this.actor);
- Tweener.addTween(this.actor, { time: 0.5,
+ Tweener.addTween(this.actor, { time: 0.5 / St.get_slow_down_factor(),
transition: 'easeOutQuad',
y: this._hiddenY,
onComplete: Lang.bind(this, function () {
diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js
index e572961a0..ac53a299d 100644
--- a/js/ui/magnifier.js
+++ b/js/ui/magnifier.js
@@ -15,8 +15,8 @@ const MagnifierDBus = imports.ui.magnifierDBus;
const MouseTrackingMode = {
NONE: 0,
CENTERED: 1,
- PUSH: 2,
- PROPORTIONAL: 3
+ PROPORTIONAL: 2,
+ PUSH: 3
};
const ScreenPosition = {
@@ -681,7 +681,7 @@ ZoomRegion.prototype = {
* @mode: One of the enum MouseTrackingMode values.
*/
setMouseTrackingMode: function(mode) {
- if (mode >= MouseTrackingMode.NONE && mode <= MouseTrackingMode.PROPORTIONAL)
+ if (mode >= MouseTrackingMode.NONE && mode <= MouseTrackingMode.PUSH)
this._mouseTrackingMode = mode;
},
diff --git a/js/ui/main.js b/js/ui/main.js
index 79c17087b..d30ab69f0 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -390,6 +390,7 @@ function pushModal(actor) {
}
modalActorFocusStack.push([actor, curFocus]);
+ global.stage.set_key_focus(null);
return true;
}
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index e0561cb4c..e0c4ecc86 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -22,10 +22,12 @@ const SUMMARY_TIMEOUT = 1;
const HIDE_TIMEOUT = 0.2;
const LONGER_HIDE_TIMEOUT = 0.6;
-const BUTTON_ICON_SIZE = 36;
-
const MAX_SOURCE_TITLE_WIDTH = 180;
+// We delay hiding of the tray if the mouse is within MOUSE_LEFT_ACTOR_THRESHOLD
+// range from the point where it left the tray.
+const MOUSE_LEFT_ACTOR_THRESHOLD = 20;
+
const State = {
HIDDEN: 0,
SHOWING: 1,
@@ -98,6 +100,7 @@ Notification.prototype = {
this.source = source;
this.urgent = false;
this.expanded = false;
+ this._useActionIcons = false;
this._customContent = false;
this._bannerBodyText = null;
this._titleFitsInBannerMode = true;
@@ -342,9 +345,9 @@ Notification.prototype = {
let button = new St.Button();
- if (Gtk.IconTheme.get_default().has_icon(id)) {
+ if (this._useActionIcons && Gtk.IconTheme.get_default().has_icon(id)) {
button.add_style_class_name('notification-icon-button');
- button.child = St.TextureCache.get_default().load_icon_name(id, St.IconType.SYMBOLIC, BUTTON_ICON_SIZE);
+ button.child = new St.Icon({ icon_name: id });
} else {
button.add_style_class_name('notification-button');
button.label = label;
@@ -359,6 +362,10 @@ Notification.prototype = {
this.urgent = urgent;
},
+ setUseActionIcons: function(useIcons) {
+ this._useActionIcons = useIcons;
+ },
+
_styleChanged: function() {
this._spacing = this.actor.get_theme_node().get_length('spacing-columns');
},
@@ -1146,6 +1153,8 @@ MessageTray.prototype = {
if (this._trayLeftTimeoutId) {
Mainloop.source_remove(this._trayLeftTimeoutId);
this._trayLeftTimeoutId = 0;
+ this._trayLeftMouseX = -1;
+ this._trayLeftMouseY = -1;
return;
}
@@ -1167,6 +1176,14 @@ MessageTray.prototype = {
this._pointerInTray = true;
this._updateState();
} else {
+ // We record the position of the mouse the moment it leaves the tray. These coordinates are used in
+ // this._onTrayLeftTimeout() to determine if the mouse has moved far enough during the initial timeout for us
+ // to consider that the user intended to leave the tray and therefore hide the tray. If the mouse is still
+ // close to its previous position, we extend the timeout once.
+ let [x, y, mods] = global.get_pointer();
+ this._trayLeftMouseX = x;
+ this._trayLeftMouseY = y;
+
// We wait just a little before hiding the message tray in case the user quickly moves the mouse back into it.
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
@@ -1176,12 +1193,25 @@ MessageTray.prototype = {
},
_onTrayLeftTimeout: function() {
- this._useLongerTrayLeftTimeout = false;
- this._trayLeftTimeoutId = 0;
- this._pointerInTray = false;
- this._pointerInSummary = false;
- this._updateNotificationTimeout(0);
- this._updateState();
+ let [x, y, mods] = global.get_pointer();
+ // We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side or up.
+ // We don't check how far down the mouse moved because any point above the tray, but below the exit coordinate,
+ // is close to the tray.
+ if (this._trayLeftMouseX > -1 &&
+ y > this._trayLeftMouseY - MOUSE_LEFT_ACTOR_THRESHOLD &&
+ x < this._trayLeftMouseX + MOUSE_LEFT_ACTOR_THRESHOLD &&
+ x > this._trayLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
+ this._trayLeftMouseX = -1;
+ this._trayLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
+ Lang.bind(this, this._onTrayLeftTimeout));
+ } else {
+ this._trayLeftTimeoutId = 0;
+ this._useLongerTrayLeftTimeout = false;
+ this._pointerInTray = false;
+ this._pointerInSummary = false;
+ this._updateNotificationTimeout(0);
+ this._updateState();
+ }
return false;
},
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 88fbc00e0..c62cb4c20 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -150,7 +150,9 @@ NotificationDaemon.prototype = {
let uri = GLib.filename_to_uri(icon, null);
return textureCache.load_uri_async(uri, size, size);
} else
- return textureCache.load_icon_name(icon, St.IconType.FULLCOLOR, size);
+ return new St.Icon({ icon_name: icon,
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: size });
} else if (hints.icon_data) {
let [width, height, rowStride, hasAlpha,
bitsPerSample, nChannels, data] = hints.icon_data;
@@ -167,7 +169,9 @@ NotificationDaemon.prototype = {
stockIcon = 'gtk-dialog-error';
break;
}
- return textureCache.load_icon_name(stockIcon, St.IconType.FULLCOLOR, size);
+ return new St.Icon({ icon_name: stockIcon,
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: size });
}
},
@@ -294,6 +298,7 @@ NotificationDaemon.prototype = {
}
if (actions.length) {
+ notification.setUseActionIcons(hints['action-icons'] == true);
for (let i = 0; i < actions.length - 1; i += 2)
notification.addButton(actions[i], actions[i + 1]);
}
@@ -317,6 +322,7 @@ NotificationDaemon.prototype = {
GetCapabilities: function() {
return [
'actions',
+ 'action-icons',
'body',
// 'body-hyperlinks',
// 'body-images',
@@ -325,7 +331,6 @@ NotificationDaemon.prototype = {
'icon-static',
'persistence',
// 'sound',
- 'x-gnome-icon-buttons'
];
},
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 466d189a0..28bdaa1ae 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -404,9 +404,9 @@ AppMenuButton.prototype = {
},
_onQuit: function() {
- if (this._focusedApp == null)
+ if (this._targetApp == null)
return;
- this._focusedApp.request_quit();
+ this._targetApp.request_quit();
},
_onAppStateChanged: function(tracker, app) {
@@ -739,8 +739,9 @@ Panel.prototype = {
/* Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview". */
let label = new St.Label({ text: _("Activities") });
this.button = new St.Clickable({ name: 'panelActivities',
- style_class: 'panel-button',
- reactive: true });
+ style_class: 'panel-button',
+ reactive: true,
+ can_focus: true });
this.button.set_child(label);
this._leftBox.add(this.button);
@@ -892,7 +893,8 @@ Panel.prototype = {
},
_onTrayIconRemoved: function(o, icon) {
- this._trayBox.remove_actor(icon);
+ if (icon.get_parent() != null)
+ this._trayBox.remove_actor(icon);
},
_addRipple : function(delay, time, startScale, startOpacity, finalScale, finalOpacity) {
diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js
index 029e08e38..9888d2388 100644
--- a/js/ui/panelMenu.js
+++ b/js/ui/panelMenu.js
@@ -1,5 +1,6 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
+const Clutter = imports.gi.Clutter;
const St = imports.gi.St;
const Lang = imports.lang;
const PopupMenu = imports.ui.popupMenu;
@@ -13,11 +14,13 @@ Button.prototype = {
_init: function(menuAlignment) {
this.actor = new St.Bin({ style_class: 'panel-button',
reactive: true,
+ can_focus: true,
x_fill: true,
y_fill: false,
track_hover: true });
this.actor._delegate = this;
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
+ this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
this.menu = new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, /* FIXME */ 0);
this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged));
Main.chrome.addActor(this.menu.actor, { visibleInOverview: true,
@@ -29,10 +32,27 @@ Button.prototype = {
this.menu.toggle();
},
+ _onKeyPress: function(actor, event) {
+ let symbol = event.get_key_symbol();
+ if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
+ this.menu.toggle();
+ return true;
+ } else if (symbol == Clutter.KEY_Down) {
+ if (!this.menu.isOpen)
+ this.menu.toggle();
+ this.menu.activateFirst();
+ return true;
+ } else
+ return false;
+ },
+
_onOpenStateChanged: function(menu, open) {
- if (open)
+ if (open) {
this.actor.add_style_pseudo_class('pressed');
- else
+ let focus = global.stage.get_key_focus();
+ if (!focus || (focus != this.actor && !menu.contains(focus)))
+ this.actor.grab_key_focus();
+ } else
this.actor.remove_style_pseudo_class('pressed');
}
};
@@ -61,7 +81,8 @@ SystemStatusButton.prototype = {
this._iconName = iconName;
if (this._iconActor)
this._iconActor.destroy();
- this._iconActor = St.TextureCache.get_default().load_icon_name(this._iconName, St.IconType.SYMBOLIC, 24);
+ this._iconActor = new St.Icon({ icon_name: this._iconName,
+ style_class: 'system-status-icon' });
this.actor.set_child(this._iconActor);
},
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 0e5d4fabc..d22f422b7 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -158,7 +158,9 @@ PlacesManager.prototype = {
this._connect = new PlaceInfo('special:connect', _("Connect to..."),
function (size) {
- return St.TextureCache.get_default().load_icon_name('applications-internet', St.IconType.FULLCOLOR, size);
+ return new St.Icon({ icon_name: 'applications-internet',
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: size });
},
function () {
new Shell.Process({ args: ['nautilus-connect-server'] }).run();
@@ -432,7 +434,9 @@ DashPlaceDisplayItem.prototype = {
box.add(text, { expand: true, x_fill: true });
if (info.isRemovable()) {
- let removeIcon = St.TextureCache.get_default().load_icon_name ('media-eject', St.IconType.FULLCOLOR, PLACES_ICON_SIZE);
+ let removeIcon = new St.Icon({ icon_name: 'media-eject',
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: PLACES_ICON_SIZE });
let removeIconBox = new St.Clickable({ child: removeIcon,
reactive: true });
box.add(removeIconBox);
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 23969a6a5..7227f90e5 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -58,7 +58,8 @@ PopupBaseMenuItem.prototype = {
hover: true });
this.actor = new Shell.GenericContainer({ style_class: 'popup-menu-item',
reactive: params.reactive,
- track_hover: params.reactive });
+ track_hover: params.reactive,
+ can_focus: params.reactive });
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
this.actor.connect('allocate', Lang.bind(this, this._allocate));
@@ -72,21 +73,39 @@ PopupBaseMenuItem.prototype = {
this.active = false;
if (params.reactive && params.activate) {
- this.actor.connect('button-release-event', Lang.bind(this, function (actor, event) {
- this.emit('activate', event);
- }));
+ this.actor.connect('button-release-event', Lang.bind(this, this._onButtonReleaseEvent));
+ this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
}
if (params.reactive && params.hover)
- this.actor.connect('notify::hover', Lang.bind(this, this._hoverChanged));
+ this.actor.connect('notify::hover', Lang.bind(this, this._onHoverChanged));
+ if (params.reactive)
+ this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
},
_onStyleChanged: function (actor) {
- let themeNode = actor.get_theme_node();
- let [found, spacing] = themeNode.get_length('spacing', false);
- this._spacing = found ? spacing : 0;
+ this._spacing = actor.get_theme_node().get_length('spacing');
},
- _hoverChanged: function (actor) {
+ _onButtonReleaseEvent: function (actor, event) {
+ this.emit('activate', event);
+ return true;
+ },
+
+ _onKeyPressEvent: function (actor, event) {
+ let symbol = event.get_key_symbol();
+
+ if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
+ this.emit('activate', event);
+ return true;
+ }
+ return false;
+ },
+
+ _onKeyFocusIn: function (actor) {
+ this.setActive(true);
+ },
+
+ _onHoverChanged: function (actor) {
this.setActive(actor.hover);
},
@@ -99,9 +118,10 @@ PopupBaseMenuItem.prototype = {
if (activeChanged) {
this.active = active;
- if (active)
+ if (active) {
this.actor.add_style_pseudo_class('active');
- else
+ this.actor.grab_key_focus();
+ } else
this.actor.remove_style_pseudo_class('active');
this.emit('active-changed', active);
}
@@ -112,10 +132,6 @@ PopupBaseMenuItem.prototype = {
this.emit('destroy');
},
- handleKeyPress: function(event) {
- return false;
- },
-
// true if non descendant content includes @actor
contains: function(actor) {
return false;
@@ -139,20 +155,24 @@ PopupBaseMenuItem.prototype = {
this._children.push({ actor: child,
column: column,
span: span });
- this.actor.connect('destroy', Lang.bind(this, function () { this.removeActor(child); }));
+ this.actor.connect('destroy', Lang.bind(this, function () { this._removeChild(child); }));
this.actor.add_actor(child);
},
- removeActor: function(child) {
+ _removeChild: function(child) {
for (let i = 0; i < this._children.length; i++) {
if (this._children[i].actor == child) {
this._children.splice(i, 1);
- this.actor.remove_actor(child);
return;
}
}
},
+ removeActor: function(child) {
+ this.actor.remove_actor(child);
+ this._removeChild(child);
+ },
+
setShowDot: function(show) {
if (show) {
if (this._dot)
@@ -339,6 +359,8 @@ PopupSliderMenuItem.prototype = {
_init: function(value) {
PopupBaseMenuItem.prototype._init.call(this, { activate: false });
+ this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
+
if (isNaN(value))
// Avoid spreading NaNs around
throw TypeError('The slider value must be a number');
@@ -348,7 +370,7 @@ PopupSliderMenuItem.prototype = {
this.addActor(this._slider, 0, -1);
this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint));
this._slider.connect('button-press-event', Lang.bind(this, this._startDragging));
- this._slider.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
+ this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
this._releaseId = this._motionId = 0;
this._dragging = false;
@@ -484,10 +506,10 @@ PopupSliderMenuItem.prototype = {
return this._value;
},
- handleKeyPress: function(event) {
+ _onKeyPressEvent: function (actor, event) {
let key = event.get_key_symbol();
- if (key == Clutter.Right || key == Clutter.Left) {
- let delta = key == Clutter.Right ? 0.1 : -0.1;
+ if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
+ let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
this._value = Math.max(0, Math.min(this._value + delta, 1));
this._slider.queue_repaint();
this.emit('value-changed', this._value);
@@ -544,22 +566,16 @@ PopupImageMenuItem.prototype = {
_init: function (text, iconName) {
PopupBaseMenuItem.prototype._init.call(this);
- this._size = 16;
-
this.label = new St.Label({ text: text });
this.addActor(this.label);
- this._imageBin = new St.Bin({ width: this._size, height: this._size });
- this.addActor(this._imageBin);
+ this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
+ this.addActor(this._icon);
this.setIcon(iconName);
},
setIcon: function(name) {
- if (this._imageBin.child)
- this._imageBin.child.destroy();
-
- let img = St.TextureCache.get_default().load_icon_name(name, St.IconType.SYMBOLIC, this._size);
- this._imageBin.set_child(img);
+ this._icon.icon_name = name;
}
};
@@ -613,6 +629,14 @@ PopupMenu.prototype = {
this._boxWrapper.add_actor(this._box);
this.actor.add_style_class_name('popup-menu');
+ global.focus_manager.add_group(this.actor);
+
+ if (sourceActor._delegate instanceof PopupSubMenuMenuItem) {
+ this._isSubMenu = true;
+ this.actor.reactive = true;
+ this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
+ }
+
this.isOpen = false;
this._activeMenuItem = null;
},
@@ -711,12 +735,10 @@ PopupMenu.prototype = {
}
},
- open: function(submenu) {
+ open: function() {
if (this.isOpen)
return;
- this.emit('opening');
-
let primary = global.get_primary_monitor();
// We need to show it now to force an allocation,
@@ -732,7 +754,7 @@ PopupMenu.prototype = {
let menuWidth = natWidth, menuHeight = natHeight;
// Position the non-pointing axis
- if (submenu) {
+ if (this._isSubmenu) {
if (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM) {
// vertical submenu
if (sourceY + sourceHeigth + menuHeight + this._gap < primary.y + primary.height)
@@ -765,8 +787,6 @@ PopupMenu.prototype = {
if (!this.isOpen)
return;
- this.emit('closing');
-
if (this._activeMenuItem)
this._activeMenuItem.setActive(false);
this.actor.reactive = false;
@@ -775,7 +795,6 @@ PopupMenu.prototype = {
this.emit('open-state-changed', false);
},
-
toggle: function() {
if (this.isOpen)
this.close();
@@ -783,35 +802,15 @@ PopupMenu.prototype = {
this.open();
},
- handleKeyPress: function(event, submenu) {
- if (!this.isOpen || (submenu && !this._activeMenuItem))
- return false;
- if (this._activeMenuItem && this._activeMenuItem.handleKeyPress(event))
+ _onKeyPressEvent: function(actor, event) {
+ // Move focus back to parent menu if the user types Left.
+ // (This handler is only connected if the PopupMenu is a
+ // submenu.)
+ if (this.isOpen &&
+ this._activeMenuItem &&
+ event.get_key_symbol() == Clutter.KEY_Left) {
+ this._activeMenuItem.setActive(false);
return true;
- switch (event.get_key_symbol()) {
- case Clutter.space:
- case Clutter.Return:
- if (this._activeMenuItem)
- this._activeMenuItem.activate(event);
- return true;
- case Clutter.Down:
- case Clutter.Up:
- let items = this._box.get_children().filter(function (child) { return child.visible && child.reactive; });
- let current = this._activeMenuItem ? this._activeMenuItem.actor : null;
- let direction = event.get_key_symbol() == Clutter.Down ? 1 : -1;
-
- let next = findNextInCycle(items, current, direction);
- if (next) {
- next._delegate.setActive(true);
- return true;
- }
- break;
- case Clutter.Left:
- if (submenu) {
- this._activeMenuItem.setActive(false);
- return true;
- }
- break;
}
return false;
@@ -846,6 +845,7 @@ PopupSubMenuMenuItem.prototype = {
_init: function(text) {
PopupBaseMenuItem.prototype._init.call(this, { activate: false, hover: false });
this.actor.connect('enter-event', Lang.bind(this, this._mouseEnter));
+ this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
this.label = new St.Label({ text: text });
this.addActor(this.label);
@@ -890,7 +890,7 @@ PopupSubMenuMenuItem.prototype = {
setActive: function(active) {
if (this.menu) {
if (active)
- this.menu.open(true);
+ this.menu.open();
else
this.menu.close();
}
@@ -898,14 +898,14 @@ PopupSubMenuMenuItem.prototype = {
PopupBaseMenuItem.prototype.setActive.call(this, active);
},
- handleKeyPress: function(event) {
+ _onKeyPressEvent: function(actor, event) {
if (!this.menu)
return false;
- if (event.get_key_symbol() == Clutter.Right) {
+ if (event.get_key_symbol() == Clutter.KEY_Right) {
this.menu.activateFirst();
return true;
}
- return this.menu.handleKeyPress(event, true);
+ return false;
},
contains: function(actor) {
@@ -931,6 +931,7 @@ PopupMenuManager.prototype = {
this.grabbed = false;
this._eventCaptureId = 0;
+ this._keyPressEventId = 0;
this._enterEventId = 0;
this._leaveEventId = 0;
this._activeMenu = null;
@@ -938,21 +939,20 @@ PopupMenuManager.prototype = {
this._delayedMenus = [];
},
- addMenu: function(menu, noGrab, position) {
+ addMenu: function(menu, position) {
let menudata = {
menu: menu,
openStateChangeId: menu.connect('open-state-changed', Lang.bind(this, this._onMenuOpenState)),
activateId: menu.connect('activate', Lang.bind(this, this._onMenuActivated)),
destroyId: menu.connect('destroy', Lang.bind(this, this._onMenuDestroy)),
enterId: 0,
- buttonPressId: 0
+ focusId: 0
};
let source = menu.sourceActor;
if (source) {
- menudata.enterId = source.connect('enter-event', Lang.bind(this, this._onMenuSourceEnter, menu));
- if (!noGrab)
- menudata.buttonPressId = source.connect('button-press-event', Lang.bind(this, this._onMenuSourcePress, menu));
+ menudata.enterId = source.connect('enter-event', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
+ menudata.focusId = source.connect('key-focus-in', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
}
if (position == undefined)
@@ -976,8 +976,8 @@ PopupMenuManager.prototype = {
if (menudata.enterId)
menu.sourceActor.disconnect(menudata.enterId);
- if (menudata.buttonPressId)
- menu.sourceActor.disconnect(menudata.buttonPressId);
+ if (menudata.focusId)
+ menu.sourceActor.disconnect(menudata.focusId);
this._menus.splice(position, 1);
},
@@ -986,6 +986,7 @@ PopupMenuManager.prototype = {
Main.pushModal(this._owner.actor);
this._eventCaptureId = global.stage.connect('captured-event', Lang.bind(this, this._onEventCapture));
+ this._keyPressEventId = global.stage.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
// captured-event doesn't see enter/leave events
this._enterEventId = global.stage.connect('enter-event', Lang.bind(this, this._onEventCapture));
this._leaveEventId = global.stage.connect('leave-event', Lang.bind(this, this._onEventCapture));
@@ -996,24 +997,30 @@ PopupMenuManager.prototype = {
ungrab: function() {
global.stage.disconnect(this._eventCaptureId);
this._eventCaptureId = 0;
+ global.stage.disconnect(this._keyPressEventId);
+ this._keyPressEventId = 0;
global.stage.disconnect(this._enterEventId);
this._enterEventId = 0;
global.stage.disconnect(this._leaveEventId);
this._leaveEventId = 0;
- Main.popModal(this._owner.actor);
-
this.grabbed = false;
+ Main.popModal(this._owner.actor);
},
_onMenuOpenState: function(menu, open) {
- if (!open && menu == this._activeMenu)
- this._activeMenu = null;
- else if (open)
+ if (open) {
this._activeMenu = menu;
+ if (!this.grabbed)
+ this.grab();
+ } else if (menu == this._activeMenu) {
+ this._activeMenu = null;
+ if (this.grabbed)
+ this.ungrab();
+ }
},
- _onMenuSourceEnter: function(actor, event, menu) {
+ _onMenuSourceEnter: function(menu) {
if (!this.grabbed || menu == this._activeMenu)
return false;
@@ -1023,13 +1030,6 @@ PopupMenuManager.prototype = {
return false;
},
- _onMenuSourcePress: function(actor, event, menu) {
- if (this.grabbed)
- return false;
- this.grab();
- return false;
- },
-
_onMenuActivated: function(menu, item) {
if (this.grabbed)
this.ungrab();
@@ -1086,23 +1086,6 @@ PopupMenuManager.prototype = {
|| (eventType == Clutter.EventType.KEY_PRESS && event.get_key_symbol() == Clutter.Escape)) {
this._closeMenu();
return true;
- } else if (eventType == Clutter.EventType.KEY_PRESS
- && this._activeMenu != null
- && this._activeMenu.handleKeyPress(event, false)) {
- return true;
- } else if (eventType == Clutter.EventType.KEY_PRESS
- && this._activeMenu != null
- && (event.get_key_symbol() == Clutter.Left
- || event.get_key_symbol() == Clutter.Right)) {
- let direction = event.get_key_symbol() == Clutter.Right ? 1 : -1;
- let pos = this._findMenu(this._activeMenu);
- let next = this._menus[mod(pos + direction, this._menus.length)].menu;
- if (next != this._activeMenu) {
- this._activeMenu.close();
- next.open(false);
- next.activateFirst();
- }
- return true;
} else if (activeMenuContains || this._eventIsOnAnyMenuSource(event)) {
return false;
}
@@ -1110,9 +1093,32 @@ PopupMenuManager.prototype = {
return true;
},
+ _onKeyPressEvent: function(actor, event) {
+ if (!this.grabbed || !this._activeMenu)
+ return false;
+ if (!this._eventIsOnActiveMenu(event))
+ return false;
+
+ let symbol = event.get_key_symbol();
+ if (symbol == Clutter.Left || symbol == Clutter.Right) {
+ let direction = symbol == Clutter.Right ? 1 : -1;
+ let pos = this._findMenu(this._activeMenu);
+ let next = this._menus[mod(pos + direction, this._menus.length)].menu;
+ if (next != this._activeMenu) {
+ let oldMenu = this._activeMenu;
+ this._activeMenu = next;
+ oldMenu.close();
+ next.open();
+ next.activateFirst();
+ }
+ return true;
+ }
+
+ return false;
+ },
+
_closeMenu: function() {
if (this._activeMenu != null)
this._activeMenu.close();
- this.ungrab();
}
};
diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js
index f1d458809..a1e9ee431 100644
--- a/js/ui/status/accessibility.js
+++ b/js/ui/status/accessibility.js
@@ -17,16 +17,18 @@ const PopupMenu = imports.ui.popupMenu;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
-const KEY_A11Y_DIR = "/desktop/gnome/accessibility";
-const KEY_STICKY_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/stickykeys_enable";
-const KEY_BOUNCE_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/bouncekeys_enable";
-const KEY_SLOW_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/slowkeys_enable";
-const KEY_MOUSE_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/mousekeys_enable";
+const A11Y_SCHEMA = "org.gnome.desktop.a11y.keyboard";
+const KEY_STICKY_KEYS_ENABLED = "stickykeys-enable";
+const KEY_BOUNCE_KEYS_ENABLED = "bouncekeys-enable";
+const KEY_SLOW_KEYS_ENABLED = "slowkeys-enable";
+const KEY_MOUSE_KEYS_ENABLED = "mousekeys-enable";
const AT_SCREEN_KEYBOARD_SCHEMA = "org.gnome.desktop.default-applications.at.mobility";
const AT_SCREEN_READER_SCHEMA = "org.gnome.desktop.default-applications.at.visual";
-const KEY_FONT_DPI = "/desktop/gnome/font_rendering/dpi";
+const XSETTINGS_SCHEMA = "org.gnome.settings-daemon.plugins.xsettings";
+const KEY_DPI = "dpi";
+
const DPI_LOW_REASONABLE_VALUE = 50;
const DPI_HIGH_REASONABLE_VALUE = 500;
@@ -71,8 +73,6 @@ ATIndicator.prototype = {
PanelMenu.SystemStatusButton.prototype._init.call(this, 'preferences-desktop-accessibility', null);
let client = GConf.Client.get_default();
- client.add_dir(KEY_A11Y_DIR, GConf.ClientPreloadType.PRELOAD_ONELEVEL, null);
- client.notify_add(KEY_A11Y_DIR, Lang.bind(this, this._keyChanged), null, null);
client.add_dir(KEY_META_DIR, GConf.ClientPreloadType.PRELOAD_ONELEVEL, null);
client.notify_add(KEY_META_DIR, Lang.bind(this, this._keyChanged), null, null);
@@ -82,7 +82,7 @@ ATIndicator.prototype = {
let magnifier = this._buildMagItem();
this.menu.addMenuItem(magnifier);
- let textZoom = this._buildFontItem(client);
+ let textZoom = this._buildFontItem();
this.menu.addMenuItem(textZoom);
let screenReader = this._buildItem(_("Screen Reader"), AT_SCREEN_READER_SCHEMA, 'startup');
@@ -94,16 +94,16 @@ ATIndicator.prototype = {
let visualBell = this._buildItemGConf(_("Visual Alerts"), client, KEY_VISUAL_BELL);
this.menu.addMenuItem(visualBell);
- let stickyKeys = this._buildItemGConf(_("Sticky Keys"), client, KEY_STICKY_KEYS_ENABLED);
+ let stickyKeys = this._buildItem(_("Sticky Keys"), A11Y_SCHEMA, KEY_STICKY_KEYS_ENABLED);
this.menu.addMenuItem(stickyKeys);
- let slowKeys = this._buildItemGConf(_("Slow Keys"), client, KEY_SLOW_KEYS_ENABLED);
+ let slowKeys = this._buildItem(_("Slow Keys"), A11Y_SCHEMA, KEY_SLOW_KEYS_ENABLED);
this.menu.addMenuItem(slowKeys);
- let bounceKeys = this._buildItemGConf(_("Bounce Keys"), client, KEY_BOUNCE_KEYS_ENABLED);
+ let bounceKeys = this._buildItem(_("Bounce Keys"), A11Y_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
this.menu.addMenuItem(bounceKeys);
- let mouseKeys = this._buildItemGConf(_("Mouse Keys"), client, KEY_MOUSE_KEYS_ENABLED);
+ let mouseKeys = this._buildItem(_("Mouse Keys"), A11Y_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
this.menu.addMenuItem(mouseKeys);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
@@ -189,31 +189,32 @@ ATIndicator.prototype = {
return highContrast;
},
- _buildFontItem: function(client) {
- let first_gconf_value = client.get_without_default(KEY_FONT_DPI);
- let default_value = getDPIFromX();
- let first_value = first_gconf_value ? first_gconf_value.get_float() : default_value;
+ _buildFontItem: function() {
+ let settings = new Gio.Settings({ schema: XSETTINGS_SCHEMA });
+
+ // we assume this never changes (which is not true if resolution
+ // is changed, but we would need XRandR events for that)
+ let x_value = getDPIFromX();
+ let user_value;
function on_get() {
- let u_dpi = client.get_float(KEY_FONT_DPI);
- let x_dpi = getDPIFromX();
- return (u_dpi - (DPI_FACTOR_LARGE * x_dpi) > -1);
+ user_value = settings.get_double(KEY_DPI);
+ return (user_value - (DPI_FACTOR_LARGE * x_value) > -1);
}
let initial_setting = on_get();
+ let default_value = initial_setting ? x_value : user_value;
let widget = this._buildItemExtended(_("Large Text"),
initial_setting,
- client.key_is_writable(KEY_FONT_DPI),
+ settings.is_writable(KEY_DPI),
function (enabled) {
if (enabled)
- client.set_float(KEY_FONT_DPI, DPI_FACTOR_LARGE * getDPIFromX());
+ settings.set_double(KEY_DPI, DPI_FACTOR_LARGE * default_value);
else
- client.set_float(KEY_FONT_DPI, (first_value && !initial_setting) ? first_value : default_value);
+ settings.set_double(KEY_DPI, default_value);
});
- this.connect('gconf-changed', function() {
+ settings.connect('changed::' + KEY_DPI, function() {
let active = on_get();
- if (!active)
- // setting was modified manually, update it
- first_value = client.get_float(KEY_FONT_DPI);
- widget.setToggleState(on_get());
+ default_value = active ? x_value : user_value;
+ widget.setToggleState(active);
});
return widget;
},
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index be8abd635..09684e606 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -38,7 +38,7 @@ Indicator.prototype = {
this._output = null;
this._outputVolumeId = 0;
this._outputMutedId = 0;
- this._outputSwitch = new PopupMenu.PopupSwitchMenuItem(_("Output: Muted"), false);
+ this._outputSwitch = new PopupMenu.PopupSwitchMenuItem(_("Volume: Muted"), false);
this._outputSwitch.connect('toggled', Lang.bind(this, this._switchToggled, '_output'));
this._outputSlider = new PopupMenu.PopupSliderMenuItem(0);
this._outputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_output'));
@@ -52,7 +52,7 @@ Indicator.prototype = {
this._input = null;
this._inputVolumeId = 0;
this._inputMutedId = 0;
- this._inputSwitch = new PopupMenu.PopupSwitchMenuItem(_("Input: Muted"), false);
+ this._inputSwitch = new PopupMenu.PopupSwitchMenuItem(_("Microphone: Muted"), false);
this._inputSwitch.connect('toggled', Lang.bind(this, this._switchToggled, '_input'));
this._inputSlider = new PopupMenu.PopupSliderMenuItem(0);
this._inputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_input'));
@@ -61,7 +61,7 @@ Indicator.prototype = {
this.menu.addMenuItem(this._inputSlider);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.menu.addAction(_("Sound Preferences"), function() {
+ this.menu.addAction(_("Sound Settings"), function() {
let p = new Shell.Process({ args: ['gnome-control-center', 'sound'] });
p.run();
});
@@ -103,7 +103,7 @@ Indicator.prototype = {
this._mutedChanged (null, null, '_output');
this._volumeChanged (null, null, '_output');
} else {
- this._outputSwitch.label.text = _("Output: Muted");
+ this._outputSwitch.label.text = _("Volume: Muted");
this._outputSwitch.setToggleState(false);
this.setIcon('audio-volume-muted-symbolic');
}
@@ -214,9 +214,9 @@ Indicator.prototype = {
_updateLabel: function(property) {
let label;
if (this[property].is_muted)
- label = (property == '_output' ? _("Output: Muted") : _("Input: Muted"));
+ label = (property == '_output' ? _("Volume: Muted") : _("Microphone: Muted"));
else
- label = (property == '_output' ? _("Output: %3.0f%%") : _("Input: %3.0f%%")).format(this[property].volume / VOLUME_MAX * 100);
+ label = (property == '_output' ? _("Volume: %3.0f%%") : _("Microphone: %3.0f%%")).format(this[property].volume / VOLUME_MAX * 100);
this[property+'Switch'].label.text = label;
}
};
diff --git a/js/ui/statusIconDispatcher.js b/js/ui/statusIconDispatcher.js
index 8c796acd6..474cf54d3 100644
--- a/js/ui/statusIconDispatcher.js
+++ b/js/ui/statusIconDispatcher.js
@@ -9,7 +9,9 @@ const NotificationDaemon = imports.ui.notificationDaemon;
const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
'bluetooth-applet': 'bluetooth',
- 'gnome-volume-control-applet': 'volume',
+ 'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
+ // when moved to control center
+ 'gnome-sound-applet': 'volume',
'nm-applet': 'network',
'gnome-power-manager': 'battery',
'keyboard': 'keyboard',
diff --git a/js/ui/statusMenu.js b/js/ui/statusMenu.js
index 5d12567e4..67fcd71f9 100644
--- a/js/ui/statusMenu.js
+++ b/js/ui/statusMenu.js
@@ -43,10 +43,10 @@ StatusMenuButton.prototype = {
box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false });
let textureCache = St.TextureCache.get_default();
- this._availableIcon = textureCache.load_icon_name('user-available', St.IconType.SYMBOLIC, 16);
- this._busyIcon = textureCache.load_icon_name('user-busy', St.IconType.SYMBOLIC, 16);
- this._invisibleIcon = textureCache.load_icon_name('user-invisible', St.IconType.SYMBOLIC, 16);
- this._idleIcon = textureCache.load_icon_name('user-idle', St.IconType.SYMBOLIC, 16);
+ this._availableIcon = new St.Icon({ icon_name: 'user-available', style_class: 'popup-menu-icon' });
+ this._busyIcon = new St.Icon({ icon_name: 'user-busy', style_class: 'popup-menu-icon' });
+ this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible', style_class: 'popup-menu-icon' });
+ this._idleIcon = new St.Icon({ icon_name: 'user-idle', style_class: 'popup-menu-icon' });
this._presence.connect('StatusChanged', Lang.bind(this, this._updatePresenceIcon));
this._presence.getStatus(Lang.bind(this, this._updatePresenceIcon));
@@ -108,11 +108,6 @@ StatusMenuButton.prototype = {
this.menu.addMenuItem(item);
this._presenceItems[GnomeSession.PresenceStatus.BUSY] = item;
- item = new PopupMenu.PopupImageMenuItem(_("Invisible"), 'user-invisible', true);
- item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSession.PresenceStatus.INVISIBLE));
- this.menu.addMenuItem(item);
- this._presenceItems[GnomeSession.PresenceStatus.INVISIBLE] = item;
-
item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item);
@@ -120,7 +115,7 @@ StatusMenuButton.prototype = {
item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
this.menu.addMenuItem(item);
- item = new PopupMenu.PopupMenuItem(_("System Preferences..."));
+ item = new PopupMenu.PopupMenuItem(_("System Settings..."));
item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this.menu.addMenuItem(item);
@@ -147,10 +142,6 @@ StatusMenuButton.prototype = {
item.connect('activate', Lang.bind(this, this._onShutDownActivate));
this.menu.addMenuItem(item);
- item = new PopupMenu.PopupMenuItem(_("Restart..."));
- item.connect('activate', Lang.bind(this, this._onShutDownActivate));
- this.menu.addMenuItem(item);
-
item = new PopupMenu.PopupMenuItem(_("Shut Down..."));
item.connect('activate', Lang.bind(this, this._onShutDownActivate));
this.menu.addMenuItem(item);
diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js
index d2269f6c2..01186d6b0 100644
--- a/js/ui/telepathyClient.js
+++ b/js/ui/telepathyClient.js
@@ -347,7 +347,9 @@ ContactManager.prototype = {
let uri = GLib.filename_to_uri(file, null);
iconBox.child = textureCache.load_uri_async(uri, iconBox._size, iconBox._size);
} else {
- iconBox.child = textureCache.load_icon_name('stock_person', St.IconType.FULLCOLOR, iconBox._size);
+ iconBox.child = St.Icon({ icon_name: 'stock_person',
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: iconBox._size });
}
},
diff --git a/po/LINGUAS b/po/LINGUAS
index 10f2c29b1..f28ead6b0 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -35,6 +35,7 @@ sv
ta
th
tr
+ug
uk
vi
zh_CN
diff --git a/po/ar.po b/po/ar.po
index 0069243d0..f981ba16f 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: HEAD\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-15 23:40+0300\n"
-"PO-Revision-Date: 2010-05-15 23:40+0300\n"
+"POT-Creation-Date: 2010-10-30 13:30+0200\n"
+"PO-Revision-Date: 2010-10-30 13:30+0300\n"
"Last-Translator: Khaled Hosny \n"
"Language-Team: Arabic \n"
"MIME-Version: 1.0\n"
@@ -16,7 +16,7 @@ msgstr ""
"Language: ar\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
-"X-Generator: Virtaal 0.6.0\n"
+"X-Generator: Virtaal 0.6.1\n"
#: ../data/gnome-shell.desktop.in.in.h:1
msgid "GNOME Shell"
@@ -34,32 +34,332 @@ msgstr "الساعة"
msgid "Customize the panel clock"
msgstr "طوّع ساعة اللوحة"
+#: ../data/org.gnome.shell.gschema.xml.in.h:1
+msgid ""
+"Allows access to internal debugging and monitoring tools using the Alt-F2 "
+"dialog."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:2
+msgid "Custom format of the clock"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:3
+msgid "Enable internal tools useful for developers and testers from Alt-F2"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:4
+msgid "File extension used for storing the screencast"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:5
+msgid "Framerate used for recording screencasts."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:6
+msgid ""
+"GNOME Shell extensions have a uuid property; this key lists extensions which "
+"should not be loaded."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:7
+msgid "History for command (Alt-F2) dialog"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:8
+msgid "Hour format"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:9
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display date in the "
+"clock, in addition to time."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:10
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display seconds in "
+"time."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:11
+msgid "If true, display the ISO week date in the calendar."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:12
+msgid "List of desktop file IDs for favorite applications"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:13
+msgid "Overview workspace view mode"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:14
+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 ! theoraenc ! oggmux' and records to Ogg Theora."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:15
+msgid "Show date in clock"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:16
+msgid "Show the week date in the calendar"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:17
+msgid "Show time with seconds"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:18
+msgid ""
+"The applications corresponding to these identifiers will be displayed in the "
+"favorites area."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:19
+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 ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:20
+msgid ""
+"The framerate of the resulting screencast recordered by GNOME Shell's "
+"screencast recorder in frames-per-second."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:21
+msgid "The gstreamer pipeline used to encode the screencast"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:22
+msgid ""
+"The selected workspace view mode in the overview. Supported values are "
+"\"single\" and \"grid\"."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:23
+msgid ""
+"The shell normally monitors active applications in order to present the most "
+"used ones (e.g. in launchers). While this data will be kept private, you may "
+"want to disable this for privacy reasons. Please note that doing so won't "
+"remove already saved data."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:24
+msgid ""
+"This key specifies the format used by the panel clock when the format key is "
+"set to \"custom\". You can use conversion specifiers understood by strftime"
+"() to obtain a specific format. See the strftime() manual for more "
+"information."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:25
+msgid ""
+"This key specifies the hour format used by the panel clock. Possible values "
+"are \"12-hour\", \"24-hour\", \"unix\" and \"custom\". If set to \"unix\", "
+"the clock will display time in seconds since Epoch, i.e. 1970-01-01. If set "
+"to \"custom\", the clock will display time according to the format specified "
+"in the custom_format key. Note that if set to either \"unix\" or \"custom\", "
+"the show_date and show_seconds keys are ignored."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:26
+msgid "Uuids of extensions to disable"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:27
+msgid "Whether to collect stats about applications usage"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
+msgid "Clip the crosshairs at the center"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
+msgid "Color of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
+msgid ""
+"Determines the length of the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
+msgid ""
+"Determines the position of the magnified mouse image within the magnified "
+"view and how it reacts to system mouse movement. The values are - none: no "
+"mouse tracking; - centered: the mouse image is displayed at the center of "
+"the zoom region (which also represents the point under the system mouse) and "
+"the magnified contents are scrolled as the system mouse moves; - "
+"proportional: the position of the magnified mouse in the zoom region is "
+"proportionally the same as the position of the system mouse on screen; - "
+"push: when the magnified mouse intersects a boundary of the zoom region, the "
+"contents are scrolled into view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
+msgid ""
+"Determines the transparency of the crosshairs, from fully opaque to fully "
+"transparent."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
+msgid ""
+"Determines whether the crosshairs intersect the magnified mouse sprite, or "
+"are clipped such that the ends of the horizontal and vertical lines surround "
+"the mouse image."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
+msgid "Enable lens mode"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
+msgid ""
+"Enables/disables display of crosshairs centered on the magnified mouse "
+"sprite."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
+msgid ""
+"For centered mouse tracking, when the system pointer is at or near the edge "
+"of the screen, the magnified contents continue to scroll such that the "
+"screen edge moves into the magnified view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
+msgid "Length of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
+msgid "Magnification factor"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
+msgid "Mouse Tracking Mode"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
+msgid "Opacity of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
+msgid "Screen position"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
+msgid "Scroll magnified contents beyond the edges of the desktop"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
+msgid "Show or hide crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
+msgid "Show or hide the magnifier"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
+msgid "Show or hide the magnifier and all of its zoom regions."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
+msgid ""
+"The color of the the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
+msgid ""
+"The magnified view either fills the entire screen, or occupies the top-half, "
+"bottom-half, left-half, or right-half of the screen."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
+msgid ""
+"The power of the magnification. A value of 1.0 means no magnification. A "
+"value of 2.0 doubles the size."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
+msgid "Thickness of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
+msgid ""
+"Whether the magnified view should be centered over the location of the "
+"system mouse and move with it."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
+msgid "Width of the vertical and horizontal lines that make up the crosshairs."
+msgstr ""
+
+#: ../data/clock-preferences.ui.h:1
+msgid "Clock Format"
+msgstr "تنسيق الساعة"
+
+#: ../data/clock-preferences.ui.h:2
+msgid "Clock Preferences"
+msgstr "تفضيلات الساعة"
+
+#: ../data/clock-preferences.ui.h:3
+msgid "Panel Display"
+msgstr "عرض اللوحة"
+
+#: ../data/clock-preferences.ui.h:4
+msgid "Show seco_nds"
+msgstr "أظهر ال_ثواني"
+
+#: ../data/clock-preferences.ui.h:5
+msgid "Show the _date"
+msgstr "أظهر ال_تاريخ"
+
+#: ../data/clock-preferences.ui.h:6
+msgid "_12 hour format"
+msgstr "نسق _12 ساعة"
+
+#: ../data/clock-preferences.ui.h:7
+msgid "_24 hour format"
+msgstr "نسق _24 ساعة"
+
#. **** Applications ****
-#: ../js/ui/appDisplay.js:306 ../js/ui/dash.js:850
+#: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
msgid "APPLICATIONS"
msgstr "التطبيقات"
-#: ../js/ui/appDisplay.js:338
+#: ../js/ui/appDisplay.js:348
msgid "PREFERENCES"
msgstr "التفضيلات"
-#: ../js/ui/appDisplay.js:705
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "نافذة جديدة"
-#: ../js/ui/appDisplay.js:709
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "أزِل من المفضّلة"
-#: ../js/ui/appDisplay.js:710
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "أضِف إلى المفضّلة"
-#: ../js/ui/appDisplay.js:1037
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "اسحب إلى هنا ليضاف إلى المفضّلة"
-#: ../js/ui/appFavorites.js:89
+#: ../js/ui/appFavorites.js:88
#, c-format
msgid "%s has been added to your favorites."
msgstr "أضيف %s إلى مفضلتك."
@@ -69,194 +369,293 @@ msgstr "أضيف %s إلى مفضلتك."
msgid "%s has been removed from your favorites."
msgstr "أزيل %s من مفضّلتك."
-#: ../js/ui/dash.js:189
+#: ../js/ui/dash.js:142
msgid "Find"
msgstr "ابحث"
-#: ../js/ui/dash.js:505
+#: ../js/ui/dash.js:473
msgid "Searching..."
msgstr "يبحث..."
-#: ../js/ui/dash.js:519
+#: ../js/ui/dash.js:487
msgid "No matching results."
msgstr "لا نتائج مطابقة."
#. **** Places ****
#. Translators: This is in the sense of locations for documents,
#. network locations, etc.
-#: ../js/ui/dash.js:869 ../js/ui/placeDisplay.js:543
+#: ../js/ui/dash.js:797 ../js/ui/placeDisplay.js:554
msgid "PLACES & DEVICES"
msgstr "الأماكن والأجهزة"
#. **** Documents ****
-#: ../js/ui/dash.js:876 ../js/ui/docDisplay.js:489
+#: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT ITEMS"
msgstr "العناصر الحديثة"
-#: ../js/ui/lookingGlass.js:354
+#: ../js/ui/lookingGlass.js:552
msgid "No extensions installed"
msgstr "لم تثبّت أية امتدادات"
-#: ../js/ui/lookingGlass.js:391
+#: ../js/ui/lookingGlass.js:589
msgid "Enabled"
msgstr "مفعّل"
-#: ../js/ui/lookingGlass.js:393
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Disabled"
msgstr "معطّل"
-#: ../js/ui/lookingGlass.js:395
+#: ../js/ui/lookingGlass.js:593
msgid "Error"
msgstr "خطأ"
-#: ../js/ui/lookingGlass.js:397
+#: ../js/ui/lookingGlass.js:595
msgid "Out of date"
msgstr "غير محدث"
-#: ../js/ui/lookingGlass.js:422
+#: ../js/ui/lookingGlass.js:620
msgid "View Source"
msgstr "اعرض المصدر"
-#: ../js/ui/lookingGlass.js:428
+#: ../js/ui/lookingGlass.js:626
msgid "Web Page"
msgstr "صفحة الوب"
-#: ../js/ui/overview.js:161
+#: ../js/ui/overview.js:160
msgid "Undo"
msgstr "تراجع"
-#: ../js/ui/panel.js:535
-msgid "Quit"
-msgstr "أنهِ"
+#. TODO - _quit() doesn't really work on apps in state STARTING yet
+#: ../js/ui/panel.js:469
+#, c-format
+msgid "Quit %s"
+msgstr "أغلق %s"
-#. Button on the left side of the panel.
-#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
-#: ../js/ui/panel.js:740
-msgid "Activities"
-msgstr "الأنشطة"
+#: ../js/ui/panel.js:494
+msgid "Preferences"
+msgstr "التفضيلات"
#. Translators: This is the time format with date used
#. in 24-hour mode.
-#: ../js/ui/panel.js:955
+#: ../js/ui/panel.js:580
msgid "%a %b %e, %R:%S"
msgstr "%A %e %B، %R:%S"
-#: ../js/ui/panel.js:956
+#: ../js/ui/panel.js:581
msgid "%a %b %e, %R"
msgstr "%A %e %B، %R"
#. Translators: This is the time format without date used
#. in 24-hour mode.
-#: ../js/ui/panel.js:960
+#: ../js/ui/panel.js:585
msgid "%a %R:%S"
msgstr "%A %R:%S"
-#: ../js/ui/panel.js:961
+#: ../js/ui/panel.js:586
msgid "%a %R"
msgstr "%A %R"
#. Translators: This is a time format with date used
#. for AM/PM.
-#: ../js/ui/panel.js:968
+#: ../js/ui/panel.js:593
msgid "%a %b %e, %l:%M:%S %p"
msgstr "%A %e %B، %l:%M:%S %p"
-#: ../js/ui/panel.js:969
+#: ../js/ui/panel.js:594
msgid "%a %b %e, %l:%M %p"
msgstr "%A %e %B، %l:%M %p"
#. Translators: This is a time format without date used
#. for AM/PM.
-#: ../js/ui/panel.js:973
+#: ../js/ui/panel.js:598
msgid "%a %l:%M:%S %p"
msgstr "%A %l:%M:%S %p"
-#: ../js/ui/panel.js:974
+#: ../js/ui/panel.js:599
msgid "%a %l:%M %p"
msgstr "%A %Ol:%OM %p"
-#: ../js/ui/placeDisplay.js:108
+#. Button on the left side of the panel.
+#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
+#: ../js/ui/panel.js:744
+msgid "Activities"
+msgstr "الأنشطة"
+
+#: ../js/ui/placeDisplay.js:111
#, c-format
msgid "Failed to unmount '%s'"
msgstr "فشل فصْل '%s'"
-#: ../js/ui/placeDisplay.js:111
+#: ../js/ui/placeDisplay.js:114
msgid "Retry"
msgstr "أعد المحاولة"
-#: ../js/ui/placeDisplay.js:156
+#: ../js/ui/placeDisplay.js:159
msgid "Connect to..."
msgstr "اتّصل ب..."
-#: ../js/ui/runDialog.js:231
+#. Translators: this MUST be either "toggle-switch-us"
+#. (for toggle switches containing the English words
+#. "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:33
+msgid "toggle-switch-us"
+msgstr ""
+
+#: ../js/ui/runDialog.js:233
msgid "Please enter a command:"
msgstr "من فضلك اكتب أمرا:"
-#: ../js/ui/runDialog.js:375
+#: ../js/ui/runDialog.js:378
#, c-format
msgid "Execution of '%s' failed:"
msgstr "فشل تنفيذ '%s':"
-#: ../js/ui/statusMenu.js:90
+#: ../js/ui/statusMenu.js:101
msgid "Available"
msgstr "متاح"
-#: ../js/ui/statusMenu.js:94
+#: ../js/ui/statusMenu.js:106
msgid "Busy"
msgstr "مشغول"
-#: ../js/ui/statusMenu.js:98
+#: ../js/ui/statusMenu.js:111
msgid "Invisible"
msgstr "خفي"
-#: ../js/ui/statusMenu.js:105
-msgid "Account Information..."
-msgstr "معلومات الحساب..."
+#: ../js/ui/statusMenu.js:119
+msgid "My Account..."
+msgstr "حسابي..."
-#: ../js/ui/statusMenu.js:109
+#: ../js/ui/statusMenu.js:123
msgid "System Preferences..."
msgstr "تفضيلات النظام..."
-#: ../js/ui/statusMenu.js:116
+#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
msgstr "أوصد الشاشة"
-#: ../js/ui/statusMenu.js:120
+#: ../js/ui/statusMenu.js:134
msgid "Switch User"
msgstr "بدّل المستخدم"
-#: ../js/ui/statusMenu.js:125
+#: ../js/ui/statusMenu.js:139
msgid "Log Out..."
msgstr "اخرج..."
-#: ../js/ui/statusMenu.js:129
+#: ../js/ui/statusMenu.js:146
+msgid "Suspend"
+msgstr "علّق"
+
+#: ../js/ui/statusMenu.js:150
+msgid "Restart..."
+msgstr "أعد التشغيل..."
+
+#: ../js/ui/statusMenu.js:154
msgid "Shut Down..."
msgstr "أطفئ..."
-#: ../js/ui/windowAttentionHandler.js:47
+#: ../js/ui/status/accessibility.js:88
+msgid "Screen Reader"
+msgstr "قارئ الشاشة"
+
+#: ../js/ui/status/accessibility.js:91
+msgid "Screen Keyboard"
+msgstr "لوحة مفاتيح على الشاشة"
+
+#: ../js/ui/status/accessibility.js:94
+msgid "Visual Alerts"
+msgstr "تنبيهات بصرية"
+
+#: ../js/ui/status/accessibility.js:97
+msgid "Sticky Keys"
+msgstr "مفاتيح لاصقة"
+
+#: ../js/ui/status/accessibility.js:100
+msgid "Slow Keys"
+msgstr "مفاتيح بطيئة"
+
+#: ../js/ui/status/accessibility.js:103
+msgid "Bounce Keys"
+msgstr "مفاتيح لها صوت"
+
+#: ../js/ui/status/accessibility.js:106
+msgid "Mouse Keys"
+msgstr "مفاتيح الفأرة"
+
+#: ../js/ui/status/accessibility.js:110
+msgid "Universal Access Settings"
+msgstr "إعدادات الإتاحة"
+
+#: ../js/ui/status/accessibility.js:163
+msgid "High Contrast"
+msgstr "تباين عال"
+
+#: ../js/ui/status/accessibility.js:202
+msgid "Large Text"
+msgstr "نص كبير"
+
+#: ../js/ui/status/accessibility.js:223
+msgid "Zoom"
+msgstr "تقريب"
+
+#: ../js/ui/windowAttentionHandler.js:43
#, c-format
msgid "%s has finished starting"
msgstr "انتهى %s من البدء"
-#: ../js/ui/windowAttentionHandler.js:49
+#: ../js/ui/windowAttentionHandler.js:45
#, c-format
msgid "'%s' is ready"
msgstr "'%s' جاهز"
-#: ../js/ui/workspacesView.js:239
+#: ../js/ui/workspacesView.js:229
msgid ""
"Can't add a new workspace because maximum workspaces limit has been reached."
msgstr "تعذّر إضافة مساحة عمل جديدة، لتجاوز أقصى عدد من مساحات العمل."
-#: ../js/ui/workspacesView.js:256
+#: ../js/ui/workspacesView.js:246
msgid "Can't remove the first workspace."
msgstr "لا يمكن حذف مساحة العمل الأولى."
-#: ../src/shell-global.c:979
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] "لا مخرَج"
+msgstr[1] "مخرَج واحد"
+msgstr[2] "مخرَجين"
+msgstr[3] "%u مخارج"
+msgstr[4] "%u مخرجا"
+msgstr[5] "%u مخرج"
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] "لا مدخل"
+msgstr[1] "مدخل واحد"
+msgstr[2] "مدخلين"
+msgstr[3] "%u مداخل"
+msgstr[4] "%u مدخلا"
+msgstr[5] "%u مدخل"
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr "أصوات النظام"
+
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
msgstr "منذ أقل من دقيقة"
-#: ../src/shell-global.c:983
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
@@ -267,7 +666,7 @@ msgstr[3] "منذ %d دقائق"
msgstr[4] "منذ %d دقيقة"
msgstr[5] "منذ %d دقيقة"
-#: ../src/shell-global.c:988
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
@@ -278,7 +677,7 @@ msgstr[3] "منذ %d ساعات"
msgstr[4] "منذ %d ساعة"
msgstr[5] "منذ %d ساعة"
-#: ../src/shell-global.c:993
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
@@ -289,7 +688,7 @@ msgstr[3] "منذ %d أيام"
msgstr[4] "منذ %d يوما"
msgstr[5] "منذ %d يوم"
-#: ../src/shell-global.c:998
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
@@ -324,6 +723,9 @@ msgstr "ابحث"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
+#~ msgid "Account Information..."
+#~ msgstr "معلومات الحساب..."
+
#~ msgid "%H:%M"
#~ msgstr "%OH:%OM"
diff --git a/po/cs.po b/po/cs.po
index cc1c66411..7af12ff3d 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -7,15 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-07-11 21:54+0200\n"
-"PO-Revision-Date: 2010-07-11 21:51+0200\n"
+"POT-Creation-Date: 2010-10-31 12:09+0100\n"
+"PO-Revision-Date: 2010-10-31 12:09+0100\n"
"Last-Translator: Petr Kovar \n"
"Language-Team: Czech \n"
+"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Lokalize 1.0\n"
+"X-Generator: Lokalize 1.1\n"
#: ../data/gnome-shell.desktop.in.in.h:1
msgid "GNOME Shell"
@@ -219,6 +220,132 @@ msgstr "Uuid rozšíření určených k vypnutí"
msgid "Whether to collect stats about applications usage"
msgstr "Zda sbírat statistická data o používání aplikací"
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
+msgid "Clip the crosshairs at the center"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
+msgid "Color of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
+msgid ""
+"Determines the length of the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
+msgid ""
+"Determines the position of the magnified mouse image within the magnified "
+"view and how it reacts to system mouse movement. The values are - none: no "
+"mouse tracking; - centered: the mouse image is displayed at the center of "
+"the zoom region (which also represents the point under the system mouse) and "
+"the magnified contents are scrolled as the system mouse moves; - "
+"proportional: the position of the magnified mouse in the zoom region is "
+"proportionally the same as the position of the system mouse on screen; - "
+"push: when the magnified mouse intersects a boundary of the zoom region, the "
+"contents are scrolled into view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
+msgid ""
+"Determines the transparency of the crosshairs, from fully opaque to fully "
+"transparent."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
+msgid ""
+"Determines whether the crosshairs intersect the magnified mouse sprite, or "
+"are clipped such that the ends of the horizontal and vertical lines surround "
+"the mouse image."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
+#, fuzzy
+msgid "Enable lens mode"
+msgstr "Povoleno"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
+msgid ""
+"Enables/disables display of crosshairs centered on the magnified mouse "
+"sprite."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
+msgid ""
+"For centered mouse tracking, when the system pointer is at or near the edge "
+"of the screen, the magnified contents continue to scroll such that the "
+"screen edge moves into the magnified view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
+msgid "Length of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
+msgid "Magnification factor"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
+msgid "Mouse Tracking Mode"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
+msgid "Opacity of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
+msgid "Screen position"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
+msgid "Scroll magnified contents beyond the edges of the desktop"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
+msgid "Show or hide crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
+msgid "Show or hide the magnifier"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
+msgid "Show or hide the magnifier and all of its zoom regions."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
+msgid ""
+"The color of the the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
+msgid ""
+"The magnified view either fills the entire screen, or occupies the top-half, "
+"bottom-half, left-half, or right-half of the screen."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
+msgid ""
+"The power of the magnification. A value of 1.0 means no magnification. A "
+"value of 2.0 doubles the size."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
+msgid "Thickness of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
+msgid ""
+"Whether the magnified view should be centered over the location of the "
+"system mouse and move with it."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
+msgid "Width of the vertical and horizontal lines that make up the crosshairs."
+msgstr ""
+
#: ../data/clock-preferences.ui.h:1
msgid "Clock Format"
msgstr "Formát hodin"
@@ -248,27 +375,27 @@ msgid "_24 hour format"
msgstr "_24hodinový formát"
#. **** Applications ****
-#: ../js/ui/appDisplay.js:388 ../js/ui/dash.js:777
+#: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
msgid "APPLICATIONS"
msgstr "APLIKACE"
-#: ../js/ui/appDisplay.js:420
+#: ../js/ui/appDisplay.js:348
msgid "PREFERENCES"
msgstr "PŘEDVOLBY"
-#: ../js/ui/appDisplay.js:725
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "Nové okno"
-#: ../js/ui/appDisplay.js:729
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "Odstranit z oblíbených"
-#: ../js/ui/appDisplay.js:730
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "Přidat mezi oblíbené"
-#: ../js/ui/appDisplay.js:1037
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "Oblíbené přidáte přetažením sem"
@@ -277,209 +404,302 @@ msgstr "Oblíbené přidáte přetažením sem"
msgid "%s has been added to your favorites."
msgstr "%s byl přidán mezi oblíbené."
-#: ../js/ui/appFavorites.js:106
+#: ../js/ui/appFavorites.js:107
#, c-format
msgid "%s has been removed from your favorites."
msgstr "%s byl odstraněn z oblíbených."
-#: ../js/ui/dash.js:146
+#: ../js/ui/dash.js:142
msgid "Find"
msgstr "Najít"
-#: ../js/ui/dash.js:475
+#: ../js/ui/dash.js:473
msgid "Searching..."
msgstr "Hledá se..."
-#: ../js/ui/dash.js:489
+#: ../js/ui/dash.js:487
msgid "No matching results."
msgstr "Neodpovídá ani jeden z výsledků."
#. **** Places ****
#. Translators: This is in the sense of locations for documents,
#. network locations, etc.
-#: ../js/ui/dash.js:796 ../js/ui/placeDisplay.js:552
+#: ../js/ui/dash.js:797 ../js/ui/placeDisplay.js:554
msgid "PLACES & DEVICES"
msgstr "MÍSTA A ZAŘÍZENÍ"
#. **** Documents ****
-#: ../js/ui/dash.js:803 ../js/ui/docDisplay.js:497
+#: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT ITEMS"
msgstr "NEDÁVNÉ POLOŽKY"
-#: ../js/ui/lookingGlass.js:471
+#: ../js/ui/lookingGlass.js:552
msgid "No extensions installed"
msgstr "Nejsou nainstalována žádná rozšíření"
-#: ../js/ui/lookingGlass.js:508
+#: ../js/ui/lookingGlass.js:589
msgid "Enabled"
msgstr "Povoleno"
-#: ../js/ui/lookingGlass.js:510
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Disabled"
msgstr "Zakázáno"
-#: ../js/ui/lookingGlass.js:512
+#: ../js/ui/lookingGlass.js:593
msgid "Error"
msgstr "Chyba"
-#: ../js/ui/lookingGlass.js:514
+#: ../js/ui/lookingGlass.js:595
msgid "Out of date"
msgstr "Neaktuální"
-#: ../js/ui/lookingGlass.js:539
+#: ../js/ui/lookingGlass.js:620
msgid "View Source"
msgstr "Zobrazit zdroj"
-#: ../js/ui/lookingGlass.js:545
+#: ../js/ui/lookingGlass.js:626
msgid "Web Page"
msgstr "Webová stránka"
-#: ../js/ui/overview.js:165
+#: ../js/ui/overview.js:160
msgid "Undo"
msgstr "Zpět"
-#: ../js/ui/panel.js:517
+#. TODO - _quit() doesn't really work on apps in state STARTING yet
+#: ../js/ui/panel.js:469
+#, c-format
+msgid "Quit %s"
+msgstr "Ukončit %s"
+
+#: ../js/ui/panel.js:494
msgid "Preferences"
msgstr "Předvolby"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
#. Translators: This is the time format with date used
#. in 24-hour mode.
-#: ../js/ui/panel.js:603
+#: ../js/ui/panel.js:580
msgid "%a %b %e, %R:%S"
msgstr "%A, %e. %B, %R:%S"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
-#: ../js/ui/panel.js:604
+#: ../js/ui/panel.js:581
msgid "%a %b %e, %R"
msgstr "%A, %e. %B, %R"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
#. Translators: This is the time format without date used
#. in 24-hour mode.
-#: ../js/ui/panel.js:608
+#: ../js/ui/panel.js:585
msgid "%a %R:%S"
msgstr "%A, %R:%S"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
-#: ../js/ui/panel.js:609
+#: ../js/ui/panel.js:586
msgid "%a %R"
msgstr "%A, %R"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
#. Translators: This is a time format with date used
#. for AM/PM.
-#: ../js/ui/panel.js:616
+#: ../js/ui/panel.js:593
msgid "%a %b %e, %l:%M:%S %p"
msgstr "%A, %e. %B, %l:%M:%S %p"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
-#: ../js/ui/panel.js:617
+#: ../js/ui/panel.js:594
msgid "%a %b %e, %l:%M %p"
msgstr "%A, %e. %B, %l:%M %p"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
#. Translators: This is a time format without date used
#. for AM/PM.
-#: ../js/ui/panel.js:621
+#: ../js/ui/panel.js:598
msgid "%a %l:%M:%S %p"
msgstr "%A, %l:%M:%S %p"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A".
-#: ../js/ui/panel.js:622
+#: ../js/ui/panel.js:599
msgid "%a %l:%M %p"
msgstr "%A, %l:%M %p"
#. Button on the left side of the panel.
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
-#: ../js/ui/panel.js:760
+#: ../js/ui/panel.js:744
msgid "Activities"
msgstr "Činnosti"
-#: ../js/ui/placeDisplay.js:109
+#: ../js/ui/placeDisplay.js:111
#, c-format
msgid "Failed to unmount '%s'"
msgstr "Nelze odpojit \"%s\""
-#: ../js/ui/placeDisplay.js:112
+#: ../js/ui/placeDisplay.js:114
msgid "Retry"
msgstr "Opakovat"
-#: ../js/ui/placeDisplay.js:157
+#: ../js/ui/placeDisplay.js:159
msgid "Connect to..."
msgstr "Připojit se k..."
-#: ../js/ui/runDialog.js:234
+#. Translators: this MUST be either "toggle-switch-us"
+#. (for toggle switches containing the English words
+#. "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:33
+msgid "toggle-switch-us"
+msgstr "toggle-switch-intl"
+
+#: ../js/ui/runDialog.js:233
msgid "Please enter a command:"
msgstr "Zadejte prosím příkaz:"
-#: ../js/ui/runDialog.js:379
+#: ../js/ui/runDialog.js:378
#, c-format
msgid "Execution of '%s' failed:"
msgstr "Vykonání \"%s\" selhalo:"
-#: ../js/ui/statusMenu.js:91
+#: ../js/ui/statusMenu.js:101
msgid "Available"
msgstr "Přítomen"
-#: ../js/ui/statusMenu.js:95
+#: ../js/ui/statusMenu.js:106
msgid "Busy"
msgstr "Zaneprázdněn"
-#: ../js/ui/statusMenu.js:99
+#: ../js/ui/statusMenu.js:111
msgid "Invisible"
msgstr "Neviditelný"
-#: ../js/ui/statusMenu.js:106
-msgid "Account Information..."
-msgstr "Informace o účtu..."
+#: ../js/ui/statusMenu.js:119
+msgid "My Account..."
+msgstr "Můj účet..."
-#: ../js/ui/statusMenu.js:110
-msgid "System Preferences..."
-msgstr "Předvolby systému..."
+#: ../js/ui/statusMenu.js:123
+msgid "System Settings..."
+msgstr "Nastavení systému..."
-#: ../js/ui/statusMenu.js:117
+#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
msgstr "Uzamknout obrazovku"
-#: ../js/ui/statusMenu.js:121
+#: ../js/ui/statusMenu.js:134
msgid "Switch User"
msgstr "Přepnout uživatele"
-#: ../js/ui/statusMenu.js:126
+#: ../js/ui/statusMenu.js:139
msgid "Log Out..."
msgstr "Odhlásit..."
-#: ../js/ui/statusMenu.js:130
+#: ../js/ui/statusMenu.js:146
+msgid "Suspend"
+msgstr "Uspat do paměti"
+
+#: ../js/ui/statusMenu.js:150
+msgid "Restart..."
+msgstr "Restartovat..."
+
+#: ../js/ui/statusMenu.js:154
msgid "Shut Down..."
msgstr "Vypnout..."
-#: ../js/ui/windowAttentionHandler.js:47
+#: ../js/ui/status/accessibility.js:88
+msgid "Screen Reader"
+msgstr "Čtení obrazovky"
+
+#: ../js/ui/status/accessibility.js:91
+msgid "Screen Keyboard"
+msgstr "Klávesnice na obrazovce"
+
+#: ../js/ui/status/accessibility.js:94
+msgid "Visual Alerts"
+msgstr "Vizuální upozornění"
+
+#: ../js/ui/status/accessibility.js:97
+msgid "Sticky Keys"
+msgstr "Lepící klávesy"
+
+#: ../js/ui/status/accessibility.js:100
+msgid "Slow Keys"
+msgstr "Pomalé klávesy"
+
+#: ../js/ui/status/accessibility.js:103
+msgid "Bounce Keys"
+msgstr "Vícenásobné stisky kláves"
+
+#: ../js/ui/status/accessibility.js:106
+msgid "Mouse Keys"
+msgstr "Myš klávesnicí"
+
+#: ../js/ui/status/accessibility.js:110
+msgid "Universal Access Settings"
+msgstr "Nastavení zpřístupnění"
+
+#: ../js/ui/status/accessibility.js:163
+msgid "High Contrast"
+msgstr "Vysoký kontrast"
+
+#: ../js/ui/status/accessibility.js:202
+msgid "Large Text"
+msgstr "Styl velkého textu"
+
+#: ../js/ui/status/accessibility.js:223
+msgid "Zoom"
+msgstr "Zvětšení"
+
+#: ../js/ui/windowAttentionHandler.js:43
#, c-format
msgid "%s has finished starting"
msgstr "Spouštění %s dokončeno"
-#: ../js/ui/windowAttentionHandler.js:49
+#: ../js/ui/windowAttentionHandler.js:45
#, c-format
msgid "'%s' is ready"
msgstr "Připraveno \"%s\""
-#: ../js/ui/workspacesView.js:237
+#: ../js/ui/workspacesView.js:229
msgid ""
"Can't add a new workspace because maximum workspaces limit has been reached."
msgstr ""
"Novou pracovní plochu nelze přidat, jelikož byl dosažen maximální počet "
"pracovních ploch."
-#: ../js/ui/workspacesView.js:254
+#: ../js/ui/workspacesView.js:246
msgid "Can't remove the first workspace."
msgstr "Nelze odstranit první pracovní plochu."
-#: ../src/shell-global.c:1039
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] "%u výstup"
+msgstr[1] "%u výstupy"
+msgstr[2] "%u výstupů"
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] "%u vstup"
+msgstr[1] "%u vstupy"
+msgstr[2] "%u vstupů"
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr "Systémové zvuky"
+
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
msgstr "Před méně než minutou"
-#: ../src/shell-global.c:1043
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
@@ -487,7 +707,7 @@ msgstr[0] "Před %d minutou"
msgstr[1] "Před %d minutami"
msgstr[2] "Před %d minutami"
-#: ../src/shell-global.c:1048
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
@@ -495,7 +715,7 @@ msgstr[0] "Před %d hodinou"
msgstr[1] "Před %d hodinami"
msgstr[2] "Před %d hodinami"
-#: ../src/shell-global.c:1053
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
@@ -503,7 +723,7 @@ msgstr[0] "Před %d dnem"
msgstr[1] "Před %d dny"
msgstr[2] "Před %d dny"
-#: ../src/shell-global.c:1058
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
@@ -534,3 +754,6 @@ msgstr "Hledat"
#, c-format
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
+
+#~ msgid "Account Information..."
+#~ msgstr "Informace o účtu..."
diff --git a/po/es.po b/po/es.po
index 443343293..2dba065c7 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: gnome-shell.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&component=general\n"
-"POT-Creation-Date: 2010-10-27 23:15+0000\n"
-"PO-Revision-Date: 2010-10-28 01:42+0200\n"
+"POT-Creation-Date: 2010-10-30 17:51+0000\n"
+"PO-Revision-Date: 2010-10-31 21:36+0100\n"
"Last-Translator: Jorge González \n"
"Language-Team: Español \n"
"MIME-Version: 1.0\n"
@@ -420,19 +420,19 @@ msgstr "APLICACIONES"
msgid "PREFERENCES"
msgstr "PREFERENCIAS"
-#: ../js/ui/appDisplay.js:648
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "Ventana nueva"
-#: ../js/ui/appDisplay.js:652
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "Quitar de los favoritos"
-#: ../js/ui/appDisplay.js:653
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "Añadir a los favoritos"
-#: ../js/ui/appDisplay.js:830
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "Arrastrar aquí para añadir a los favoritos"
@@ -608,8 +608,9 @@ msgid "My Account..."
msgstr "Mi cuenta…"
#: ../js/ui/statusMenu.js:123
-msgid "System Preferences..."
-msgstr "Preferencias del sistema…"
+#| msgid "System Preferences..."
+msgid "System Settings..."
+msgstr "Ajustes del sistema…"
#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
@@ -719,36 +720,35 @@ msgstr[0] "%u entrada"
msgstr[1] "%u entradas"
#: ../src/gvc/gvc-mixer-control.c:1402
-#| msgid "System Settings..."
msgid "System Sounds"
msgstr "Sonidos del sistema"
-#: ../src/shell-global.c:1204
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
msgstr "Hace menos de un minuto"
-#: ../src/shell-global.c:1208
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "Hace %d minuto"
msgstr[1] "Hace %d minutos"
-#: ../src/shell-global.c:1213
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "Hace %d hora"
msgstr[1] "Hace %d horas"
-#: ../src/shell-global.c:1218
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
msgstr[0] "Hace %d día"
msgstr[1] "Hace %d días"
-#: ../src/shell-global.c:1223
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
diff --git a/po/gl.po b/po/gl.po
index c1378201f..e0c8bf60a 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-26 16:28+0200\n"
-"PO-Revision-Date: 2010-10-26 16:36+0200\n"
+"POT-Creation-Date: 2010-11-03 00:26+0100\n"
+"PO-Revision-Date: 2010-11-03 00:28+0100\n"
"Last-Translator: Fran Diéguez \n"
"Language-Team: Galician \n"
"Language: gl\n"
@@ -61,7 +61,7 @@ msgstr "Extensión de ficheiro usada para o almacenamento da screencast"
#: ../data/org.gnome.shell.gschema.xml.in.h:5
msgid "Framerate used for recording screencasts."
-msgstr "Taxa de marcos usada para gravar as capturas de pantalla"
+msgstr "Taxa de marcos usada para gravar as capturas de pantalla."
#: ../data/org.gnome.shell.gschema.xml.in.h:6
msgid ""
@@ -73,7 +73,7 @@ msgstr ""
#: ../data/org.gnome.shell.gschema.xml.in.h:7
msgid "History for command (Alt-F2) dialog"
-msgstr "Hitorial do diálogo de orde (Alt-F)"
+msgstr "Hitorial do diálogo de orde (Alt-F2)"
#: ../data/org.gnome.shell.gschema.xml.in.h:8
msgid "Hour format"
@@ -418,19 +418,19 @@ msgstr "APLICATIVOS"
msgid "PREFERENCES"
msgstr "PREFERENCIAS"
-#: ../js/ui/appDisplay.js:648
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "Xanela nova"
-#: ../js/ui/appDisplay.js:652
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "Eliminar dos favoritos"
-#: ../js/ui/appDisplay.js:653
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "Engadir aos favoritos"
-#: ../js/ui/appDisplay.js:830
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "Arrastre aquí para engadir aos favoritos"
@@ -476,7 +476,9 @@ msgstr "Non hai ningunha extensión instalada"
msgid "Enabled"
msgstr "Activado"
-#: ../js/ui/lookingGlass.js:591
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Disabled"
msgstr "Desactivado"
@@ -559,7 +561,7 @@ msgstr "Actividades"
#: ../js/ui/placeDisplay.js:111
#, c-format
msgid "Failed to unmount '%s'"
-msgstr "Produciuse un fallo ao montar «%s»"
+msgstr "Produciuse un fallo ao desmontar «%s»"
#: ../js/ui/placeDisplay.js:114
msgid "Retry"
@@ -604,8 +606,8 @@ msgid "My Account..."
msgstr "A miña conta..."
#: ../js/ui/statusMenu.js:123
-msgid "System Preferences..."
-msgstr "Preferencias do sistema..."
+msgid "System Settings..."
+msgstr "Configuracións do sistema..."
#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
@@ -696,32 +698,54 @@ msgstr ""
msgid "Can't remove the first workspace."
msgstr "Non é posíbel quitar a primeira área de traballo."
-#: ../src/shell-global.c:1204
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] "%u saída"
+msgstr[1] "%u saídas"
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] "%u entrada"
+msgstr[1] "%u entradas"
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr "Sons do sistema"
+
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
msgstr "Hai menos dun minuto"
-#: ../src/shell-global.c:1208
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "hai %d minuto"
msgstr[1] "hai %d minutos"
-#: ../src/shell-global.c:1213
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "hai %d hora"
msgstr[1] "hai %d horas"
-#: ../src/shell-global.c:1218
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
msgstr[0] "hai %d día"
msgstr[1] "hai %d días"
-#: ../src/shell-global.c:1223
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
@@ -752,12 +776,12 @@ msgstr "Buscar"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
+#~ msgid "System Preferences..."
+#~ msgstr "Preferencias do sistema..."
+
#~ msgid "Account Information..."
#~ msgstr "Información da conta..."
-#~ msgid "System Settings..."
-#~ msgstr "Configuracións do sistema..."
-
#~ msgid "ON"
#~ msgstr "⚫"
diff --git a/po/he.po b/po/he.po
index be704419f..0899a1fa1 100644
--- a/po/he.po
+++ b/po/he.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-28 08:56+0200\n"
-"PO-Revision-Date: 2010-10-28 08:58+0200\n"
+"POT-Creation-Date: 2010-11-01 07:47+0200\n"
+"PO-Revision-Date: 2010-11-01 07:48+0200\n"
"Last-Translator: Yaron Shahrabani \n"
"Language-Team: Hebrew \n"
"MIME-Version: 1.0\n"
@@ -411,19 +411,19 @@ msgstr "יישומים"
msgid "PREFERENCES"
msgstr "העדפות"
-#: ../js/ui/appDisplay.js:648
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "חלון חדש"
-#: ../js/ui/appDisplay.js:652
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "הסרה מהמועדפים"
-#: ../js/ui/appDisplay.js:653
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "הוספה למועדפים"
-#: ../js/ui/appDisplay.js:830
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "יש לגרור פריטים לכאן כדי להוסיף מועדפים"
@@ -599,8 +599,8 @@ msgid "My Account..."
msgstr "החשבון שלי..."
#: ../js/ui/statusMenu.js:123
-msgid "System Preferences..."
-msgstr "העדפות המערכת..."
+msgid "System Settings..."
+msgstr "הגדרות המערכת..."
#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
@@ -713,11 +713,11 @@ msgstr[2] "2 קלטים"
msgid "System Sounds"
msgstr "צלילי מערכת"
-#: ../src/shell-global.c:1204
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
msgstr "לפני פחות מדקה"
-#: ../src/shell-global.c:1208
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
@@ -725,7 +725,7 @@ msgstr[0] "לפני דקה"
msgstr[1] "לפני %d דקות"
msgstr[2] "לפני 2 דקות"
-#: ../src/shell-global.c:1213
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
@@ -733,7 +733,7 @@ msgstr[0] "לפני שעה"
msgstr[1] "לפני %d שעות"
msgstr[2] "לפני שעתיים"
-#: ../src/shell-global.c:1218
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
@@ -741,7 +741,7 @@ msgstr[0] "לפני יום"
msgstr[1] "לפני %d ימים"
msgstr[2] "לפני יומיים"
-#: ../src/shell-global.c:1223
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
diff --git a/po/pa.po b/po/pa.po
index a0479c7c7..bec9a27f5 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
"cgi?product=gnome-shell&component=general\n"
-"POT-Creation-Date: 2010-10-02 20:44+0000\n"
-"PO-Revision-Date: 2010-10-04 07:19+0530\n"
+"POT-Creation-Date: 2010-10-27 23:15+0000\n"
+"PO-Revision-Date: 2010-10-29 08:13+0530\n"
"Last-Translator: A S Alam \n"
"Language-Team: Punjabi/Panjabi \n"
"MIME-Version: 1.0\n"
@@ -166,9 +166,9 @@ msgid ""
"() to obtain a specific format. See the strftime() manual for more "
"information."
msgstr ""
-"ਇਹ ਕੁੰਜੀ ਪੈਨਲ ਘੜੀ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਫਾਰਮੈਟ ਦਿੰਦੀ ਹੈ, ਜਦੋਂ ਕਿ ਫਾਰਮੈਟ ਕੁੰਜੀ \"ਕਸਟਮ\" ਸੈੱਟ "
-"ਕੀਤੀ ਹੋਵੇ। ਤੁਸੀਂ ਖਾਸ ਫਾਰਮੈਟ ਦੇਣ ਲਈ ਹਦਾਇਤਾਂ ਵਾਸਤੇ strftime () ਨੂੰ ਵਰਤ ਸਕਦੇ ਹੋ। "
-"ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ strftime () ਦਸਤਾਵੇਜ਼ ਵੇਖੋ।"
+"ਇਹ ਕੁੰਜੀ ਪੈਨਲ ਘੜੀ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਫਾਰਮੈਟ ਦਿੰਦੀ ਹੈ, ਜਦੋਂ ਕਿ ਫਾਰਮੈਟ ਕੁੰਜੀ \"ਕਸਟਮ\" ਸੈੱਟ ਕੀਤੀ "
+"ਹੋਵੇ। ਤੁਸੀਂ ਖਾਸ ਫਾਰਮੈਟ ਦੇਣ ਲਈ ਹਦਾਇਤਾਂ ਵਾਸਤੇ strftime () ਨੂੰ ਵਰਤ ਸਕਦੇ ਹੋ। ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ "
+"strftime () ਦਸਤਾਵੇਜ਼ ਵੇਖੋ।"
#: ../data/org.gnome.shell.gschema.xml.in.h:25
msgid ""
@@ -179,12 +179,12 @@ msgid ""
"in the custom_format key. Note that if set to either \"unix\" or \"custom\", "
"the show_date and show_seconds keys are ignored."
msgstr ""
-"ਇਹ ਕੁੰਜੀ ਤਹਿ ਕਰਦੀ ਹੈ ਕਿ ਕਿਹੜਾ ਪੈਨਲ ਘੜੀ ਵਿੱਚ ਘੰਟਾ ਫਾਰਮੈਟ ਵਰਤਿਆ ਜਾਵੇ। ਸੰਭਵ ਮੁੱਲ ਹਨ "
-"\"12-hour\"(੧੨-ਘੰਟੇ), \"24-hour\" (੨੪-ਘੰਟੇ), \"unix\" (ਯੂਨੈਕਸ) ਅਤੇ \"custom\" "
-"(ਪਸੰਦੀਦਾ)। ਜੇ \"ਯੂਨੈਕਸ\" ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ ਘੜੀ ਨੂੰ ਈਪੋਚ (੦੧-ਜਨਵਰੀ-੧੯੭੦) ਤੋਂ ਵੇਖਾਇਆ\n"
-"ਜਾਵੇਗਾ। ਜੇ \"ਪਸੰਦੀਦਾ\" ਲਈ ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ, ਘੜੀ ਨੂੰ custom_format ਕੁੰਜੀ ਵਿੱਚ ਦਿੱਤੇ "
-"ਫਾਰਮੈਟ ਮੁਤਾਬਕ ਵੇਖਾਇਆ ਜਾਵੇਗਾ। ਯਾਦ ਰੱਖੋ ਕਿ ਜੇ \"ਯੂਨੈਕਸ\" ਜਾਂ \"ਪਸੰਦੀਦਾ\" ਸੈੱਟ ਕੀਤਾ ਤਾਂ ਅੱਪਗਰੇਡ "
-"ਮਿਤੀ ਵੇਖਾਓ ਤੇ ਸਕਿੰਟ ਵੇਖਾਓ ਨੂੰ ਅਣਡਿੱਠਾ ਕੀਤਾ ਜਾਵੇਗਾ।"
+"ਇਹ ਕੁੰਜੀ ਤਹਿ ਕਰਦੀ ਹੈ ਕਿ ਕਿਹੜਾ ਪੈਨਲ ਘੜੀ ਵਿੱਚ ਘੰਟਾ ਫਾਰਮੈਟ ਵਰਤਿਆ ਜਾਵੇ। ਸੰਭਵ ਮੁੱਲ ਹਨ \"12-"
+"hour\"(੧੨-ਘੰਟੇ), \"24-hour\" (੨੪-ਘੰਟੇ), \"unix\" (ਯੂਨੈਕਸ) ਅਤੇ \"custom\" (ਪਸੰਦੀਦਾ)। "
+"ਜੇ \"ਯੂਨੈਕਸ\" ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ ਘੜੀ ਨੂੰ ਈਪੋਚ (੦੧-ਜਨਵਰੀ-੧੯੭੦) ਤੋਂ ਵੇਖਾਇਆ\n"
+"ਜਾਵੇਗਾ। ਜੇ \"ਪਸੰਦੀਦਾ\" ਲਈ ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ, ਘੜੀ ਨੂੰ custom_format ਕੁੰਜੀ ਵਿੱਚ ਦਿੱਤੇ ਫਾਰਮੈਟ "
+"ਮੁਤਾਬਕ ਵੇਖਾਇਆ ਜਾਵੇਗਾ। ਯਾਦ ਰੱਖੋ ਕਿ ਜੇ \"ਯੂਨੈਕਸ\" ਜਾਂ \"ਪਸੰਦੀਦਾ\" ਸੈੱਟ ਕੀਤਾ ਤਾਂ ਅੱਪਗਰੇਡ ਮਿਤੀ "
+"ਵੇਖਾਓ ਤੇ ਸਕਿੰਟ ਵੇਖਾਓ ਨੂੰ ਅਣਡਿੱਠਾ ਕੀਤਾ ਜਾਵੇਗਾ।"
#: ../data/org.gnome.shell.gschema.xml.in.h:26
msgid "Uuids of extensions to disable"
@@ -194,6 +194,132 @@ msgstr "ਇਕਟੈਨਸ਼ਨ ਦੀ Uuids ਬੰਦ ਹੈ"
msgid "Whether to collect stats about applications usage"
msgstr "ਐਪਲੀਕੇਸ਼ਨ ਵਰਤੋਂ ਬਾਰੇ ਅੰਕੜੇ ਇੱਕਠੇ ਕਰਨੇ ਹਨ"
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
+msgid "Clip the crosshairs at the center"
+msgstr "ਸੈਂਟਰ ਉੱਤੇ ਕਰਾਂਸਹੇਅਰ ਕਲਿੱਪ ਕਰੋ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
+msgid "Color of the crosshairs"
+msgstr "ਕਰਾਂਸਹੇਅਰ ਦਾ ਰੰਗ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
+msgid ""
+"Determines the length of the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
+msgid ""
+"Determines the position of the magnified mouse image within the magnified "
+"view and how it reacts to system mouse movement. The values are - none: no "
+"mouse tracking; - centered: the mouse image is displayed at the center of "
+"the zoom region (which also represents the point under the system mouse) and "
+"the magnified contents are scrolled as the system mouse moves; - "
+"proportional: the position of the magnified mouse in the zoom region is "
+"proportionally the same as the position of the system mouse on screen; - "
+"push: when the magnified mouse intersects a boundary of the zoom region, the "
+"contents are scrolled into view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
+msgid ""
+"Determines the transparency of the crosshairs, from fully opaque to fully "
+"transparent."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
+msgid ""
+"Determines whether the crosshairs intersect the magnified mouse sprite, or "
+"are clipped such that the ends of the horizontal and vertical lines surround "
+"the mouse image."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
+#| msgid "Enabled"
+msgid "Enable lens mode"
+msgstr "ਲੈਨਜ਼ ਮੋਡ ਚਾਲੂ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
+msgid ""
+"Enables/disables display of crosshairs centered on the magnified mouse "
+"sprite."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
+msgid ""
+"For centered mouse tracking, when the system pointer is at or near the edge "
+"of the screen, the magnified contents continue to scroll such that the "
+"screen edge moves into the magnified view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
+msgid "Length of the crosshairs"
+msgstr "ਕਰਾਂਸਹੇਅਰ ਦੀ ਲੰਬਾਈ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
+msgid "Magnification factor"
+msgstr "ਵੱਡਦਰਸ਼ੀ ਗੁਣਾਂਕ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
+msgid "Mouse Tracking Mode"
+msgstr "ਮਾਊਸ ਟਰੈਕਿੰਗ ਮੋਡ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
+msgid "Opacity of the crosshairs"
+msgstr "ਕਰਾਂਸਹੇਅਰ ਦਾ ਧੁੰਦਲਾਪਨ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
+msgid "Screen position"
+msgstr "ਸਕਰੀਨ ਸਥਿਤੀ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
+msgid "Scroll magnified contents beyond the edges of the desktop"
+msgstr "ਡੈਸਕਟਾਪ ਦੇ ਕੋਨਿਆਂ ਤੋਂ ਪਾਰ ਵੱਡਦਰਸ਼ੀ ਸਮੱਗਰੀ ਸਕਰੋਲ ਕਰੋ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
+msgid "Show or hide crosshairs"
+msgstr "ਕਰਾਂਸਹੇਅਰ ਵੇਖੋ ਜਾਂ ਓਹਲੇ ਕਰੋ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
+msgid "Show or hide the magnifier"
+msgstr "ਵੱਡਦਰਸ਼ੀ ਵੇਖੋ ਜਾਂ ਓਹਲੇ ਕਰੋ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
+msgid "Show or hide the magnifier and all of its zoom regions."
+msgstr "ਵੱਡਦਰਸ਼ੀ ਵੇਖੋ ਜਾਂ ਓਹਲੇ ਕਰੋ ਤੇ ਇਸ ਦੇ ਸਭ ਖੇਤਰਾਂ ਨੂੰ ਜ਼ੂਮ ਕਰੋ।"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
+msgid ""
+"The color of the the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr "ਵਰਟੀਕਲ ਤੇ ਹਰੀਜੱਟਲ ਲਾਈਨਾਂ ਦਾ ਰੰਗ, ਜੋ ਕਿ ਕਰਾਂਸਹੇਅਰ ਬਣਾਉਂਦੀਆਂ ਹਨ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
+msgid ""
+"The magnified view either fills the entire screen, or occupies the top-half, "
+"bottom-half, left-half, or right-half of the screen."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
+msgid ""
+"The power of the magnification. A value of 1.0 means no magnification. A "
+"value of 2.0 doubles the size."
+msgstr "ਵੱਡਦਰਸ਼ੀ ਦੀ ਤਾਕਤ ਹੈ। ੧.੦ ਦਾ ਮਤਲਬ ਹੈ ਕਿ ਕੋਈ ਵੀ ਨਹੀਂ। ੨.੦ ਦਾ ਮਤਲਬ ਹੈ ਆਕਾਰ ਦਾ ਦੋ ਗੁਣਾ।"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
+msgid "Thickness of the crosshairs"
+msgstr "ਕਰਾਂਸਹੇਅਰ ਦੀ ਮੋਟਾਈ"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
+msgid ""
+"Whether the magnified view should be centered over the location of the "
+"system mouse and move with it."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
+msgid "Width of the vertical and horizontal lines that make up the crosshairs."
+msgstr "ਵਰਟੀਕਲ ਤੇ ਹਰੀਜੱਟਲ ਲਾਈਨਾਂ ਦੀ ਚੌੜਾਈ, ਜੋ ਕਿ ਕਰਾਂਸਹੇਅਰ ਬਣਾਉਂਦੀਆਂ ਹਨ"
+
#: ../data/clock-preferences.ui.h:1
msgid "Clock Format"
msgstr "ਘੜੀ ਫਾਰਮੈਟ"
@@ -289,7 +415,9 @@ msgstr "ਕੋਈ ਇਕਸਟੈਨਸ਼ਨ ਇੰਸਟਾਲ ਨਹੀਂ
msgid "Enabled"
msgstr "ਚਾਲੂ ਹੈ"
-#: ../js/ui/lookingGlass.js:591
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Disabled"
msgstr "ਬੰਦ ਹੈ"
@@ -314,58 +442,58 @@ msgid "Undo"
msgstr "ਵਾਪਸ"
#. TODO - _quit() doesn't really work on apps in state STARTING yet
-#: ../js/ui/panel.js:461
+#: ../js/ui/panel.js:469
#, c-format
msgid "Quit %s"
msgstr "%s ਬੰਦ ਕਰੋ"
-#: ../js/ui/panel.js:486
+#: ../js/ui/panel.js:494
msgid "Preferences"
msgstr "ਮੇਰੀ ਪਸੰਦ"
#. Translators: This is the time format with date used
#. in 24-hour mode.
-#: ../js/ui/panel.js:572
+#: ../js/ui/panel.js:580
msgid "%a %b %e, %R:%S"
msgstr "%a, %e %b %R:%S"
-#: ../js/ui/panel.js:573
+#: ../js/ui/panel.js:581
msgid "%a %b %e, %R"
msgstr "%a %e %b, %R"
#. Translators: This is the time format without date used
#. in 24-hour mode.
-#: ../js/ui/panel.js:577
+#: ../js/ui/panel.js:585
msgid "%a %R:%S"
msgstr "%a %R:%S"
-#: ../js/ui/panel.js:578
+#: ../js/ui/panel.js:586
msgid "%a %R"
msgstr "%a %R"
#. Translators: This is a time format with date used
#. for AM/PM.
-#: ../js/ui/panel.js:585
+#: ../js/ui/panel.js:593
msgid "%a %b %e, %l:%M:%S %p"
msgstr "%a %e %b, %l:%M:%S %p"
-#: ../js/ui/panel.js:586
+#: ../js/ui/panel.js:594
msgid "%a %b %e, %l:%M %p"
msgstr "%a %e %b, %l:%M %p"
#. Translators: This is a time format without date used
#. for AM/PM.
-#: ../js/ui/panel.js:590
+#: ../js/ui/panel.js:598
msgid "%a %l:%M:%S %p"
msgstr "%a %l:%M:%S %p"
-#: ../js/ui/panel.js:591
+#: ../js/ui/panel.js:599
msgid "%a %l:%M %p"
msgstr "%a %l:%M %p"
#. Button on the left side of the panel.
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
-#: ../js/ui/panel.js:736
+#: ../js/ui/panel.js:744
msgid "Activities"
msgstr "ਸਰਗਰਮੀਆਂ"
@@ -389,7 +517,7 @@ msgstr "...ਨਾਲ ਕੁਨੈਕਟ ਕਰੋ"
#. simply result in invisible toggle switches.
#: ../js/ui/popupMenu.js:33
msgid "toggle-switch-us"
-msgstr ""
+msgstr "toggle-switch-us"
#: ../js/ui/runDialog.js:233
msgid "Please enter a command:"
@@ -400,43 +528,95 @@ msgstr "ਕਮਾਂਡ ਦਿਓ ਜੀ:"
msgid "Execution of '%s' failed:"
msgstr "'%s' ਚਲਾਉਣ ਲਈ ਫੇਲ੍ਹ:"
-#: ../js/ui/statusMenu.js:91
+#: ../js/ui/statusMenu.js:101
msgid "Available"
msgstr "ਉਪਲੱਬਧ"
-#: ../js/ui/statusMenu.js:95
+#: ../js/ui/statusMenu.js:106
msgid "Busy"
msgstr "ਰੁਝਿਆ"
-#: ../js/ui/statusMenu.js:99
+#: ../js/ui/statusMenu.js:111
msgid "Invisible"
msgstr "ਅਦਿੱਖ"
-#: ../js/ui/statusMenu.js:106
-msgid "Account Information..."
-msgstr "ਅਕਾਊਂਟ ਜਾਣਕਾਰੀ..."
+#: ../js/ui/statusMenu.js:119
+msgid "My Account..."
+msgstr "...ਮੇਰਾ ਅਕਾਊਂਟ"
-#: ../js/ui/statusMenu.js:110
-#| msgid "System Preferences..."
-msgid "System Settings..."
-msgstr "ਸਿਸਟਮ ਸੈਟਿੰਗ..."
+#: ../js/ui/statusMenu.js:123
+#| msgid "Preferences"
+msgid "System Preferences..."
+msgstr "ਸਿਸਟਮ ਪਸੰਦ..."
-#: ../js/ui/statusMenu.js:117
+#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
msgstr "ਸਕਰੀਨ ਲਾਕ ਕਰੋ"
-#: ../js/ui/statusMenu.js:121
+#: ../js/ui/statusMenu.js:134
msgid "Switch User"
msgstr "ਯੂਜ਼ਰ ਬਦਲੋ"
-#: ../js/ui/statusMenu.js:126
+#: ../js/ui/statusMenu.js:139
msgid "Log Out..."
msgstr "ਲਾਗਆਉਟ..."
-#: ../js/ui/statusMenu.js:130
+#: ../js/ui/statusMenu.js:146
+msgid "Suspend"
+msgstr "ਸਸਪੈਂਡ"
+
+#: ../js/ui/statusMenu.js:150
+msgid "Restart..."
+msgstr "...ਮੁੜ-ਚਾਲੂ"
+
+#: ../js/ui/statusMenu.js:154
msgid "Shut Down..."
msgstr "ਬੰਦ ਕਰੋ..."
+#: ../js/ui/status/accessibility.js:88
+msgid "Screen Reader"
+msgstr "ਸਕਰੀਨ ਰੀਡਰ"
+
+#: ../js/ui/status/accessibility.js:91
+msgid "Screen Keyboard"
+msgstr "ਸਕਰੀਨ ਕੀਬੋਰਡ"
+
+#: ../js/ui/status/accessibility.js:94
+msgid "Visual Alerts"
+msgstr "ਦਿੱਖ ਚੇਤਾਵਨੀ"
+
+#: ../js/ui/status/accessibility.js:97
+msgid "Sticky Keys"
+msgstr "ਸਟਿੱਕੀ ਸਵਿੱਚਾਂ"
+
+#: ../js/ui/status/accessibility.js:100
+msgid "Slow Keys"
+msgstr "ਹੌਲੀ ਸਵਿੱਚਾਂ"
+
+#: ../js/ui/status/accessibility.js:103
+msgid "Bounce Keys"
+msgstr "ਬਾਊਂਸ ਸਵਿੱਚਾਂ"
+
+#: ../js/ui/status/accessibility.js:106
+msgid "Mouse Keys"
+msgstr "ਮਾਊਸ ਸਵਿੱਚਾਂ"
+
+#: ../js/ui/status/accessibility.js:110
+msgid "Universal Access Settings"
+msgstr "ਯੂਨੀਵਰਸਲ ਅਸੈੱਸ ਸੈਟਿੰਗ"
+
+#: ../js/ui/status/accessibility.js:163
+msgid "High Contrast"
+msgstr "ਵੱਧ ਕਨਟਰਾਸਟ"
+
+#: ../js/ui/status/accessibility.js:202
+msgid "Large Text"
+msgstr "ਵੱਡੇ ਅੱਖਰ"
+
+#: ../js/ui/status/accessibility.js:223
+msgid "Zoom"
+msgstr "ਜ਼ੂਮ"
+
#: ../js/ui/windowAttentionHandler.js:43
#, c-format
msgid "%s has finished starting"
@@ -447,40 +627,63 @@ msgstr "%s ਸ਼ੁਰੂ ਹੋਣਾ ਖਤਮ ਹੋਇਆ"
msgid "'%s' is ready"
msgstr "'%s' ਤਿਆਰ ਹੈ"
-#: ../js/ui/workspacesView.js:230
+#: ../js/ui/workspacesView.js:229
msgid "Can't add a new workspace because maximum workspaces limit has been reached."
msgstr "ਨਵਾਂ ਵਰਕਸਪੇਸ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ, ਕਿਉਂਕਿ ਵਰਕਸਪੇਸਾਂ ਦੀ ਵੱਧੋ-ਵੱਧ ਗਿਣਤੀ ਪੂਰੀ ਹੋ ਚੁੱਕੀ ਹੈ।"
-#: ../js/ui/workspacesView.js:247
+#: ../js/ui/workspacesView.js:246
msgid "Can't remove the first workspace."
msgstr "ਪਹਿਲਾਂ ਵਰਕਸਪੇਸ ਨਹੀਂ ਹਟਾਇਆ ਜਾ ਸਕਦਾ।"
-#: ../src/shell-global.c:1196
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] "%u ਆਉਟਪੁੱਟ"
+msgstr[1] "%u ਆਉਟਪੁੱਟ"
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] "%u ਇੰਪੁੱਟ"
+msgstr[1] "%u ਇੰਪੁੱਟ"
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+#| msgid "System Settings..."
+msgid "System Sounds"
+msgstr "ਸਿਸਟਮ ਸਾਊਂਡ"
+
+#: ../src/shell-global.c:1204
msgid "Less than a minute ago"
msgstr "ਇੱਕ ਮਿੰਟ ਤੋਂ ਘੱਟ ਚਿਰ ਪਹਿਲਾਂ"
-#: ../src/shell-global.c:1200
+#: ../src/shell-global.c:1208
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%d ਮਿੰਟ ਪਹਿਲਾਂ"
msgstr[1] "%d ਮਿੰਟ ਪਹਿਲਾਂ"
-#: ../src/shell-global.c:1205
+#: ../src/shell-global.c:1213
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d ਘੰਟਾ ਪਹਿਲਾਂ"
msgstr[1] "%d ਘੰਟੇ ਪਹਿਲਾਂ"
-#: ../src/shell-global.c:1210
+#: ../src/shell-global.c:1218
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
msgstr[0] "%d ਦਿਨ ਪਹਿਲਾਂ"
msgstr[1] "%d ਦਿਨ ਪਹਿਲਾਂ"
-#: ../src/shell-global.c:1215
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
@@ -511,6 +714,9 @@ msgstr "ਖੋਜ"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
+#~ msgid "Account Information..."
+#~ msgstr "ਅਕਾਊਂਟ ਜਾਣਕਾਰੀ..."
+
#~ msgid "Sidebar"
#~ msgstr "ਬਾਹੀ"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index a3849b703..e2eb91636 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -4,14 +4,16 @@
# Og Maciel , 2009.
# Rodrigo Flores , 2009.
# Felipe Borges , 2010.
+# Henrique P. Machado , 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-04-17 14:02-0300\n"
-"PO-Revision-Date: 2010-03-02 20:59-0300\n"
-"Last-Translator: Rodrigo Flores \n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
+"shell&component=general\n"
+"POT-Creation-Date: 2010-10-30 17:51+0000\n"
+"PO-Revision-Date: 2010-09-02 17:36-0300\n"
+"Last-Translator: Henrique P. Machado \n"
"Language-Team: Brazilian Portuguese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -26,32 +28,386 @@ msgstr "GNOME Shell"
msgid "Window management and application launching"
msgstr "Gerenciamento de janelas e lançador de aplicativos"
+#: ../data/gnome-shell-clock-preferences.desktop.in.in.h:1
+msgid "Clock"
+msgstr "Relógio"
+
+#: ../data/gnome-shell-clock-preferences.desktop.in.in.h:2
+msgid "Customize the panel clock"
+msgstr "Personalizar o relógio do painel"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:1
+msgid ""
+"Allows access to internal debugging and monitoring tools using the Alt-F2 "
+"dialog."
+msgstr ""
+"Permite acesso a ferramentas internas de depuração e monitoramento usando o "
+"diálogo Alt-F2."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:2
+msgid "Custom format of the clock"
+msgstr "Padrão personalizado do relógio"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:3
+msgid "Enable internal tools useful for developers and testers from Alt-F2"
+msgstr ""
+"Habilitar ferramentas internas úteis para desenvolvedores e testadores a "
+"partir do Alt-F2"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:4
+msgid "File extension used for storing the screencast"
+msgstr "Extensão de arquivo usada para armazenagem do screencast"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:5
+msgid "Framerate used for recording screencasts."
+msgstr "Taxa de quadros usada para gravar screencasts."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:6
+msgid ""
+"GNOME Shell extensions have a uuid property; this key lists extensions which "
+"should not be loaded."
+msgstr ""
+"As extensões do GNOME Shell tem uma propriedade uuid; esta chave lista as "
+"extensões que não devem ser carregadas."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:7
+msgid "History for command (Alt-F2) dialog"
+msgstr "Histórico do diálogo comandos (Alt-F2)"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:8
+msgid "Hour format"
+msgstr "Formato de horas"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:9
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display date in the "
+"clock, in addition to time."
+msgstr ""
+"Se verdadeiro e o formato é \"12-horas\" ou \"24-horas\", mostra a data no "
+"relógio, junto com o horário."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:10
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display seconds in "
+"time."
+msgstr ""
+"Se verdadeiro e o formato é \"12-horas\" ou \"24-horas\", mostra os segundos "
+"junto com o horário."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:11
+msgid "If true, display the ISO week date in the calendar."
+msgstr "Se verdadeiro, exibe o número da semana no calendário."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:12
+msgid "List of desktop file IDs for favorite applications"
+msgstr ""
+"Lista dos IDs de arquivo de área de trabalho para os aplicativos favoritos"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:13
+msgid "Overview workspace view mode"
+msgstr "Resumo do modo de visão de áreas de trabalho"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:14
+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 ! theoraenc ! oggmux' and records to Ogg Theora."
+msgstr ""
+"Configura a fila de processamento usada para codificar gravações. Ela segue "
+"a a sintaxe usada para gst-launch. A fila de processamento deve ter um sink "
+"pad onde o vídeo gravado é retido. Ele normalmente terá um source pad "
+"desconectado; saídas deste pad serão gravadas no arquivo de saída. Porém, a "
+"fila de processamento pode também tomar conta de sua própria saída - isto "
+"poderia ser usado para enviar a saída para um servidor icecast via "
+"shout2send oiu similar. Quando não definido ou definido para um valor vazio, "
+"o fluxo de processamento padrão será usado. Atualmente é 'videorate ! "
+"theoraenc ! oggmux' e gravação no formato Ogg Theora."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:15
+msgid "Show date in clock"
+msgstr "Mostrar data no relógio"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:16
+msgid "Show the week date in the calendar"
+msgstr "Mostrar o número da semana no calendário"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:17
+msgid "Show time with seconds"
+msgstr "Mostrar horário com segundos"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:18
+msgid ""
+"The applications corresponding to these identifiers will be displayed in the "
+"favorites area."
+msgstr ""
+"Os aplicativos correspondentes a estes identificadores serão exibidos na "
+"área de favoritos."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:19
+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 ""
+"O nome de arquivo para screencasts gravados será um nome de arquivo único "
+"baseado na data atual e usará esta extensão. Ele deve ser alterado ao gravar "
+"para um contêiner de formato diferente."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:20
+msgid ""
+"The framerate of the resulting screencast recordered by GNOME Shell's "
+"screencast recorder in frames-per-second."
+msgstr ""
+"A taxa de quadros do screencast resultante gravado pelo gravador de "
+"screencastsdo GNOME Shell em quadros por segundo."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:21
+msgid "The gstreamer pipeline used to encode the screencast"
+msgstr "A fila de processamento gstreamer usada para codificar o screencast"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:22
+msgid ""
+"The selected workspace view mode in the overview. Supported values are "
+"\"single\" and \"grid\"."
+msgstr ""
+"O o modo de visão do espaço de trabalho na visão geral. Valores aceitos são: "
+"\"single\" e \"grid\"."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:23
+msgid ""
+"The shell normally monitors active applications in order to present the most "
+"used ones (e.g. in launchers). While this data will be kept private, you may "
+"want to disable this for privacy reasons. Please note that doing so won't "
+"remove already saved data."
+msgstr ""
+"O shell normalmente monitora os aplicativos em execução para apresentar os "
+"mais usados (ex: em lançadores). Embora estes dados serão mantidos em em "
+"segurança, você pode querer desabilitá-los por razões de privacidade. Por "
+"favor, note que que ao fazer isso não removerá os dado já salvos."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:24
+msgid ""
+"This key specifies the format used by the panel clock when the format key is "
+"set to \"custom\". You can use conversion specifiers understood by strftime"
+"() to obtain a specific format. See the strftime() manual for more "
+"information."
+msgstr ""
+"Esta chave especifica o formato usado pelo relógio do painel quando a chave "
+"de formato é atribuída como \"personalizado\". Você pode usar "
+"especificadores de conversão entendidos pela função strftime() para obter um "
+"formato específico. Veja o manual da strftime() para maiores informações."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:25
+msgid ""
+"This key specifies the hour format used by the panel clock. Possible values "
+"are \"12-hour\", \"24-hour\", \"unix\" and \"custom\". If set to \"unix\", "
+"the clock will display time in seconds since Epoch, i.e. 1970-01-01. If set "
+"to \"custom\", the clock will display time according to the format specified "
+"in the custom_format key. Note that if set to either \"unix\" or \"custom\", "
+"the show_date and show_seconds keys are ignored."
+msgstr ""
+"Esta chave especifica o formato de horas utilizado pelo relógio do painel. "
+"Valores possíveis são \"12-hour\", \"24-hour\", \"unix\" e \"custom\". Se "
+"definida como \"unix\", o relógio irá exibir as horas em segundos desde seu "
+"lançamento, por exemplo 01/01/1970. Se definida como \"custom\", o relógio "
+"irá exibir as horas de acordo com o formato especificado na chave "
+"custom_format. Note que se definida tanto como \"unix\" ou \"custom\", as "
+"chaves show_date e show_seconds serão igoradas."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:26
+msgid "Uuids of extensions to disable"
+msgstr "Uuids das extensões a desabilitar"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:27
+msgid "Whether to collect stats about applications usage"
+msgstr "Quando coletar dados sobre uso de aplicativos"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
+msgid "Clip the crosshairs at the center"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
+msgid "Color of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
+msgid ""
+"Determines the length of the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
+msgid ""
+"Determines the position of the magnified mouse image within the magnified "
+"view and how it reacts to system mouse movement. The values are - none: no "
+"mouse tracking; - centered: the mouse image is displayed at the center of "
+"the zoom region (which also represents the point under the system mouse) and "
+"the magnified contents are scrolled as the system mouse moves; - "
+"proportional: the position of the magnified mouse in the zoom region is "
+"proportionally the same as the position of the system mouse on screen; - "
+"push: when the magnified mouse intersects a boundary of the zoom region, the "
+"contents are scrolled into view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
+msgid ""
+"Determines the transparency of the crosshairs, from fully opaque to fully "
+"transparent."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
+msgid ""
+"Determines whether the crosshairs intersect the magnified mouse sprite, or "
+"are clipped such that the ends of the horizontal and vertical lines surround "
+"the mouse image."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
+#, fuzzy
+#| msgid "Enabled"
+msgid "Enable lens mode"
+msgstr "Habilitado"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
+msgid ""
+"Enables/disables display of crosshairs centered on the magnified mouse "
+"sprite."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
+msgid ""
+"For centered mouse tracking, when the system pointer is at or near the edge "
+"of the screen, the magnified contents continue to scroll such that the "
+"screen edge moves into the magnified view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
+msgid "Length of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
+msgid "Magnification factor"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
+msgid "Mouse Tracking Mode"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
+msgid "Opacity of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
+msgid "Screen position"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
+msgid "Scroll magnified contents beyond the edges of the desktop"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
+msgid "Show or hide crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
+msgid "Show or hide the magnifier"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
+msgid "Show or hide the magnifier and all of its zoom regions."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
+msgid ""
+"The color of the the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
+msgid ""
+"The magnified view either fills the entire screen, or occupies the top-half, "
+"bottom-half, left-half, or right-half of the screen."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
+msgid ""
+"The power of the magnification. A value of 1.0 means no magnification. A "
+"value of 2.0 doubles the size."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
+msgid "Thickness of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
+msgid ""
+"Whether the magnified view should be centered over the location of the "
+"system mouse and move with it."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
+msgid "Width of the vertical and horizontal lines that make up the crosshairs."
+msgstr ""
+
+#: ../data/clock-preferences.ui.h:1
+msgid "Clock Format"
+msgstr "Formato do relógio"
+
+#: ../data/clock-preferences.ui.h:2
+msgid "Clock Preferences"
+msgstr "Preferências do Relógio"
+
+#: ../data/clock-preferences.ui.h:3
+msgid "Panel Display"
+msgstr "Mostrador do painel"
+
+#: ../data/clock-preferences.ui.h:4
+msgid "Show seco_nds"
+msgstr "Mostrar segundos"
+
+#: ../data/clock-preferences.ui.h:5
+msgid "Show the _date"
+msgstr "Mostrar a _data"
+
+#: ../data/clock-preferences.ui.h:6
+msgid "_12 hour format"
+msgstr "Formato de _12 horas"
+
+#: ../data/clock-preferences.ui.h:7
+msgid "_24 hour format"
+msgstr "Formato de _24 horas"
+
#. **** Applications ****
-#: ../js/ui/appDisplay.js:306 ../js/ui/dash.js:850
+#: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
msgid "APPLICATIONS"
msgstr "APLICATIVOS"
-#: ../js/ui/appDisplay.js:338
+#: ../js/ui/appDisplay.js:348
msgid "PREFERENCES"
msgstr "PREFERÊNCIAS"
-#: ../js/ui/appDisplay.js:697
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "Nova janela"
-#: ../js/ui/appDisplay.js:701
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "Remover dos Favoritos"
-#: ../js/ui/appDisplay.js:702
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "Adicionar aos Favoritos"
-#: ../js/ui/appDisplay.js:1029
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "Arraste até aqui para adicionar aos favoritos"
-#: ../js/ui/appFavorites.js:89
+#: ../js/ui/appFavorites.js:88
#, c-format
msgid "%s has been added to your favorites."
msgstr "%s foi adicionado aos seus favoritos."
@@ -61,177 +417,314 @@ msgstr "%s foi adicionado aos seus favoritos."
msgid "%s has been removed from your favorites."
msgstr "%s foi removido dos seus favoritos."
-#: ../js/ui/dash.js:189
+#: ../js/ui/dash.js:142
msgid "Find"
msgstr "Localizar"
-#: ../js/ui/dash.js:505
+#: ../js/ui/dash.js:473
msgid "Searching..."
msgstr "Pesquisando..."
-#: ../js/ui/dash.js:519
+#: ../js/ui/dash.js:487
msgid "No matching results."
msgstr "Nenhum resultado encontrado."
#. **** Places ****
#. Translators: This is in the sense of locations for documents,
#. network locations, etc.
-#: ../js/ui/dash.js:869 ../js/ui/placeDisplay.js:543
+#: ../js/ui/dash.js:797 ../js/ui/placeDisplay.js:554
msgid "PLACES & DEVICES"
msgstr "LOCAIS & DISPOSITIVOS"
#. **** Documents ****
-#: ../js/ui/dash.js:876 ../js/ui/docDisplay.js:489
+#: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT ITEMS"
msgstr "DOCUMENTOS RECENTES"
-#: ../js/ui/lookingGlass.js:362
+#: ../js/ui/lookingGlass.js:552
msgid "No extensions installed"
msgstr "Nenhuma extensão instalada"
-#: ../js/ui/lookingGlass.js:399
+#: ../js/ui/lookingGlass.js:589
msgid "Enabled"
msgstr "Habilitado"
-#: ../js/ui/lookingGlass.js:401
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Disabled"
msgstr "Desabilitado"
-#: ../js/ui/lookingGlass.js:403
+#: ../js/ui/lookingGlass.js:593
msgid "Error"
msgstr "Erro"
-#: ../js/ui/lookingGlass.js:405
+#: ../js/ui/lookingGlass.js:595
msgid "Out of date"
msgstr "Expirado"
-#: ../js/ui/lookingGlass.js:430
+#: ../js/ui/lookingGlass.js:620
msgid "View Source"
msgstr "Ver fonte"
-#: ../js/ui/lookingGlass.js:436
+#: ../js/ui/lookingGlass.js:626
msgid "Web Page"
msgstr "Página Web"
-#: ../js/ui/overview.js:181
+#: ../js/ui/overview.js:160
msgid "Undo"
msgstr "Desfazer"
-#. Button on the left side of the panel.
-#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
-#: ../js/ui/panel.js:346
-msgid "Activities"
-msgstr "Atividades"
+#. TODO - _quit() doesn't really work on apps in state STARTING yet
+#: ../js/ui/panel.js:469
+#, c-format
+msgid "Quit %s"
+msgstr "Sair de %s"
-#. Translators: This is the time format used in 24-hour mode.
-#: ../js/ui/panel.js:566
+#: ../js/ui/panel.js:494
+msgid "Preferences"
+msgstr "Preferências"
+
+#. Translators: This is the time format with date used
+#. in 24-hour mode.
+#: ../js/ui/panel.js:580
+msgid "%a %b %e, %R:%S"
+msgstr "%a %b %e, %R:%S"
+
+#: ../js/ui/panel.js:581
+msgid "%a %b %e, %R"
+msgstr "%a %b %e, %R"
+
+#. Translators: This is the time format without date used
+#. in 24-hour mode.
+#: ../js/ui/panel.js:585
+msgid "%a %R:%S"
+msgstr "%a %R:%S"
+
+#: ../js/ui/panel.js:586
msgid "%a %R"
msgstr "%a %R"
-#. Translators: This is a time format used for AM/PM.
-#: ../js/ui/panel.js:569
-msgid "%a %l:%M %p"
-msgstr "%a %l:%M %p"
+#. Translators: This is a time format with date used
+#. for AM/PM.
+#: ../js/ui/panel.js:593
+msgid "%a %b %e, %l:%M:%S %p"
+msgstr "%a %e de %b, %H:%M:%S"
-#: ../js/ui/placeDisplay.js:108
+#: ../js/ui/panel.js:594
+msgid "%a %b %e, %l:%M %p"
+msgstr "%a %e de %b, %H:%M"
+
+#. Translators: This is a time format without date used
+#. for AM/PM.
+#: ../js/ui/panel.js:598
+msgid "%a %l:%M:%S %p"
+msgstr "%a %H:%M:%S"
+
+#: ../js/ui/panel.js:599
+msgid "%a %l:%M %p"
+msgstr "%a %H:%M"
+
+#. Button on the left side of the panel.
+#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
+#: ../js/ui/panel.js:744
+msgid "Activities"
+msgstr "Atividades"
+
+#: ../js/ui/placeDisplay.js:111
#, c-format
msgid "Failed to unmount '%s'"
msgstr "Erro ao desmontar \"%s\""
-#: ../js/ui/placeDisplay.js:111
+#: ../js/ui/placeDisplay.js:114
msgid "Retry"
msgstr "Tentar novamente"
-#: ../js/ui/placeDisplay.js:156
+#: ../js/ui/placeDisplay.js:159
msgid "Connect to..."
msgstr "Conectar ao..."
-#: ../js/ui/runDialog.js:231
+#. Translators: this MUST be either "toggle-switch-us"
+#. (for toggle switches containing the English words
+#. "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:33
+msgid "toggle-switch-us"
+msgstr ""
+
+#: ../js/ui/runDialog.js:233
msgid "Please enter a command:"
msgstr "Por favor digite um comando:"
-#: ../js/ui/runDialog.js:375
+#: ../js/ui/runDialog.js:378
#, c-format
msgid "Execution of '%s' failed:"
msgstr "A execução de \"%s\" falhou:"
-#: ../js/ui/statusMenu.js:105
+#: ../js/ui/statusMenu.js:101
msgid "Available"
msgstr "Disponível"
-#: ../js/ui/statusMenu.js:110
+#: ../js/ui/statusMenu.js:106
msgid "Busy"
msgstr "Ocupado"
-#: ../js/ui/statusMenu.js:115
+#: ../js/ui/statusMenu.js:111
msgid "Invisible"
msgstr "Invisível"
-#: ../js/ui/statusMenu.js:124
-msgid "Account Information..."
-msgstr "Informação da conta..."
+#: ../js/ui/statusMenu.js:119
+msgid "My Account..."
+msgstr ""
-#: ../js/ui/statusMenu.js:129
-msgid "System Preferences..."
-msgstr "Preferências do sistema..."
+#: ../js/ui/statusMenu.js:123
+#| msgid "System Preferences..."
+msgid "System Settings..."
+msgstr "Configurações do sistema..."
-#: ../js/ui/statusMenu.js:138
+#: ../js/ui/statusMenu.js:130
msgid "Lock Screen"
msgstr "Travar a tela"
-#: ../js/ui/statusMenu.js:143
+#: ../js/ui/statusMenu.js:134
msgid "Switch User"
msgstr "Alternar usuário"
-#: ../js/ui/statusMenu.js:149
+#: ../js/ui/statusMenu.js:139
msgid "Log Out..."
msgstr "Encerrar sessão..."
+#: ../js/ui/statusMenu.js:146
+msgid "Suspend"
+msgstr ""
+
+#: ../js/ui/statusMenu.js:150
+msgid "Restart..."
+msgstr ""
+
#: ../js/ui/statusMenu.js:154
msgid "Shut Down..."
msgstr "Desligar..."
-#: ../js/ui/windowAttentionHandler.js:47
+#: ../js/ui/status/accessibility.js:88
+msgid "Screen Reader"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:91
+msgid "Screen Keyboard"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:94
+msgid "Visual Alerts"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:97
+msgid "Sticky Keys"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:100
+msgid "Slow Keys"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:103
+msgid "Bounce Keys"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:106
+msgid "Mouse Keys"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:110
+msgid "Universal Access Settings"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:163
+msgid "High Contrast"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:202
+msgid "Large Text"
+msgstr ""
+
+#: ../js/ui/status/accessibility.js:223
+msgid "Zoom"
+msgstr ""
+
+#: ../js/ui/windowAttentionHandler.js:43
#, c-format
msgid "%s has finished starting"
msgstr "%s terminou sua inicialização"
-#: ../js/ui/windowAttentionHandler.js:49
+#: ../js/ui/windowAttentionHandler.js:45
#, c-format
msgid "'%s' is ready"
msgstr "\"%s\" está pronto"
-#: ../src/shell-global.c:967
-msgid "Less than a minute ago"
-msgstr "Menos de um minuto atrás"
+#: ../js/ui/workspacesView.js:229
+msgid ""
+"Can't add a new workspace because maximum workspaces limit has been reached."
+msgstr ""
+"Não é possível adicionar um novo espaço de trabalho porque foi atingido o "
+"limite."
-#: ../src/shell-global.c:971
+#: ../js/ui/workspacesView.js:246
+msgid "Can't remove the first workspace."
+msgstr "Não é possível remover o primeiro espaço de trabalho."
+
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] ""
+msgstr[1] ""
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr ""
+
+#: ../src/shell-global.c:1219
+msgid "Less than a minute ago"
+msgstr "Há menos de um minuto"
+
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
-msgstr[0] "%d minuto atrás"
-msgstr[1] "%d minutos atrás"
+msgstr[0] "Há %d minuto"
+msgstr[1] "Há %d minutos"
-#: ../src/shell-global.c:976
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
-msgstr[0] "%d hora atrás"
-msgstr[1] "%d horas atrás"
+msgstr[0] "Há %d hora"
+msgstr[1] "Há %d horas"
-#: ../src/shell-global.c:981
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
-msgstr[0] "%d dia atrás"
-msgstr[1] "%d dias atrás"
+msgstr[0] "Há %d dia"
+msgstr[1] "Há %d dias"
-#: ../src/shell-global.c:986
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
-msgstr[0] "%d semana atrás"
-msgstr[1] "%d semanas atrás"
+msgstr[0] "Há %d semana"
+msgstr[1] "Há %d semanas"
#: ../src/shell-uri-util.c:89
msgid "Home Folder"
@@ -257,6 +750,15 @@ msgstr "Pesquisar"
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
+#~ msgid "ON"
+#~ msgstr "⚪"
+
+#~ msgid "OFF"
+#~ msgstr "⚫"
+
+#~ msgid "Account Information..."
+#~ msgstr "Informação da conta..."
+
#~ msgid "Sidebar"
#~ msgstr "Barra lateral"
diff --git a/po/ro.po b/po/ro.po
index 79e7c307f..d9f88d600 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,20 +1,23 @@
# Romanian translation for gnome-shell.
-# Copyright (C) 2009 gnome-shell's COPYRIGHT HOLDER
# This file is distributed under the same license as the gnome-shell package.
-# Lucian Adrian Grijincu , 2009.
+# Lucian Adrian Grijincu , 2009, 2010.
+# Daniel Șerbănescu , 2010.
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-10-28 22:25+0200\n"
-"PO-Revision-Date: 2009-10-28 22:33+0200\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
+"shell&component=general\n"
+"POT-Creation-Date: 2010-11-15 13:50+0000\n"
+"PO-Revision-Date: 2010-11-15 22:34+0300\n"
"Last-Translator: Lucian Adrian Grijincu \n"
-"Language-Team: Romanian \n"
+"Language-Team: Romanian Gnome Team \n"
+"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2);;\n"
+"X-Generator: Virtaal 0.6.1\n"
#: ../data/gnome-shell.desktop.in.in.h:1
msgid "GNOME Shell"
@@ -24,199 +27,737 @@ msgstr "GNOME Shell"
msgid "Window management and application launching"
msgstr "Administrare de ferestre și lansare de aplicații"
-#: ../js/ui/appDisplay.js:332
-msgid "Frequent"
-msgstr "Frecvent"
+#: ../data/gnome-shell-clock-preferences.desktop.in.in.h:1
+msgid "Clock"
+msgstr "Ceas"
-#: ../js/ui/appDisplay.js:867
-msgid "Drag here to add favorites"
-msgstr "Adăugați aici favorite cu mausul"
+#: ../data/gnome-shell-clock-preferences.desktop.in.in.h:2
+msgid "Customize the panel clock"
+msgstr "Personalizați ceasul din panou"
-#: ../js/ui/appIcon.js:426
+#: ../data/org.gnome.shell.gschema.xml.in.h:1
+msgid ""
+"Allows access to internal debugging and monitoring tools using the Alt-F2 "
+"dialog."
+msgstr ""
+"Permite accesul la informațiile interne utilitarelor de depanare și "
+"monitorizare folosind dialogul Alt-F2."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:2
+msgid "Custom format of the clock"
+msgstr "Format personalizat pentru ceas"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:3
+msgid "Enable internal tools useful for developers and testers from Alt-F2"
+msgstr "Activează utilitarele interne pentru dezvoltatori și testeri din Alt-F2"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:4
+msgid "File extension used for storing the screencast"
+msgstr "Extensia de fișier utilizată pentru stocarea înregistrărilor de ecran"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:5
+msgid "Framerate used for recording screencasts."
+msgstr "Frecvența de cadre utilizată pentru înregistrările de ecran."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:6
+msgid ""
+"GNOME Shell extensions have a uuid property; this key lists extensions which "
+"should not be loaded."
+msgstr ""
+"Extensiile GNOME Shell au o proprietate uuid; această cheie listează "
+"extensiile care nu ar trebui încărcate."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:7
+msgid "History for command (Alt-F2) dialog"
+msgstr "Istoricul dialogului de comenzi (Alt-F2)"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:8
+msgid "Hour format"
+msgstr "Format oră"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:9
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display date in the "
+"clock, in addition to time."
+msgstr ""
+"Dacă este adevărat, și formatul este fie „12-hour” fie „24-hour”, pe lângă "
+"oră, în ceas se afișează și data."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:10
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display seconds in "
+"time."
+msgstr ""
+"Dacă este adevărat, și formatul este fie „12-hour” fie „24-hour”, pe lângă "
+"oră, în ceas se afișează și secundele."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:11
+msgid "If true, display the ISO week date in the calendar."
+msgstr "Dacă este adevărat, se afișează săptămâna ISO în calendar."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:12
+msgid "List of desktop file IDs for favorite applications"
+msgstr "Listă de identificatori de fișiere desktop pentru aplicațiile favorite"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:13
+msgid "Overview workspace view mode"
+msgstr "Modul de vizualizare a spațiilor de lucru în prezentarea generală"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:14
+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 ! theoraenc ! oggmux' and records to Ogg Theora."
+msgstr ""
+"Definește linia de asamblare GStreamer utilizată pentru a codifica "
+"înregistrările. Folosiți aceeași sintaxă ca la gst-launch. Linia de "
+"asamblare ar trebui să aibă o intrare neconectată unde va fi înregistrat "
+"ecranul. În mod normal va avea o intrare neconectată și o ieșire care va fi "
+"scrisă în fișierul de ieșire. Cu toate acestea, linia de asamblare poate să "
+"aibă grijă de ieșirea proprie - aceasta ar putea fi utilizată pentru a "
+"trimite ieșirea la un server icecast, shout2send sau un alt server similar. "
+"Când este dezactivată, sau are o valoare vidă, se utilizează linia de "
+"asamblare implicită. Aceasta este acum definită ca „videorate ! theoraenc ! "
+"oggmux” și înregistrează în formatul Ogg Theora."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:15
+msgid "Show date in clock"
+msgstr "Afișează data în ceas"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:16
+msgid "Show the week date in the calendar"
+msgstr "Afișează săptămâna în calendar"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:17
+msgid "Show time with seconds"
+msgstr "Afișează timpul cu secunde "
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:18
+msgid ""
+"The applications corresponding to these identifiers will be displayed in the "
+"favorites area."
+msgstr ""
+"Aplicațiile corespunzătoare acestor identificatori vor fi afișate în zona "
+"favoritelor."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:19
+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 ""
+"Numele de fișier ale înregistrărilor de ecran vor fi unice, bazate pe data "
+"curentă și vor folosi această extensie. Ar trebui să fie modificată când se "
+"înregistrează într-un format de container diferit."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:20
+msgid ""
+"The framerate of the resulting screencast recordered by GNOME Shell's "
+"screencast recorder in frames-per-second."
+msgstr ""
+"Frecvența de cadre a înregistrărilor de ecran efectuare de Înregistratorul "
+"de ecran al GNOME Shell, în cadre pe secundă."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:21
+msgid "The gstreamer pipeline used to encode the screencast"
+msgstr ""
+"Linia de asamblare gstreamer folosită pentru a codifica înregistrarea de "
+"ecran"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:22
+msgid ""
+"The selected workspace view mode in the overview. Supported values are "
+"\"single\" and \"grid\"."
+msgstr ""
+"Modul de vizualizare a spațiilor de lucru în prezentarea generală. Valorile "
+"suportate sunt „single” și „grid”."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:23
+msgid ""
+"The shell normally monitors active applications in order to present the most "
+"used ones (e.g. in launchers). While this data will be kept private, you may "
+"want to disable this for privacy reasons. Please note that doing so won't "
+"remove already saved data."
+msgstr ""
+"În mod normal, shell-ul monitorizează aplicațiile active pentru a le "
+"prezenta pe cele mai utilizate (de ex. în lansatoare de aplicații). Deși "
+"aceste date vor fi păstrate în mod privat, s-ar putea să doriți să "
+"dezactivați această funcționalitate din motive de intimitate. Dezactivarea "
+"nu va șterge datele deja salvate."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:24
+msgid ""
+"This key specifies the format used by the panel clock when the format key is "
+"set to \"custom\". You can use conversion specifiers understood by strftime"
+"() to obtain a specific format. See the strftime() manual for more "
+"information."
+msgstr ""
+"Această cheie specifică formatul utilizat în ceasul de panou când cheia de "
+"format are valoarea „custom”. Puteți utiliza specificatorii de conversie "
+"specifici strftime() pentru a obține un anumit format. Consultați manualul "
+"strftime() pentru mai multe informații."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:25
+msgid ""
+"This key specifies the hour format used by the panel clock. Possible values "
+"are \"12-hour\", \"24-hour\", \"unix\" and \"custom\". If set to \"unix\", "
+"the clock will display time in seconds since Epoch, i.e. 1970-01-01. If set "
+"to \"custom\", the clock will display time according to the format specified "
+"in the custom_format key. Note that if set to either \"unix\" or \"custom\", "
+"the show_date and show_seconds keys are ignored."
+msgstr ""
+"Această cheie specifică formatul orei afișate de ceasul din panou. Valorile "
+"posibile sunt „12-hour”, „24-hour”, „unix” și „custom”. Dacă valoarea este "
+"„unix”, ceasul va afișa timpul în secunde de la începutul Epocii Unix (1 "
+"ianuarie 1970). Dacă valoarea este „custom”, ceasul va afișa timpul conform "
+"formatului din cheia custom_format. Dacă valoarea este fie „unix” fie "
+"„custom” se ignoră valoarea cheilor show_date și show_seconds."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:26
+msgid "Uuids of extensions to disable"
+msgstr "Uuid-urile extensiilor de dezactivat"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:27
+msgid "Whether to collect stats about applications usage"
+msgstr "Dacă să se colecteze statistici despre utilizarea aplicațiilor"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
+msgid "Clip the crosshairs at the center"
+msgstr "Prinde reticulele în centru"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
+msgid "Color of the crosshairs"
+msgstr "Culoarea reticulelor"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
+msgid ""
+"Determines the length of the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+"Determină lungimea liniilor verticale și orizontale care alcătuiesc "
+"reticulele."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
+msgid ""
+"Determines the position of the magnified mouse image within the magnified "
+"view and how it reacts to system mouse movement. The values are - none: no "
+"mouse tracking; - centered: the mouse image is displayed at the center of "
+"the zoom region (which also represents the point under the system mouse) and "
+"the magnified contents are scrolled as the system mouse moves; - "
+"proportional: the position of the magnified mouse in the zoom region is "
+"proportionally the same as the position of the system mouse on screen; - "
+"push: when the magnified mouse intersects a boundary of the zoom region, the "
+"contents are scrolled into view."
+msgstr ""
+"Determină poziția imaginii mărite a mausului în vizualizarea mărită și cum "
+"reacționează la mișcarea mausului a sistemului. Valorile sunt - none: nu se "
+"urmărește mausul; - centered: imaginea mausului este afișată în centrul "
+"regiunii zoom (care reprezintă de asemenea punctul de sub mausul sistemului) "
+"și proportional: poziția mausului mărit în regiunea zoom este proporțională "
+"la fel ca poziția mausului sistemului de pe ecran; - push: când mausul "
+"mărit intersectează o graniță a regiunii zoom, conținutul acesteia este "
+"derulat în câmpul vizibil."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
+msgid ""
+"Determines the transparency of the crosshairs, from fully opaque to fully "
+"transparent."
+msgstr ""
+"Determină transparența reticulelor, de la complet opac la deplin "
+"transparente."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
+msgid ""
+"Determines whether the crosshairs intersect the magnified mouse sprite, or "
+"are clipped such that the ends of the horizontal and vertical lines surround "
+"the mouse image."
+msgstr ""
+"Determină dacă reticulele intersectează umbra mausului mărit, sau sunt "
+"prinse astfel încât capetele liniilor orizontale și verticale înconjoară "
+"imaginea mausului."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
+msgid "Enable lens mode"
+msgstr "Activează modul cu lupă"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
+msgid ""
+"Enables/disables display of crosshairs centered on the magnified mouse "
+"sprite."
+msgstr ""
+"Activează/dezactivează afișarea reticulelor centrate pe umbra mausului "
+"mărit."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
+msgid ""
+"For centered mouse tracking, when the system pointer is at or near the edge "
+"of the screen, the magnified contents continue to scroll such that the "
+"screen edge moves into the magnified view."
+msgstr ""
+"Pentru urmărirea centrată a mausului, când indicatorul sistemului este pe "
+"sau lângă marginea ecranului, conținutul mărit continuă să se deruleze "
+"astfel încât marginile ecranului se mută în modul mărit."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
+msgid "Length of the crosshairs"
+msgstr "Lungimea reticulelor"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
+msgid "Magnification factor"
+msgstr "Factorul de mărire"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
+msgid "Mouse Tracking Mode"
+msgstr "Mod urmărire maus"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
+msgid "Opacity of the crosshairs"
+msgstr "Opacitatea reticulelor"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
+msgid "Screen position"
+msgstr "Poziția ecranului"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
+msgid "Scroll magnified contents beyond the edges of the desktop"
+msgstr "Derulează conținutul mărit în afara marginilor ecranului"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
+msgid "Show or hide crosshairs"
+msgstr "Arată sau ascunde reticulele"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
+msgid "Show or hide the magnifier"
+msgstr "Arată sau ascunde lupa"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
+msgid "Show or hide the magnifier and all of its zoom regions."
+msgstr "Arată sau ascunde lupa și toate regiunile ei de zoom."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
+msgid ""
+"The color of the the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr "Culoarea liniilor verticale și orizontale ce compun reticul."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
+msgid ""
+"The magnified view either fills the entire screen, or occupies the top-half, "
+"bottom-half, left-half, or right-half of the screen."
+msgstr ""
+"Vizualizarea mărită fie se aplică întregului ecran, fie ocupă jumătatea de "
+"sus, jumătatea de jos, jumătatea din stânga, sau jumătatea din dreapta a "
+"ecranului."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
+msgid ""
+"The power of the magnification. A value of 1.0 means no magnification. A "
+"value of 2.0 doubles the size."
+msgstr ""
+"Factor de mărire. Valoarea 1.0 înseamnă afișare fără mărire sau "
+"micșorare. Valoarea 2.0 dublează mărimea."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
+msgid "Thickness of the crosshairs"
+msgstr "Grosimea reticulelor"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
+msgid ""
+"Whether the magnified view should be centered over the location of the "
+"system mouse and move with it."
+msgstr ""
+"Dacă vizualizarea mărită ar trebui centrată asupra locației mausului "
+"sistemului și dacă ar trebui să se miște odată cu el."
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
+msgid "Width of the vertical and horizontal lines that make up the crosshairs."
+msgstr "Lățimea liniilor verticale și orizontale ce compun reticulele."
+
+#: ../data/clock-preferences.ui.h:1
+msgid "Clock Format"
+msgstr "Format ceas"
+
+#: ../data/clock-preferences.ui.h:2
+msgid "Clock Preferences"
+msgstr "Preferințe ceas"
+
+#: ../data/clock-preferences.ui.h:3
+msgid "Panel Display"
+msgstr "Afișaj panou"
+
+#: ../data/clock-preferences.ui.h:4
+msgid "Show seco_nds"
+msgstr "Afișează secu_nde"
+
+#: ../data/clock-preferences.ui.h:5
+msgid "Show the _date"
+msgstr "Afișează _data"
+
+#: ../data/clock-preferences.ui.h:6
+msgid "_12 hour format"
+msgstr "Format cu _12 ore"
+
+#: ../data/clock-preferences.ui.h:7
+msgid "_24 hour format"
+msgstr "Format cu _24 de ore"
+
+#. **** Applications ****
+#: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
+msgid "APPLICATIONS"
+msgstr "APPLICAȚII"
+
+#: ../js/ui/appDisplay.js:348
+msgid "PREFERENCES"
+msgstr "PREFERINȚE"
+
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "Fereastră nouă"
-#: ../js/ui/appIcon.js:430
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
-msgstr "Șterge din favorite"
+msgstr "Elimină de la favorite"
-#: ../js/ui/appIcon.js:431
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "Adaugă la favorite"
-#: ../js/ui/dash.js:283
-msgid "Find..."
-msgstr "Caută..."
+#: ../js/ui/appDisplay.js:829
+msgid "Drag here to add favorites"
+msgstr "Trageți aici pentru a adăuga favorite"
-#: ../js/ui/dash.js:400
-msgid "More"
-msgstr "Mai multe"
+#: ../js/ui/appFavorites.js:88
+#, c-format
+msgid "%s has been added to your favorites."
+msgstr "%s a fost adăugat la favorite."
-#: ../js/ui/dash.js:543
-msgid "(see all)"
-msgstr "(arată tot)"
+#: ../js/ui/appFavorites.js:107
+#, c-format
+msgid "%s has been removed from your favorites."
+msgstr "%s a fost eliminat de la favorite."
-#. **** Applications ****
-#: ../js/ui/dash.js:725 ../js/ui/dash.js:787
-msgid "APPLICATIONS"
-msgstr "APPLICAȚII"
+#: ../js/ui/dash.js:142
+msgid "Find"
+msgstr "Caută"
+
+#: ../js/ui/dash.js:473
+msgid "Searching..."
+msgstr "Se caută..."
+
+#: ../js/ui/dash.js:487
+msgid "No matching results."
+msgstr "Niciun rezultat care să se potrivească."
#. **** Places ****
#. Translators: This is in the sense of locations for documents,
#. network locations, etc.
-#: ../js/ui/dash.js:745
-msgid "PLACES"
-msgstr "LOCAȚII"
+#: ../js/ui/dash.js:797 ../js/ui/placeDisplay.js:558
+msgid "PLACES & DEVICES"
+msgstr "LOCAȚII & DISPOZITIVE"
#. **** Documents ****
-#: ../js/ui/dash.js:752 ../js/ui/dash.js:797
-msgid "RECENT DOCUMENTS"
-msgstr "DOCUMENTE RECENTE"
+#: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
+msgid "RECENT ITEMS"
+msgstr "ELEMENTE RECENTE"
-#. **** Search Results ****
-#: ../js/ui/dash.js:777 ../js/ui/dash.js:961
-msgid "SEARCH RESULTS"
-msgstr "REZULTATELE CĂUTĂRII"
+#: ../js/ui/lookingGlass.js:552
+msgid "No extensions installed"
+msgstr "Nicio extensie instalată"
-#: ../js/ui/dash.js:792
-msgid "PREFERENCES"
-msgstr "PREFERINȚE"
+#: ../js/ui/lookingGlass.js:589
+msgid "Enabled"
+msgstr "Activat"
-#. Button on the left side of the panel.
-#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
-#: ../js/ui/panel.js:274
-msgid "Activities"
-msgstr "Activități"
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
+msgid "Disabled"
+msgstr "Dezactivat"
-#. Translators: This is a time format.
-#: ../js/ui/panel.js:491
+#: ../js/ui/lookingGlass.js:593
+msgid "Error"
+msgstr "Eroare"
+
+#: ../js/ui/lookingGlass.js:595
+msgid "Out of date"
+msgstr "Învechit"
+
+#: ../js/ui/lookingGlass.js:620
+msgid "View Source"
+msgstr "Vezi sursa"
+
+#: ../js/ui/lookingGlass.js:626
+msgid "Web Page"
+msgstr "Pagină web"
+
+#: ../js/ui/overview.js:160
+msgid "Undo"
+msgstr "Anulează"
+
+#. TODO - _quit() doesn't really work on apps in state STARTING yet
+#: ../js/ui/panel.js:469
+#, c-format
+msgid "Quit %s"
+msgstr "Închide %s"
+
+#: ../js/ui/panel.js:494
+msgid "Preferences"
+msgstr "Preferințe"
+
+#. Translators: This is the time format with date used
+#. in 24-hour mode.
+#: ../js/ui/panel.js:580
+msgid "%a %b %e, %R:%S"
+msgstr "%a %e %b, %R:%S"
+
+#: ../js/ui/panel.js:581
+msgid "%a %b %e, %R"
+msgstr "%a %e %b, %R"
+
+#. Translators: This is the time format without date used
+#. in 24-hour mode.
+#: ../js/ui/panel.js:585
+msgid "%a %R:%S"
+msgstr "%a %R:%S"
+
+#: ../js/ui/panel.js:586
+msgid "%a %R"
+msgstr "%a %R"
+
+#. Translators: This is a time format with date used
+#. for AM/PM.
+#: ../js/ui/panel.js:593
+msgid "%a %b %e, %l:%M:%S %p"
+msgstr "%a %e %b, %l:%M:%S %p"
+
+#: ../js/ui/panel.js:594
+msgid "%a %b %e, %l:%M %p"
+msgstr "%a %e %b, %l:%M %p"
+
+#. Translators: This is a time format without date used
+#. for AM/PM.
+#: ../js/ui/panel.js:598
+msgid "%a %l:%M:%S %p"
+msgstr "%a %l:%M:%S %p"
+
+#: ../js/ui/panel.js:599
msgid "%a %l:%M %p"
msgstr "%a %l:%M %p"
-#: ../js/ui/places.js:178
+#. Button on the left side of the panel.
+#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
+#: ../js/ui/panel.js:744
+msgid "Activities"
+msgstr "Activități"
+
+#: ../js/ui/placeDisplay.js:111
+#, c-format
+msgid "Failed to unmount '%s'"
+msgstr "Nu s-a putut demonta „%s”"
+
+#: ../js/ui/placeDisplay.js:114
+msgid "Retry"
+msgstr "Reîncearcă"
+
+#: ../js/ui/placeDisplay.js:159
msgid "Connect to..."
msgstr "Conectare la..."
-#: ../js/ui/runDialog.js:96
+#. Translators: this MUST be either "toggle-switch-us"
+#. (for toggle switches containing the English words
+#. "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:33
+msgid "toggle-switch-us"
+msgstr "toggle-switch-us"
+
+#: ../js/ui/runDialog.js:233
msgid "Please enter a command:"
msgstr "Introduceți o comandă:"
-#: ../js/ui/runDialog.js:173
+#: ../js/ui/runDialog.js:378
#, c-format
msgid "Execution of '%s' failed:"
msgstr "Execuția comenzii „%s” a eșuat:"
-#. Translators: This is a time format.
-#: ../js/ui/widget.js:163
-msgid "%H:%M"
-msgstr "%H:%M"
+#: ../js/ui/statusMenu.js:101
+msgid "Available"
+msgstr "Disponibil"
-#: ../js/ui/widget.js:317
-msgid "Applications"
-msgstr "Aplicații"
+#: ../js/ui/statusMenu.js:106
+msgid "Busy"
+msgstr "Ocupat"
-#: ../js/ui/widget.js:339
-msgid "Recent Documents"
-msgstr "Documente recente"
+#: ../js/ui/statusMenu.js:114
+msgid "My Account..."
+msgstr "Contul meu..."
-#: ../src/shell-global.c:821
+#: ../js/ui/statusMenu.js:118
+msgid "System Settings..."
+msgstr "Configurări sistem..."
+
+#: ../js/ui/statusMenu.js:125
+msgid "Lock Screen"
+msgstr "Blochează ecranul"
+
+#: ../js/ui/statusMenu.js:129
+msgid "Switch User"
+msgstr "Schimbă utilizatorul"
+
+#: ../js/ui/statusMenu.js:134
+msgid "Log Out..."
+msgstr "Ieși din sesiune..."
+
+#: ../js/ui/statusMenu.js:141
+msgid "Suspend"
+msgstr "Suspendă"
+
+#: ../js/ui/statusMenu.js:145
+msgid "Shut Down..."
+msgstr "Oprește..."
+
+#: ../js/ui/status/accessibility.js:88
+msgid "Screen Reader"
+msgstr "Cititor de ecran"
+
+#: ../js/ui/status/accessibility.js:91
+msgid "Screen Keyboard"
+msgstr "Tastatură pe ecran"
+
+#: ../js/ui/status/accessibility.js:94
+msgid "Visual Alerts"
+msgstr "Alerte vizuale"
+
+#: ../js/ui/status/accessibility.js:97
+msgid "Sticky Keys"
+msgstr "Taste lipicioase"
+
+#: ../js/ui/status/accessibility.js:100
+msgid "Slow Keys"
+msgstr "Taste încete"
+
+#: ../js/ui/status/accessibility.js:103
+msgid "Bounce Keys"
+msgstr "Taste fără repetiție"
+
+#: ../js/ui/status/accessibility.js:106
+msgid "Mouse Keys"
+msgstr "Taste maus"
+
+#: ../js/ui/status/accessibility.js:110
+msgid "Universal Access Settings"
+msgstr "Configurări acces universal"
+
+#: ../js/ui/status/accessibility.js:163
+msgid "High Contrast"
+msgstr "Contrast puternic"
+
+#: ../js/ui/status/accessibility.js:205
+msgid "Large Text"
+msgstr "Text mare"
+
+#: ../js/ui/status/accessibility.js:224
+msgid "Zoom"
+msgstr "Zoom"
+
+#: ../js/ui/windowAttentionHandler.js:43
+#, c-format
+msgid "%s has finished starting"
+msgstr "Pornirea %s s-a finalizat"
+
+#: ../js/ui/windowAttentionHandler.js:45
+#, c-format
+msgid "'%s' is ready"
+msgstr "„%s” este gata"
+
+#: ../js/ui/workspacesView.js:229
+msgid ""
+"Can't add a new workspace because maximum workspaces limit has been reached."
+msgstr ""
+"Nu se poate adăuga un nou spațiu de lucru pentru că s-a atins limita maximă "
+"a numărului de spații."
+
+#: ../js/ui/workspacesView.js:246
+msgid "Can't remove the first workspace."
+msgstr "Nu se poate elimina primul spațiu de lucru."
+
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] "o ieșire"
+msgstr[1] "%u ieșiri"
+msgstr[2] "%u de ieșiri"
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] "o intrare"
+msgstr[1] "%u intrări"
+msgstr[2] "%u de intrări"
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr "Sunetele sistemului"
+
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
-msgstr "În ultimul minut"
+msgstr "Cu mai puțin de un minut în urmă"
-#: ../src/shell-global.c:824
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
-msgstr[0] "acum un minut"
-msgstr[1] "acum %d minute"
-msgstr[2] "acum %d de minute"
+msgstr[0] "Acum un minut"
+msgstr[1] "Acum %d minute"
+msgstr[2] "Acum %d de minute"
-#: ../src/shell-global.c:827
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
-msgstr[0] "acum o oră"
-msgstr[1] "acum %d ore"
-msgstr[2] "acum %d de ore"
+msgstr[0] "Acum o oră"
+msgstr[1] "Acum %d ore"
+msgstr[2] "Acum %d de ore"
-#: ../src/shell-global.c:830
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
-msgstr[0] "acum o zi"
-msgstr[1] "acum %d zile"
-msgstr[2] "acum %d de zile"
+msgstr[0] "Acum o zi"
+msgstr[1] "Acum %d zile"
+msgstr[2] "Acum %d de zile"
-#: ../src/shell-global.c:833
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
-msgstr[0] "acum o săptămână"
-msgstr[1] "acum %d săptămâni"
-msgstr[2] "acum %d de săptămâni"
+msgstr[0] "Acum o săptămână"
+msgstr[1] "Acum %d săptămâni"
+msgstr[2] "Acum %d de săptămâni"
-#: ../src/shell-status-menu.c:156
-msgid "Unknown"
-msgstr "Necunoscut"
-
-#: ../src/shell-status-menu.c:212
-#, c-format
-msgid "Can't lock screen: %s"
-msgstr "Nu s-a putut bloca ecranul: %s"
-
-#: ../src/shell-status-menu.c:227
-#, c-format
-msgid "Can't temporarily set screensaver to blank screen: %s"
-msgstr "Nu s-a putut folosi temporar un ecran gol pentru economizorul de "
-"ecran: %s"
-
-#: ../src/shell-status-menu.c:351
-#, c-format
-msgid "Can't logout: %s"
-msgstr "Nu se poate ieși din sesiune: %s"
-
-#: ../src/shell-status-menu.c:492
-msgid "Account Information..."
-msgstr "Informații despre cont..."
-
-#: ../src/shell-status-menu.c:502
-msgid "Sidebar"
-msgstr "Bară laterală"
-
-#: ../src/shell-status-menu.c:510
-msgid "System Preferences..."
-msgstr "Preferințe de sistem..."
-
-#: ../src/shell-status-menu.c:525
-msgid "Lock Screen"
-msgstr "Blocare ecran"
-
-#: ../src/shell-status-menu.c:535
-msgid "Switch User"
-msgstr "Alt utilizator"
-
-#. Only show switch user if there are other users
-#. Log Out
-#: ../src/shell-status-menu.c:546
-msgid "Log Out..."
-msgstr "Ieșire..."
-
-#. Shut down
-#: ../src/shell-status-menu.c:557
-msgid "Shut Down..."
-msgstr "Oprire..."
-
-#: ../src/shell-uri-util.c:87
+#: ../src/shell-uri-util.c:89
msgid "Home Folder"
msgstr "Dosar personal"
#. Translators: this is the same string as the one found in
#. * nautilus
-#: ../src/shell-uri-util.c:102
+#: ../src/shell-uri-util.c:104
msgid "File System"
msgstr "Sistem de fișiere"
-#: ../src/shell-uri-util.c:248
+#: ../src/shell-uri-util.c:250
msgid "Search"
msgstr "Caută"
@@ -225,8 +766,59 @@ msgstr "Caută"
#. * example, "Trash: some-directory". It means that the
#. * directory called "some-directory" is in the trash.
#.
-#: ../src/shell-uri-util.c:298
+#: ../src/shell-uri-util.c:300
#, c-format
msgid "%1$s: %2$s"
msgstr "%1$s: %2$s"
+#~ msgid "ON"
+#~ msgstr "Pornit"
+
+#~ msgid "OFF"
+#~ msgstr "Oprit"
+
+#~ msgid "Invisible"
+#~ msgstr "Invizibil"
+
+#~ msgid "Account Information..."
+#~ msgstr "Informații despre cont..."
+
+#~ msgid "Frequent"
+#~ msgstr "Frecvent"
+
+#~ msgid "More"
+#~ msgstr "Mai multe"
+
+#~ msgid "(see all)"
+#~ msgstr "(arată tot)"
+
+#~ msgid "PLACES"
+#~ msgstr "LOCAȚII"
+
+#~ msgid "SEARCH RESULTS"
+#~ msgstr "REZULTATELE CĂUTĂRII"
+
+#~ msgid "%H:%M"
+#~ msgstr "%H:%M"
+
+#~ msgid "Applications"
+#~ msgstr "Aplicații"
+
+#~ msgid "Recent Documents"
+#~ msgstr "Documente recente"
+
+#~ msgid "Unknown"
+#~ msgstr "Necunoscut"
+
+#~ msgid "Can't lock screen: %s"
+#~ msgstr "Nu s-a putut bloca ecranul: %s"
+
+#~ msgid "Can't temporarily set screensaver to blank screen: %s"
+#~ msgstr ""
+#~ "Nu s-a putut folosi temporar un ecran gol pentru economizorul de ecran: %s"
+
+#~ msgid "Can't logout: %s"
+#~ msgstr "Nu se poate ieși din sesiune: %s"
+
+#~ msgid "Sidebar"
+#~ msgstr "Bară laterală"
diff --git a/po/ug.po b/po/ug.po
new file mode 100644
index 000000000..dc8bb1eac
--- /dev/null
+++ b/po/ug.po
@@ -0,0 +1,694 @@
+# Uyghur translation for gnome-shell.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Gheyret Kenji,2010.
+# Sahran , 2010.
+# Zeper , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-shell\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=general\n"
+"POT-Creation-Date: 2010-11-11 00:43+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Gheyret Kenji\n"
+"Language-Team: Uyghur Computer Science Association \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: ../data/gnome-shell.desktop.in.in.h:1
+msgid "GNOME Shell"
+msgstr "GNOME چاپان"
+
+#: ../data/gnome-shell.desktop.in.in.h:2
+msgid "Window management and application launching"
+msgstr "كۆزنەك باشقۇرغۇچ ۋە پروگرامما قوزغاتقۇچ"
+
+#: ../data/gnome-shell-clock-preferences.desktop.in.in.h:1
+msgid "Clock"
+msgstr "سائەت"
+
+#: ../data/gnome-shell-clock-preferences.desktop.in.in.h:2
+msgid "Customize the panel clock"
+msgstr "ئىختىيارىچە تاختا سائەت"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:1
+msgid ""
+"Allows access to internal debugging and monitoring tools using the Alt-F2 "
+"dialog."
+msgstr "ئىچكى سازلاش ۋە كۆزىتىش قورالىنى زىيارەت قىلىشتا Alt-F2 ئىشلىتىلىدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:2
+msgid "Custom format of the clock"
+msgstr "ئىختىيارىي سائەت فورماتى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:3
+msgid "Enable internal tools useful for developers and testers from Alt-F2"
+msgstr "ئىچكى قورال قوزغىتىلسا ئىجادكارلار ۋە سىنىغۇچىلارنىڭ Alt-F2 ئارقىلىق كىرىشىگە قۇلايلىق"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:4
+msgid "File extension used for storing the screencast"
+msgstr "ھۆججەت كېڭەيتىلگەن ئاتى ئېكران كەسمىسى (screencasts) ساقلاشقا ئىشلىتىلىدۇ"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:5
+msgid "Framerate used for recording screencasts."
+msgstr "كاندۇك نىسبىتى ئېكران كەسمىسى (screencasts) خاتىرىلەشكە ئىشلىتىلىدۇ"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:6
+msgid ""
+"GNOME Shell extensions have a uuid property; this key lists extensions which "
+"should not be loaded."
+msgstr "GNOME چاپان (Shell)كېڭەيتىلمىسىنىڭ uuid خاسلىقى بار؛ بۇ كۇنۇپكا يۈكلەنمەيدىغان كېڭەيتىلمىلەر تىزىملىكىنى كۆرسىتىدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:7
+msgid "History for command (Alt-F2) dialog"
+msgstr "بۇيرۇق (Alt-F2) سۆزلەشكۈنىڭ تارىخى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:8
+msgid "Hour format"
+msgstr "سائەت فورماتى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:9
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display date in the "
+"clock, in addition to time."
+msgstr "ئەگەر راست (true) بولسا سائەتتە ۋاقىت فورماتىنى «12 سائەت» ياكى «24 سائەت» كۆرسەتكەندىن سىرت چېسلانىمۇ كۆرسىتىدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:10
+msgid ""
+"If true and format is either \"12-hour\" or \"24-hour\", display seconds in "
+"time."
+msgstr "ئەگەر راست (true) بولسا سائەتتە ۋاقىت فورماتىنى «12 سائەت» ياكى «24 سائەت» كۆرسەتكەندىن سىرت سېكۇنتنىمۇ كۆرسىتىدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:11
+msgid "If true, display the ISO week date in the calendar."
+msgstr "ئەگەر راست(true) بولسا يىلنامىدىكى ISO ھەپتە چېسلانى كۆرسىتىدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:12
+msgid "List of desktop file IDs for favorite applications"
+msgstr "ئامراق پروگراممىلارنىڭ ئۈستەل ئۈستى ھۆججەت ID تىزىملىكى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:13
+msgid "Overview workspace view mode"
+msgstr "قىسقىچە بايان خىزمەت رايون كۆرۈنۈش ھالىتى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:14
+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 ! theoraenc ! oggmux' and records to Ogg Theora."
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:15
+msgid "Show date in clock"
+msgstr "سائەت ئىچىدە چېسلا كۆرسەت"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:16
+msgid "Show the week date in the calendar"
+msgstr "يىلنامىدە ھەپتە كۆرسەت"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:17
+msgid "Show time with seconds"
+msgstr "ۋاقىت ئىچىدە سېكۇنتنى بىللە كۆرسەت"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:18
+msgid ""
+"The applications corresponding to these identifiers will be displayed in the "
+"favorites area."
+msgstr "مۇناسىپ پروگرامما بەلگىسى يىغقۇچ رايونىدا كۆرسىتىلىدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:19
+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 "خاتىرىلەنگەن ئېكراننىڭ ھۆججەت ئاتى نۆۋەتتىكى چېسلا ئاساسىدا بىردىنبىر بولۇپ بۇ كېڭەيتىلگەن ئاتىنى ئىشلىتىدۇ. ئۇ ئۆزگەرسە ئوخشاش بولمىغان قاچا فورماتىدا خاتىرىلەيدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:20
+msgid ""
+"The framerate of the resulting screencast recordered by GNOME Shell's "
+"screencast recorder in frames-per-second."
+msgstr "GNOME Shell ئېكران خاتىرىلىگۈچ ھەر سېكۇنتتا خاتىرىلەيدىغان ئېكران كەسمىسى كاندۇك نىسبىتى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:21
+msgid "The gstreamer pipeline used to encode the screencast"
+msgstr ""
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:22
+msgid ""
+"The selected workspace view mode in the overview. Supported values are "
+"\"single\" and \"grid\"."
+msgstr "تاللانغان قىسقىچە مەزمۇن خىزمەت رايونى كۆرۈنۈشىدە قوللايدىغان قىممەت «يەككە» ۋە «سېتكا»"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:23
+msgid ""
+"The shell normally monitors active applications in order to present the most "
+"used ones (e.g. in launchers). While this data will be kept private, you may "
+"want to disable this for privacy reasons. Please note that doing so won't "
+"remove already saved data."
+msgstr "چاپان (shell) ئادەتتىكى ئەھۋالدا كۆپ ئىشلىتىلىدىغان ئاكتىپ پروگراممىلار(مەسىلەن، ئىجرا قىلىنىۋاتقان)نى كۆزىتىدۇ. گەرچە بۇ سانلىق مەلۇماتلار مەخپىي ساقلانسىمۇ، شەخسىي سىر سەۋەبىدىن بۇنى چەكلىشىڭىز مۇمكىن. دىققەت بۇنداق قىلغاندا ئاللىبۇرۇن ساقلانغان سانلىق مەلۇماتلار چىقىرىۋېتىلمەيدۇ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:24
+msgid ""
+"This key specifies the format used by the panel clock when the format key is "
+"set to \"custom\". You can use conversion specifiers understood by strftime"
+"() to obtain a specific format. See the strftime() manual for more "
+"information."
+msgstr "format (فورمات) كۇنۇپكىسى \"custom\" (ئىختىيارى) قىلىپ تەڭشەلسە بۇ كۇنۇپكا تاختا سائەت ئىشلىتىدىغان فورماتنى بەلگىلەيدۇ. سىز strftime()نىڭ فورمات بەلگىسىنى ئىشلىتىپ بەلگىلەنگەن فورماتقا ئېرىشەلەيسىز. تەپسىلاتىنى strftime() نىڭ قوللانمىسىدىن كۆرۈڭ."
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:25
+msgid ""
+"This key specifies the hour format used by the panel clock. Possible values "
+"are \"12-hour\", \"24-hour\", \"unix\" and \"custom\". If set to \"unix\", "
+"the clock will display time in seconds since Epoch, i.e. 1970-01-01. If set "
+"to \"custom\", the clock will display time according to the format specified "
+"in the custom_format key. Note that if set to either \"unix\" or \"custom\", "
+"the show_date and show_seconds keys are ignored."
+msgstr "بۇ كۇنۇپكا تاختا سائەت ئىشلەتكەن سائەت فورماتىنى بەلگىلىگەن. ئىشلەتكىلى بولىدىغان قىممىتى \"12-hour\" يەنى (12 سائەت)، \"24-hour\" يەنى (24 سائەت)، \"unix\" ۋە \"custom\" (ئىختىيارى). ئەگەر \"unix\" قىلىپ تەڭشەلسە سائەت ئۆزلۈكىدىن يېڭى ئېرا (يەنى، 1970-01-01) دىن ئۆتكەن سېكۇنتنى ئاساس قىلىدۇ. ئەگەر \"custom\" قىلىپ تەڭشەلسە سائەت custom_format كۇنۇپكا قىممىتىگە ئاساسەن ۋاقىتنى كۆرسىتىدۇ. ئەگەر \"unix\" ياكى \"custom\" قىلىپ تەڭشەلسە show_date ۋە show_seconds قىممىتىگە پەرۋا قىلمايدۇ"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:26
+msgid "Uuids of extensions to disable"
+msgstr "كېڭەيتىلمىنىڭ Uuid چەكلەندى"
+
+#: ../data/org.gnome.shell.gschema.xml.in.h:27
+msgid "Whether to collect stats about applications usage"
+msgstr "پروگراممىنىڭ ئىشلىتىلىشى ھەققىدىكى ستاتىستىكىنى توپلامدۇ يوق"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
+msgid "Clip the crosshairs at the center"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
+msgid "Color of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
+msgid ""
+"Determines the length of the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
+msgid ""
+"Determines the position of the magnified mouse image within the magnified "
+"view and how it reacts to system mouse movement. The values are - none: no "
+"mouse tracking; - centered: the mouse image is displayed at the center of "
+"the zoom region (which also represents the point under the system mouse) and "
+"the magnified contents are scrolled as the system mouse moves; - "
+"proportional: the position of the magnified mouse in the zoom region is "
+"proportionally the same as the position of the system mouse on screen; - "
+"push: when the magnified mouse intersects a boundary of the zoom region, the "
+"contents are scrolled into view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
+msgid ""
+"Determines the transparency of the crosshairs, from fully opaque to fully "
+"transparent."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
+msgid ""
+"Determines whether the crosshairs intersect the magnified mouse sprite, or "
+"are clipped such that the ends of the horizontal and vertical lines surround "
+"the mouse image."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
+msgid "Enable lens mode"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
+msgid ""
+"Enables/disables display of crosshairs centered on the magnified mouse "
+"sprite."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
+msgid ""
+"For centered mouse tracking, when the system pointer is at or near the edge "
+"of the screen, the magnified contents continue to scroll such that the "
+"screen edge moves into the magnified view."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
+msgid "Length of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
+msgid "Magnification factor"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
+msgid "Mouse Tracking Mode"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
+msgid "Opacity of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
+msgid "Screen position"
+msgstr "ئېكران ئورنى"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
+msgid "Scroll magnified contents beyond the edges of the desktop"
+msgstr "دومىلىما چوڭايتقۇچ ئۈستەل ئۈستى گىرۋەك مەزمۇنىدىن ھالقىپ كەتتى"
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
+msgid "Show or hide crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
+msgid "Show or hide the magnifier"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
+msgid "Show or hide the magnifier and all of its zoom regions."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
+msgid ""
+"The color of the the vertical and horizontal lines that make up the "
+"crosshairs."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
+msgid ""
+"The magnified view either fills the entire screen, or occupies the top-half, "
+"bottom-half, left-half, or right-half of the screen."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
+msgid ""
+"The power of the magnification. A value of 1.0 means no magnification. A "
+"value of 2.0 doubles the size."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
+msgid "Thickness of the crosshairs"
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
+msgid ""
+"Whether the magnified view should be centered over the location of the "
+"system mouse and move with it."
+msgstr ""
+
+#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
+msgid "Width of the vertical and horizontal lines that make up the crosshairs."
+msgstr ""
+
+#: ../data/clock-preferences.ui.h:1
+msgid "Clock Format"
+msgstr "سائەت فورماتى"
+
+#: ../data/clock-preferences.ui.h:2
+msgid "Clock Preferences"
+msgstr "سائەت مايىللىقى"
+
+#: ../data/clock-preferences.ui.h:3
+msgid "Panel Display"
+msgstr "تاختا كۆرسەت"
+
+#: ../data/clock-preferences.ui.h:4
+msgid "Show seco_nds"
+msgstr "سېكۇنت كۆرسەت(_N)"
+
+#: ../data/clock-preferences.ui.h:5
+msgid "Show the _date"
+msgstr "چېسلانى كۆرسەت(_D)"
+
+#: ../data/clock-preferences.ui.h:6
+msgid "_12 hour format"
+msgstr "_12 سائەت فورماتى"
+
+#: ../data/clock-preferences.ui.h:7
+msgid "_24 hour format"
+msgstr "_24 سائەت فورماتى"
+
+#. **** Applications ****
+#: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
+msgid "APPLICATIONS"
+msgstr "پروگراممىلار"
+
+#: ../js/ui/appDisplay.js:348
+msgid "PREFERENCES"
+msgstr "مايىللىق"
+
+#: ../js/ui/appDisplay.js:647
+msgid "New Window"
+msgstr "يېڭى كۆزنەك"
+
+#: ../js/ui/appDisplay.js:651
+msgid "Remove from Favorites"
+msgstr "يىغقۇچتىن چىقىرىۋەت"
+
+#: ../js/ui/appDisplay.js:652
+msgid "Add to Favorites"
+msgstr "يىغقۇچقا قوش"
+
+#: ../js/ui/appDisplay.js:829
+msgid "Drag here to add favorites"
+msgstr "بۇ جايغا سۆرەپ قىسقۇچقا قوش"
+
+#: ../js/ui/appFavorites.js:88
+#, c-format
+msgid "%s has been added to your favorites."
+msgstr "%s يىغقۇچىڭىزغا قوشۇلىدۇ."
+
+#: ../js/ui/appFavorites.js:107
+#, c-format
+msgid "%s has been removed from your favorites."
+msgstr "%s يىغقۇچىڭىزدىن چىقىرىۋېتىلىدۇ."
+
+#: ../js/ui/dash.js:142
+msgid "Find"
+msgstr "ئىزدە"
+
+#: ../js/ui/dash.js:473
+msgid "Searching..."
+msgstr "ئىزدەۋاتىدۇ…"
+
+#: ../js/ui/dash.js:487
+msgid "No matching results."
+msgstr "ماس كېلىدىغان نەتىجە يوق."
+
+#. **** Places ****
+#. Translators: This is in the sense of locations for documents,
+#. network locations, etc.
+#: ../js/ui/dash.js:797 ../js/ui/placeDisplay.js:554
+msgid "PLACES & DEVICES"
+msgstr "ئورۇن ۋە ئۈسكۈنىلەر"
+
+#. **** Documents ****
+#: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
+msgid "RECENT ITEMS"
+msgstr "يېقىنقى تۈرلەر"
+
+#: ../js/ui/lookingGlass.js:552
+msgid "No extensions installed"
+msgstr "ھېچقانداق كېڭەيتىلمە ئورنىتىلمىغان"
+
+#: ../js/ui/lookingGlass.js:589
+msgid "Enabled"
+msgstr "قوزغىتىلغان"
+
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
+msgid "Disabled"
+msgstr "چەكلەنگەن"
+
+#: ../js/ui/lookingGlass.js:593
+msgid "Error"
+msgstr "خاتالىق"
+
+#: ../js/ui/lookingGlass.js:595
+msgid "Out of date"
+msgstr "ۋاقتى ئۆتۈپ كەتكەن"
+
+#: ../js/ui/lookingGlass.js:620
+msgid "View Source"
+msgstr "مەنبەنى كۆرسەت"
+
+#: ../js/ui/lookingGlass.js:626
+msgid "Web Page"
+msgstr "تور بەت"
+
+#: ../js/ui/overview.js:160
+msgid "Undo"
+msgstr "يېنىۋال"
+
+#. TODO - _quit() doesn't really work on apps in state STARTING yet
+#: ../js/ui/panel.js:469
+#, c-format
+msgid "Quit %s"
+msgstr "%s چېكىن"
+
+#: ../js/ui/panel.js:494
+msgid "Preferences"
+msgstr "مايىللىق"
+
+#. Translators: This is the time format with date used
+#. in 24-hour mode.
+#: ../js/ui/panel.js:580
+msgid "%a %b %e, %R:%S"
+msgstr "%a %b %e، %R:%S"
+
+#: ../js/ui/panel.js:581
+msgid "%a %b %e, %R"
+msgstr "%a %b %e، %R"
+
+#. Translators: This is the time format without date used
+#. in 24-hour mode.
+#: ../js/ui/panel.js:585
+msgid "%a %R:%S"
+msgstr "%a %R:%S"
+
+#: ../js/ui/panel.js:586
+msgid "%a %R"
+msgstr "%a %R"
+
+#. Translators: This is a time format with date used
+#. for AM/PM.
+#: ../js/ui/panel.js:593
+msgid "%a %b %e, %l:%M:%S %p"
+msgstr "%a %b %e, %l:%M:%S %p"
+
+#: ../js/ui/panel.js:594
+msgid "%a %b %e, %l:%M %p"
+msgstr "%a %b %e, %l:%M %p"
+
+#. Translators: This is a time format without date used
+#. for AM/PM.
+#: ../js/ui/panel.js:598
+msgid "%a %l:%M:%S %p"
+msgstr "%a %l:%M:%S %p"
+
+#: ../js/ui/panel.js:599
+msgid "%a %l:%M %p"
+msgstr "%p%l:%M (%a)"
+
+#. Button on the left side of the panel.
+#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview".
+#: ../js/ui/panel.js:744
+msgid "Activities"
+msgstr "ھەرىكەتچان"
+
+#: ../js/ui/placeDisplay.js:111
+#, c-format
+msgid "Failed to unmount '%s'"
+msgstr "%s نىڭ ئېگەرنى يېشىش مەغلۇپ بولدى."
+
+#: ../js/ui/placeDisplay.js:114
+msgid "Retry"
+msgstr "قايتا سىنا"
+
+#: ../js/ui/placeDisplay.js:159
+msgid "Connect to..."
+msgstr "باغلانماق..."
+
+#. Translators: this MUST be either "toggle-switch-us"
+#. (for toggle switches containing the English words
+#. "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:33
+msgid "toggle-switch-us"
+msgstr ""
+
+#: ../js/ui/runDialog.js:233
+msgid "Please enter a command:"
+msgstr "بۇيرۇق كىرگۈزۈڭ:"
+
+#: ../js/ui/runDialog.js:378
+#, c-format
+msgid "Execution of '%s' failed:"
+msgstr "'%s' ئىجرا قىلالمىدى:"
+
+#: ../js/ui/statusMenu.js:101
+msgid "Available"
+msgstr "ئىشلىتىلىشچان"
+
+#: ../js/ui/statusMenu.js:106
+msgid "Busy"
+msgstr "ئالدىراش"
+
+#: ../js/ui/statusMenu.js:111
+msgid "Invisible"
+msgstr "يوشۇرۇن"
+
+#: ../js/ui/statusMenu.js:119
+msgid "My Account..."
+msgstr ""
+
+#: ../js/ui/statusMenu.js:123
+msgid "System Settings..."
+msgstr "سىستېما تەڭشەكلىرى"
+
+#: ../js/ui/statusMenu.js:130
+msgid "Lock Screen"
+msgstr "ئېكراننى قۇلۇپلا"
+
+#: ../js/ui/statusMenu.js:134
+msgid "Switch User"
+msgstr "ئىشلەتكۈچى ئالماشتۇر"
+
+#: ../js/ui/statusMenu.js:139
+msgid "Log Out..."
+msgstr "تىزىمدىن چىق…"
+
+#: ../js/ui/statusMenu.js:146
+msgid "Suspend"
+msgstr "ۋاقىتلىق توختىتىش"
+
+#: ../js/ui/statusMenu.js:150
+msgid "Restart..."
+msgstr ""
+
+#: ../js/ui/statusMenu.js:154
+msgid "Shut Down..."
+msgstr "تاقا…"
+
+#: ../js/ui/status/accessibility.js:88
+msgid "Screen Reader"
+msgstr "ئېكران ئوقۇغۇچ"
+
+#: ../js/ui/status/accessibility.js:91
+msgid "Screen Keyboard"
+msgstr "ئېكران ھەرپتاختىسى"
+
+#: ../js/ui/status/accessibility.js:94
+msgid "Visual Alerts"
+msgstr "كۆرۈنمە ئاگاھلاندۇرۇش"
+
+#: ../js/ui/status/accessibility.js:97
+msgid "Sticky Keys"
+msgstr "چاپلاش كۇنۇپكىسى"
+
+#: ../js/ui/status/accessibility.js:100
+msgid "Slow Keys"
+msgstr "ئاستا كۇنۇپكا"
+
+#: ../js/ui/status/accessibility.js:103
+msgid "Bounce Keys"
+msgstr "قاڭقىش كۇنۇپكىسى"
+
+#: ../js/ui/status/accessibility.js:106
+msgid "Mouse Keys"
+msgstr "چاشقىنەك كۇنۇپكا"
+
+#: ../js/ui/status/accessibility.js:110
+msgid "Universal Access Settings"
+msgstr "ھەممىباب زىيارەت تەڭشىكى"
+
+#: ../js/ui/status/accessibility.js:163
+msgid "High Contrast"
+msgstr "يۇقىرى ئاق-قارىلىقى"
+
+#: ../js/ui/status/accessibility.js:202
+msgid "Large Text"
+msgstr "چوڭ تېكىست"
+
+#: ../js/ui/status/accessibility.js:223
+msgid "Zoom"
+msgstr "كېڭەيت تارايت"
+
+#: ../js/ui/windowAttentionHandler.js:43
+#, c-format
+msgid "%s has finished starting"
+msgstr "%s باشلاشنى تاماملىدى"
+
+#: ../js/ui/windowAttentionHandler.js:45
+#, c-format
+msgid "'%s' is ready"
+msgstr "'%s' تەييار بولدى"
+
+#: ../js/ui/workspacesView.js:229
+msgid ""
+"Can't add a new workspace because maximum workspaces limit has been reached."
+msgstr "يېڭى خىزمەت رايونى قوشالمايدۇ چۈنكى ئەڭ كۆپ خىزمەت رايون چېكىگە يەتتى."
+
+#: ../js/ui/workspacesView.js:246
+msgid "Can't remove the first workspace."
+msgstr "بىرىنچى خىزمەت رايونىنى چىقىرىۋېتەلمەيدۇ."
+
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] "%u چىقار"
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] "%u كىرگۈز"
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr "سىستېما ئاۋازى"
+
+#: ../src/shell-global.c:1219
+msgid "Less than a minute ago"
+msgstr "بىر مىنۇتتىنمۇ ئىلگىرى"
+
+#: ../src/shell-global.c:1223
+#, c-format
+msgid "%d minute ago"
+msgid_plural "%d minutes ago"
+msgstr[0] "%d مىنۇت ئىلگىرى"
+
+#: ../src/shell-global.c:1228
+#, c-format
+msgid "%d hour ago"
+msgid_plural "%d hours ago"
+msgstr[0] "%d سائەت ئىلگىرى"
+
+#: ../src/shell-global.c:1233
+#, c-format
+msgid "%d day ago"
+msgid_plural "%d days ago"
+msgstr[0] "%d كۈن ئىلگىرى"
+
+#: ../src/shell-global.c:1238
+#, c-format
+msgid "%d week ago"
+msgid_plural "%d weeks ago"
+msgstr[0] "%d ھەپتە ئىلگىرى"
+
+#: ../src/shell-uri-util.c:89
+msgid "Home Folder"
+msgstr "باش مۇندەرىجە"
+
+#. Translators: this is the same string as the one found in
+#. * nautilus
+#: ../src/shell-uri-util.c:104
+msgid "File System"
+msgstr "ھۆججەت سىستېمىسى"
+
+#: ../src/shell-uri-util.c:250
+msgid "Search"
+msgstr "ئىزدە"
+
+#. Translators: the first string is the name of a gvfs
+#. * method, and the second string is a path. For
+#. * example, "Trash: some-directory". It means that the
+#. * directory called "some-directory" is in the trash.
+#.
+#: ../src/shell-uri-util.c:300
+#, c-format
+msgid "%1$s: %2$s"
+msgstr "%1$s: %2$s"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index b6642f113..ee6533960 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -3,21 +3,22 @@
# This file is distributed under the same license as the gnome-shell package.
# Ray Wang , 2009.
# jiero , 2010.
-# YunQiang Su , 2010.
# Aron Xu , 2010.
# Jessica Ban , 2010.
+# YunQiang Su , 2010.
+#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&component=general\n"
-"POT-Creation-Date: 2010-10-25 21:45+0000\n"
-"PO-Revision-Date: 2010-10-28 00:26+0800\n"
-"Last-Translator: Aron Xu \n"
+"POT-Creation-Date: 2010-10-30 17:51+0000\n"
+"PO-Revision-Date: 2010-10-28 01:24+0800\n"
+"Last-Translator: YunQiang Su \n"
"Language-Team: Chinese (simplified) \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../data/gnome-shell.desktop.in.in.h:1
@@ -206,17 +207,17 @@ msgstr "是否收集应用程序的使用情况"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
msgid "Clip the crosshairs at the center"
-msgstr ""
+msgstr "将十字夹在中间"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
msgid "Color of the crosshairs"
-msgstr ""
+msgstr "十字的颜色"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
msgid ""
"Determines the length of the vertical and horizontal lines that make up the "
"crosshairs."
-msgstr ""
+msgstr "确定组成十字的水平线和竖直线的长度。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
msgid ""
@@ -230,30 +231,35 @@ msgid ""
"push: when the magnified mouse intersects a boundary of the zoom region, the "
"contents are scrolled into view."
msgstr ""
+"确定放大了的鼠标图像在放大了的视图中的的位置,以及如何对系统鼠标的移动做出反"
+"馈。可用的值有 - none:鼠标不跟踪;- centered:鼠标图像显示在放大区域的中心"
+"(这也表示系统鼠标下的点),而且放大的内容也随着系统鼠标的移动而滚动;- "
+"proportional:放大区域中,放大的鼠标的位置和系统鼠标在屏幕上的位置成比例相同"
+"(数学上的“相似”);- push:当放大的鼠标与放大区域的边界相交时,将内容滚动进视"
+"图。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
msgid ""
"Determines the transparency of the crosshairs, from fully opaque to fully "
"transparent."
-msgstr ""
+msgstr "确定十字线的透明度,从全遮蔽到全透明。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
msgid ""
"Determines whether the crosshairs intersect the magnified mouse sprite, or "
"are clipped such that the ends of the horizontal and vertical lines surround "
"the mouse image."
-msgstr ""
+msgstr "确定十字是和放大的光标精灵交叉,还是固定来让水平和竖直线环绕鼠标形象。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
-#, fuzzy
msgid "Enable lens mode"
-msgstr "启用"
+msgstr "启用透镜模式"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
msgid ""
"Enables/disables display of crosshairs centered on the magnified mouse "
"sprite."
-msgstr ""
+msgstr "启用或禁用穿过放大的鼠标精灵的十字。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
msgid ""
@@ -261,22 +267,24 @@ msgid ""
"of the screen, the magnified contents continue to scroll such that the "
"screen edge moves into the magnified view."
msgstr ""
+"对于居中的鼠标跟踪,当系统指针位于或者接近屏幕的边缘时,放大的内容继续滚动,"
+"以便让屏幕边缘移动到放大的视图。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
msgid "Length of the crosshairs"
-msgstr ""
+msgstr "十字长度"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
msgid "Magnification factor"
-msgstr ""
+msgstr "放大因子"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
msgid "Mouse Tracking Mode"
-msgstr ""
+msgstr "鼠标跟随模式"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
msgid "Opacity of the crosshairs"
-msgstr ""
+msgstr "十字的不透明度"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
msgid "Screen position"
@@ -284,51 +292,51 @@ msgstr "屏幕位置"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
msgid "Scroll magnified contents beyond the edges of the desktop"
-msgstr ""
+msgstr "在桌面边界以外滚动放大内容"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
msgid "Show or hide crosshairs"
-msgstr ""
+msgstr "显示或隐藏十字线"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
msgid "Show or hide the magnifier"
-msgstr ""
+msgstr "显示或隐藏放大镜"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
msgid "Show or hide the magnifier and all of its zoom regions."
-msgstr ""
+msgstr "显示或隐藏放大镜及其全部放大区域。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
msgid ""
"The color of the the vertical and horizontal lines that make up the "
"crosshairs."
-msgstr ""
+msgstr "组成十字的水平线和竖直线的颜色。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
msgid ""
"The magnified view either fills the entire screen, or occupies the top-half, "
"bottom-half, left-half, or right-half of the screen."
-msgstr ""
+msgstr "放大的视图是充满整个屏幕还是占据屏幕的顶半部、底半部、左半部或右半部。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
msgid ""
"The power of the magnification. A value of 1.0 means no magnification. A "
"value of 2.0 doubles the size."
-msgstr ""
+msgstr "边长的放大倍数。1.0 表示不放大,2.0 表示将长度增倍。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
msgid "Thickness of the crosshairs"
-msgstr ""
+msgstr "十字的厚度"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
msgid ""
"Whether the magnified view should be centered over the location of the "
"system mouse and move with it."
-msgstr ""
+msgstr "放大的视图是否以系统鼠标为中心放置并且随之移动。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
msgid "Width of the vertical and horizontal lines that make up the crosshairs."
-msgstr ""
+msgstr "组成十字的水平和竖直线的宽度。"
#: ../data/clock-preferences.ui.h:1
msgid "Clock Format"
@@ -367,19 +375,19 @@ msgstr "应用程序"
msgid "PREFERENCES"
msgstr "首选项"
-#: ../js/ui/appDisplay.js:648
+#: ../js/ui/appDisplay.js:647
msgid "New Window"
msgstr "新窗口"
-#: ../js/ui/appDisplay.js:652
+#: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites"
msgstr "从收藏夹中移除"
-#: ../js/ui/appDisplay.js:653
+#: ../js/ui/appDisplay.js:652
msgid "Add to Favorites"
msgstr "添加到收藏夹"
-#: ../js/ui/appDisplay.js:830
+#: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites"
msgstr "拖到这里加入收藏夹"
@@ -425,7 +433,9 @@ msgstr "未安装扩展"
msgid "Enabled"
msgstr "启用"
-#: ../js/ui/lookingGlass.js:591
+#. translators:
+#. * The device has been disabled
+#: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Disabled"
msgstr "禁用"
@@ -525,7 +535,7 @@ msgstr "连接到..."
#. simply result in invisible toggle switches.
#: ../js/ui/popupMenu.js:33
msgid "toggle-switch-us"
-msgstr ""
+msgstr "toggle-switch-intl"
#: ../js/ui/runDialog.js:233
msgid "Please enter a command:"
@@ -553,7 +563,9 @@ msgid "My Account..."
msgstr "我的帐户..."
#: ../js/ui/statusMenu.js:123
-msgid "System Preferences..."
+#, fuzzy
+#| msgid "System Preferences..."
+msgid "System Settings..."
msgstr "系统首选项..."
#: ../js/ui/statusMenu.js:130
@@ -582,7 +594,7 @@ msgstr "关机..."
#: ../js/ui/status/accessibility.js:88
msgid "Screen Reader"
-msgstr ""
+msgstr "屏幕阅读器"
#: ../js/ui/status/accessibility.js:91
msgid "Screen Keyboard"
@@ -602,15 +614,15 @@ msgstr "慢速键"
#: ../js/ui/status/accessibility.js:103
msgid "Bounce Keys"
-msgstr ""
+msgstr "筛选键"
#: ../js/ui/status/accessibility.js:106
msgid "Mouse Keys"
-msgstr ""
+msgstr "鼠标按键"
#: ../js/ui/status/accessibility.js:110
msgid "Universal Access Settings"
-msgstr ""
+msgstr "通用访问设置"
#: ../js/ui/status/accessibility.js:163
msgid "High Contrast"
@@ -643,29 +655,49 @@ msgstr "无法添加新工作区,因为已经达到了工作区数量限制。
msgid "Can't remove the first workspace."
msgstr "不能移除第一个工作区。"
-#: ../src/shell-global.c:1204
+#. translators:
+#. * The number of sound outputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1094
+#, c-format
+msgid "%u Output"
+msgid_plural "%u Outputs"
+msgstr[0] ""
+
+#. translators:
+#. * The number of sound inputs on a particular device
+#: ../src/gvc/gvc-mixer-control.c:1104
+#, c-format
+msgid "%u Input"
+msgid_plural "%u Inputs"
+msgstr[0] ""
+
+#: ../src/gvc/gvc-mixer-control.c:1402
+msgid "System Sounds"
+msgstr ""
+
+#: ../src/shell-global.c:1219
msgid "Less than a minute ago"
msgstr "少于一分钟前"
-#: ../src/shell-global.c:1208
+#: ../src/shell-global.c:1223
#, c-format
msgid "%d minute ago"
msgid_plural "%d minutes ago"
msgstr[0] "%d 分钟前"
-#: ../src/shell-global.c:1213
+#: ../src/shell-global.c:1228
#, c-format
msgid "%d hour ago"
msgid_plural "%d hours ago"
msgstr[0] "%d 小时前"
-#: ../src/shell-global.c:1218
+#: ../src/shell-global.c:1233
#, c-format
msgid "%d day ago"
msgid_plural "%d days ago"
msgstr[0] "%d 天前"
-#: ../src/shell-global.c:1223
+#: ../src/shell-global.c:1238
#, c-format
msgid "%d week ago"
msgid_plural "%d weeks ago"
diff --git a/src/Makefile-st.am b/src/Makefile-st.am
index 74b023b75..40d27c56e 100644
--- a/src/Makefile-st.am
+++ b/src/Makefile-st.am
@@ -77,7 +77,10 @@ st_source_h = \
st/st-container.h \
st/st-drawing-area.h \
st/st-entry.h \
+ st/st-focus-manager.h \
st/st-group.h \
+ st/st-icon.h \
+ st/st-icon-colors.h \
st/st-im-text.h \
st/st-label.h \
st/st-overflow-box.h \
@@ -86,7 +89,6 @@ st_source_h = \
st/st-scroll-bar.h \
st/st-scroll-view.h \
st/st-shadow.h \
- st/st-subtexture.h \
st/st-table.h \
st/st-table-child.h \
st/st-texture-cache.h \
@@ -126,7 +128,10 @@ st_source_c = \
st/st-container.c \
st/st-drawing-area.c \
st/st-entry.c \
+ st/st-focus-manager.c \
st/st-group.c \
+ st/st-icon.c \
+ st/st-icon-colors.c \
st/st-im-text.c \
st/st-label.c \
st/st-overflow-box.c \
@@ -135,7 +140,6 @@ st_source_c = \
st/st-scroll-bar.c \
st/st-scroll-view.c \
st/st-shadow.c \
- st/st-subtexture.c \
st/st-table.c \
st/st-table-child.c \
st/st-texture-cache.c \
diff --git a/src/Makefile.am b/src/Makefile.am
index 6bdc0d261..013a884fb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -117,6 +117,8 @@ libgnome_shell_la_SOURCES = \
libgnome_shell_la_gir_sources = \
$(filter-out %-private.h $(shell_recorder_non_gir_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES))
+########################################
+
shell_recorder_sources = \
shell-recorder.c \
shell-recorder.h
@@ -139,6 +141,35 @@ test_recorder_SOURCES = \
test-recorder.c
endif BUILD_RECORDER
+########################################
+
+# In order to run the interactive tests for GUI components, we need to have
+# an executable that exports the St components. Libtool doesn't have a way
+# to include all the symbols from a convenience library into a executable
+# so what we do is build a small uninstalled library that pulls in the
+# St convenience library and link the test running program to that.
+
+noinst_LTLIBRARIES += libjs-test.la
+
+libjs_test_la_LDFLAGS = -rpath $(libdir)
+libjs_test_la_CPPFLAGS = $(JS_TEST_CFLAGS)
+libjs_test_la_LIBADD = $(JS_TEST_LIBS) libst-1.0.la
+
+# The tests use or reference a couple of Shell classes
+libjs_test_la_SOURCES = \
+ shell-generic-container.c \
+ shell-perf-log.c
+
+noinst_PROGRAMS += run-js-test
+
+run_js_test_CPPFLAGS = $(JS_TEST_CFLAGS)
+run_js_test_LDADD = $(JS_TEST_LIBS) libjs-test.la
+run_js_test_LDFLAGS = -export-dynamic
+
+run_js_test_SOURCES = \
+ run-js-test.c
+
+########################################
shell-marshal.h: stamp-shell-marshal.h
@true
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index f67277840..0a3959df4 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -161,6 +161,8 @@ gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
"/desktop/gnome/shell/windows/button_layout");
meta_prefs_override_preference_location ("/apps/metacity/general/side_by_side_tiling",
"/desktop/gnome/shell/windows/side_by_side_tiling");
+ meta_prefs_override_preference_location ("/apps/metacity/general/theme",
+ "/desktop/gnome/shell/windows/theme");
}
static void
diff --git a/src/gnome-shell.in b/src/gnome-shell.in
index b523bde75..c855c0180 100755
--- a/src/gnome-shell.in
+++ b/src/gnome-shell.in
@@ -717,6 +717,7 @@ function main() {
''')
f.close()
+ print "Created extension in %r" % (extension_path, )
subprocess.Popen(['gnome-open', extensionjs_path])
sys.exit(0)
diff --git a/src/run-js-test.c b/src/run-js-test.c
new file mode 100644
index 000000000..5be4eaddd
--- /dev/null
+++ b/src/run-js-test.c
@@ -0,0 +1,144 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Based on gjs/console.c from GJS
+ *
+ * Copyright (c) 2008 litl, LLC
+ * Copyright (c) 2010 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+static char **include_path = NULL;
+static char *command = NULL;
+
+static GOptionEntry entries[] = {
+ { "command", 'c', 0, G_OPTION_ARG_STRING, &command, "Program passed in as a string", "COMMAND" },
+ { "include-path", 'I', 0, G_OPTION_ARG_STRING_ARRAY, &include_path, "Add the directory DIR to the list of directories to search for js files.", "DIR" },
+ { NULL }
+};
+
+static GdkFilterReturn
+event_filter (GdkXEvent *xevent,
+ GdkEvent *event,
+ gpointer data)
+{
+ XEvent *xev = (XEvent *)xevent;
+
+ if (clutter_x11_handle_event (xev) == CLUTTER_X11_FILTER_CONTINUE)
+ return GDK_FILTER_CONTINUE;
+ else
+ return GDK_FILTER_REMOVE;
+}
+
+int
+main(int argc, char **argv)
+{
+ char *command_line;
+ GOptionContext *context;
+ ClutterActor *stage;
+ GError *error = NULL;
+ GjsContext *js_context;
+ char *script;
+ const char *filename;
+ char *title;
+ gsize len;
+ int code;
+
+ g_thread_init (NULL);
+
+ gtk_init (&argc, &argv);
+
+ clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
+ clutter_x11_disable_event_retrieval ();
+
+ clutter_init (&argc, &argv);
+
+ gdk_window_add_filter (NULL, event_filter, NULL);
+
+ context = g_option_context_new (NULL);
+
+ /* pass unknown through to the JS script */
+ g_option_context_set_ignore_unknown_options (context, TRUE);
+
+ g_option_context_add_main_entries (context, entries, NULL);
+ if (!g_option_context_parse (context, &argc, &argv, &error))
+ g_error ("option parsing failed: %s", error->message);
+
+ setlocale (LC_ALL, "");
+ g_type_init ();
+
+ command_line = g_strjoinv (" ", argv);
+ g_debug ("Command line: %s", command_line);
+ g_free (command_line);
+
+ g_debug ("Creating new context to eval console script");
+ js_context = gjs_context_new_with_search_path (include_path);
+
+ /* prepare command line arguments */
+ if (!gjs_context_define_string_array (js_context, "ARGV",
+ argc - 2, (const char**)argv + 2,
+ &error)) {
+ g_printerr ("Failed to defined ARGV: %s", error->message);
+ exit (1);
+ }
+
+ if (command != NULL) {
+ script = command;
+ len = strlen (script);
+ filename = "";
+ } else if (argc <= 1) {
+ script = g_strdup ("const Console = imports.console; Console.interact();");
+ len = strlen (script);
+ filename = "";
+ } else /*if (argc >= 2)*/ {
+ error = NULL;
+ if (!g_file_get_contents (argv[1], &script, &len, &error)) {
+ g_printerr ("%s\n", error->message);
+ exit (1);
+ }
+ filename = argv[1];
+ }
+
+ stage = clutter_stage_get_default ();
+ title = g_filename_display_basename (filename);
+ clutter_stage_set_title (CLUTTER_STAGE (stage), title);
+ g_free (title);
+
+ /* evaluate the script */
+ error = NULL;
+ if (!gjs_context_eval (js_context, script, len,
+ filename, &code, &error)) {
+ g_free (script);
+ g_printerr ("%s\n", error->message);
+ exit (1);
+ }
+
+ g_free (script);
+ exit (code);
+}
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 3bfca45aa..7df763f05 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -9,11 +9,12 @@
#include
#include
#include
+#include
#include "shell-app-private.h"
#include "shell-global.h"
-#include "st/st-texture-cache.h"
#include "display.h"
+#include "st.h"
#define GMENU_I_KNOW_THIS_IS_UNSTABLE
#include
@@ -1004,11 +1005,12 @@ shell_app_info_get_name (ShellAppInfo *info)
return g_key_file_get_locale_string (info->keyfile, DESKTOP_ENTRY_GROUP, "Name", NULL, NULL);
case SHELL_APP_INFO_TYPE_WINDOW:
{
- char *title;
- g_object_get (info->window, "title", &title, NULL);
- if (!title)
- title = g_strdup ("");
- return title;
+ const char *name;
+
+ name = meta_window_get_wm_class (info->window);
+ if (!name)
+ name = _("Unknown");
+ return g_strdup (name);
}
}
g_assert_not_reached ();
diff --git a/src/shell-generic-container.c b/src/shell-generic-container.c
index 5b439636c..e378d7211 100644
--- a/src/shell-generic-container.c
+++ b/src/shell-generic-container.c
@@ -162,6 +162,25 @@ shell_generic_container_pick (ClutterActor *actor,
}
}
+static GList *
+shell_generic_container_get_focus_chain (StContainer *container)
+{
+ ShellGenericContainer *self = SHELL_GENERIC_CONTAINER (container);
+ GList *children, *focus_chain;
+
+ focus_chain = NULL;
+ for (children = st_container_get_children_list (container); children; children = children->next)
+ {
+ ClutterActor *child = children->data;
+
+ if (CLUTTER_ACTOR_IS_VISIBLE (child) &&
+ !shell_generic_container_get_skip_paint (self, child))
+ focus_chain = g_list_prepend (focus_chain, child);
+ }
+
+ return g_list_reverse (focus_chain);
+}
+
/**
* shell_generic_container_get_n_skip_paint:
* @self: A #ShellGenericContainer
@@ -231,6 +250,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
+ StContainerClass *container_class = ST_CONTAINER_CLASS (klass);
gobject_class->finalize = shell_generic_container_finalize;
@@ -240,6 +260,8 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
actor_class->paint = shell_generic_container_paint;
actor_class->pick = shell_generic_container_pick;
+ container_class->get_focus_chain = shell_generic_container_get_focus_chain;
+
shell_generic_container_signals[GET_PREFERRED_WIDTH] =
g_signal_new ("get-preferred-width",
G_TYPE_FROM_CLASS (klass),
diff --git a/src/shell-global.c b/src/shell-global.c
index a8305196e..11747a419 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -7,6 +7,7 @@
#include "shell-perf-log.h"
#include "shell-window-tracker.h"
#include "shell-wm.h"
+#include "st.h"
#include "display.h"
#include "util.h"
@@ -59,6 +60,7 @@ struct _ShellGlobal {
const char *datadir;
const char *imagedir;
const char *userdatadir;
+ StFocusManager *focus_manager;
/* Displays the root window; see shell_global_create_root_pixmap_actor() */
ClutterActor *root_pixmap;
@@ -90,6 +92,7 @@ enum {
PROP_DATADIR,
PROP_IMAGEDIR,
PROP_USERDATADIR,
+ PROP_FOCUS_MANAGER,
};
G_DEFINE_TYPE(ShellGlobal, shell_global, G_TYPE_OBJECT);
@@ -173,6 +176,9 @@ shell_global_get_property(GObject *object,
case PROP_USERDATADIR:
g_value_set_string (value, global->userdatadir);
break;
+ case PROP_FOCUS_MANAGER:
+ g_value_set_object (value, global->focus_manager);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -328,6 +334,13 @@ shell_global_class_init (ShellGlobalClass *klass)
"Directory containing gnome-shell user data",
NULL,
G_PARAM_READABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_FOCUS_MANAGER,
+ g_param_spec_object ("focus-manager",
+ "Focus manager",
+ "The shell's StFocusManager",
+ ST_TYPE_FOCUS_MANAGER,
+ G_PARAM_READABLE));
}
/**
@@ -734,6 +747,8 @@ _shell_global_set_plugin (ShellGlobal *global,
display = meta_screen_get_display (screen);
g_signal_connect (display, "notify::focus-window",
G_CALLBACK (focus_window_changed), global);
+
+ global->focus_manager = st_focus_manager_get_for_stage (CLUTTER_STAGE (stage));
}
void
diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c
index cb276e4e0..ad8bc478d 100644
--- a/src/shell-window-tracker.c
+++ b/src/shell-window-tracker.c
@@ -16,9 +16,9 @@
#include "shell-window-tracker-private.h"
#include "shell-app-system.h"
#include "shell-app-private.h"
-#include "st/st-texture-cache.h"
#include "shell-global.h"
#include "shell-marshal.h"
+#include "st.h"
#include "display.h"
#include "window.h"
diff --git a/src/shell-xfixes-cursor.c b/src/shell-xfixes-cursor.c
index baf677c5c..14d2b59c4 100644
--- a/src/shell-xfixes-cursor.c
+++ b/src/shell-xfixes-cursor.c
@@ -195,11 +195,40 @@ xfixes_cursor_reset_image (ShellXFixesCursor *xfixes_cursor)
{
XFixesCursorImage *cursor_image;
CoglHandle sprite = COGL_INVALID_HANDLE;
+ guint8 *cursor_data;
+ gboolean free_cursor_data;
if (!xfixes_cursor->have_xfixes)
return;
cursor_image = XFixesGetCursorImage (clutter_x11_get_default_display ());
+
+ /* Like all X APIs, XFixesGetCursorImage() returns arrays of 32-bit
+ * quantities as arrays of long; we need to convert on 64 bit */
+ if (sizeof(long) == 4)
+ {
+ cursor_data = (guint8 *)cursor_image->pixels;
+ free_cursor_data = FALSE;
+ }
+ else
+ {
+ int i, j;
+ guint32 *cursor_words;
+ gulong *p;
+ guint32 *q;
+
+ cursor_words = g_new (guint32, cursor_image->width * cursor_image->height);
+ cursor_data = (guint8 *)cursor_words;
+
+ p = cursor_image->pixels;
+ q = cursor_words;
+ for (j = 0; j < cursor_image->height; j++)
+ for (i = 0; i < cursor_image->width; i++)
+ *(q++) = *(p++);
+
+ free_cursor_data = TRUE;
+ }
+
sprite = cogl_texture_new_from_data (cursor_image->width,
cursor_image->height,
COGL_TEXTURE_NONE,
@@ -210,7 +239,11 @@ xfixes_cursor_reset_image (ShellXFixesCursor *xfixes_cursor)
#endif
COGL_PIXEL_FORMAT_ANY,
cursor_image->width * 4, /* stride */
- (const guint8 *) cursor_image->pixels);
+ cursor_data);
+
+ if (free_cursor_data)
+ g_free (cursor_data);
+
if (sprite != COGL_INVALID_HANDLE)
{
if (xfixes_cursor->cursor_sprite != NULL)
diff --git a/src/st/st-adjustment.c b/src/st/st-adjustment.c
index 0a6817824..cb284c1a9 100644
--- a/src/st/st-adjustment.c
+++ b/src/st/st-adjustment.c
@@ -2,8 +2,8 @@
/*
* st-adjustment.c: Adjustment object
*
- * Copyright (C) 2008 OpenedHand
- * Copyright (c) 2009 Intel Corporation.
+ * Copyright 2008 OpenedHand
+ * Copyright 2009 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,12 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Chris Lord , inspired by GtkAdjustment
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-adjustment.h b/src/st/st-adjustment.h
index b816191e5..3cfce640b 100644
--- a/src/st/st-adjustment.h
+++ b/src/st/st-adjustment.h
@@ -15,12 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Chris Lord , inspired by GtkAdjustment
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-bin.c b/src/st/st-bin.c
index 30392972c..af6c2f7dd 100644
--- a/src/st/st-bin.c
+++ b/src/st/st-bin.c
@@ -2,7 +2,8 @@
/*
* st-bin.c: Basic container actor
*
- * Copyright (c) 2009 Intel Corporation.
+ * Copyright 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,11 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Emmanuele Bassi
- *
+ * along with this program. If not, see .
*/
/**
@@ -226,6 +223,28 @@ st_bin_dispose (GObject *gobject)
G_OBJECT_CLASS (st_bin_parent_class)->dispose (gobject);
}
+static gboolean
+st_bin_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction)
+{
+ StBinPrivate *priv = ST_BIN (widget)->priv;
+ ClutterActor *bin_actor = CLUTTER_ACTOR (widget);
+
+ if (st_widget_get_can_focus (widget))
+ {
+ if (from && clutter_actor_contains (bin_actor, from))
+ return FALSE;
+
+ clutter_actor_grab_key_focus (bin_actor);
+ return TRUE;
+ }
+ else if (priv->child && ST_IS_WIDGET (priv->child))
+ return st_widget_navigate_focus (ST_WIDGET (priv->child), from, direction, FALSE);
+ else
+ return FALSE;
+}
+
static void
st_bin_set_property (GObject *gobject,
guint prop_id,
@@ -309,6 +328,7 @@ st_bin_class_init (StBinClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
+ StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (StBinPrivate));
@@ -323,6 +343,8 @@ st_bin_class_init (StBinClass *klass)
actor_class->paint = st_bin_paint;
actor_class->pick = st_bin_pick;
+ widget_class->navigate_focus = st_bin_navigate_focus;
+
/**
* StBin:child:
*
diff --git a/src/st/st-bin.h b/src/st/st-bin.h
index 8e671a0ba..2c2e58898 100644
--- a/src/st/st-bin.h
+++ b/src/st/st-bin.h
@@ -14,12 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Emmanuele Bassi
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-border-image.c b/src/st/st-border-image.c
index 1a67a9542..c55ee9b20 100644
--- a/src/st/st-border-image.c
+++ b/src/st/st-border-image.c
@@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-border-image.c: store information about an image with borders
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include
diff --git a/src/st/st-border-image.h b/src/st/st-border-image.h
index c1bb7e477..f0941602e 100644
--- a/src/st/st-border-image.h
+++ b/src/st/st-border-image.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-border-image.h: store information about an image with borders
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_BORDER_IMAGE_H__
#define __ST_BORDER_IMAGE_H__
diff --git a/src/st/st-box-layout-child.c b/src/st/st-box-layout-child.c
index cee0b785d..3d748d519 100644
--- a/src/st/st-box-layout-child.c
+++ b/src/st/st-box-layout-child.c
@@ -14,10 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-box-layout-child.h b/src/st/st-box-layout-child.h
index aa8051a68..097da0e22 100644
--- a/src/st/st-box-layout-child.h
+++ b/src/st/st-box-layout-child.h
@@ -14,10 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
+ * along with this program. If not, see .
*/
#ifndef _ST_BOX_LAYOUT_CHILD_H
diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c
index 98fe29100..3a912fa97 100644
--- a/src/st/st-box-layout.c
+++ b/src/st/st-box-layout.c
@@ -3,6 +3,9 @@
* st-box-layout.h: box layout actor
*
* Copyright 2009 Intel Corporation.
+ * Copyright 2009 Abderrahim Kitouni
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010 Florian Muellner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,11 +17,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
/* Portions copied from Clutter:
diff --git a/src/st/st-box-layout.h b/src/st/st-box-layout.h
index 74644c9f7..54372d53c 100644
--- a/src/st/st-box-layout.h
+++ b/src/st/st-box-layout.h
@@ -3,6 +3,7 @@
* st-box-layout.h: box layout actor
*
* Copyright 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,11 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-button.c b/src/st/st-button.c
index 81d4e88a6..dfee0265e 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -4,6 +4,7 @@
*
* Copyright 2007 OpenedHand
* Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,12 +16,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Emmanuele Bassi
- * Thomas Wood
- *
+ * along with this program. If not, see .
*/
/**
@@ -72,9 +68,9 @@ struct _StButtonPrivate
gchar *text;
guint is_pressed : 1;
- guint is_hover : 1;
guint is_checked : 1;
guint is_toggle : 1;
+ guint has_grab : 1;
gint spacing;
};
@@ -88,13 +84,13 @@ st_button_update_label_style (StButton *button)
{
ClutterActor *label;
- label = st_bin_get_child ((StBin*) button);
+ label = st_bin_get_child (ST_BIN (button));
/* check the child is really a label */
if (!CLUTTER_IS_TEXT (label))
return;
- _st_set_text_from_style ((ClutterText*) label, st_widget_get_theme_node (ST_WIDGET (button)));
+ _st_set_text_from_style (CLUTTER_TEXT (label), st_widget_get_theme_node (ST_WIDGET (button)));
}
static void
@@ -123,15 +119,32 @@ st_button_style_changed (StWidget *widget)
}
static void
-st_button_real_pressed (StButton *button)
+st_button_press (StButton *button)
{
- st_widget_add_style_pseudo_class ((StWidget*) button, "active");
+ if (button->priv->is_pressed)
+ return;
+
+ button->priv->is_pressed = TRUE;
+ st_widget_add_style_pseudo_class (ST_WIDGET (button), "active");
}
static void
-st_button_real_released (StButton *button)
+st_button_release (StButton *button,
+ gboolean clicked)
{
- st_widget_remove_style_pseudo_class ((StWidget*) button, "active");
+ if (!button->priv->is_pressed)
+ return;
+
+ button->priv->is_pressed = FALSE;
+ st_widget_remove_style_pseudo_class (ST_WIDGET (button), "active");
+
+ if (clicked)
+ {
+ if (button->priv->is_toggle)
+ st_button_set_checked (button, !button->priv->is_checked);
+
+ g_signal_emit (button, button_signals[CLICKED], 0);
+ }
}
static gboolean
@@ -143,14 +156,10 @@ st_button_button_press (ClutterActor *actor,
if (event->button == 1)
{
StButton *button = ST_BUTTON (actor);
- StButtonClass *klass = ST_BUTTON_GET_CLASS (button);
-
- button->priv->is_pressed = TRUE;
clutter_grab_pointer (actor);
-
- if (klass->pressed)
- klass->pressed (button);
+ button->priv->has_grab = TRUE;
+ st_button_press (button);
return TRUE;
}
@@ -165,25 +174,47 @@ st_button_button_release (ClutterActor *actor,
if (event->button == 1)
{
StButton *button = ST_BUTTON (actor);
- StButtonClass *klass = ST_BUTTON_GET_CLASS (button);
+ gboolean is_click;
- if (!button->priv->is_pressed)
- return FALSE;
+ is_click = button->priv->has_grab && st_widget_get_hover (ST_WIDGET (button));
+ st_button_release (button, is_click);
- clutter_ungrab_pointer ();
-
- if (button->priv->is_toggle)
+ if (button->priv->has_grab)
{
- st_button_set_checked (button, !button->priv->is_checked);
+ button->priv->has_grab = FALSE;
+ clutter_ungrab_pointer ();
}
- button->priv->is_pressed = FALSE;
+ return TRUE;
+ }
- if (klass->released)
- klass->released (button);
+ return FALSE;
+}
- g_signal_emit (button, button_signals[CLICKED], 0);
+static gboolean
+st_button_key_press (ClutterActor *actor,
+ ClutterKeyEvent *event)
+{
+ st_widget_hide_tooltip (ST_WIDGET (actor));
+ if (event->keyval == CLUTTER_KEY_space ||
+ event->keyval == CLUTTER_KEY_Return)
+ {
+ st_button_press (ST_BUTTON (actor));
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static gboolean
+st_button_key_release (ClutterActor *actor,
+ ClutterKeyEvent *event)
+{
+ if (event->keyval == CLUTTER_KEY_space ||
+ event->keyval == CLUTTER_KEY_Return)
+ {
+ st_button_release (ST_BUTTON (actor), TRUE);
return TRUE;
}
@@ -195,12 +226,19 @@ st_button_enter (ClutterActor *actor,
ClutterCrossingEvent *event)
{
StButton *button = ST_BUTTON (actor);
+ gboolean ret;
- st_widget_add_style_pseudo_class ((StWidget*) button, "hover");
+ ret = CLUTTER_ACTOR_CLASS (st_button_parent_class)->enter_event (actor, event);
- button->priv->is_hover = 1;
+ if (button->priv->has_grab)
+ {
+ if (st_widget_get_hover (ST_WIDGET (button)))
+ st_button_press (button);
+ else
+ st_button_release (button, FALSE);
+ }
- return CLUTTER_ACTOR_CLASS (st_button_parent_class)->enter_event (actor, event);
+ return ret;
}
static gboolean
@@ -208,24 +246,19 @@ st_button_leave (ClutterActor *actor,
ClutterCrossingEvent *event)
{
StButton *button = ST_BUTTON (actor);
+ gboolean ret;
- button->priv->is_hover = 0;
+ ret = CLUTTER_ACTOR_CLASS (st_button_parent_class)->leave_event (actor, event);
- if (button->priv->is_pressed)
+ if (button->priv->has_grab)
{
- StButtonClass *klass = ST_BUTTON_GET_CLASS (button);
-
- clutter_ungrab_pointer ();
-
- button->priv->is_pressed = FALSE;
-
- if (klass->released)
- klass->released (button);
+ if (st_widget_get_hover (ST_WIDGET (button)))
+ st_button_press (button);
+ else
+ st_button_release (button, FALSE);
}
- st_widget_remove_style_pseudo_class ((StWidget*) button, "hover");
-
- return CLUTTER_ACTOR_CLASS (st_button_parent_class)->leave_event (actor, event);
+ return ret;
}
static void
@@ -302,15 +335,14 @@ st_button_class_init (StButtonClass *klass)
g_type_class_add_private (klass, sizeof (StButtonPrivate));
- klass->pressed = st_button_real_pressed;
- klass->released = st_button_real_released;
-
gobject_class->set_property = st_button_set_property;
gobject_class->get_property = st_button_get_property;
gobject_class->finalize = st_button_finalize;
actor_class->button_press_event = st_button_button_press;
actor_class->button_release_event = st_button_button_release;
+ actor_class->key_press_event = st_button_key_press;
+ actor_class->key_release_event = st_button_key_release;
actor_class->enter_event = st_button_enter;
actor_class->leave_event = st_button_leave;
@@ -360,7 +392,8 @@ st_button_init (StButton *button)
button->priv = ST_BUTTON_GET_PRIVATE (button);
button->priv->spacing = 6;
- clutter_actor_set_reactive ((ClutterActor *) button, TRUE);
+ clutter_actor_set_reactive (CLUTTER_ACTOR (button), TRUE);
+ st_widget_set_track_hover (ST_WIDGET (button), TRUE);
}
/**
@@ -431,7 +464,7 @@ st_button_set_label (StButton *button,
else
priv->text = g_strdup ("");
- label = st_bin_get_child ((StBin*) button);
+ label = st_bin_get_child (ST_BIN (button));
if (label && CLUTTER_IS_TEXT (label))
{
@@ -445,7 +478,7 @@ st_button_set_label (StButton *button,
"ellipsize", PANGO_ELLIPSIZE_END,
"use-markup", TRUE,
NULL);
- st_bin_set_child ((StBin*) button, label);
+ st_bin_set_child (ST_BIN (button), label);
}
/* Fake a style change so that we reset the style properties on the label */
@@ -524,9 +557,9 @@ st_button_set_checked (StButton *button,
button->priv->is_checked = checked;
if (checked)
- st_widget_add_style_pseudo_class ((StWidget*) button, "checked");
+ st_widget_add_style_pseudo_class (ST_WIDGET (button), "checked");
else
- st_widget_remove_style_pseudo_class ((StWidget*) button, "checked");
+ st_widget_remove_style_pseudo_class (ST_WIDGET (button), "checked");
}
g_object_notify (G_OBJECT (button), "checked");
diff --git a/src/st/st-button.h b/src/st/st-button.h
index f17bc50b9..15a6983dd 100644
--- a/src/st/st-button.h
+++ b/src/st/st-button.h
@@ -15,13 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Emmanuele Bassi
- * Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
@@ -66,8 +60,6 @@ struct _StButtonClass
StBinClass parent_class;
/* vfuncs, not signals */
- void (* pressed) (StButton *button);
- void (* released) (StButton *button);
void (* transition) (StButton *button);
/* signals */
diff --git a/src/st/st-clickable.c b/src/st/st-clickable.c
index 38cc41f47..5787aaf42 100644
--- a/src/st/st-clickable.c
+++ b/src/st/st-clickable.c
@@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-clickable.h: A bin with methods and properties useful for implementing buttons
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
/**
* SECTION:st-clickable
@@ -158,6 +176,37 @@ st_clickable_button_release_event (ClutterActor *actor,
return TRUE;
}
+static gboolean
+st_clickable_key_press_event (ClutterActor *actor,
+ ClutterKeyEvent *event)
+{
+ StClickable *self = ST_CLICKABLE (actor);
+
+ if (event->keyval == CLUTTER_KEY_space ||
+ event->keyval == CLUTTER_KEY_Return)
+ {
+ set_pressed (self, TRUE);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static gboolean
+st_clickable_key_release_event (ClutterActor *actor,
+ ClutterKeyEvent *event)
+{
+ StClickable *self = ST_CLICKABLE (actor);
+
+ if (event->keyval != CLUTTER_KEY_space &&
+ event->keyval != CLUTTER_KEY_Return)
+ return FALSE;
+
+ set_pressed (self, FALSE);
+
+ g_signal_emit (G_OBJECT (self), st_clickable_signals[CLICKED], 0, event);
+ return TRUE;
+}
+
/**
* st_clickable_fake_release:
* @box:
@@ -240,6 +289,8 @@ st_clickable_class_init (StClickableClass *klass)
actor_class->leave_event = st_clickable_leave_event;
actor_class->button_press_event = st_clickable_button_press_event;
actor_class->button_release_event = st_clickable_button_release_event;
+ actor_class->key_press_event = st_clickable_key_press_event;
+ actor_class->key_release_event = st_clickable_key_release_event;
/**
* StClickable::clicked
diff --git a/src/st/st-clickable.h b/src/st/st-clickable.h
index 1c59447d7..2f1c3b0ee 100644
--- a/src/st/st-clickable.h
+++ b/src/st/st-clickable.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-clickable.h: A bin with methods and properties useful for implementing buttons
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_CLICKABLE_H__
#define __ST_CLICKABLE_H__
diff --git a/src/st/st-clipboard.c b/src/st/st-clipboard.c
index 833de4bbf..6d98c959d 100644
--- a/src/st/st-clipboard.c
+++ b/src/st/st-clipboard.c
@@ -14,11 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-clipboard.h b/src/st/st-clipboard.h
index 7b687d589..20759d43d 100644
--- a/src/st/st-clipboard.h
+++ b/src/st/st-clipboard.h
@@ -14,11 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-container.c b/src/st/st-container.c
index 7a8dee2f0..4d140a16a 100644
--- a/src/st/st-container.c
+++ b/src/st/st-container.c
@@ -4,6 +4,8 @@
*
* Copyright 2007 OpenedHand
* Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2010 Florian Müllner
+ * Copyright 2010 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,19 +17,15 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Emmanuele Bassi
- * Thomas Wood
- *
+ * along with this program. If not, see .
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include
+
#include "st-container.h"
#define ST_CONTAINER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),ST_TYPE_CONTAINER, StContainerPrivate))
@@ -178,6 +176,40 @@ st_container_get_children_list (StContainer *container)
return container->priv->children;
}
+static GList *
+st_container_real_get_focus_chain (StContainer *container)
+{
+ GList *chain, *children;
+
+ chain = NULL;
+ for (children = container->priv->children; children; children = children->next)
+ {
+ ClutterActor *child = children->data;
+
+ if (CLUTTER_ACTOR_IS_VISIBLE (child))
+ chain = g_list_prepend (chain, child);
+ }
+
+ return g_list_reverse (chain);
+}
+
+/**
+ * st_container_get_focus_chain:
+ * @container: An #StContainer
+ *
+ * Gets a list of the focusable children of @container, in "Tab"
+ * order. By default, this returns all visible
+ * (as in CLUTTER_ACTOR_IS_VISIBLE()) children of @container.
+ *
+ * Returns: (element-type Clutter.Actor) (transfer container):
+ * @container's focusable children
+ */
+GList *
+st_container_get_focus_chain (StContainer *container)
+{
+ return ST_CONTAINER_GET_CLASS (container)->get_focus_chain (container);
+}
+
static gint
sort_z_order (gconstpointer a,
gconstpointer b)
@@ -389,6 +421,289 @@ st_container_dispose (GObject *object)
G_OBJECT_CLASS (st_container_parent_class)->dispose (object);
}
+/* filter @children to contain only only actors that overlap @rbox
+ * when moving in @direction. (Assuming no transformations.)
+ */
+static GList *
+filter_by_position (GList *children,
+ ClutterActorBox *rbox,
+ GtkDirectionType direction)
+{
+ ClutterActorBox cbox;
+ GList *l, *ret;
+ ClutterActor *child;
+
+ for (l = children, ret = NULL; l; l = l->next)
+ {
+ child = l->data;
+ clutter_actor_get_allocation_box (child, &cbox);
+
+ /* Filter out children if they are in the wrong direction from
+ * @rbox, or if they don't overlap it.
+ */
+ switch (direction)
+ {
+ case GTK_DIR_UP:
+ if (cbox.y2 > rbox->y1)
+ continue;
+ if (cbox.x1 >= rbox->x2 || cbox.x2 <= rbox->x1)
+ continue;
+ break;
+
+ case GTK_DIR_DOWN:
+ if (cbox.y1 < rbox->y2)
+ continue;
+ if (cbox.x1 >= rbox->x2 || cbox.x2 <= rbox->x1)
+ continue;
+ break;
+
+ case GTK_DIR_LEFT:
+ if (cbox.x2 > rbox->x1)
+ continue;
+ if (cbox.y1 >= rbox->y2 || cbox.y2 <= rbox->y1)
+ continue;
+ break;
+
+ case GTK_DIR_RIGHT:
+ if (cbox.x1 < rbox->x2)
+ continue;
+ if (cbox.y1 >= rbox->y2 || cbox.y2 <= rbox->y1)
+ continue;
+ break;
+
+ default:
+ g_return_val_if_reached (NULL);
+ }
+
+ ret = g_list_prepend (ret, child);
+ }
+
+ g_list_free (children);
+ return ret;
+}
+
+typedef struct {
+ GtkDirectionType direction;
+ ClutterActorBox box;
+} StContainerChildSortData;
+
+static int
+sort_by_position (gconstpointer a,
+ gconstpointer b,
+ gpointer user_data)
+{
+ ClutterActor *actor_a = (ClutterActor *)a;
+ ClutterActor *actor_b = (ClutterActor *)b;
+ StContainerChildSortData *sort_data = user_data;
+ GtkDirectionType direction = sort_data->direction;
+ ClutterActorBox abox, bbox;
+ int ax, ay, bx, by;
+ int cmp, fmid;
+
+ /* Determine the relationship, relative to motion in @direction, of
+ * the center points of the two actors. Eg, for %GTK_DIR_UP, we
+ * return a negative number if @actor_a's center is below @actor_b's
+ * center, and postive if vice versa, which will result in an
+ * overall list sorted bottom-to-top.
+ */
+
+ clutter_actor_get_allocation_box (actor_a, &abox);
+ ax = (int)(abox.x1 + abox.x2) / 2;
+ ay = (int)(abox.y1 + abox.y2) / 2;
+ clutter_actor_get_allocation_box (actor_b, &bbox);
+ bx = (int)(bbox.x1 + bbox.x2) / 2;
+ by = (int)(bbox.y1 + bbox.y2) / 2;
+
+ switch (direction)
+ {
+ case GTK_DIR_UP:
+ cmp = by - ay;
+ break;
+ case GTK_DIR_DOWN:
+ cmp = ay - by;
+ break;
+ case GTK_DIR_LEFT:
+ cmp = bx - ax;
+ break;
+ case GTK_DIR_RIGHT:
+ cmp = ax - bx;
+ break;
+ default:
+ g_return_val_if_reached (0);
+ }
+
+ if (cmp)
+ return cmp;
+
+ /* If two actors have the same center on the axis being sorted,
+ * prefer the one that is closer to the center of the current focus
+ * actor on the other axis. Eg, for %GTK_DIR_UP, prefer whichever
+ * of @actor_a and @actor_b has a horizontal center closest to the
+ * current focus actor's horizontal center.
+ *
+ * (This matches GTK's behavior.)
+ */
+ switch (direction)
+ {
+ case GTK_DIR_UP:
+ case GTK_DIR_DOWN:
+ fmid = (int)(sort_data->box.x1 + sort_data->box.x2) / 2;
+ return abs (ax - fmid) - abs (bx - fmid);
+ case GTK_DIR_LEFT:
+ case GTK_DIR_RIGHT:
+ fmid = (int)(sort_data->box.y1 + sort_data->box.y2) / 2;
+ return abs (ay - fmid) - abs (by - fmid);
+ default:
+ g_return_val_if_reached (0);
+ }
+}
+
+static gboolean
+st_container_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction)
+{
+ StContainer *container = ST_CONTAINER (widget);
+ ClutterActor *container_actor, *focus_child;
+ GList *children, *l;
+
+ container_actor = CLUTTER_ACTOR (widget);
+ if (from == container_actor)
+ return FALSE;
+
+ /* Figure out if @from is a descendant of @container, and if so,
+ * set @focus_child to the immediate child of @container that
+ * contains (or *is*) @from.
+ */
+ focus_child = from;
+ while (focus_child && clutter_actor_get_parent (focus_child) != container_actor)
+ focus_child = clutter_actor_get_parent (focus_child);
+
+ if (st_widget_get_can_focus (widget))
+ {
+ if (!focus_child)
+ {
+ /* Accept focus from outside */
+ clutter_actor_grab_key_focus (container_actor);
+ return TRUE;
+ }
+ else
+ {
+ /* Yield focus from within: since @container itself is
+ * focusable we don't allow the focus to be navigated
+ * within @container.
+ */
+ return FALSE;
+ }
+ }
+
+ /* See if we can navigate within @focus_child */
+ if (focus_child && ST_IS_WIDGET (focus_child))
+ {
+ if (st_widget_navigate_focus (ST_WIDGET (focus_child), from, direction, FALSE))
+ return TRUE;
+ }
+
+ /* At this point we know that we want to navigate focus to one of
+ * @container's immediate children; the next one after @focus_child,
+ * or the first one if @focus_child is %NULL. (With "next" and
+ * "first" being determined by @direction.)
+ */
+
+ children = st_container_get_focus_chain (container);
+ if (direction == GTK_DIR_TAB_FORWARD ||
+ direction == GTK_DIR_TAB_BACKWARD)
+ {
+ if (direction == GTK_DIR_TAB_BACKWARD)
+ children = g_list_reverse (children);
+
+ if (focus_child)
+ {
+ /* Remove focus_child and any earlier children */
+ while (children && children->data != focus_child)
+ children = g_list_delete_link (children, children);
+ if (children)
+ children = g_list_delete_link (children, children);
+ }
+ }
+ else /* direction is an arrow key, not tab */
+ {
+ StContainerChildSortData sort_data;
+
+ /* Compute the allocation box of the previous focused actor, in
+ * @container's coordinate space. If there was no previous focus,
+ * use the coordinates of the appropriate edge of @container.
+ *
+ * Note that all of this code assumes the actors are not
+ * transformed (or at most, they are all scaled by the same
+ * amount). If @container or any of its children is rotated, or
+ * any child is inconsistently scaled, then the focus chain will
+ * probably be unpredictable.
+ */
+ if (from)
+ {
+ if (from == focus_child)
+ clutter_actor_get_allocation_box (focus_child, &sort_data.box);
+ else
+ {
+ float cx, cy, fx, fy, fw, fh;
+
+ clutter_actor_get_transformed_position (CLUTTER_ACTOR (container), &cx, &cy);
+ clutter_actor_get_transformed_position (from, &fx, &fy);
+ clutter_actor_get_transformed_size (from, &fw, &fh);
+
+ sort_data.box.x1 = fx - cx;
+ sort_data.box.x2 = fx - cx + fw;
+ sort_data.box.y1 = fy - cy;
+ sort_data.box.y2 = fy - cy + fh;
+ }
+ }
+ else
+ {
+ clutter_actor_get_allocation_box (CLUTTER_ACTOR (container), &sort_data.box);
+ switch (direction)
+ {
+ case GTK_DIR_UP:
+ sort_data.box.y1 = sort_data.box.y2;
+ break;
+ case GTK_DIR_DOWN:
+ sort_data.box.y2 = sort_data.box.y1;
+ break;
+ case GTK_DIR_LEFT:
+ sort_data.box.x1 = sort_data.box.x2;
+ break;
+ case GTK_DIR_RIGHT:
+ sort_data.box.x2 = sort_data.box.x1;
+ break;
+ default:
+ g_warn_if_reached ();
+ }
+ }
+ sort_data.direction = direction;
+
+ if (focus_child)
+ children = filter_by_position (children, &sort_data.box, direction);
+ if (children)
+ children = g_list_sort_with_data (children, sort_by_position, &sort_data);
+ }
+
+ /* Now try each child in turn */
+ for (l = children; l; l = l->next)
+ {
+ if (ST_IS_WIDGET (l->data))
+ {
+ if (st_widget_navigate_focus (l->data, from, direction, FALSE))
+ {
+ g_list_free (children);
+ return TRUE;
+ }
+ }
+ }
+
+ g_list_free (children);
+ return FALSE;
+}
+
static void
clutter_container_iface_init (ClutterContainerIface *iface)
{
@@ -410,8 +725,14 @@ static void
st_container_class_init (StContainerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
+ StContainerClass *container_class = ST_CONTAINER_CLASS (klass);
g_type_class_add_private (klass, sizeof (StContainerPrivate));
object_class->dispose = st_container_dispose;
+
+ widget_class->navigate_focus = st_container_navigate_focus;
+
+ container_class->get_focus_chain = st_container_real_get_focus_chain;
}
diff --git a/src/st/st-container.h b/src/st/st-container.h
index ac9ef2c06..f5f04aa09 100644
--- a/src/st/st-container.h
+++ b/src/st/st-container.h
@@ -15,10 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
@@ -50,6 +47,8 @@ struct _StContainer {
struct _StContainerClass {
StWidgetClass parent_class;
+
+ GList * (*get_focus_chain) (StContainer *container);
};
GType st_container_get_type (void) G_GNUC_CONST;
@@ -57,11 +56,13 @@ GType st_container_get_type (void) G_GNUC_CONST;
void st_container_remove_all (StContainer *container);
void st_container_destroy_children (StContainer *container);
+GList * st_container_get_focus_chain (StContainer *container);
+
/* Only to be used by subclasses of StContainer */
void st_container_move_child (StContainer *container,
ClutterActor *actor,
int pos);
-GList *st_container_get_children_list (StContainer *container);
+GList * st_container_get_children_list (StContainer *container);
G_END_DECLS
diff --git a/src/st/st-drawing-area.c b/src/st/st-drawing-area.c
index a10da15db..2235842d8 100644
--- a/src/st/st-drawing-area.c
+++ b/src/st/st-drawing-area.c
@@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-drawing-area.c: A dynamically-sized Cairo drawing area
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
/**
* SECTION:st-drawing-area
diff --git a/src/st/st-drawing-area.h b/src/st/st-drawing-area.h
index 429e749b0..fddd7dfa5 100644
--- a/src/st/st-drawing-area.h
+++ b/src/st/st-drawing-area.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-drawing-area.h: A dynamically-sized Cairo drawing area
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_DRAWING_AREA_H__
#define __ST_DRAWING_AREA_H__
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index ecb8ba783..fe0fe34bb 100644
--- a/src/st/st-entry.c
+++ b/src/st/st-entry.c
@@ -3,6 +3,8 @@
* st-entry.c: Plain entry actor
*
* Copyright 2008, 2009 Intel Corporation
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010 Florian Müllner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,11 +16,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
/**
@@ -219,6 +217,29 @@ st_entry_style_changed (StWidget *self)
ST_WIDGET_CLASS (st_entry_parent_class)->style_changed (self);
}
+static gboolean
+st_entry_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction)
+{
+ StEntryPrivate *priv = ST_ENTRY_PRIV (widget);
+
+ /* This is basically the same as st_widget_real_navigate_focus(),
+ * except that widget is behaving as a proxy for priv->entry (which
+ * isn't an StWidget and so has no can-focus flag of its own).
+ */
+
+ if (from == priv->entry)
+ return FALSE;
+ else if (st_widget_get_can_focus (widget))
+ {
+ clutter_actor_grab_key_focus (priv->entry);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
static void
st_entry_get_preferred_width (ClutterActor *actor,
gfloat for_height,
@@ -632,6 +653,7 @@ st_entry_class_init (StEntryClass *klass)
actor_class->leave_event = st_entry_leave_event;
widget_class->style_changed = st_entry_style_changed;
+ widget_class->navigate_focus = st_entry_navigate_focus;
pspec = g_param_spec_object ("clutter-text",
"Clutter Text",
diff --git a/src/st/st-entry.h b/src/st/st-entry.h
index bf14dcd6b..581ad4d5e 100644
--- a/src/st/st-entry.h
+++ b/src/st/st-entry.h
@@ -14,12 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-focus-manager.c b/src/st/st-focus-manager.c
new file mode 100644
index 000000000..8c7bc9dfd
--- /dev/null
+++ b/src/st/st-focus-manager.c
@@ -0,0 +1,201 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-focus-manager.c: Keyboard focus manager
+ *
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
+/**
+ * SECTION:st-focus-manager
+ * @short_description: Keyboard focus management
+ *
+ * #StFocusManager handles keyboard focus for all actors on the stage.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include
+
+#include "st-focus-manager.h"
+
+#define ST_FOCUS_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ST_TYPE_FOCUS_MANAGER, StFocusManagerPrivate))
+
+struct _StFocusManagerPrivate
+{
+ GHashTable *groups;
+};
+
+G_DEFINE_TYPE (StFocusManager, st_focus_manager, G_TYPE_OBJECT)
+
+static void
+st_focus_manager_dispose (GObject *object)
+{
+ StFocusManager *manager = ST_FOCUS_MANAGER (object);
+
+ if (manager->priv->groups)
+ {
+ g_hash_table_destroy (manager->priv->groups);
+ manager->priv->groups = NULL;
+ }
+
+ G_OBJECT_CLASS (st_focus_manager_parent_class)->dispose (object);
+}
+
+static void
+st_focus_manager_class_init (StFocusManagerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (StFocusManagerPrivate));
+
+ object_class->dispose = st_focus_manager_dispose;
+}
+
+static void
+st_focus_manager_init (StFocusManager *manager)
+{
+ manager->priv = ST_FOCUS_MANAGER_GET_PRIVATE (manager);
+ manager->priv->groups = g_hash_table_new (NULL, NULL);
+}
+
+static gboolean
+st_focus_manager_stage_event (ClutterActor *stage,
+ ClutterEvent *event,
+ gpointer user_data)
+{
+ StFocusManager *manager = user_data;
+ GtkDirectionType direction;
+ gboolean wrap_around = FALSE;
+ ClutterActor *focused, *group;
+
+ if (event->type != CLUTTER_KEY_PRESS)
+ return FALSE;
+
+ switch (event->key.keyval)
+ {
+ case CLUTTER_KEY_Up:
+ direction = GTK_DIR_UP;
+ break;
+ case CLUTTER_KEY_Down:
+ direction = GTK_DIR_DOWN;
+ break;
+ case CLUTTER_KEY_Left:
+ direction = GTK_DIR_LEFT;
+ break;
+ case CLUTTER_KEY_Right:
+ direction = GTK_DIR_RIGHT;
+ break;
+ case CLUTTER_KEY_Tab:
+ if (event->key.modifier_state & CLUTTER_SHIFT_MASK)
+ direction = GTK_DIR_TAB_BACKWARD;
+ else
+ direction = GTK_DIR_TAB_FORWARD;
+ wrap_around = TRUE;
+ break;
+ case CLUTTER_KEY_ISO_Left_Tab:
+ direction = GTK_DIR_TAB_BACKWARD;
+ wrap_around = TRUE;
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ focused = clutter_stage_get_key_focus (CLUTTER_STAGE (stage));
+ if (!focused)
+ return FALSE;
+
+ for (group = focused; group != stage; group = clutter_actor_get_parent (group))
+ {
+ if (g_hash_table_lookup (manager->priv->groups, group))
+ {
+ return st_widget_navigate_focus (ST_WIDGET (group), focused,
+ direction, wrap_around);
+ }
+ }
+ return FALSE;
+}
+
+/**
+ * st_focus_manager_get_for_stage:
+ * @stage: a #ClutterStage
+ *
+ * Gets the #StFocusManager for @stage, creating it if necessary.
+ *
+ * Return value: (transfer none): the focus manager for @stage
+ */
+StFocusManager *
+st_focus_manager_get_for_stage (ClutterStage *stage)
+{
+ StFocusManager *manager;
+
+ manager = g_object_get_data (G_OBJECT (stage), "st-focus-manager");
+ if (!manager)
+ {
+ manager = g_object_new (ST_TYPE_FOCUS_MANAGER, NULL);
+ g_object_set_data_full (G_OBJECT (stage), "st-focus-manager",
+ manager, g_object_unref);
+
+ g_signal_connect (stage, "event",
+ G_CALLBACK (st_focus_manager_stage_event), manager);
+ }
+
+ return manager;
+}
+
+static void
+remove_destroyed_group (ClutterActor *actor,
+ gpointer user_data)
+{
+ StFocusManager *manager = user_data;
+
+ st_focus_manager_remove_group (manager, ST_WIDGET (actor));
+}
+
+/**
+ * st_focus_manager_add_group:
+ * @manager: the #StFocusManager
+ * @root: the root container of the group
+ *
+ * Adds a new focus group to @manager. When the focus is in an actor
+ * that is a descendant of @root, @manager will handle moving focus
+ * from one actor to another within @root based on keyboard events.
+ */
+void
+st_focus_manager_add_group (StFocusManager *manager,
+ StWidget *root)
+{
+ g_signal_connect (root, "destroy",
+ G_CALLBACK (remove_destroyed_group),
+ manager);
+ g_hash_table_insert (manager->priv->groups, root, GINT_TO_POINTER (1));
+}
+
+/**
+ * st_focus_manager_remove_group:
+ * @manager: the #StFocusManager
+ * @root: the root container of the group
+ *
+ * Removes the group rooted at @root from @manager
+ */
+void
+st_focus_manager_remove_group (StFocusManager *manager,
+ StWidget *root)
+{
+ g_hash_table_remove (manager->priv->groups, root);
+}
diff --git a/src/st/st-focus-manager.h b/src/st/st-focus-manager.h
new file mode 100644
index 000000000..9d4dc30d9
--- /dev/null
+++ b/src/st/st-focus-manager.h
@@ -0,0 +1,79 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-focus-manager.h: Keyboard focus manager
+ *
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
+#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
+#error "Only can be included directly.h"
+#endif
+
+#ifndef __ST_FOCUS_MANAGER_H__
+#define __ST_FOCUS_MANAGER_H__
+
+#include
+#include
+
+G_BEGIN_DECLS
+
+#define ST_TYPE_FOCUS_MANAGER (st_focus_manager_get_type ())
+#define ST_FOCUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_FOCUS_MANAGER, StFocusManager))
+#define ST_IS_FOCUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_FOCUS_MANAGER))
+#define ST_FOCUS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_FOCUS_MANAGER, StFocusManagerClass))
+#define ST_IS_FOCUS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_FOCUS_MANAGER))
+#define ST_FOCUS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_FOCUS_MANAGER, StFocusManagerClass))
+
+typedef struct _StFocusManager StFocusManager;
+typedef struct _StFocusManagerPrivate StFocusManagerPrivate;
+typedef struct _StFocusManagerClass StFocusManagerClass;
+
+/**
+ * StFocusManager:
+ *
+ * The #StFocusManager struct contains only private data
+ */
+struct _StFocusManager
+{
+ /*< private >*/
+ GObject parent_instance;
+
+ StFocusManagerPrivate *priv;
+};
+
+/**
+ * StFocusManagerClass:
+ *
+ * The #StFocusManagerClass struct contains only private data
+ */
+struct _StFocusManagerClass
+{
+ /*< private >*/
+ GObjectClass parent_class;
+};
+
+GType st_focus_manager_get_type (void) G_GNUC_CONST;
+
+StFocusManager *st_focus_manager_get_for_stage (ClutterStage *stage);
+
+void st_focus_manager_add_group (StFocusManager *manager,
+ StWidget *root);
+void st_focus_manager_remove_group (StFocusManager *manager,
+ StWidget *root);
+
+G_END_DECLS
+
+#endif /* __ST_FOCUS_MANAGER_H__ */
diff --git a/src/st/st-group.c b/src/st/st-group.c
index 0942be13c..b981de056 100644
--- a/src/st/st-group.c
+++ b/src/st/st-group.c
@@ -1,6 +1,8 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * st-group.h: A fixed layout container based on ClutterGroup
+ * st-group.c: A fixed layout container based on ClutterGroup
+ *
+ * Copyright 2010 Florian Müllner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -12,9 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-group.h b/src/st/st-group.h
index bf7e34b6f..af2428758 100644
--- a/src/st/st-group.h
+++ b/src/st/st-group.h
@@ -2,6 +2,8 @@
/*
* st-group.h: A fixed layout container based on ClutterGroup
*
+ * Copyright 2010 Florian Müllner
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
@@ -12,10 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-icon-colors.c b/src/st/st-icon-colors.c
new file mode 100644
index 000000000..0655246c8
--- /dev/null
+++ b/src/st/st-icon-colors.c
@@ -0,0 +1,108 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-icon-colors.c: Colors for colorizing a symbolic icon
+ *
+ * Copyright 2010 Red Hat, Inc.
+ * Copyright 2010 Florian Müllner
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
+#include "st-icon-colors.h"
+
+/**
+ * st_icon_colors_new:
+ *
+ * Creates a new #StIconColors. All colors are initialized to transparent black.
+ *
+ * Return value: a newly created #StIconColors. Free with st_icon_colors_unref()
+ */
+StIconColors *
+st_icon_colors_new (void)
+{
+ StIconColors *colors;
+
+ colors = g_slice_new0 (StIconColors);
+ colors->ref_count = 1;
+
+ return colors;
+}
+
+/**
+ * st_icon_colors_ref:
+ * @colors: a #StIconColors
+ *
+ * Atomically increments the reference count of @colors by one.
+ *
+ * Returns: the passed in #StIconColors.
+ */
+StIconColors *
+st_icon_colors_ref (StIconColors *colors)
+{
+ g_return_val_if_fail (colors != NULL, NULL);
+ g_return_val_if_fail (colors->ref_count > 0, colors);
+
+ g_atomic_int_add ((volatile int *)&colors->ref_count, 1);
+ return colors;
+}
+
+/**
+ * st_icon_colors_unref:
+ * @colors: a #StIconColors
+ *
+ * Atomically decrements the reference count of @colors by one.
+ * If the reference count drops to 0, all memory allocated by the
+ * #StIconColors is released.
+ */
+void
+st_icon_colors_unref (StIconColors *colors)
+{
+ g_return_if_fail (colors != NULL);
+ g_return_if_fail (colors->ref_count > 0);
+
+ if (g_atomic_int_exchange_and_add ((volatile int *)&colors->ref_count, -1) - 1 == 0)
+ g_slice_free (StIconColors, colors);
+}
+
+/**
+ * st_icon_colors_copy:
+ * @colors: a #StIconColors
+ *
+ * Creates a new StIconColors structure that is a copy of the passed
+ * in @colors. You would use this function instead of st_icon_colors_ref()
+ * if you were planning to change colors in the result.
+ *
+ * Returns: a newly created #StIconColors.
+ */
+StIconColors *
+st_icon_colors_copy (StIconColors *colors)
+{
+ StIconColors *copy;
+
+ g_return_val_if_fail (colors != NULL, NULL);
+
+ copy = st_icon_colors_new ();
+
+ copy->foreground = colors->foreground;
+ copy->warning = colors->warning;
+ copy->error = colors->error;
+ copy->success = colors->success;
+
+ return copy;
+}
+
+G_DEFINE_BOXED_TYPE (StIconColors,
+ st_icon_colors,
+ st_icon_colors_ref,
+ st_icon_colors_unref)
diff --git a/src/st/st-icon-colors.h b/src/st/st-icon-colors.h
new file mode 100644
index 000000000..b582308a5
--- /dev/null
+++ b/src/st/st-icon-colors.h
@@ -0,0 +1,41 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+#ifndef __ST_ICON_COLORS__
+#define __ST_ICON_COLORS__
+
+#include
+
+G_BEGIN_DECLS
+
+#define ST_TYPE_ICON_COLORS (st_icon_colors_get_type ())
+
+typedef struct _StIconColors StIconColors;
+
+/**
+ * StIconColors:
+ * @foreground: foreground color
+ * @warning: color indicating a warning state
+ * @error: color indicating an error state
+ * @success: color indicating a successful operation
+ *
+ * The #StIconColors structure encapsulates colors for colorizing a symbolic
+ * icon.
+ */
+struct _StIconColors {
+ volatile guint ref_count;
+
+ ClutterColor foreground;
+ ClutterColor warning;
+ ClutterColor error;
+ ClutterColor success;
+};
+
+GType st_icon_colors_get_type (void) G_GNUC_CONST;
+
+StIconColors *st_icon_colors_new (void);
+StIconColors *st_icon_colors_ref (StIconColors *colors);
+void st_icon_colors_unref (StIconColors *colors);
+StIconColors *st_icon_colors_copy (StIconColors *colors);
+
+G_END_DECLS
+
+#endif /* __ST_ICON_COLORS__ */
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
new file mode 100644
index 000000000..94e6842df
--- /dev/null
+++ b/src/st/st-icon.c
@@ -0,0 +1,492 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-icon.c: icon widget
+ *
+ * Copyright 2009, 2010 Intel Corporation.
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
+/**
+ * SECTION:st-icon
+ * @short_description: a simple styled icon actor
+ *
+ * #StIcon is a simple styled texture actor that displays an image from
+ * a stylesheet.
+ */
+
+#include "st-enum-types.h"
+#include "st-icon.h"
+#include "st-texture-cache.h"
+#include "st-private.h"
+
+enum
+{
+ PROP_0,
+
+ PROP_ICON_NAME,
+ PROP_ICON_TYPE,
+ PROP_ICON_SIZE
+};
+
+G_DEFINE_TYPE (StIcon, st_icon, ST_TYPE_WIDGET)
+
+#define ST_ICON_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ST_TYPE_ICON, StIconPrivate))
+
+struct _StIconPrivate
+{
+ ClutterActor *icon_texture;
+
+ gchar *icon_name;
+ StIconType icon_type;
+ gint prop_icon_size; /* icon size set as property */
+ gint theme_icon_size; /* icon size from theme node */
+ gint icon_size; /* icon size we are using */
+};
+
+static void st_icon_update (StIcon *icon);
+static gboolean st_icon_update_icon_size (StIcon *icon);
+
+#define DEFAULT_ICON_SIZE 48
+#define DEFAULT_ICON_TYPE ST_ICON_SYMBOLIC
+
+static void
+st_icon_set_property (GObject *gobject,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ StIcon *icon = ST_ICON (gobject);
+
+ switch (prop_id)
+ {
+ case PROP_ICON_NAME:
+ st_icon_set_icon_name (icon, g_value_get_string (value));
+ break;
+
+ case PROP_ICON_TYPE:
+ st_icon_set_icon_type (icon, g_value_get_enum (value));
+ break;
+
+ case PROP_ICON_SIZE:
+ st_icon_set_icon_size (icon, g_value_get_int (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+st_icon_get_property (GObject *gobject,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ StIcon *icon = ST_ICON (gobject);
+
+ switch (prop_id)
+ {
+ case PROP_ICON_NAME:
+ g_value_set_string (value, st_icon_get_icon_name (icon));
+ break;
+
+ case PROP_ICON_TYPE:
+ g_value_set_enum (value, st_icon_get_icon_type (icon));
+ break;
+
+ case PROP_ICON_SIZE:
+ g_value_set_int (value, st_icon_get_icon_size (icon));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+st_icon_dispose (GObject *gobject)
+{
+ StIconPrivate *priv = ST_ICON (gobject)->priv;
+
+ if (priv->icon_texture)
+ {
+ clutter_actor_destroy (priv->icon_texture);
+ priv->icon_texture = NULL;
+ }
+
+ G_OBJECT_CLASS (st_icon_parent_class)->dispose (gobject);
+}
+
+static void
+st_icon_get_preferred_height (ClutterActor *actor,
+ gfloat for_width,
+ gfloat *min_height_p,
+ gfloat *nat_height_p)
+{
+ StIconPrivate *priv = ST_ICON (actor)->priv;
+ StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
+
+ if (min_height_p)
+ *min_height_p = priv->icon_size;
+
+ if (nat_height_p)
+ *nat_height_p = priv->icon_size;
+
+ st_theme_node_adjust_preferred_height (theme_node, min_height_p, nat_height_p);
+}
+
+static void
+st_icon_get_preferred_width (ClutterActor *actor,
+ gfloat for_height,
+ gfloat *min_width_p,
+ gfloat *nat_width_p)
+{
+ StIconPrivate *priv = ST_ICON (actor)->priv;
+ StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
+
+ if (min_width_p)
+ *min_width_p = priv->icon_size;
+
+ if (nat_width_p)
+ *nat_width_p = priv->icon_size;
+
+ st_theme_node_adjust_preferred_width (theme_node, min_width_p, nat_width_p);
+}
+
+static void
+st_icon_allocate (ClutterActor *actor,
+ const ClutterActorBox *box,
+ ClutterAllocationFlags flags)
+{
+ StIconPrivate *priv = ST_ICON (actor)->priv;
+ StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
+
+ CLUTTER_ACTOR_CLASS (st_icon_parent_class)->allocate (actor, box, flags);
+
+ if (priv->icon_texture)
+ {
+ ClutterActorBox content_box;
+
+ st_theme_node_get_content_box (theme_node, box, &content_box);
+
+ /* Center the texture in the allocation; scaling up the icon from the size
+ * we loaded it at is just a bad idea and probably accidental. Main downside
+ * of doing this is that it may not be obvious that they have to turn off
+ * fill to align the icon non-centered in the parent container.
+ *
+ * We don't use _st_allocate_fill() for a bit of efficiency and because we
+ * expect to get rid of the child actor in favor of a CoglTexture in the
+ * future.
+ */
+ content_box.x1 = (int)(0.5 + content_box.x1 + (content_box.x2 - content_box.x1 - priv->icon_size) / 2.);
+ content_box.x2 = content_box.x1 + priv->icon_size;
+ content_box.y1 = (int)(0.5 + content_box.y1 + (content_box.y2 - content_box.y1 - priv->icon_size) / 2.);
+ content_box.y2 = content_box.y1 + priv->icon_size;
+
+ clutter_actor_allocate (priv->icon_texture, &content_box, flags);
+ }
+}
+
+static void
+st_icon_paint (ClutterActor *actor)
+{
+ StIconPrivate *priv = ST_ICON (actor)->priv;
+
+ /* Chain up to paint background */
+ CLUTTER_ACTOR_CLASS (st_icon_parent_class)->paint (actor);
+
+ if (priv->icon_texture)
+ clutter_actor_paint (priv->icon_texture);
+}
+
+static void
+st_icon_map (ClutterActor *actor)
+{
+ StIconPrivate *priv = ST_ICON (actor)->priv;
+
+ CLUTTER_ACTOR_CLASS (st_icon_parent_class)->map (actor);
+
+ if (priv->icon_texture)
+ clutter_actor_map (priv->icon_texture);
+}
+
+static void
+st_icon_unmap (ClutterActor *actor)
+{
+ StIconPrivate *priv = ST_ICON (actor)->priv;
+
+ CLUTTER_ACTOR_CLASS (st_icon_parent_class)->unmap (actor);
+
+ if (priv->icon_texture)
+ clutter_actor_unmap (priv->icon_texture);
+}
+
+static void
+st_icon_style_changed (StWidget *widget)
+{
+ StIcon *self = ST_ICON (widget);
+ StThemeNode *theme_node = st_widget_get_theme_node (widget);
+ StIconPrivate *priv = self->priv;
+
+ priv->theme_icon_size = st_theme_node_get_length (theme_node, "icon-size");
+ st_icon_update_icon_size (self);
+ st_icon_update (self);
+}
+
+static void
+st_icon_class_init (StIconClass *klass)
+{
+ GParamSpec *pspec;
+
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
+ StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (StIconPrivate));
+
+ object_class->get_property = st_icon_get_property;
+ object_class->set_property = st_icon_set_property;
+ object_class->dispose = st_icon_dispose;
+
+ actor_class->get_preferred_height = st_icon_get_preferred_height;
+ actor_class->get_preferred_width = st_icon_get_preferred_width;
+ actor_class->allocate = st_icon_allocate;
+ actor_class->paint = st_icon_paint;
+ actor_class->map = st_icon_map;
+ actor_class->unmap = st_icon_unmap;
+
+ widget_class->style_changed = st_icon_style_changed;
+
+ pspec = g_param_spec_string ("icon-name",
+ "Icon name",
+ "An icon name",
+ NULL, ST_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ICON_NAME, pspec);
+
+ pspec = g_param_spec_enum ("icon-type",
+ "Icon type",
+ "The type of icon that should be used",
+ ST_TYPE_ICON_TYPE,
+ DEFAULT_ICON_TYPE,
+ ST_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ICON_TYPE, pspec);
+
+ pspec = g_param_spec_int ("icon-size",
+ "Icon size",
+ "The size if the icon, if positive. Otherwise the size will be derived from the current style",
+ -1, G_MAXINT, -1,
+ ST_PARAM_READWRITE);
+ g_object_class_install_property (object_class, PROP_ICON_SIZE, pspec);
+}
+
+static void
+st_icon_init (StIcon *self)
+{
+ self->priv = ST_ICON_GET_PRIVATE (self);
+
+ self->priv->icon_size = DEFAULT_ICON_SIZE;
+ self->priv->prop_icon_size = -1;
+ self->priv->icon_type = DEFAULT_ICON_TYPE;
+}
+
+static void
+st_icon_update (StIcon *icon)
+{
+ StIconPrivate *priv = icon->priv;
+
+ /* Get rid of the old one */
+ if (priv->icon_texture)
+ {
+ clutter_actor_destroy (priv->icon_texture);
+ priv->icon_texture = NULL;
+ }
+
+ /* Try to lookup the new one */
+ if (priv->icon_name)
+ {
+ StThemeNode *theme_node = st_widget_peek_theme_node (ST_WIDGET (icon));
+
+ if (theme_node)
+ {
+ StTextureCache *cache = st_texture_cache_get_default ();
+ priv->icon_texture = st_texture_cache_load_icon_name (cache,
+ theme_node,
+ priv->icon_name,
+ priv->icon_type,
+ priv->icon_size);
+
+ if (priv->icon_texture)
+ clutter_actor_set_parent (priv->icon_texture, CLUTTER_ACTOR (icon));
+ }
+ }
+}
+
+static gboolean
+st_icon_update_icon_size (StIcon *icon)
+{
+ StIconPrivate *priv = icon->priv;
+ int new_size;
+
+ if (priv->prop_icon_size > 0)
+ new_size = priv->prop_icon_size;
+ else if (priv->theme_icon_size > 0)
+ new_size = priv->theme_icon_size;
+ else
+ new_size = DEFAULT_ICON_SIZE;
+
+ if (new_size != priv->icon_size)
+ {
+ clutter_actor_queue_relayout (CLUTTER_ACTOR (icon));
+ priv->icon_size = new_size;
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+/**
+ * st_icon_new:
+ *
+ * Create a newly allocated #StIcon
+ *
+ * Returns: A newly allocated #StIcon
+ */
+ClutterActor *
+st_icon_new (void)
+{
+ return g_object_new (ST_TYPE_ICON, NULL);
+}
+
+const gchar *
+st_icon_get_icon_name (StIcon *icon)
+{
+ g_return_val_if_fail (ST_IS_ICON (icon), NULL);
+
+ return icon->priv->icon_name;
+}
+
+void
+st_icon_set_icon_name (StIcon *icon,
+ const gchar *icon_name)
+{
+ StIconPrivate *priv;
+
+ g_return_if_fail (ST_IS_ICON (icon));
+
+ priv = icon->priv;
+
+ /* Check if there's no change */
+ if (g_strcmp0 (priv->icon_name, icon_name) == 0)
+ return;
+
+ g_free (priv->icon_name);
+ priv->icon_name = g_strdup (icon_name);
+
+ st_icon_update (icon);
+
+ g_object_notify (G_OBJECT (icon), "icon-name");
+}
+
+/**
+ * st_icon_get_icon_type:
+ * @icon: a #StIcon
+ *
+ * Gets the type of icon we'll look up to display in the actor.
+ * See st_icon_set_icon_type().
+ *
+ * Return value: the icon type.
+ */
+StIconType
+st_icon_get_icon_type (StIcon *icon)
+{
+ g_return_val_if_fail (ST_IS_ICON (icon), DEFAULT_ICON_TYPE);
+
+ return icon->priv->icon_type;
+}
+
+/**
+ * st_icon_set_icon_type:
+ * @icon: a #StIcon
+ * @icon_type: the type of icon to use
+ *
+ * Sets the type of icon we'll look up to display in the actor.
+ * The icon type determines whether we use a symbolic icon or
+ * a full color icon and also is used for specific handling for
+ * application and document icons.
+ */
+void
+st_icon_set_icon_type (StIcon *icon,
+ StIconType icon_type)
+{
+ StIconPrivate *priv;
+
+ g_return_if_fail (ST_IS_ICON (icon));
+
+ priv = icon->priv;
+
+ if (icon_type == priv->icon_type)
+ return;
+
+ priv->icon_type = icon_type;
+ st_icon_update (icon);
+
+ g_object_notify (G_OBJECT (icon), "icon-type");
+}
+
+/**
+ * st_icon_get_icon_size:
+ * @icon: an icon
+ *
+ * Gets the size explicit size on the icon. This is not necesariily
+ * the size that the icon will actually be displayed at.
+ *
+ * Return value: the size explicitly set, or -1 if no size has been set
+ */
+gint
+st_icon_get_icon_size (StIcon *icon)
+{
+ g_return_val_if_fail (ST_IS_ICON (icon), -1);
+
+ return icon->priv->prop_icon_size;
+}
+
+/**
+ * st_icon_set_icon_size:
+ * @icon: an icon
+ * @size: if positive, the new size, otherwise the size will be
+ * derived from the current style
+ *
+ * Sets an explicit size for the icon.
+ */
+void
+st_icon_set_icon_size (StIcon *icon,
+ gint size)
+{
+ StIconPrivate *priv;
+
+ g_return_if_fail (ST_IS_ICON (icon));
+
+ priv = icon->priv;
+ if (priv->prop_icon_size != size)
+ {
+ priv->prop_icon_size = size;
+ if (st_icon_update_icon_size (icon))
+ st_icon_update (icon);
+ g_object_notify (G_OBJECT (icon), "icon-size");
+ }
+}
diff --git a/src/st/st-icon.h b/src/st/st-icon.h
new file mode 100644
index 000000000..bddb41d89
--- /dev/null
+++ b/src/st/st-icon.h
@@ -0,0 +1,100 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-icon.h: icon widget
+ *
+ * Copyright 2009, 2010 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Written by: Thomas Wood
+ *
+ */
+
+#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
+#error "Only can be included directly.h"
+#endif
+
+#ifndef _ST_ICON
+#define _ST_ICON
+
+#include
+#include
+
+#include
+
+G_BEGIN_DECLS
+
+#define ST_TYPE_ICON st_icon_get_type()
+
+#define ST_ICON(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_ICON, StIcon))
+
+#define ST_ICON_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_ICON, StIconClass))
+
+#define ST_IS_ICON(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_ICON))
+
+#define ST_IS_ICON_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_ICON))
+
+#define ST_ICON_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_ICON, StIconClass))
+
+typedef struct _StIconPrivate StIconPrivate;
+
+/**
+ * StIcon:
+ *
+ * The contents of this structure are private and should only be accessed
+ * through the public API.
+ */
+typedef struct {
+ /*< private >*/
+ StWidget parent;
+
+ StIconPrivate *priv;
+} StIcon;
+
+typedef struct {
+ StWidgetClass parent_class;
+
+ /* padding for future expansion */
+ void (*_padding_0) (void);
+ void (*_padding_1) (void);
+ void (*_padding_2) (void);
+ void (*_padding_3) (void);
+ void (*_padding_4) (void);
+} StIconClass;
+
+GType st_icon_get_type (void);
+
+ClutterActor* st_icon_new (void);
+
+
+
+const gchar *st_icon_get_icon_name (StIcon *icon);
+void st_icon_set_icon_name (StIcon *icon, const gchar *icon_name);
+
+void st_icon_set_icon_type (StIcon *icon, StIconType icon_type);
+StIconType st_icon_get_icon_type (StIcon *icon);
+
+gint st_icon_get_icon_size (StIcon *icon);
+void st_icon_set_icon_size (StIcon *icon, gint size);
+
+
+G_END_DECLS
+
+#endif /* _ST_ICON */
+
diff --git a/src/st/st-im-text.c b/src/st/st-im-text.c
index 23657ae87..5f00abfca 100644
--- a/src/st/st-im-text.c
+++ b/src/st/st-im-text.c
@@ -1,6 +1,8 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * st-im-text.c
+ * st-im-text.c: Text widget with input method support
+ *
+ * Copyright 2009 Red Hat, Inc.
*
* This started as a copy of ClutterIMText converted to use
* GtkIMContext rather than ClutterIMContext. Original code:
@@ -18,10 +20,8 @@
* 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, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-im-text.h b/src/st/st-im-text.h
index e897b1041..d6f10f412 100644
--- a/src/st/st-im-text.h
+++ b/src/st/st-im-text.h
@@ -1,6 +1,8 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * st-imtext.h
+ * st-im-text.h: Text widget with input method support
+ *
+ * Copyright 2009 Red Hat, Inc.
*
* This is a copy of ClutterIMText converted to use GtkIMContext rather
* than ClutterIMContext. Original code:
@@ -18,10 +20,8 @@
* 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, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-label.c b/src/st/st-label.c
index cf7ae5a7f..38a7d715e 100644
--- a/src/st/st-label.c
+++ b/src/st/st-label.c
@@ -3,6 +3,8 @@
* st-label.c: Plain label actor
*
* Copyright 2008,2009 Intel Corporation
+ * Copyright 2009 Red Hat, Inc.
+ * Copyright 2010 Florian Müllner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,11 +16,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-label.h b/src/st/st-label.h
index 934a49420..abe32d9d8 100644
--- a/src/st/st-label.h
+++ b/src/st/st-label.h
@@ -14,12 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-overflow-box.c b/src/st/st-overflow-box.c
index 6d40049c3..9996b2a18 100644
--- a/src/st/st-overflow-box.c
+++ b/src/st/st-overflow-box.c
@@ -1,9 +1,9 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * Portions derived from st-box-layout.c, which is
- * Copyright 2009 Intel Corporation.
- * Modified into -overflow-box, by Colin Walters , which is
- * Copyright 2009 Red Hat, Inc.
+ * st-overflow-box.c: A vertical box which paints as many actors as it can fit
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,9 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ * along with this program. If not, see .
*/
/**
@@ -314,27 +312,36 @@ st_overflow_box_allocate (ClutterActor *actor,
}
static void
-st_overflow_box_internal_paint (StOverflowBox *box)
+visible_children_iter_init (StOverflowBox *box,
+ GList **iter,
+ int *n)
+{
+ *iter = st_container_get_children_list (ST_CONTAINER (box));
+ *n = 0;
+}
+
+static ClutterActor *
+visible_children_iter (StOverflowBox *box,
+ GList **iter,
+ int *n)
{
StOverflowBoxPrivate *priv = box->priv;
- GList *l, *children;
- int i;
+ GList *l;
- i = 0;
- children = st_container_get_children_list (ST_CONTAINER (box));
- for (l = children; i < priv->n_visible && l; l = l->next)
+ for (l = *iter; *n < priv->n_visible && l; l = l->next)
{
ClutterActor *child = (ClutterActor*) l->data;
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
if (!clutter_actor_get_fixed_position_set (child))
- i++;
+ (*n)++;
- clutter_actor_paint (child);
+ *iter = l->next;
+ return child;
}
- for (;l; l = l->next)
+ for (; l; l = l->next)
{
ClutterActor *child = (ClutterActor*) l->data;
@@ -342,8 +349,25 @@ st_overflow_box_internal_paint (StOverflowBox *box)
continue;
if (clutter_actor_get_fixed_position_set (child))
- clutter_actor_paint (child);
+ {
+ *iter = l->next;
+ return child;
+ }
}
+
+ return NULL;
+}
+
+static void
+st_overflow_box_internal_paint (StOverflowBox *box)
+{
+ ClutterActor *child;
+ GList *children;
+ int n;
+
+ visible_children_iter_init (box, &children, &n);
+ while ((child = visible_children_iter (box, &children, &n)))
+ clutter_actor_paint (child);
}
static void
@@ -379,12 +403,29 @@ st_overflow_box_style_changed (StWidget *self)
ST_WIDGET_CLASS (st_overflow_box_parent_class)->style_changed (self);
}
+static GList *
+st_overflow_box_get_focus_chain (StContainer *container)
+{
+ StOverflowBox *box = ST_OVERFLOW_BOX (container);
+ ClutterActor *child;
+ GList *children, *focus_chain;
+ int n;
+
+ focus_chain = NULL;
+ visible_children_iter_init (box, &children, &n);
+ while ((child = visible_children_iter (box, &children, &n)))
+ focus_chain = g_list_prepend (focus_chain, child);
+
+ return g_list_reverse (focus_chain);
+}
+
static void
st_overflow_box_class_init (StOverflowBoxClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
+ StContainerClass *container_class = ST_CONTAINER_CLASS (klass);
GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (StOverflowBoxPrivate));
@@ -400,6 +441,8 @@ st_overflow_box_class_init (StOverflowBoxClass *klass)
widget_class->style_changed = st_overflow_box_style_changed;
+ container_class->get_focus_chain = st_overflow_box_get_focus_chain;
+
pspec = g_param_spec_uint ("min-children",
"Min Children",
"The actor will request a minimum size large enough to include this many children",
diff --git a/src/st/st-overflow-box.h b/src/st/st-overflow-box.h
index 47632ade0..5bba7fb4f 100644
--- a/src/st/st-overflow-box.h
+++ b/src/st/st-overflow-box.h
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * st-overflow-box.h: box which hides actors that don't fit
+ * st-overflow-box.h: A vertical box which paints as many actors as it can fit
*
* Copyright 2009 Red Hat, Inc.
*
@@ -14,9 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-private.c b/src/st/st-private.c
index 264ed727e..f4707691e 100644
--- a/src/st/st-private.c
+++ b/src/st/st-private.c
@@ -1,4 +1,24 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-private.h: Private declarations and functions
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010 Florian Müllner
+ * Copyright 2010 Intel Corporation
+ * Copyright 2010 Giovanni Campagna
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include
#include
@@ -324,6 +344,49 @@ _st_set_text_from_style (ClutterText *text,
}
}
+/**
+ * _st_create_texture_material:
+ * @src_texture: The CoglTexture for the material
+ *
+ * Creates a simple material which contains the given texture as a
+ * single layer.
+ */
+CoglHandle
+_st_create_texture_material (CoglHandle src_texture)
+{
+ static CoglHandle texture_material_template = COGL_INVALID_HANDLE;
+ CoglHandle material;
+
+ g_return_val_if_fail (src_texture != COGL_INVALID_HANDLE,
+ COGL_INVALID_HANDLE);
+
+ /* We use a material that has a dummy texture as a base for all
+ texture materials. The idea is that only the Cogl texture object
+ would be different in the children so it is likely that Cogl will
+ be able to share GL programs between all the textures. */
+ if (G_UNLIKELY (texture_material_template == COGL_INVALID_HANDLE))
+ {
+ static const guint8 white_pixel[] = { 0xff, 0xff, 0xff, 0xff };
+ CoglHandle dummy_texture;
+
+ dummy_texture =
+ cogl_texture_new_from_data (1, 1,
+ COGL_TEXTURE_NONE,
+ COGL_PIXEL_FORMAT_RGBA_8888_PRE,
+ COGL_PIXEL_FORMAT_ANY,
+ 4, white_pixel);
+
+ texture_material_template = cogl_material_new ();
+ cogl_material_set_layer (texture_material_template, 0, dummy_texture);
+ cogl_handle_unref (dummy_texture);
+ }
+
+ material = cogl_material_copy (texture_material_template);
+
+ cogl_material_set_layer (material, 0, src_texture);
+
+ return material;
+}
/*****
* Shadows
diff --git a/src/st/st-private.h b/src/st/st-private.h
index 33d58d422..f958842d3 100644
--- a/src/st/st-private.h
+++ b/src/st/st-private.h
@@ -1,9 +1,11 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * st-private.h: Private declarations
+ * st-private.h: Private declarations and functions
*
* Copyright 2007 OpenedHand
* Copyright 2009 Intel Corporation.
+ * Copyright 2010 Red Hat, Inc.
+ * Copyright 2010 Florian Müllner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,10 +17,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
+ * along with this program. If not, see .
*/
#ifndef __ST_PRIVATE_H__
@@ -73,6 +72,8 @@ void _st_allocate_fill (StWidget *parent,
void _st_set_text_from_style (ClutterText *text,
StThemeNode *theme_node);
+CoglHandle _st_create_texture_material (CoglHandle src_texture);
+
/* Helper for widgets which need to draw additional shadows */
CoglHandle _st_create_shadow_material (StShadow *shadow_spec,
CoglHandle src_texture);
diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c
index f6b798ee8..61acdf06e 100644
--- a/src/st/st-scroll-bar.c
+++ b/src/st/st-scroll-bar.c
@@ -3,7 +3,9 @@
* st-scroll-bar.c: Scroll bar actor
*
* Copyright 2008 OpenedHand
- * Copyright 2009 Intel Corporation.
+ * Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010 Maxim Ermilov
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,12 +17,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Chris Lord
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-scroll-bar.h b/src/st/st-scroll-bar.h
index 2505dd347..371e2a58f 100644
--- a/src/st/st-scroll-bar.h
+++ b/src/st/st-scroll-bar.h
@@ -15,13 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Chris Lord
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c
index fbe0a03fd..14df6005b 100644
--- a/src/st/st-scroll-view.c
+++ b/src/st/st-scroll-view.c
@@ -4,6 +4,8 @@
*
* Copyright 2008 OpenedHand
* Copyright 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010 Maxim Ermilov
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,12 +17,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Chris Lord
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
/**
@@ -284,7 +281,7 @@ st_scroll_view_dispose (GObject *object)
{
g_object_run_dispose (G_OBJECT (priv->vadjustment));
g_object_unref (priv->vadjustment);
- priv->hadjustment = NULL;
+ priv->vadjustment = NULL;
}
/* since it's impossible to get a handle to these actors, we can
diff --git a/src/st/st-scroll-view.h b/src/st/st-scroll-view.h
index bcd4bbb5a..ddb1ebb7d 100644
--- a/src/st/st-scroll-view.h
+++ b/src/st/st-scroll-view.h
@@ -4,6 +4,8 @@
*
* Copyright 2008 OpenedHand
* Copyright 2009 Intel Corporation.
+ * Copyright 2010 Red Hat, Inc.
+ * Copyright 2010 Maxim Ermilov
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,13 +17,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Chris Lord
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-scrollable.c b/src/st/st-scrollable.c
index f10f9a5b2..b2c5451b8 100644
--- a/src/st/st-scrollable.c
+++ b/src/st/st-scrollable.c
@@ -4,6 +4,7 @@
*
* Copyright 2008 OpenedHand
* Copyright 2009 Intel Corporation.
+ * Copyright 2010 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,12 +16,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Written by: Chris Lord
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
#include "st-scrollable.h"
diff --git a/src/st/st-scrollable.h b/src/st/st-scrollable.h
index 22884eb15..5c8d32ef3 100644
--- a/src/st/st-scrollable.h
+++ b/src/st/st-scrollable.h
@@ -15,13 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Chris Lord
- * Port to St by: Robert Staudinger
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-shadow.c b/src/st/st-shadow.c
index 29bcd08c1..78cf3dea4 100644
--- a/src/st/st-shadow.c
+++ b/src/st/st-shadow.c
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-shadow.c: Boxed type holding for -st-shadow attributes
+ *
+ * Copyright 2009, 2010 Florian Müllner
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#include "config.h"
#include "st-shadow.h"
diff --git a/src/st/st-shadow.h b/src/st/st-shadow.h
index f5fe82332..1a057c307 100644
--- a/src/st/st-shadow.h
+++ b/src/st/st-shadow.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-shadow.h: Boxed type holding for -st-shadow attributes
+ *
+ * Copyright 2009, 2010 Florian Müllner
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_SHADOW__
#define __ST_SHADOW__
diff --git a/src/st/st-subtexture.c b/src/st/st-subtexture.c
deleted file mode 100644
index c51fc50de..000000000
--- a/src/st/st-subtexture.c
+++ /dev/null
@@ -1,576 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/*
- * st-subtexture.h: Class to wrap a texture and "subframe" it.
- * based on
- * st-texture-frame.c: Expandible texture actor
- *
- * Copyright 2007 OpenedHand
- * Copyright 2009 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU Lesser General Public License,
- * version 2.1, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include
-#include
-
-#include "st-subtexture.h"
-
-enum
-{
- PROP_0,
-
- PROP_PARENT_TEXTURE,
-
- PROP_TOP,
- PROP_LEFT,
- PROP_WIDTH,
- PROP_HEIGHT
-};
-
-G_DEFINE_TYPE (StSubtexture, st_subtexture, CLUTTER_TYPE_ACTOR);
-
-#define ST_SUBTEXTURE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ST_TYPE_SUBTEXTURE, StSubtexturePrivate))
-
-struct _StSubtexturePrivate
-{
- ClutterTexture *parent_texture;
-
- int left;
- int top;
- int width;
- int height;
-
- CoglHandle material;
-};
-
-static void
-st_subtexture_get_preferred_width (ClutterActor *self,
- gfloat for_height,
- gfloat *min_width_p,
- gfloat *natural_width_p)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (self)->priv;
-
- if (G_UNLIKELY (priv->parent_texture == NULL))
- {
- if (min_width_p)
- *min_width_p = 0;
-
- if (natural_width_p)
- *natural_width_p = 0;
- }
- else
- {
- if (min_width_p)
- *min_width_p = priv->width;
- if (natural_width_p)
- *natural_width_p = priv->width;
- }
-}
-
-static void
-st_subtexture_get_preferred_height (ClutterActor *self,
- gfloat for_width,
- gfloat *min_height_p,
- gfloat *natural_height_p)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (self)->priv;
-
- if (G_UNLIKELY (priv->parent_texture == NULL))
- {
- if (min_height_p)
- *min_height_p = 0;
-
- if (natural_height_p)
- *natural_height_p = 0;
- }
- else
- {
- if (min_height_p)
- *min_height_p = priv->height;
- if (natural_height_p)
- *natural_height_p = priv->height;
- }
-}
-
-static void
-st_subtexture_realize (ClutterActor *self)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (self)->priv;
-
- if (priv->material != COGL_INVALID_HANDLE)
- return;
-
- priv->material = cogl_material_new ();
-
- CLUTTER_ACTOR_SET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
-}
-
-static void
-st_subtexture_unrealize (ClutterActor *self)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (self)->priv;
-
- if (priv->material == COGL_INVALID_HANDLE)
- return;
-
- cogl_handle_unref (priv->material);
- priv->material = COGL_INVALID_HANDLE;
-
- CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
-}
-
-static void
-st_subtexture_paint (ClutterActor *self)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (self)->priv;
- CoglHandle cogl_texture = COGL_INVALID_HANDLE;
- ClutterActorBox box = { 0, 0, 0, 0 };
- gfloat tx1, ty1, tx2, ty2, tex_width, tex_height, width, height;
- guint8 opacity;
-
- /* no need to paint stuff if we don't have a texture */
- if (G_UNLIKELY (priv->parent_texture == NULL))
- return;
-
- /* parent texture may have been hidden, so need to make sure it gets
- * realized
- */
- if (!CLUTTER_ACTOR_IS_REALIZED (priv->parent_texture))
- clutter_actor_realize (CLUTTER_ACTOR (priv->parent_texture));
-
- cogl_texture = clutter_texture_get_cogl_texture (priv->parent_texture);
- if (cogl_texture == COGL_INVALID_HANDLE)
- return;
-
- tex_width = cogl_texture_get_width (cogl_texture);
- tex_height = cogl_texture_get_height (cogl_texture);
-
- clutter_actor_get_allocation_box (self, &box);
-
- width = box.x2 - box.x1;
- height = box.y2 - box.y1;
-
- tx1 = 1.0 * priv->left / tex_width;
- ty1 = 1.0 * priv->top / tex_height;
-
- tx2 = 1.0 * (priv->left + priv->width) / tex_width;
- ty2 = 1.0 * (priv->top + priv->height) / tex_height;
-
-
- opacity = clutter_actor_get_paint_opacity (self);
-
- g_assert (priv->material != COGL_INVALID_HANDLE);
-
- /* set the source material using the parent texture's COGL handle */
- cogl_material_set_color4ub (priv->material, 255, 255, 255, opacity);
- cogl_material_set_layer (priv->material, 0, cogl_texture);
- cogl_set_source (priv->material);
-
- cogl_rectangle_with_texture_coords (0,0, (float) width, (float) height,
- tx1, ty1, tx2, ty2);
-}
-
-static inline void
-st_subtexture_set_frame_internal (StSubtexture *frame,
- int left,
- int top,
- int width,
- int height)
-{
- StSubtexturePrivate *priv = frame->priv;
- GObject *gobject = G_OBJECT (frame);
- gboolean changed = FALSE;
-
- g_object_freeze_notify (gobject);
-
- if (priv->top != top)
- {
- priv->top = top;
- g_object_notify (gobject, "top");
- changed = TRUE;
- }
-
- if (priv->left != left)
- {
- priv->left = left;
- g_object_notify (gobject, "left");
- changed = TRUE;
- }
-
- if (priv->width != width)
- {
- priv->width = width;
- g_object_notify (gobject, "width");
- changed = TRUE;
- }
-
- if (priv->height != height)
- {
- priv->height = height;
- g_object_notify (gobject, "height");
- changed = TRUE;
- }
-
- if (changed && CLUTTER_ACTOR_IS_VISIBLE (frame))
- clutter_actor_queue_redraw (CLUTTER_ACTOR (frame));
-
- g_object_thaw_notify (gobject);
-}
-
-static void
-st_subtexture_set_property (GObject *gobject,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- StSubtexture *frame = ST_SUBTEXTURE (gobject);
- StSubtexturePrivate *priv = frame->priv;
-
- switch (prop_id)
- {
- case PROP_PARENT_TEXTURE:
- st_subtexture_set_parent_texture (frame,
- g_value_get_object (value));
- break;
-
- case PROP_TOP:
- st_subtexture_set_frame_internal (frame,
- priv->left,
- g_value_get_int (value),
- priv->width,
- priv->height);
- break;
-
- case PROP_LEFT:
- st_subtexture_set_frame_internal (frame,
- g_value_get_int (value),
- priv->top,
- priv->width,
- priv->height);
- break;
-
- case PROP_WIDTH:
- st_subtexture_set_frame_internal (frame,
- priv->left,
- priv->top,
- g_value_get_int (value),
- priv->height);
- break;
-
- case PROP_HEIGHT:
- st_subtexture_set_frame_internal (frame,
- priv->left,
- priv->top,
- priv->width,
- g_value_get_int (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
- break;
- }
-}
-
-static void
-st_subtexture_get_property (GObject *gobject,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (gobject)->priv;
-
- switch (prop_id)
- {
- case PROP_PARENT_TEXTURE:
- g_value_set_object (value, priv->parent_texture);
- break;
-
- case PROP_LEFT:
- g_value_set_int (value, priv->left);
- break;
-
- case PROP_TOP:
- g_value_set_int (value, priv->top);
- break;
-
- case PROP_WIDTH:
- g_value_set_int (value, priv->width);
- break;
-
- case PROP_HEIGHT:
- g_value_set_int (value, priv->height);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
- break;
- }
-}
-
-static void
-st_subtexture_dispose (GObject *gobject)
-{
- StSubtexturePrivate *priv = ST_SUBTEXTURE (gobject)->priv;
-
- if (priv->parent_texture)
- {
- g_object_unref (priv->parent_texture);
- priv->parent_texture = NULL;
- }
-
- if (priv->material)
- {
- cogl_handle_unref (priv->material);
- priv->material = COGL_INVALID_HANDLE;
- }
-
- G_OBJECT_CLASS (st_subtexture_parent_class)->dispose (gobject);
-}
-
-static void
-st_subtexture_class_init (StSubtextureClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
- GParamSpec *pspec;
-
- g_type_class_add_private (gobject_class, sizeof (StSubtexturePrivate));
-
- actor_class->get_preferred_width =
- st_subtexture_get_preferred_width;
- actor_class->get_preferred_height =
- st_subtexture_get_preferred_height;
- actor_class->realize = st_subtexture_realize;
- actor_class->unrealize = st_subtexture_unrealize;
- actor_class->paint = st_subtexture_paint;
-
- gobject_class->set_property = st_subtexture_set_property;
- gobject_class->get_property = st_subtexture_get_property;
- gobject_class->dispose = st_subtexture_dispose;
-
- pspec = g_param_spec_object ("parent-texture",
- "Parent Texture",
- "The parent ClutterTexture",
- CLUTTER_TYPE_TEXTURE,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_PARENT_TEXTURE, pspec);
-
- pspec = g_param_spec_int ("left",
- "Left",
- "Left offset",
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_LEFT, pspec);
-
- pspec = g_param_spec_int ("top",
- "Top",
- "Top offset",
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_TOP, pspec);
-
- pspec = g_param_spec_int ("width",
- "Width",
- "Width",
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_WIDTH, pspec);
-
- pspec = g_param_spec_int ("height",
- "Height",
- "Height",
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_HEIGHT, pspec);
-}
-
-static void
-st_subtexture_init (StSubtexture *self)
-{
- StSubtexturePrivate *priv;
-
- self->priv = priv = ST_SUBTEXTURE_GET_PRIVATE (self);
-
- priv->material = COGL_INVALID_HANDLE;
-}
-
-/**
- * st_subtexture_new:
- * @texture: a #ClutterTexture or %NULL
- * @left: left
- * @top: top
- * @width: width
- * @height: height
- *
- * A #StSubtexture is a specialized texture that efficiently clones
- * an area of the given @texture while keeping preserving portions of the
- * same texture.
- *
- * A #StSubtexture can be used to make a rectangular texture fit a
- * given size without stretching its borders.
- *
- * Return value: the newly created #StSubtexture
- */
-ClutterActor*
-st_subtexture_new (ClutterTexture *texture,
- gint left,
- gint top,
- gint width,
- gint height)
-{
- g_return_val_if_fail (texture == NULL || CLUTTER_IS_TEXTURE (texture), NULL);
-
- return g_object_new (ST_TYPE_SUBTEXTURE,
- "parent-texture", texture,
- "top", top,
- "left", left,
- "width", width,
- "height", height,
- NULL);
-}
-
-/**
- * st_subtexture_get_parent_texture:
- * @frame: A #StSubtexture
- *
- * Return the texture used by the #StSubtexture
- *
- * Returns: (transfer none): a #ClutterTexture owned by the #StSubtexture
- */
-ClutterTexture *
-st_subtexture_get_parent_texture (StSubtexture *frame)
-{
- g_return_val_if_fail (ST_IS_SUBTEXTURE (frame), NULL);
-
- return frame->priv->parent_texture;
-}
-
-/**
- * st_subtexture_set_parent_texture:
- * @frame: A #StSubtexture
- * @texture: A #ClutterTexture
- *
- * Set the #ClutterTexture used by this #StSubtexture
- *
- */
-void
-st_subtexture_set_parent_texture (StSubtexture *frame,
- ClutterTexture *texture)
-{
- StSubtexturePrivate *priv;
- gboolean was_visible;
-
- g_return_if_fail (ST_IS_SUBTEXTURE (frame));
- g_return_if_fail (texture == NULL || CLUTTER_IS_TEXTURE (texture));
-
- priv = frame->priv;
-
- was_visible = CLUTTER_ACTOR_IS_VISIBLE (frame);
-
- if (priv->parent_texture == texture)
- return;
-
- if (priv->parent_texture)
- {
- g_object_unref (priv->parent_texture);
- priv->parent_texture = NULL;
-
- if (was_visible)
- clutter_actor_hide (CLUTTER_ACTOR (frame));
- }
-
- if (texture)
- {
- priv->parent_texture = g_object_ref (texture);
-
- if (was_visible && CLUTTER_ACTOR_IS_VISIBLE (priv->parent_texture))
- clutter_actor_show (CLUTTER_ACTOR (frame));
- }
-
- clutter_actor_queue_relayout (CLUTTER_ACTOR (frame));
-
- g_object_notify (G_OBJECT (frame), "parent-texture");
-}
-
-/**
- * st_subtexture_set_frame:
- * @frame: A #StSubtexture
- * @left: left
- * @top: top
- * @width: width
- * @height: height
- *
- * Set the frame of the subtexture
- *
- */
-void
-st_subtexture_set_frame (StSubtexture *frame,
- gint left,
- gint top,
- gint width,
- gint height)
-{
- g_return_if_fail (ST_IS_SUBTEXTURE (frame));
-
- st_subtexture_set_frame_internal (frame, left, top, width, height);
-}
-
-/**
- * st_subtexture_get_frame:
- * @frame: A #StSubtexture
- * @left: left
- * @top: top
- * @width: width
- * @height: height
- *
- * Retrieve the current frame.
- *
- */
-void
-st_subtexture_get_frame (StSubtexture *frame,
- gint *left,
- gint *top,
- gint *width,
- gint *height)
-{
- StSubtexturePrivate *priv;
-
- g_return_if_fail (ST_IS_SUBTEXTURE (frame));
-
- priv = frame->priv;
-
- if (top)
- *top = priv->top;
-
- if (left)
- *left = priv->left;
-
- if (width)
- *width = priv->width;
-
- if (height)
- *height = priv->height;
-}
diff --git a/src/st/st-subtexture.h b/src/st/st-subtexture.h
deleted file mode 100644
index d038ca98e..000000000
--- a/src/st/st-subtexture.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/*
- * st-subtexture.h: Class to wrap a texture and "subframe" it.
- *
- * Based on
- * st-texture-frame.h: Expandible texture actor
- *
- * Copyright 2007, 2008 OpenedHand Ltd
- * Copyright 2009 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU Lesser General Public License,
- * version 2.1, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
-#error "Only can be included directly.h"
-#endif
-
-#ifndef __ST_SUBTEXTURE_H__
-#define __ST_SUBTEXTURE_H__
-
-#include
-
-G_BEGIN_DECLS
-
-#define ST_TYPE_SUBTEXTURE (st_subtexture_get_type ())
-#define ST_SUBTEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_SUBTEXTURE, StSubtexture))
-#define ST_SUBTEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_SUBTEXTURE, StSubtextureClass))
-#define ST_IS_SUBTEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_SUBTEXTURE))
-#define ST_IS_SUBTEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_SUBTEXTURE))
-#define ST_SUBTEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_SUBTEXTURE, StSubtextureClass))
-
-typedef struct _StSubtexture StSubtexture;
-typedef struct _StSubtexturePrivate StSubtexturePrivate;
-typedef struct _StSubtextureClass StSubtextureClass;
-
-/**
- * StSubtexture:
- *
- * The contents of this structure are private and should only be accessed
- * through the public API.
- */
-struct _StSubtexture
-{
- /*< private >*/
- ClutterActor parent_instance;
-
- StSubtexturePrivate *priv;
-};
-
-struct _StSubtextureClass
-{
- ClutterActorClass parent_class;
-
- /* padding for future expansion */
- void (*_st_box_1) (void);
- void (*_st_box_2) (void);
- void (*_st_box_3) (void);
- void (*_st_box_4) (void);
-};
-
-GType st_subtexture_get_type (void) G_GNUC_CONST;
-
-ClutterActor * st_subtexture_new (ClutterTexture *texture,
- gint top,
- gint left,
- gint width,
- gint height);
-void st_subtexture_set_parent_texture (StSubtexture *frame,
- ClutterTexture *texture);
-ClutterTexture *st_subtexture_get_parent_texture (StSubtexture *frame);
-void st_subtexture_set_frame (StSubtexture *frame,
- gint top,
- gint left,
- gint width,
- gint height);
-void st_subtexture_get_frame (StSubtexture *frame,
- gint *top,
- gint *left,
- gint *width,
- gint *height);
-
-G_END_DECLS
-
-#endif /* __ST_SUBTEXTURE_H__ */
diff --git a/src/st/st-table-child.c b/src/st/st-table-child.c
index 7d8feaf53..90c7186fa 100644
--- a/src/st/st-table-child.c
+++ b/src/st/st-table-child.c
@@ -3,6 +3,7 @@
* st-table-child.h: Table child implementation
*
* Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2010 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,12 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#include "st-private.h"
diff --git a/src/st/st-table-child.h b/src/st/st-table-child.h
index 14df7ecd5..080522f94 100644
--- a/src/st/st-table-child.h
+++ b/src/st/st-table-child.h
@@ -14,12 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-table-private.h b/src/st/st-table-private.h
index 6115cdf60..6c270e2c0 100644
--- a/src/st/st-table-private.h
+++ b/src/st/st-table-private.h
@@ -15,10 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
+ * along with this program. If not, see .
*/
#ifndef __ST_TABLE_PRIVATE_H__
diff --git a/src/st/st-table.c b/src/st/st-table.c
index f92c810cb..26fb42ed0 100644
--- a/src/st/st-table.c
+++ b/src/st/st-table.c
@@ -3,6 +3,8 @@
* st-table.c: Table layout widget
*
* Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009 Abderrahim Kitouni
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,12 +16,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-table.h b/src/st/st-table.h
index bce6084d5..f6b8d7181 100644
--- a/src/st/st-table.h
+++ b/src/st/st-table.h
@@ -14,12 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index a40590e7d..cd84bdb10 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -1,11 +1,30 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-texture-cache.h: Object for loading and caching images as textures
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010, Maxim Ermilov
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include "config.h"
#include "st-texture-cache.h"
#include
#define GNOME_DESKTOP_USE_UNSTABLE_API
-#include
+#include
#include
#include
@@ -17,6 +36,8 @@
struct _StTextureCachePrivate
{
+ GtkIconTheme *icon_theme;
+
/* Things that were loaded with a cache policy != NONE */
GHashTable *keyed_cache; /* char * -> CoglTexture* */
/* Presently this is used to de-duplicate requests for GIcons,
@@ -30,6 +51,14 @@ struct _StTextureCachePrivate
static void st_texture_cache_dispose (GObject *object);
static void st_texture_cache_finalize (GObject *object);
+enum
+{
+ ICON_THEME_CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE(StTextureCache, st_texture_cache, G_TYPE_OBJECT);
/* We want to preserve the aspect ratio by default, also the default
@@ -59,12 +88,56 @@ st_texture_cache_class_init (StTextureCacheClass *klass)
gobject_class->dispose = st_texture_cache_dispose;
gobject_class->finalize = st_texture_cache_finalize;
+
+ signals[ICON_THEME_CHANGED] =
+ g_signal_new ("icon-theme-changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0, /* no default handler slot */
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+/* Evicts all cached textures for named icons */
+static void
+st_texture_cache_evict_icons (StTextureCache *cache)
+{
+ GHashTableIter iter;
+ gpointer key;
+ gpointer value;
+
+ g_hash_table_iter_init (&iter, cache->priv->keyed_cache);
+ while (g_hash_table_iter_next (&iter, &key, &value))
+ {
+ const char *cache_key = key;
+
+ /* This is too conservative - it takes out all cached textures
+ * for GIcons even when they aren't named icons, but it's not
+ * worth the complexity of parsing the key and calling
+ * g_icon_new_for_string(); icon theme changes aren't normal */
+ if (g_str_has_prefix (cache_key, "gicon:"))
+ g_hash_table_iter_remove (&iter);
+ }
+}
+
+static void
+on_icon_theme_changed (GtkIconTheme *icon_theme,
+ StTextureCache *cache)
+{
+ st_texture_cache_evict_icons (cache);
+ g_signal_emit (cache, signals[ICON_THEME_CHANGED], 0);
}
static void
st_texture_cache_init (StTextureCache *self)
{
self->priv = g_new0 (StTextureCachePrivate, 1);
+
+ self->priv->icon_theme = gtk_icon_theme_get_default ();
+ g_signal_connect (self->priv->icon_theme, "changed",
+ G_CALLBACK (on_icon_theme_changed), self);
+
self->priv->keyed_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, cogl_handle_unref);
self->priv->outstanding_requests = g_hash_table_new_full (g_str_hash, g_str_equal,
@@ -77,6 +150,14 @@ st_texture_cache_dispose (GObject *object)
{
StTextureCache *self = (StTextureCache*)object;
+ if (self->priv->icon_theme)
+ {
+ g_signal_handlers_disconnect_by_func (self->priv->icon_theme,
+ (gpointer) on_icon_theme_changed,
+ self);
+ self->priv->icon_theme = NULL;
+ }
+
if (self->priv->keyed_cache)
g_hash_table_destroy (self->priv->keyed_cache);
self->priv->keyed_cache = NULL;
@@ -108,6 +189,7 @@ typedef struct {
GtkIconInfo *icon_info;
gint width;
gint height;
+ StIconColors *colors;
gpointer user_data;
} AsyncIconLookupData;
@@ -162,16 +244,49 @@ compute_pixbuf_scale (gint width,
return FALSE;
}
+static void
+rgba_from_clutter (GdkRGBA *rgba,
+ ClutterColor *color)
+{
+ rgba->red = color->red / 255.;
+ rgba->green = color->green / 255.;
+ rgba->blue = color->blue / 255.;
+ rgba->alpha = color->alpha / 255.;
+}
+
static GdkPixbuf *
-impl_load_pixbuf_gicon (GIcon *icon,
- GtkIconInfo *info,
- int size,
- GError **error)
+impl_load_pixbuf_gicon (GIcon *icon,
+ GtkIconInfo *info,
+ int size,
+ StIconColors *colors,
+ GError **error)
{
int scaled_width, scaled_height;
- GdkPixbuf *pixbuf = gtk_icon_info_load_icon (info, error);
+ GdkPixbuf *pixbuf;
int width, height;
+ if (colors)
+ {
+ GdkRGBA foreground_color;
+ GdkRGBA success_color;
+ GdkRGBA warning_color;
+ GdkRGBA error_color;
+
+ rgba_from_clutter (&foreground_color, &colors->foreground);
+ rgba_from_clutter (&success_color, &colors->success);
+ rgba_from_clutter (&warning_color, &colors->warning);
+ rgba_from_clutter (&error_color, &colors->error);
+
+ pixbuf = gtk_icon_info_load_symbolic (info,
+ &foreground_color, &success_color,
+ &warning_color, &error_color,
+ NULL, error);
+ }
+ else
+ {
+ pixbuf = gtk_icon_info_load_icon (info, error);
+ }
+
if (!pixbuf)
return NULL;
@@ -212,6 +327,8 @@ icon_lookup_data_destroy (gpointer p)
g_free (data->mimetype);
if (data->recent_info)
gtk_recent_info_unref (data->recent_info);
+ if (data->colors)
+ st_icon_colors_unref (data->colors);
g_free (data);
}
@@ -445,7 +562,7 @@ load_pixbuf_thread (GSimpleAsyncResult *result,
else if (data->uri)
pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, &error);
else if (data->icon)
- pixbuf = impl_load_pixbuf_gicon (data->icon, data->icon_info, data->width, &error);
+ pixbuf = impl_load_pixbuf_gicon (data->icon, data->icon_info, data->width, data->colors, &error);
else
g_assert_not_reached ();
@@ -471,6 +588,7 @@ load_icon_pixbuf_async (StTextureCache *cache,
GIcon *icon,
GtkIconInfo *icon_info,
gint size,
+ StIconColors *colors,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -483,6 +601,10 @@ load_icon_pixbuf_async (StTextureCache *cache,
data->icon = g_object_ref (icon);
data->icon_info = gtk_icon_info_copy (icon_info);
data->width = data->height = size;
+ if (colors)
+ data->colors = st_icon_colors_ref (colors);
+ else
+ data->colors = NULL;
data->user_data = user_data;
result = g_simple_async_result_new (G_OBJECT (cache), callback, user_data, load_icon_pixbuf_async);
@@ -925,6 +1047,74 @@ create_texture_and_ensure_request (StTextureCache *cache,
return had_pending;
}
+static ClutterActor *
+load_gicon_with_colors (StTextureCache *cache,
+ GIcon *icon,
+ gint size,
+ StIconColors *colors)
+{
+ AsyncTextureLoadData *request;
+ ClutterActor *texture;
+ char *gicon_string;
+ char *key;
+ GtkIconTheme *theme;
+ GtkIconInfo *info;
+
+ gicon_string = g_icon_to_string (icon);
+ if (colors)
+ {
+ /* This raises some doubts about the practice of using string keys */
+ key = g_strdup_printf (CACHE_PREFIX_GICON "icon=%s,size=%d,colors=%2x%2x%2x%2x,%2x%2x%2x%2x,%2x%2x%2x%2x,%2x%2x%2x%2x",
+ gicon_string, size,
+ colors->foreground.red, colors->foreground.blue, colors->foreground.green, colors->foreground.alpha,
+ colors->warning.red, colors->warning.blue, colors->warning.green, colors->warning.alpha,
+ colors->error.red, colors->error.blue, colors->error.green, colors->error.alpha,
+ colors->success.red, colors->success.blue, colors->success.green, colors->success.alpha);
+ }
+ else
+ {
+ key = g_strdup_printf (CACHE_PREFIX_GICON "icon=%s,size=%d",
+ gicon_string, size);
+ }
+ g_free (gicon_string);
+
+ if (create_texture_and_ensure_request (cache, key, size, &request, &texture))
+ {
+ g_free (key);
+ return texture;
+ }
+
+ /* Do theme lookups in the main thread to avoid thread-unsafety */
+ theme = cache->priv->icon_theme;
+
+ info = gtk_icon_theme_lookup_by_gicon (theme, icon, size, GTK_ICON_LOOKUP_USE_BUILTIN);
+ if (info != NULL)
+ {
+ /* hardcoded here for now; we should actually blow this away on
+ * icon theme changes probably */
+ request->key = g_strdup (key);
+ request->policy = ST_TEXTURE_CACHE_POLICY_FOREVER;
+ request->icon = g_object_ref (icon);
+ request->icon_info = info;
+ request->width = request->height = size;
+
+ load_icon_pixbuf_async (cache, icon, info, size, colors, NULL, on_pixbuf_loaded, request);
+ }
+ else
+ {
+ /* Blah; we failed to find the icon, but we've added our texture to the outstanding
+ * requests. In that case, just undo what create_texture_lookup_status did.
+ */
+ g_slist_foreach (request->textures, (GFunc) g_object_unref, NULL);
+ g_slist_free (request->textures);
+ g_free (request);
+ g_hash_table_remove (cache->priv->outstanding_requests, key);
+ }
+
+ g_free (key);
+ return CLUTTER_ACTOR (texture);
+}
+
/**
* st_texture_cache_load_gicon:
* @cache: The texture cache instance
@@ -945,52 +1135,7 @@ st_texture_cache_load_gicon (StTextureCache *cache,
GIcon *icon,
gint size)
{
- AsyncTextureLoadData *request;
- ClutterActor *texture;
- char *gicon_string;
- char *key;
- GtkIconTheme *theme;
- GtkIconInfo *info;
-
- gicon_string = g_icon_to_string (icon);
- key = g_strdup_printf (CACHE_PREFIX_GICON "icon=%s,size=%d", gicon_string, size);
- g_free (gicon_string);
-
- if (create_texture_and_ensure_request (cache, key, size, &request, &texture))
- {
- g_free (key);
- return texture;
- }
-
- /* Do theme lookups in the main thread to avoid thread-unsafety */
- theme = gtk_icon_theme_get_default ();
-
- info = gtk_icon_theme_lookup_by_gicon (theme, icon, size, GTK_ICON_LOOKUP_USE_BUILTIN);
- if (info != NULL)
- {
- /* hardcoded here for now; we should actually blow this away on
- * icon theme changes probably */
- request->key = g_strdup (key);
- request->policy = ST_TEXTURE_CACHE_POLICY_FOREVER;
- request->icon = g_object_ref (icon);
- request->icon_info = info;
- request->width = request->height = size;
-
- load_icon_pixbuf_async (cache, icon, info, size, NULL, on_pixbuf_loaded, request);
- }
- else
- {
- /* Blah; we failed to find the icon, but we've added our texture to the outstanding
- * requests. In that case, just undo what create_texture_lookup_status did.
- */
- g_slist_foreach (request->textures, (GFunc) g_object_unref, NULL);
- g_slist_free (request->textures);
- g_free (request);
- g_hash_table_remove (cache->priv->outstanding_requests, key);
- }
-
- g_free (key);
- return CLUTTER_ACTOR (texture);
+ return load_gicon_with_colors (cache, icon, size, NULL);
}
typedef struct {
@@ -1154,17 +1299,20 @@ st_texture_cache_load_sliced_image (StTextureCache *cache,
/**
* st_texture_cache_load_icon_name:
* @cache: The texture cache instance
+ * @theme_node: (allow-none): a #StThemeNode
* @name: Name of a themed icon
* @icon_type: the type of icon to load
* @size: Size of themed
*
* Load a themed icon into a texture. See the #StIconType documentation
- * for an explanation of how @icon_type affects the returned icon.
+ * for an explanation of how @icon_type affects the returned icon. The
+ * colors used for symbolic icons are derived from @theme_node.
*
* Return Value: (transfer none): A new #ClutterTexture for the icon
*/
ClutterActor *
st_texture_cache_load_icon_name (StTextureCache *cache,
+ StThemeNode *theme_node,
const char *name,
StIconType icon_type,
gint size)
@@ -1173,6 +1321,8 @@ st_texture_cache_load_icon_name (StTextureCache *cache,
GIcon *themed;
char *symbolic;
+ g_return_val_if_fail (!(icon_type == ST_ICON_SYMBOLIC && theme_node == NULL), NULL);
+
switch (icon_type)
{
case ST_ICON_APPLICATION:
@@ -1187,7 +1337,8 @@ st_texture_cache_load_icon_name (StTextureCache *cache,
symbolic = g_strconcat (name, "-symbolic", NULL);
themed = g_themed_icon_new_with_default_fallbacks ((const gchar*)symbolic);
g_free (symbolic);
- texture = st_texture_cache_load_gicon (cache, themed, size);
+ texture = load_gicon_with_colors (cache, themed, size,
+ st_theme_node_get_icon_colors (theme_node));
g_object_unref (themed);
return CLUTTER_ACTOR (texture);
@@ -1486,11 +1637,13 @@ st_texture_cache_load_from_raw (StTextureCache *cache,
texture = create_default_texture (cache);
clutter_actor_set_size (CLUTTER_ACTOR (texture), size, size);
- /* In theory, two images of different size could have the same
- * pixel data. We ignore that theory.
+ /* In theory, two images of with different width and height could have the same
+ * pixel data and thus hash the same. (Say, a 16x16 and a 8x32 blank image.)
+ * We ignore this for now. If anybody hits this problem they should use
+ * GChecksum directly to compute a checksum including the width and height.
*/
checksum = g_compute_checksum_for_data (G_CHECKSUM_SHA1, data, len);
- key = g_strdup_printf (CACHE_PREFIX_RAW_CHECKSUM "checksum=%s,size=%d", checksum, size);
+ key = g_strdup_printf (CACHE_PREFIX_RAW_CHECKSUM "checksum=%s", checksum);
g_free (checksum);
texdata = g_hash_table_lookup (cache->priv->keyed_cache, key);
diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
index df4ef4352..e8fc586c5 100644
--- a/src/st/st-texture-cache.h
+++ b/src/st/st-texture-cache.h
@@ -1,12 +1,39 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-texture-cache.h: Object for loading and caching images as textures
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2010, Maxim Ermilov
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_TEXTURE_CACHE_H__
#define __ST_TEXTURE_CACHE_H__
+#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
+#error "Only can be included directly.h"
+#endif
+
#include
#include
#include
#include
+#include
+#include
+
#define ST_TYPE_TEXTURE_CACHE (st_texture_cache_get_type ())
#define ST_TEXTURE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_TEXTURE_CACHE, StTextureCache))
#define ST_TEXTURE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_TEXTURE_CACHE, StTextureCacheClass))
@@ -32,13 +59,6 @@ struct _StTextureCacheClass
};
-typedef enum {
- ST_ICON_SYMBOLIC,
- ST_ICON_FULLCOLOR,
- ST_ICON_APPLICATION,
- ST_ICON_DOCUMENT
-} StIconType;
-
typedef enum {
ST_TEXTURE_CACHE_POLICY_NONE,
ST_TEXTURE_CACHE_POLICY_FOREVER
@@ -59,6 +79,7 @@ ClutterActor *st_texture_cache_bind_pixbuf_property (StTextureCache *cache,
const char *property_name);
ClutterActor *st_texture_cache_load_icon_name (StTextureCache *cache,
+ StThemeNode *theme_node,
const char *name,
StIconType icon_type,
gint size);
diff --git a/src/st/st-theme-context.c b/src/st/st-theme-context.c
index a3e25ca83..80a00e5d0 100644
--- a/src/st/st-theme-context.c
+++ b/src/st/st-theme-context.c
@@ -1,7 +1,27 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-context.c: holds global information about a tree of styled objects
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009 Florian Müllner
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include
+#include "st-texture-cache.h"
#include "st-theme.h"
#include "st-theme-context.h"
@@ -32,11 +52,18 @@ static guint signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (StThemeContext, st_theme_context, G_TYPE_OBJECT)
+static void on_icon_theme_changed (StTextureCache *cache,
+ StThemeContext *context);
+
static void
st_theme_context_finalize (GObject *object)
{
StThemeContext *context = ST_THEME_CONTEXT (object);
+ g_signal_handlers_disconnect_by_func (st_texture_cache_get_default (),
+ (gpointer) on_icon_theme_changed,
+ context);
+
if (context->root_node)
g_object_unref (context->root_node);
if (context->theme)
@@ -69,6 +96,11 @@ 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 (),
+ "icon-theme-changed",
+ G_CALLBACK (on_icon_theme_changed),
+ context);
}
/**
@@ -110,6 +142,17 @@ st_theme_context_changed (StThemeContext *context)
g_object_unref (old_root);
}
+static void
+on_icon_theme_changed (StTextureCache *cache,
+ StThemeContext *context)
+{
+ /* Note that an icon theme change isn't really a change of the StThemeContext;
+ * the style information has changed. But since the style factors into the
+ * icon_name => icon lookup, faking a theme context change is a good way
+ * to force users such as StIcon to look up icons again */
+ st_theme_context_changed (context);
+}
+
/**
* st_theme_context_get_for_stage:
* @stage: a #ClutterStage
diff --git a/src/st/st-theme-context.h b/src/st/st-theme-context.h
index b55f31c49..6e6ee3cb2 100644
--- a/src/st/st-theme-context.h
+++ b/src/st/st-theme-context.h
@@ -1,4 +1,24 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-context.c: holds global information about a tree of styled objects
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009 Florian Müllner
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_THEME_CONTEXT_H__
#define __ST_THEME_CONTEXT_H__
diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c
index 718a156a1..847c7bb75 100644
--- a/src/st/st-theme-node-drawing.c
+++ b/src/st/st-theme-node-drawing.c
@@ -1,32 +1,30 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* Drawing for StWidget.
-
- Copyright (C) 2009,2010 Red Hat, Inc.
-
- Contains code derived from:
- rectangle.c: Rounded rectangle.
- Copyright (C) 2008 litl, LLC.
- st-shadow-texture.c: a class for creating soft shadow texture
- Copyright (C) 2009 Florian Müllner
- st-texture-frame.h: Expandible texture actor
- Copyright 2007 OpenedHand
- Copyright 2009 Intel Corporation.
-
- The St is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The St 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the St; see the file COPYING.LIB.
- If not, write to the Free Software Foundation, Inc., 59 Temple Place -
- Suite 330, Boston, MA 02111-1307, USA.
-*/
+/*
+ * st-theme-node-drawing.c: Code to draw themed elements
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009, 2010 Florian Müllner
+ * Copyright 2010 Intel Corporation.
+ *
+ * Contains code derived from:
+ * rectangle.c: Rounded rectangle.
+ * Copyright 2008 litl, LLC.
+ * st-texture-frame.h: Expandible texture actor
+ * Copyright 2007 OpenedHand
+ * Copyright 2009 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include
#include
@@ -52,7 +50,7 @@ typedef struct {
} StCornerSpec;
static CoglHandle
-create_corner_texture (StCornerSpec *corner)
+create_corner_material (StCornerSpec *corner)
{
CoglHandle texture;
cairo_t *cr;
@@ -167,7 +165,7 @@ load_corner (StTextureCache *cache,
{
LoadCornerData *data = datap;
- return create_corner_texture (data->corner);
+ return create_corner_material (data->corner);
}
/* To match the CSS specification, we want the border to look like it was
@@ -222,7 +220,7 @@ static CoglHandle
st_theme_node_lookup_corner (StThemeNode *node,
StCorner corner_id)
{
- CoglHandle texture;
+ CoglHandle texture, material;
char *key;
StTextureCache *cache;
StCornerSpec corner;
@@ -264,15 +262,22 @@ st_theme_node_lookup_corner (StThemeNode *node,
break;
}
+ if (corner.color.alpha == 0 &&
+ corner.border_color_1.alpha == 0 &&
+ corner.border_color_2.alpha == 0)
+ return COGL_INVALID_HANDLE;
+
key = corner_to_string (&corner);
data.node = node;
data.corner = &corner;
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &data, NULL);
+ material = _st_create_texture_material (texture);
+ cogl_handle_unref (texture);
g_free (key);
- return texture;
+ return material;
}
static void
@@ -507,16 +512,20 @@ _st_theme_node_free_drawing_state (StThemeNode *node)
if (node->background_texture != COGL_INVALID_HANDLE)
cogl_handle_unref (node->background_texture);
+ if (node->background_material != COGL_INVALID_HANDLE)
+ cogl_handle_unref (node->background_material);
if (node->background_shadow_material != COGL_INVALID_HANDLE)
cogl_handle_unref (node->background_shadow_material);
if (node->border_texture != COGL_INVALID_HANDLE)
cogl_handle_unref (node->border_texture);
+ if (node->border_material != COGL_INVALID_HANDLE)
+ cogl_handle_unref (node->border_material);
if (node->border_shadow_material != COGL_INVALID_HANDLE)
cogl_handle_unref (node->border_shadow_material);
for (corner_id = 0; corner_id < 4; corner_id++)
- if (node->corner_texture[corner_id] != COGL_INVALID_HANDLE)
- cogl_handle_unref (node->corner_texture[corner_id]);
+ if (node->corner_material[corner_id] != COGL_INVALID_HANDLE)
+ cogl_handle_unref (node->corner_material[corner_id]);
_st_theme_node_init_drawing_state (node);
}
@@ -527,12 +536,14 @@ _st_theme_node_init_drawing_state (StThemeNode *node)
int corner_id;
node->background_texture = COGL_INVALID_HANDLE;
+ node->background_material = COGL_INVALID_HANDLE;
node->background_shadow_material = COGL_INVALID_HANDLE;
node->border_shadow_material = COGL_INVALID_HANDLE;
node->border_texture = COGL_INVALID_HANDLE;
+ node->border_material = COGL_INVALID_HANDLE;
for (corner_id = 0; corner_id < 4; corner_id++)
- node->corner_texture[corner_id] = COGL_INVALID_HANDLE;
+ node->corner_material[corner_id] = COGL_INVALID_HANDLE;
}
static void st_theme_node_paint_borders (StThemeNode *node,
@@ -581,6 +592,11 @@ st_theme_node_render_resources (StThemeNode *node,
node->border_texture = st_theme_node_render_gradient (node);
}
+ if (node->border_texture)
+ node->border_material = _st_create_texture_material (node->border_texture);
+ else
+ node->border_material = COGL_INVALID_HANDLE;
+
if (shadow_spec)
{
if (node->border_texture != COGL_INVALID_HANDLE)
@@ -622,6 +638,7 @@ st_theme_node_render_resources (StThemeNode *node,
{
node->background_texture = st_texture_cache_load_file_to_cogl_texture (texture_cache, background_image);
+ node->background_material = _st_create_texture_material (node->background_texture);
if (shadow_spec)
{
@@ -630,40 +647,26 @@ st_theme_node_render_resources (StThemeNode *node,
}
}
- node->corner_texture[ST_CORNER_TOPLEFT] =
+ node->corner_material[ST_CORNER_TOPLEFT] =
st_theme_node_lookup_corner (node, ST_CORNER_TOPLEFT);
- node->corner_texture[ST_CORNER_TOPRIGHT] =
+ node->corner_material[ST_CORNER_TOPRIGHT] =
st_theme_node_lookup_corner (node, ST_CORNER_TOPRIGHT);
- node->corner_texture[ST_CORNER_BOTTOMRIGHT] =
+ node->corner_material[ST_CORNER_BOTTOMRIGHT] =
st_theme_node_lookup_corner (node, ST_CORNER_BOTTOMRIGHT);
- node->corner_texture[ST_CORNER_BOTTOMLEFT] =
+ node->corner_material[ST_CORNER_BOTTOMLEFT] =
st_theme_node_lookup_corner (node, ST_CORNER_BOTTOMLEFT);
}
static void
-paint_texture_with_opacity (CoglHandle texture,
- ClutterActorBox *box,
- guint8 paint_opacity)
+paint_material_with_opacity (CoglHandle material,
+ ClutterActorBox *box,
+ guint8 paint_opacity)
{
- if (paint_opacity == 255)
- {
- /* Minor: optimization use the default material if we can */
- cogl_set_source_texture (texture);
- cogl_rectangle (box->x1, box->y1, box->x2, box->y2);
- return;
- }
-
- CoglHandle material;
-
- material = cogl_material_new ();
- cogl_material_set_layer (material, 0, texture);
cogl_material_set_color4ub (material,
paint_opacity, paint_opacity, paint_opacity, paint_opacity);
cogl_set_source (material);
cogl_rectangle (box->x1, box->y1, box->x2, box->y2);
-
- cogl_handle_unref (material);
}
static void
@@ -678,7 +681,7 @@ st_theme_node_paint_borders (StThemeNode *node,
int max_width_radius[4];
int corner_id;
ClutterColor border_color;
- CoglHandle material;
+ guint8 alpha;
width = box->x2 - box->x1;
height = box->y2 - box->y1;
@@ -700,72 +703,72 @@ st_theme_node_paint_borders (StThemeNode *node,
float x1, y1, x2, y2;
over (&border_color, &node->background_color, &effective_border);
+ alpha = paint_opacity * effective_border.alpha / 255;
- cogl_set_source_color4ub (effective_border.red,
- effective_border.green,
- effective_border.blue,
- paint_opacity * effective_border.alpha / 255);
+ if (alpha > 0)
+ {
+ cogl_set_source_color4ub (effective_border.red,
+ effective_border.green,
+ effective_border.blue,
+ alpha);
- /* NORTH */
- skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0;
- skip_corner_2 = node->border_radius[ST_CORNER_TOPRIGHT] > 0;
+ /* NORTH */
+ skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0;
+ skip_corner_2 = node->border_radius[ST_CORNER_TOPRIGHT] > 0;
- x1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : 0;
- y1 = 0;
- x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_TOPRIGHT] : width;
- y2 = border_width;
- cogl_rectangle (x1, y1, x2, y2);
+ x1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : 0;
+ y1 = 0;
+ x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_TOPRIGHT] : width;
+ y2 = border_width;
+ cogl_rectangle (x1, y1, x2, y2);
- /* EAST */
- skip_corner_1 = node->border_radius[ST_CORNER_TOPRIGHT] > 0;
- skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0;
+ /* EAST */
+ skip_corner_1 = node->border_radius[ST_CORNER_TOPRIGHT] > 0;
+ skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0;
- x1 = width - border_width;
- y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPRIGHT] : border_width;
- x2 = width;
- y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMRIGHT]
- : height - border_width;
- cogl_rectangle (x1, y1, x2, y2);
+ x1 = width - border_width;
+ y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPRIGHT] : border_width;
+ x2 = width;
+ y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMRIGHT]
+ : height - border_width;
+ cogl_rectangle (x1, y1, x2, y2);
- /* SOUTH */
- skip_corner_1 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0;
- skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0;
+ /* SOUTH */
+ skip_corner_1 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0;
+ skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0;
- x1 = skip_corner_1 ? max_width_radius[ST_CORNER_BOTTOMLEFT] : 0;
- y1 = height - border_width;
- x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_BOTTOMRIGHT]
- : width;
- y2 = height;
- cogl_rectangle (x1, y1, x2, y2);
+ x1 = skip_corner_1 ? max_width_radius[ST_CORNER_BOTTOMLEFT] : 0;
+ y1 = height - border_width;
+ x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_BOTTOMRIGHT]
+ : width;
+ y2 = height;
+ cogl_rectangle (x1, y1, x2, y2);
- /* WEST */
- skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0;
- skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0;
+ /* WEST */
+ skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0;
+ skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0;
- x1 = 0;
- y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : border_width;
- x2 = border_width;
- y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMLEFT]
- : height - border_width;
- cogl_rectangle (x1, y1, x2, y2);
+ x1 = 0;
+ y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : border_width;
+ x2 = border_width;
+ y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMLEFT]
+ : height - border_width;
+ cogl_rectangle (x1, y1, x2, y2);
+ }
}
/* corners */
- if (max_border_radius > 0)
+ if (max_border_radius > 0 && paint_opacity > 0)
{
- material = cogl_material_new ();
- cogl_material_set_color4ub (material,
- paint_opacity, paint_opacity,
- paint_opacity, paint_opacity);
- cogl_set_source (material);
-
for (corner_id = 0; corner_id < 4; corner_id++)
{
- if (node->corner_texture[corner_id] == COGL_INVALID_HANDLE)
+ if (node->corner_material[corner_id] == COGL_INVALID_HANDLE)
continue;
- cogl_material_set_layer (material,
- 0, node->corner_texture[corner_id]);
+ cogl_material_set_color4ub (node->corner_material[corner_id],
+ paint_opacity, paint_opacity,
+ paint_opacity, paint_opacity);
+ cogl_set_source (node->corner_material[corner_id]);
switch (corner_id)
{
@@ -791,109 +794,112 @@ st_theme_node_paint_borders (StThemeNode *node,
break;
}
}
- cogl_handle_unref (material);
}
/* background color */
- cogl_set_source_color4ub (node->background_color.red,
- node->background_color.green,
- node->background_color.blue,
- paint_opacity * node->background_color.alpha / 255);
-
- /* We add padding to each corner, so that all corners end up as if they
- * had a border-radius of max_border_radius, which allows us to treat
- * corners as uniform further on.
- */
- for (corner_id = 0; corner_id < 4; corner_id++)
+ alpha = paint_opacity * node->background_color.alpha / 255;
+ if (alpha > 0)
{
- float verts[8];
- int n_rects;
+ cogl_set_source_color4ub (node->background_color.red,
+ node->background_color.green,
+ node->background_color.blue,
+ alpha);
- /* corner texture does not need padding */
- if (max_border_radius == node->border_radius[corner_id])
- continue;
-
- n_rects = node->border_radius[corner_id] == 0 ? 1 : 2;
-
- switch (corner_id)
- {
- case ST_CORNER_TOPLEFT:
- verts[0] = border_width;
- verts[1] = max_width_radius[ST_CORNER_TOPLEFT];
- verts[2] = max_border_radius;
- verts[3] = max_border_radius;
- if (n_rects == 2)
- {
- verts[4] = max_width_radius[ST_CORNER_TOPLEFT];
- verts[5] = border_width;
- verts[6] = max_border_radius;
- verts[7] = max_width_radius[ST_CORNER_TOPLEFT];
- }
- break;
- case ST_CORNER_TOPRIGHT:
- verts[0] = width - max_border_radius;
- verts[1] = max_width_radius[ST_CORNER_TOPRIGHT];
- verts[2] = width - border_width;
- verts[3] = max_border_radius;
- if (n_rects == 2)
- {
- verts[4] = width - max_border_radius;
- verts[5] = border_width;
- verts[6] = width - max_width_radius[ST_CORNER_TOPRIGHT];
- verts[7] = max_width_radius[ST_CORNER_TOPRIGHT];
- }
- break;
- case ST_CORNER_BOTTOMRIGHT:
- verts[0] = width - max_border_radius;
- verts[1] = height - max_border_radius;
- verts[2] = width - border_width;
- verts[3] = height - max_width_radius[ST_CORNER_BOTTOMRIGHT];
- if (n_rects == 2)
- {
- verts[4] = width - max_border_radius;
- verts[5] = height - max_width_radius[ST_CORNER_BOTTOMRIGHT];
- verts[6] = width - max_width_radius[ST_CORNER_BOTTOMRIGHT];
- verts[7] = height - border_width;
- }
- break;
- case ST_CORNER_BOTTOMLEFT:
- verts[0] = border_width;
- verts[1] = height - max_border_radius;
- verts[2] = max_border_radius;
- verts[3] = height - max_width_radius[ST_CORNER_BOTTOMLEFT];
- if (n_rects == 2)
- {
- verts[4] = max_width_radius[ST_CORNER_BOTTOMLEFT];
- verts[5] = height - max_width_radius[ST_CORNER_BOTTOMLEFT];
- verts[6] = max_border_radius;
- verts[7] = height - border_width;
- }
- break;
- }
- cogl_rectangles (verts, n_rects);
- }
-
- if (max_border_radius > border_width)
- {
- /* Once we've drawn the borders and corners, if the corners are bigger
- * the the border width, the remaining area is shaped like
- *
- * ########
- * ##########
- * ##########
- * ########
- *
- * We draw it in 3 pieces - first the top and bottom, then the main
- * rectangle
+ /* We add padding to each corner, so that all corners end up as if they
+ * had a border-radius of max_border_radius, which allows us to treat
+ * corners as uniform further on.
*/
- cogl_rectangle (max_border_radius, border_width,
- width - max_border_radius, max_border_radius);
- cogl_rectangle (max_border_radius, height - max_border_radius,
- width - max_border_radius, height - border_width);
- }
+ for (corner_id = 0; corner_id < 4; corner_id++)
+ {
+ float verts[8];
+ int n_rects;
- cogl_rectangle (border_width, MAX(border_width, max_border_radius),
- width - border_width, height - MAX(border_width, max_border_radius));
+ /* corner texture does not need padding */
+ if (max_border_radius == node->border_radius[corner_id])
+ continue;
+
+ n_rects = node->border_radius[corner_id] == 0 ? 1 : 2;
+
+ switch (corner_id)
+ {
+ case ST_CORNER_TOPLEFT:
+ verts[0] = border_width;
+ verts[1] = max_width_radius[ST_CORNER_TOPLEFT];
+ verts[2] = max_border_radius;
+ verts[3] = max_border_radius;
+ if (n_rects == 2)
+ {
+ verts[4] = max_width_radius[ST_CORNER_TOPLEFT];
+ verts[5] = border_width;
+ verts[6] = max_border_radius;
+ verts[7] = max_width_radius[ST_CORNER_TOPLEFT];
+ }
+ break;
+ case ST_CORNER_TOPRIGHT:
+ verts[0] = width - max_border_radius;
+ verts[1] = max_width_radius[ST_CORNER_TOPRIGHT];
+ verts[2] = width - border_width;
+ verts[3] = max_border_radius;
+ if (n_rects == 2)
+ {
+ verts[4] = width - max_border_radius;
+ verts[5] = border_width;
+ verts[6] = width - max_width_radius[ST_CORNER_TOPRIGHT];
+ verts[7] = max_width_radius[ST_CORNER_TOPRIGHT];
+ }
+ break;
+ case ST_CORNER_BOTTOMRIGHT:
+ verts[0] = width - max_border_radius;
+ verts[1] = height - max_border_radius;
+ verts[2] = width - border_width;
+ verts[3] = height - max_width_radius[ST_CORNER_BOTTOMRIGHT];
+ if (n_rects == 2)
+ {
+ verts[4] = width - max_border_radius;
+ verts[5] = height - max_width_radius[ST_CORNER_BOTTOMRIGHT];
+ verts[6] = width - max_width_radius[ST_CORNER_BOTTOMRIGHT];
+ verts[7] = height - border_width;
+ }
+ break;
+ case ST_CORNER_BOTTOMLEFT:
+ verts[0] = border_width;
+ verts[1] = height - max_border_radius;
+ verts[2] = max_border_radius;
+ verts[3] = height - max_width_radius[ST_CORNER_BOTTOMLEFT];
+ if (n_rects == 2)
+ {
+ verts[4] = max_width_radius[ST_CORNER_BOTTOMLEFT];
+ verts[5] = height - max_width_radius[ST_CORNER_BOTTOMLEFT];
+ verts[6] = max_border_radius;
+ verts[7] = height - border_width;
+ }
+ break;
+ }
+ cogl_rectangles (verts, n_rects);
+ }
+
+ if (max_border_radius > border_width)
+ {
+ /* Once we've drawn the borders and corners, if the corners are bigger
+ * the the border width, the remaining area is shaped like
+ *
+ * ########
+ * ##########
+ * ##########
+ * ########
+ *
+ * We draw it in 3 pieces - first the top and bottom, then the main
+ * rectangle
+ */
+ cogl_rectangle (max_border_radius, border_width,
+ width - max_border_radius, max_border_radius);
+ cogl_rectangle (max_border_radius, height - max_border_radius,
+ width - max_border_radius, height - border_width);
+ }
+
+ cogl_rectangle (border_width, MAX(border_width, max_border_radius),
+ width - border_width, height - MAX(border_width, max_border_radius));
+ }
}
static void
@@ -930,8 +936,7 @@ st_theme_node_paint_sliced_border_image (StThemeNode *node,
if (ey < 0)
ey = border_bottom; /* FIXME ? */
- material = cogl_material_new ();
- cogl_material_set_layer (material, 0, node->border_texture);
+ material = node->border_material;
cogl_material_set_color4ub (material,
paint_opacity, paint_opacity, paint_opacity, paint_opacity);
@@ -988,8 +993,6 @@ st_theme_node_paint_sliced_border_image (StThemeNode *node,
cogl_rectangles_with_texture_coords (rectangles, 9);
}
-
- cogl_handle_unref (material);
}
static void
@@ -1096,11 +1099,11 @@ st_theme_node_paint (StThemeNode *node,
&allocation,
paint_opacity);
- if (node->border_texture != COGL_INVALID_HANDLE)
+ if (node->border_material != COGL_INVALID_HANDLE)
{
/* Gradients and border images are mutually exclusive at this time */
if (node->background_gradient_type != ST_GRADIENT_NONE)
- paint_texture_with_opacity (node->border_texture, &allocation, paint_opacity);
+ paint_material_with_opacity (node->border_material, &allocation, paint_opacity);
else
st_theme_node_paint_sliced_border_image (node, &allocation, paint_opacity);
}
@@ -1133,7 +1136,7 @@ st_theme_node_paint (StThemeNode *node,
&background_box,
paint_opacity);
- paint_texture_with_opacity (node->background_texture, &background_box, paint_opacity);
+ paint_material_with_opacity (node->background_material, &background_box, paint_opacity);
}
}
@@ -1170,9 +1173,13 @@ st_theme_node_copy_cached_paint_state (StThemeNode *node,
node->border_shadow_material = cogl_handle_ref (other->border_shadow_material);
if (other->background_texture)
node->background_texture = cogl_handle_ref (other->background_texture);
+ if (other->background_material)
+ node->background_material = cogl_handle_ref (other->background_material);
if (other->border_texture)
node->border_texture = cogl_handle_ref (other->border_texture);
+ if (other->border_material)
+ node->border_material = cogl_handle_ref (other->border_material);
for (corner_id = 0; corner_id < 4; corner_id++)
- if (other->corner_texture[corner_id])
- node->corner_texture[corner_id] = cogl_handle_ref (other->corner_texture[corner_id]);
+ if (other->corner_material[corner_id])
+ node->corner_material[corner_id] = cogl_handle_ref (other->corner_material[corner_id]);
}
diff --git a/src/st/st-theme-node-private.h b/src/st/st-theme-node-private.h
index 9267a6efa..7673755e9 100644
--- a/src/st/st-theme-node-private.h
+++ b/src/st/st-theme-node-private.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-node-private.h: private structures and functions for StThemeNode
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_THEME_NODE_PRIVATE_H__
#define __ST_THEME_NODE_PRIVATE_H__
@@ -48,6 +67,7 @@ struct _StThemeNode {
StBorderImage *border_image;
StShadow *shadow;
StShadow *text_shadow;
+ StIconColors *icon_colors;
GType element_type;
char *element_id;
@@ -77,8 +97,10 @@ struct _StThemeNode {
CoglHandle background_shadow_material;
CoglHandle border_shadow_material;
CoglHandle background_texture;
+ CoglHandle background_material;
CoglHandle border_texture;
- CoglHandle corner_texture[4];
+ CoglHandle border_material;
+ CoglHandle corner_material[4];
};
struct _StThemeNodeClass {
diff --git a/src/st/st-theme-node-transition.c b/src/st/st-theme-node-transition.c
index 319cea7c3..ea1ba1c9e 100644
--- a/src/st/st-theme-node-transition.c
+++ b/src/st/st-theme-node-transition.c
@@ -1,22 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* Theme node transitions for StWidget.
+/*
+ * st-theme-node-transition.c: Theme node transitions for StWidget.
*
- * Copyright (C) 2010 Florian Müllner
+ * Copyright 2010 Florian Müllner
+ * Copyright 2010 Adel Gadllah
*
- * The St is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * 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.1 of
+ * the License, or (at your option) any later version.
*
- * The St 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
- * Library General Public License for more details.
+ * This program is distributed in the hope 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 Library General Public
- * License along with the St; see the file COPYING.LIB.
- * If not, write to the Free Software Foundation, Inc., 59 Temple Place -
- * Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
*/
#include "st-theme-node-transition.h"
diff --git a/src/st/st-theme-node-transition.h b/src/st/st-theme-node-transition.h
index 2f237b189..3bcef9beb 100644
--- a/src/st/st-theme-node-transition.h
+++ b/src/st/st-theme-node-transition.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-node-transition.h: Theme node transitions for StWidget.
+ *
+ * Copyright 2010 Florian Müllner
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_THEME_NODE_TRANSITION_H__
#define __ST_THEME_NODE_TRANSITION_H__
diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c
index 1a23399be..a9d1c2f6d 100644
--- a/src/st/st-theme-node.c
+++ b/src/st/st-theme-node.c
@@ -1,4 +1,26 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-node.c: style information for one node in a tree of themed objects
+ *
+ * Copyright 2008-2010 Red Hat, Inc.
+ * Copyright 2009 Steve Frécinaux
+ * Copyright 2009, 2010 Florian Müllner
+ * Copyright 2010 Adel Gadllah
+ * Copyright 2010 Giovanni Campagna
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include
#include
@@ -14,6 +36,9 @@ static void st_theme_node_finalize (GObject *object);
static const ClutterColor BLACK_COLOR = { 0, 0, 0, 0xff };
static const ClutterColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
+static const ClutterColor DEFAULT_SUCCESS_COLOR = { 0x4e, 0x9a, 0x06, 0xff };
+static const ClutterColor DEFAULT_WARNING_COLOR = { 0xf5, 0x79, 0x3e, 0xff };
+static const ClutterColor DEFAULT_ERROR_COLOR = { 0xcc, 0x00, 0x00, 0xff };
extern gfloat st_slow_down_factor;
@@ -2726,6 +2751,125 @@ st_theme_node_get_text_shadow (StThemeNode *node)
return result;
}
+/**
+ * st_theme_node_get_icon_colors:
+ * @node: a #StThemeNode
+ *
+ * Gets the colors that should be used for colorizing symbolic icons according
+ * the style of this node.
+ *
+ * Return value: (transfer none): the icon colors to use for this theme node
+ */
+StIconColors *
+st_theme_node_get_icon_colors (StThemeNode *node)
+{
+ /* Foreground here will always be the same as st_theme_node_get_foreground_color(),
+ * but there's a loss of symmetry and little efficiency win if we try to exploit
+ * that. */
+
+ enum {
+ FOREGROUND = 1 << 0,
+ WARNING = 1 << 1,
+ ERROR = 1 << 2,
+ SUCCESS = 1 << 3
+ };
+
+ gboolean shared_with_parent;
+ int i;
+ ClutterColor color = { 0, };
+
+ guint still_need = FOREGROUND | WARNING | ERROR | SUCCESS;
+
+ g_return_val_if_fail (ST_IS_THEME_NODE (node), NULL);
+
+ if (node->icon_colors)
+ return node->icon_colors;
+
+ if (node->parent_node)
+ {
+ node->icon_colors = st_theme_node_get_icon_colors (node->parent_node);
+ shared_with_parent = TRUE;
+ }
+ else
+ {
+ node->icon_colors = st_icon_colors_new ();
+ node->icon_colors->foreground = BLACK_COLOR;
+ node->icon_colors->warning = DEFAULT_WARNING_COLOR;
+ node->icon_colors->error = DEFAULT_ERROR_COLOR;
+ node->icon_colors->success = DEFAULT_SUCCESS_COLOR;
+ shared_with_parent = FALSE;
+ }
+
+ ensure_properties (node);
+
+ for (i = node->n_properties - 1; i >= 0 && still_need != 0; i--)
+ {
+ CRDeclaration *decl = node->properties[i];
+ GetFromTermResult result = VALUE_NOT_FOUND;
+ guint found = 0;
+
+ if ((still_need & FOREGROUND) != 0 &&
+ strcmp (decl->property->stryng->str, "color") == 0)
+ {
+ found = FOREGROUND;
+ result = get_color_from_term (node, decl->value, &color);
+ }
+ else if ((still_need & WARNING) != 0 &&
+ strcmp (decl->property->stryng->str, "warning-color") == 0)
+ {
+ found = WARNING;
+ result = get_color_from_term (node, decl->value, &color);
+ }
+ else if ((still_need & ERROR) != 0 &&
+ strcmp (decl->property->stryng->str, "error-color") == 0)
+ {
+ found = ERROR;
+ result = get_color_from_term (node, decl->value, &color);
+ }
+ else if ((still_need & SUCCESS) != 0 &&
+ strcmp (decl->property->stryng->str, "success-color") == 0)
+ {
+ found = SUCCESS;
+ result = get_color_from_term (node, decl->value, &color);
+ }
+
+ if (result == VALUE_INHERIT)
+ {
+ still_need &= ~found;
+ }
+ else if (result == VALUE_FOUND)
+ {
+ still_need &= ~found;
+ if (shared_with_parent)
+ {
+ node->icon_colors = st_icon_colors_copy (node->icon_colors);
+ shared_with_parent = FALSE;
+ }
+
+ switch (found)
+ {
+ case FOREGROUND:
+ node->icon_colors->foreground = color;
+ break;
+ case WARNING:
+ node->icon_colors->warning = color;
+ break;
+ case ERROR:
+ node->icon_colors->error = color;
+ break;
+ case SUCCESS:
+ node->icon_colors->success = color;
+ break;
+ }
+ }
+ }
+
+ if (shared_with_parent)
+ st_icon_colors_ref (node->icon_colors);
+
+ return node->icon_colors;
+}
+
static float
get_width_inc (StThemeNode *node)
{
diff --git a/src/st/st-theme-node.h b/src/st/st-theme-node.h
index ec567c305..13e0bf63c 100644
--- a/src/st/st-theme-node.h
+++ b/src/st/st-theme-node.h
@@ -1,9 +1,31 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-node.h: style information for one node in a tree of themed objects
+ *
+ * Copyright 2008-2010 Red Hat, Inc.
+ * Copyright 2009, 2010 Florian Müllner
+ * Copyright 2010 Giovanni Campagna
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_THEME_NODE_H__
#define __ST_THEME_NODE_H__
#include
#include "st-border-image.h"
+#include "st-icon-colors.h"
#include "st-shadow.h"
G_BEGIN_DECLS
@@ -176,6 +198,8 @@ StBorderImage *st_theme_node_get_border_image (StThemeNode *node);
StShadow *st_theme_node_get_shadow (StThemeNode *node);
StShadow *st_theme_node_get_text_shadow (StThemeNode *node);
+StIconColors *st_theme_node_get_icon_colors (StThemeNode *node);
+
/* Helpers for get_preferred_width()/get_preferred_height() ClutterActor vfuncs */
void st_theme_node_adjust_for_height (StThemeNode *node,
float *for_height);
diff --git a/src/st/st-theme-private.h b/src/st/st-theme-private.h
index 92e87e833..ecd2639be 100644
--- a/src/st/st-theme-private.h
+++ b/src/st/st-theme-private.h
@@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme-private.h: Private StThemeMethods
+ *
+ * Copyright 2008, 2009 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
+
#ifndef __ST_THEME_PRIVATE_H__
#define __ST_THEME_PRIVATE_H__
diff --git a/src/st/st-theme.c b/src/st/st-theme.c
index 6e2fd2c74..bce53b429 100644
--- a/src/st/st-theme.c
+++ b/src/st/st-theme.c
@@ -1,6 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-
-/* This file started as a cut-and-paste of cr-sel-eng.c from libcroco.
+/*
+ * st-theme.c: A set of CSS stylesheets used for rule matching
+ *
+ * Copyright 2003-2004 Dodji Seketeli
+ * Copyright 2008, 2009 Red Hat, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ *
+ * This file started as a cut-and-paste of cr-sel-eng.c from libcroco.
*
* In moving it to hippo-canvas:
* - Reformatted and otherwise edited to match our coding style
@@ -19,27 +36,6 @@
* - Some code simplification
*/
-/*
- * This file is part of The Croco Library
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2.1 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser
- * General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- * Copyright (C) 2003-2004 Dodji Seketeli. All Rights Reserved.
- */
-
#include
#include
diff --git a/src/st/st-theme.h b/src/st/st-theme.h
index 1a55b29fb..003c2a7c1 100644
--- a/src/st/st-theme.h
+++ b/src/st/st-theme.h
@@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * st-theme.h: A set of CSS stylesheets used for rule matching
+ *
+ * Copyright 2008, 2009 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#ifndef __ST_THEME_H__
#define __ST_THEME_H__
diff --git a/src/st/st-tooltip.c b/src/st/st-tooltip.c
index c458fb561..52419f680 100644
--- a/src/st/st-tooltip.c
+++ b/src/st/st-tooltip.c
@@ -3,6 +3,7 @@
* st-tooltip.c: Plain tooltip actor
*
* Copyright 2008, 2009 Intel Corporation
+ * Copyright 2009 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -14,12 +15,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
/**
diff --git a/src/st/st-tooltip.h b/src/st/st-tooltip.h
index ab7b943b8..087518180 100644
--- a/src/st/st-tooltip.h
+++ b/src/st/st-tooltip.h
@@ -14,13 +14,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Thomas Wood
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
diff --git a/src/st/st-types.h b/src/st/st-types.h
index a103e1c3b..335c2a094 100644
--- a/src/st/st-types.h
+++ b/src/st/st-types.h
@@ -12,9 +12,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ * along with this program. If not, see .
*/
/**
@@ -44,6 +42,13 @@ typedef enum {
ST_ALIGN_END
} StAlign;
+typedef enum {
+ ST_ICON_SYMBOLIC,
+ ST_ICON_FULLCOLOR,
+ ST_ICON_APPLICATION,
+ ST_ICON_DOCUMENT
+} StIconType;
+
G_END_DECLS
#endif /* __ST_TYPES_H__ */
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 48c7a3dde..312661d9c 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -4,6 +4,9 @@
*
* Copyright 2007 OpenedHand
* Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009 Abderrahim Kitouni
+ * Copyright 2009, 2010 Florian Müllner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,13 +18,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
- * Written by: Emmanuele Bassi
- * Thomas Wood
- *
+ * along with this program. If not, see .
*/
#ifdef HAVE_CONFIG_H
@@ -64,6 +61,7 @@ struct _StWidgetPrivate
gboolean draw_border_internal : 1;
gboolean track_hover : 1;
gboolean hover : 1;
+ gboolean can_focus : 1;
StTooltip *tooltip;
@@ -93,7 +91,8 @@ enum
PROP_HAS_TOOLTIP,
PROP_TOOLTIP_TEXT,
PROP_TRACK_HOVER,
- PROP_HOVER
+ PROP_HOVER,
+ PROP_CAN_FOCUS
};
enum
@@ -113,6 +112,9 @@ G_DEFINE_ABSTRACT_TYPE (StWidget, st_widget, CLUTTER_TYPE_ACTOR);
static void st_widget_recompute_style (StWidget *widget,
StThemeNode *old_theme_node);
+static gboolean st_widget_real_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction);
static void
st_widget_set_property (GObject *gobject,
@@ -164,6 +166,10 @@ st_widget_set_property (GObject *gobject,
st_widget_set_hover (actor, g_value_get_boolean (value));
break;
+ case PROP_CAN_FOCUS:
+ st_widget_set_can_focus (actor, g_value_get_boolean (value));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
break;
@@ -217,6 +223,10 @@ st_widget_get_property (GObject *gobject,
g_value_set_boolean (value, priv->hover);
break;
+ case PROP_CAN_FOCUS:
+ g_value_set_boolean (value, priv->can_focus);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
break;
@@ -512,6 +522,9 @@ get_root_theme_node (ClutterStage *stage)
* The theme node is used to access standard and custom CSS
* properties of the widget.
*
+ * Note: it is a fatal error to call this on a widget that is
+ * not been added to a stage.
+ *
* Return value: (transfer none): the theme node for the widget.
* This is owned by the widget. When attributes of the widget
* or the environment that affect the styling change (for example
@@ -560,6 +573,29 @@ st_widget_get_theme_node (StWidget *widget)
return priv->theme_node;
}
+/**
+ * st_widget_peek_theme_node:
+ * @widget: a #StWidget
+ *
+ * Returns the theme node for the widget if it has already been
+ * computed, %NULL if the widget hasn't been added to a stage or the theme
+ * node hasn't been computed. If %NULL is returned, then ::style-changed
+ * will be reliably emitted before the widget is allocated or painted.
+ *
+ * Return value: (transfer none): the theme node for the widget.
+ * This is owned by the widget. When attributes of the widget
+ * or the environment that affect the styling change (for example
+ * the style_class property of the widget), it will be recreated,
+ * and the ::style-changed signal will be emitted on the widget.
+ */
+StThemeNode *
+st_widget_peek_theme_node (StWidget *widget)
+{
+ StWidgetPrivate *priv = widget->priv;
+
+ return priv->theme_node;
+}
+
static gboolean
st_widget_enter (ClutterActor *actor,
ClutterCrossingEvent *event)
@@ -604,6 +640,22 @@ st_widget_leave (ClutterActor *actor,
return FALSE;
}
+static void
+st_widget_key_focus_in (ClutterActor *actor)
+{
+ StWidget *widget = ST_WIDGET (actor);
+
+ st_widget_add_style_pseudo_class (widget, "focus");
+}
+
+static void
+st_widget_key_focus_out (ClutterActor *actor)
+{
+ StWidget *widget = ST_WIDGET (actor);
+
+ st_widget_remove_style_pseudo_class (widget, "focus");
+}
+
static void
st_widget_hide (ClutterActor *actor)
{
@@ -642,9 +694,12 @@ st_widget_class_init (StWidgetClass *klass)
actor_class->enter_event = st_widget_enter;
actor_class->leave_event = st_widget_leave;
+ actor_class->key_focus_in = st_widget_key_focus_in;
+ actor_class->key_focus_out = st_widget_key_focus_out;
actor_class->hide = st_widget_hide;
klass->style_changed = st_widget_real_style_changed;
+ klass->navigate_focus = st_widget_real_navigate_focus;
/**
* StWidget:pseudo-class:
@@ -777,6 +832,20 @@ st_widget_class_init (StWidgetClass *klass)
PROP_HOVER,
pspec);
+ /**
+ * StWidget:can-focus:
+ *
+ * Whether or not the widget can be focused via keyboard navigation.
+ */
+ pspec = g_param_spec_boolean ("can-focus",
+ "Can focus",
+ "Whether the widget can be focused via keyboard navigation",
+ FALSE,
+ ST_PARAM_READWRITE);
+ g_object_class_install_property (gobject_class,
+ PROP_CAN_FOCUS,
+ pspec);
+
/**
* StWidget::style-changed:
*
@@ -1624,6 +1693,113 @@ st_widget_get_hover (StWidget *widget)
return widget->priv->hover;
}
+/**
+ * st_widget_set_can_focus:
+ * @widget: A #StWidget
+ * @can_focus: %TRUE if the widget can receive keyboard focus
+ * via keyboard navigation
+ *
+ * Marks @widget as being able to receive keyboard focus via
+ * keyboard navigation.
+ */
+void
+st_widget_set_can_focus (StWidget *widget,
+ gboolean can_focus)
+{
+ StWidgetPrivate *priv;
+
+ g_return_if_fail (ST_IS_WIDGET (widget));
+
+ priv = widget->priv;
+
+ if (priv->can_focus != can_focus)
+ {
+ priv->can_focus = can_focus;
+ g_object_notify (G_OBJECT (widget), "can-focus");
+ }
+}
+
+/**
+ * st_widget_get_can_focus:
+ * @widget: A #StWidget
+ *
+ * Returns the current value of the can-focus property. See
+ * st_widget_set_can_focus() for more information.
+ *
+ * Returns: current value of can-focus on @widget
+ */
+gboolean
+st_widget_get_can_focus (StWidget *widget)
+{
+ g_return_val_if_fail (ST_IS_WIDGET (widget), FALSE);
+
+ return widget->priv->can_focus;
+}
+
+static gboolean
+st_widget_real_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction)
+{
+ if (widget->priv->can_focus &&
+ CLUTTER_ACTOR (widget) != from)
+ {
+ clutter_actor_grab_key_focus (CLUTTER_ACTOR (widget));
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/**
+ * st_widget_navigate_focus:
+ * @widget: the "top level" container
+ * @from: (allow-none): the actor that the focus is coming from
+ * @direction: the direction focus is moving in
+ * @wrap_around: whether focus should wrap around
+ *
+ * Tries to update the keyboard focus within @widget in response to a
+ * keyboard event.
+ *
+ * If @from is a descendant of @widget, this attempts to move the
+ * keyboard focus to the next descendant of @widget (in the order
+ * implied by @direction) that has the #StWidget:can-focus property
+ * set. If @from is %NULL, or outside of @widget, this attempts to
+ * focus either @widget itself, or its first descendant in the order
+ * implied by @direction.
+ *
+ * If a container type is marked #StWidget:can-focus, the expected
+ * behavior is that it will only take up a single slot on the focus
+ * chain as a whole, rather than allowing navigation between its child
+ * actors (or having a distinction between itself being focused and
+ * one of its children being focused).
+ *
+ * Some widget classes might have slightly different behavior from the
+ * above, where that would make more sense.
+ *
+ * If @wrap_around is %TRUE and @from is a child of @widget, but the
+ * widget has no further children that can accept the focus in the
+ * given direction, then st_widget_navigate_focus() will try a second
+ * time, using a %NULL @from, which should cause it to reset the focus
+ * to the first available widget in the given direction.
+ *
+ * Return value: %TRUE if clutter_actor_grab_key_focus() has been
+ * called on an actor. %FALSE if not.
+ */
+gboolean
+st_widget_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction,
+ gboolean wrap_around)
+{
+ g_return_val_if_fail (ST_IS_WIDGET (widget), FALSE);
+
+ if (ST_WIDGET_GET_CLASS (widget)->navigate_focus (widget, from, direction))
+ return TRUE;
+ if (wrap_around && from && clutter_actor_contains (CLUTTER_ACTOR (widget), from))
+ return ST_WIDGET_GET_CLASS (widget)->navigate_focus (widget, NULL, direction);
+ return FALSE;
+}
+
static gboolean
append_actor_text (GString *desc,
ClutterActor *actor)
diff --git a/src/st/st-widget.h b/src/st/st-widget.h
index 2a65f8fff..cc3b47c01 100644
--- a/src/st/st-widget.h
+++ b/src/st/st-widget.h
@@ -4,6 +4,9 @@
*
* Copyright 2007 OpenedHand
* Copyright 2008, 2009 Intel Corporation.
+ * Copyright 2009, 2010 Red Hat, Inc.
+ * Copyright 2009 Abderrahim Kitouni
+ * Copyright 2010 Florian Müllner
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
@@ -15,10 +18,7 @@
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- * Boston, MA 02111-1307, USA.
- *
+ * along with this program. If not, see .
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
@@ -78,7 +78,10 @@ struct _StWidgetClass
ClutterActorClass parent_class;
/* vfuncs */
- void (* style_changed) (StWidget *self);
+ void (* style_changed) (StWidget *self);
+ gboolean (* navigate_focus) (StWidget *self,
+ ClutterActor *from,
+ GtkDirectionType direction);
};
GType st_widget_get_type (void) G_GNUC_CONST;
@@ -137,9 +140,18 @@ StTextDirection st_widget_get_direction (StWidget *self
void st_widget_set_direction (StWidget *self,
StTextDirection dir);
+void st_widget_set_can_focus (StWidget *widget,
+ gboolean can_focus);
+gboolean st_widget_get_can_focus (StWidget *widget);
+gboolean st_widget_navigate_focus (StWidget *widget,
+ ClutterActor *from,
+ GtkDirectionType direction,
+ gboolean wrap_around);
+
/* Only to be used by sub-classes of StWidget */
void st_widget_style_changed (StWidget *widget);
StThemeNode * st_widget_get_theme_node (StWidget *widget);
+StThemeNode * st_widget_peek_theme_node (StWidget *widget);
/* debug methods */
char *st_describe_actor (ClutterActor *actor);
diff --git a/src/st/test-theme.c b/src/st/test-theme.c
index 425fc5773..43e14452d 100644
--- a/src/st/test-theme.c
+++ b/src/st/test-theme.c
@@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * test-theme.c: test program for CSS styling code
+ *
+ * Copyright 2009, 2010 Red Hat, Inc.
+ *
+ * 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.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope 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 program. If not, see .
+ */
#include
#include "st-theme.h"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ea2164587..42a92a3a1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,6 +8,7 @@ TEST_JS = \
interactive/calendar.js \
interactive/css-fonts.js \
interactive/entry.js \
+ interactive/icons.js \
interactive/inline-style.js \
interactive/scrolling.js \
interactive/scroll-view-sizing.js \
diff --git a/tests/interactive/icons.js b/tests/interactive/icons.js
new file mode 100644
index 000000000..5ccd9abfd
--- /dev/null
+++ b/tests/interactive/icons.js
@@ -0,0 +1,88 @@
+/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
+
+const Clutter = imports.gi.Clutter;
+const St = imports.gi.St;
+
+const UI = imports.testcommon.ui;
+
+UI.init();
+let stage = Clutter.Stage.get_default();
+
+stage.width = 400;
+stage.height = 700;
+
+let b = new St.BoxLayout({ vertical: true,
+ width: stage.width,
+ height: stage.height });
+stage.add_actor(b);
+
+function addTest(label, icon_props) {
+ if (b.get_children().length > 0)
+ b.add (new St.BoxLayout({ style: 'background: #cccccc; border: 10px transparent white; height: 1px; ' }));
+
+ let hb = new St.BoxLayout({ vertical: false,
+ style: 'spacing: 10px;' });
+
+ hb.add(new St.Label({ text: label }), { y_fill: false });
+ hb.add(new St.Icon(icon_props));
+
+ b.add(hb);
+}
+
+addTest("Symbolic",
+ { icon_name: 'battery-full',
+ icon_type: St.IconType.SYMBOLIC,
+ icon_size: 48 });
+addTest("Full color",
+ { icon_name: 'battery-full',
+ icon_type: St.IconType.FULLCOLOR,
+ icon_size: 48 });
+addTest("Default size",
+ { icon_name: 'battery-full',
+ icon_type: St.IconType.SYMBOLIC });
+addTest("Size set by property",
+ { icon_name: 'battery-full',
+ icon_type: St.IconType.SYMBOLIC,
+ icon_size: 32 });
+addTest("Size set by style",
+ { icon_name: 'battery-full',
+ icon_type: St.IconType.SYMBOLIC,
+ style: 'icon-size: 1em;' });
+addTest("16px icon in 48px icon widget",
+ { icon_name: 'battery-full',
+ icon_type: St.IconType.SYMBOLIC,
+ style: 'icon-size: 16px; width: 48px; height: 48px; border: 1px solid black;' });
+
+function iconRow(icons, box_style) {
+ let hb = new St.BoxLayout({ vertical: false, style: box_style });
+
+ for each (let iconName in icons) {
+ hb.add(new St.Icon({ icon_name: iconName,
+ icon_type: St.IconType.SYMBOLIC,
+ icon_size: 48 }));
+ }
+
+ b.add(hb);
+}
+
+let normalCss = 'background: white; color: black; padding: 10px 10px;';
+let reversedCss = 'background: black; color: white; warning-color: #ffcc00; error-color: #ff0000; padding: 10px 10px;';
+
+let batteryIcons = ['battery-full-charging',
+ 'battery-full',
+ 'battery-good',
+ 'battery-low',
+ 'battery-caution' ];
+
+let volumeIcons = ['audio-volume-high',
+ 'audio-volume-medium',
+ 'audio-volume-low',
+ 'audio-volume-muted' ];
+
+iconRow(batteryIcons, normalCss);
+iconRow(batteryIcons, reversedCss);
+iconRow(volumeIcons, normalCss);
+iconRow(volumeIcons, reversedCss);
+
+stage.show();
+Clutter.main();
diff --git a/tests/run-test.sh.in b/tests/run-test.sh.in
index 1ee197eb2..af905cbc8 100644
--- a/tests/run-test.sh.in
+++ b/tests/run-test.sh.in
@@ -11,7 +11,7 @@ debug=
for arg in $@ ; do
case $arg in
-g|--debug)
- debug="gdb --args"
+ debug="libtool --mode=execute gdb --args"
;;
-v|--verbose)
verbose=true
@@ -34,15 +34,14 @@ GI_TYPELIB_PATH="@MUTTER_LIB_DIR@/mutter:$builddir/../src"
GJS_DEBUG_OUTPUT=stderr
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
GNOME_SHELL_TESTSDIR="$srcdir/"
-LD_PRELOAD="$builddir/../src/.libs/libgnome-shell.so"
export GI_TYPELIB_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_JS GNOME_SHELL_TESTSDIR LD_PRELOAD
-gjs_args=
+run_js_test_args=
for i in $srcdir $srcdir/../js @GJS_JS_DIR@ @GJS_JS_NATIVE_DIR@ ; do
- gjs_args="$gjs_args -I $i"
+ run_js_test_args="$run_js_test_args -I $i"
done
for test in $tests ; do
- $debug gjs-console $gjs_args $test || exit $?
+ $debug $builddir/../src/run-js-test $run_js_test_args $test || exit $?
done
diff --git a/tests/testcommon/ui.js b/tests/testcommon/ui.js
index 7110c65a1..82d5861d5 100644
--- a/tests/testcommon/ui.js
+++ b/tests/testcommon/ui.js
@@ -8,7 +8,6 @@ const Shell = imports.gi.Shell;
const Environment = imports.ui.environment;
function init() {
- Clutter.init(null, null);
Environment.init();
let stage = Clutter.Stage.get_default();
diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh
index ca0bbf9cf..3ffa1ae77 100755
--- a/tools/build/gnome-shell-build-setup.sh
+++ b/tools/build/gnome-shell-build-setup.sh
@@ -57,11 +57,11 @@ fi
# libtool, pkgconfig
#
# Devel packages needed by gnome-shell and its deps:
-# dbus-glib, GL, gnome-menus, gstreamer, libffi,
+# dbus-glib, expat, GL, gnome-menus, gstreamer, libffi,
# libjasper, libjpeg, libpng, libpulse, libtiff, libwnck,
-# libxml2, ORBit2, python, readline,
+# libxklavier, libxml2, ORBit2, pam, python, readline,
# spidermonkey ({mozilla,firefox,xulrunner}-js), startup-notification
-# xdamage, icon-naming-utils
+# xdamage, icon-naming-utils, libtool-ltdl, libvorbis
#
# Non-devel packages needed by gnome-shell and its deps:
# glxinfo, gstreamer-plugins-base, gstreamer-plugins-good,
@@ -71,29 +71,36 @@ fi
# (*) only needed for --xephyr
if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint ; then
- reqd=""
+ reqd="
+ build-essential curl
+ automake bison flex gettext git-core gnome-common gtk-doc-tools
+ gvfs gvfs-backends icon-naming-utils
+ libdbus-glib-1-dev libexpat-dev libffi-dev libgnome-menu-dev libgnome-desktop-dev
+ libjasper-dev libjpeg-dev libpng-dev libstartup-notification0-dev libtiff-dev
+ libwnck-dev libgl1-mesa-dev liborbit2-dev libpulse-dev libreadline5-dev libxml2-dev
+ mesa-common-dev mesa-utils libpam-dev python-dev python-gconf python-gobject
+ xulrunner-dev xserver-xephyr gnome-terminal libcroco3-dev
+ libgstreamer0.10-dev gstreamer0.10-plugins-base gstreamer0.10-plugins-good
+ libltdl-dev libvorbis-dev libxklavier-dev
+ "
+
+ if apt-cache show autopoint > /dev/null 2> /dev/null; then
+ reqd="$reqd autopoint"
+ fi
+
if [ ! -x /usr/bin/dpkg-checkbuilddeps ]; then
echo "Please run 'sudo apt-get install dpkg-dev' and try again."
echo
exit 1
fi
- for pkg in \
- build-essential curl \
- automake bison flex gettext git-core gnome-common gtk-doc-tools \
- gvfs gvfs-backends icon-naming-utils \
- libdbus-glib-1-dev libffi-dev libgnome-menu-dev libgnome-desktop-dev \
- libjasper-dev libjpeg-dev libpng-dev libstartup-notification0-dev libtiff-dev \
- libwnck-dev libgl1-mesa-dev liborbit2-dev libpulse-dev libreadline5-dev libxml2-dev \
- mesa-common-dev mesa-utils python-dev python-gconf python-gobject \
- xulrunner-dev xserver-xephyr gnome-terminal libcroco3-dev \
- libgstreamer0.10-dev gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
- ; do
+
+ for pkg in $reqd ; do
if ! dpkg-checkbuilddeps -d $pkg /dev/null 2> /dev/null; then
- reqd="$pkg $reqd"
+ missing="$pkg $missing"
fi
done
- if test ! "x$reqd" = x; then
- echo "Please run 'sudo apt-get install $reqd' and try again."
+ if test ! "x$missing" = x; then
+ echo "Please run 'sudo apt-get install $missing' and try again."
echo
exit 1
fi
@@ -105,11 +112,12 @@ if test "x$system" = xFedora ; then
automake bison flex gettext git gnome-common gnome-doc-utils gvfs intltool
libtool pkgconfig dbus-glib-devel gnome-desktop-devel gnome-menus-devel
gnome-python2-gconf jasper-devel libffi-devel libjpeg-devel libpng-devel
- libtiff-devel libwnck-devel mesa-libGL-devel ORBit2-devel pulseaudio-libs-devel
- python-devel pygobject2 readline-devel xulrunner-devel libXdamage-devel libcroco-devel
- libxml2-devel gstreamer-devel gstreamer-plugins-base gstreamer-plugins-good
- glx-utils startup-notification-devel xorg-x11-server-Xephyr gnome-terminal zenity
- icon-naming-utils
+ libtiff-devel libwnck-devel mesa-libGL-devel ORBit2-devel pam-devel
+ pulseaudio-libs-devel python-devel pygobject2 readline-devel xulrunner-devel
+ libXdamage-devel libcroco-devel libxml2-devel gstreamer-devel
+ gstreamer-plugins-base gstreamer-plugins-good glx-utils expat-devel
+ startup-notification-devel xorg-x11-server-Xephyr gnome-terminal zenity
+ icon-naming-utils libtool-ltdl-devel libvorbis-devel libxklavier-devel
"
if expr $version \>= 14 > /dev/null ; then
diff --git a/tools/build/gnome-shell.modules b/tools/build/gnome-shell.modules
index 35e83342f..7357e29ba 100644
--- a/tools/build/gnome-shell.modules
+++ b/tools/build/gnome-shell.modules
@@ -11,6 +11,8 @@
href="git://git.moblin.org"/>
+
@@ -86,13 +88,20 @@
-
-
+
+
+
+
+
+
+
+
+
@@ -151,19 +160,20 @@
+
+
+
+
+
-
-
-
-
@@ -172,6 +182,15 @@
+
+
+
+
+
+
+
@@ -185,6 +204,8 @@
+
+
@@ -194,7 +215,7 @@
-
+
@@ -202,9 +223,38 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+