Merge branch 'master' into datetime

This commit is contained in:
David Zeuthen 2010-11-16 09:16:38 -05:00
commit 7aa3aba0c2
120 changed files with 6811 additions and 2026 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@ src/Makefile.in
src/gnomeshell-taskpanel src/gnomeshell-taskpanel
src/gnome-shell src/gnome-shell
src/gnome-shell-clock-preferences src/gnome-shell-clock-preferences
src/run-js-test
src/test-recorder src/test-recorder
src/test-recorder.ogg src/test-recorder.ogg
src/test-theme src/test-theme

View File

@ -1,5 +1,5 @@
AC_PREREQ(2.63) 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_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c]) 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(TRAY, gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.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 MUTTER_BIN_DIR=`$PKG_CONFIG --variable=exec_prefix mutter-plugins`/bin
# FIXME: metacity-plugins.pc should point directly to its .gir file # FIXME: metacity-plugins.pc should point directly to its .gir file
MUTTER_LIB_DIR=`$PKG_CONFIG --variable=libdir mutter-plugins` MUTTER_LIB_DIR=`$PKG_CONFIG --variable=libdir mutter-plugins`

View File

@ -62,5 +62,23 @@
</locale> </locale>
</schema> </schema>
<schema>
<key>/schemas/desktop/gnome/shell/windows/theme</key>
<applyto>/desktop/gnome/shell/windows/theme</applyto>
<owner>gnome-shell</owner>
<type>string</type>
<default>Adwaita</default>
<locale name="C">
<short>Current theme</short>
<long>
The theme determines the appearance of window borders,
titlebar, and so forth.
This key overrides /apps/metacity/general/theme when
running GNOME Shell.
</long>
</locale>
</schema>
</schemalist> </schemalist>
</gconfschemafile> </gconfschemafile>

View File

@ -27,7 +27,7 @@
</_description> </_description>
</key> </key>
<key name="mouse-tracking" enum="MouseTrackingMode"> <key name="mouse-tracking" enum="MouseTrackingMode">
<default>'centered'</default> <default>'proportional'</default>
<_summary>Mouse Tracking Mode</_summary> <_summary>Mouse Tracking Mode</_summary>
<_description> <_description>
Determines the position of the magnified mouse image within the Determines the position of the magnified mouse image within the
@ -45,7 +45,7 @@
</_description> </_description>
</key> </key>
<key name="screen-position" enum="ScreenPosition"> <key name="screen-position" enum="ScreenPosition">
<default>'bottom-half'</default> <default>'full-screen'</default>
<_summary>Screen position</_summary> <_summary>Screen position</_summary>
<_description> <_description>
The magnified view either fills the entire screen, or occupies the The magnified view either fills the entire screen, or occupies the

View File

@ -153,6 +153,10 @@ StTooltip {
-slider-handle-radius: 0.5em; -slider-handle-radius: 0.5em;
} }
.popup-menu-icon {
icon-size: 1em;
}
/* Switches (to be used in menus) */ /* Switches (to be used in menus) */
.toggle-switch { .toggle-switch {
width: 4.5em; width: 4.5em;
@ -240,6 +244,10 @@ StTooltip {
spacing: 8px; spacing: 8px;
} }
.system-status-icon {
icon-size: 1em;
}
/* Overview */ /* Overview */
.overview { .overview {
@ -1018,6 +1026,10 @@ StTooltip {
background: rgba(128,128,128,0.7); background: rgba(128,128,128,0.7);
} }
.notification-icon-button > StIcon {
icon-size: 36px;
}
.chat-received { .chat-received {
background-gradient-direction: horizontal; background-gradient-direction: horizontal;
background-gradient-start: rgba(255, 255, 255, 0.2); background-gradient-start: rgba(255, 255, 255, 0.2);
@ -1101,8 +1113,8 @@ StTooltip {
.switcher-list { .switcher-list {
background: rgba(0,0,0,0.8); background: rgba(0,0,0,0.8);
border: 1px solid rgba(128,128,128,0.40); border: 1px solid rgba(128,128,128,0.40);
border-radius: 8px; border-radius: 24px;
padding: 18px; padding: 20px;
font: 12px sans-serif; font: 12px sans-serif;
color: white; color: white;
@ -1116,7 +1128,9 @@ StTooltip {
background-gradient-direction: horizontal; background-gradient-direction: horizontal;
background-gradient-start: rgba(51, 51, 51, 1.0); background-gradient-start: rgba(51, 51, 51, 1.0);
background-gradient-end: rgba(51, 51, 51, 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; width: 60px;
} }
@ -1124,13 +1138,15 @@ StTooltip {
background-gradient-direction: horizontal; background-gradient-direction: horizontal;
background-gradient-start: rgba(51, 51, 51, 0); background-gradient-start: rgba(51, 51, 51, 0);
background-gradient-end: rgba(51, 51, 51, 1.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; width: 60px;
} }
.switcher-list .item-box { .switcher-list .item-box {
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 8px;
} }
.switcher-list .thumbnail-box { .switcher-list .thumbnail-box {
@ -1145,12 +1161,12 @@ StTooltip {
.switcher-list .outlined-item-box { .switcher-list .outlined-item-box {
padding: 6px; padding: 6px;
border: 2px solid rgba(85,85,85,1.0); border: 2px solid rgba(85,85,85,1.0);
border-radius: 4px; border-radius: 8px;
} }
.switcher-list .selected-item-box { .switcher-list .selected-item-box {
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 8px;
background: rgba(255,255,255,0.33); background: rgba(255,255,255,0.33);
} }
@ -1183,16 +1199,16 @@ StTooltip {
.workspace-switcher-container { .workspace-switcher-container {
background: rgba(0,0,0,0.8); background: rgba(0,0,0,0.8);
border: 1px solid rgba(128,128,128,0.40); border: 1px solid rgba(128,128,128,0.40);
border-radius: 8px; border-radius: 24px;
padding: 12px; padding: 20px;
} }
.workspace-switcher { .workspace-switcher {
background: transparent; background: transparent;
border: 0px; border: 0px;
border-radius: 0px; border-radius: 0px;
padding: 4px; padding: 0px;
spacing: 4.5px; spacing: 8px;
} }
.ws-switcher-active-left { .ws-switcher-active-left {
@ -1200,7 +1216,7 @@ StTooltip {
border: 0px; border: 0px;
background: rgba(255,255,255,0.5); background: rgba(255,255,255,0.5);
background-image: url("ws-switch-arrow-left.svg"); background-image: url("ws-switch-arrow-left.svg");
border-radius: 4px; border-radius: 8px;
} }
.ws-switcher-active-right { .ws-switcher-active-right {
@ -1208,14 +1224,14 @@ StTooltip {
border: 0px; border: 0px;
background: rgba(255,255,255,0.5); background: rgba(255,255,255,0.5);
background-image: url("ws-switch-arrow-right.svg"); background-image: url("ws-switch-arrow-right.svg");
border-radius: 4px; border-radius: 8px;
} }
.ws-switcher-box { .ws-switcher-box {
height: 96px; height: 96px;
border: 2px solid rgba(85,85,85,0.5); border: 2px solid rgba(85,85,85,0.5);
background: transparent; background: transparent;
border-radius: 4px; border-radius: 8px;
} }
/* Run Dialog */ /* Run Dialog */

View File

@ -2,20 +2,7 @@
const DBus = imports.dbus; const DBus = imports.dbus;
// D-Bus utils; should eventually move to gjs. // D-Bus utils
// 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;
}
function nameToPath(name) { function nameToPath(name) {
return '/' + name.replace(/\./g, '/'); return '/' + name.replace(/\./g, '/');
}; };
@ -118,7 +105,7 @@ const ChannelDispatchOperationIface = {
outSignature: '' } outSignature: '' }
] ]
}; };
let ChannelDispatchOperation = makeProxyClass(ChannelDispatchOperationIface); let ChannelDispatchOperation = DBus.makeProxyClass(ChannelDispatchOperationIface);
const CONNECTION_NAME = TELEPATHY + '.Connection'; const CONNECTION_NAME = TELEPATHY + '.Connection';
const ConnectionIface = { const ConnectionIface = {
@ -128,7 +115,7 @@ const ConnectionIface = {
inSignature: 'uu' } inSignature: 'uu' }
] ]
}; };
let Connection = makeProxyClass(ConnectionIface); let Connection = DBus.makeProxyClass(ConnectionIface);
const ConnectionStatus = { const ConnectionStatus = {
CONNECTED: 0, CONNECTED: 0,
@ -150,7 +137,7 @@ const ConnectionAliasingIface = {
inSignature: 'a(us)' } inSignature: 'a(us)' }
] ]
}; };
let ConnectionAliasing = makeProxyClass(ConnectionAliasingIface); let ConnectionAliasing = DBus.makeProxyClass(ConnectionAliasingIface);
const CONNECTION_AVATARS_NAME = CONNECTION_NAME + '.Interface.Avatars'; const CONNECTION_AVATARS_NAME = CONNECTION_NAME + '.Interface.Avatars';
const ConnectionAvatarsIface = { 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 CONNECTION_CONTACTS_NAME = CONNECTION_NAME + '.Interface.Contacts';
const ConnectionContactsIface = { 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 CONNECTION_REQUESTS_NAME = CONNECTION_NAME + '.Interface.Requests';
const ConnectionRequestsIface = { 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 CONNECTION_SIMPLE_PRESENCE_NAME = CONNECTION_NAME + '.Interface.SimplePresence';
const ConnectionSimplePresenceIface = { const ConnectionSimplePresenceIface = {
@ -234,7 +221,7 @@ const ConnectionSimplePresenceIface = {
inSignature: 'a{u(uss)}' } inSignature: 'a{u(uss)}' }
] ]
}; };
let ConnectionSimplePresence = makeProxyClass(ConnectionSimplePresenceIface); let ConnectionSimplePresence = DBus.makeProxyClass(ConnectionSimplePresenceIface);
const ConnectionPresenceType = { const ConnectionPresenceType = {
UNSET: 0, UNSET: 0,
@ -264,7 +251,7 @@ const ChannelIface = {
inSignature: '' } inSignature: '' }
] ]
}; };
let Channel = makeProxyClass(ChannelIface); let Channel = DBus.makeProxyClass(ChannelIface);
const CHANNEL_TEXT_NAME = CHANNEL_NAME + '.Type.Text'; const CHANNEL_TEXT_NAME = CHANNEL_NAME + '.Type.Text';
const ChannelTextIface = { const ChannelTextIface = {
@ -288,7 +275,7 @@ const ChannelTextIface = {
inSignature: 'uuuuus' } inSignature: 'uuuuus' }
] ]
}; };
let ChannelText = makeProxyClass(ChannelTextIface); let ChannelText = DBus.makeProxyClass(ChannelTextIface);
const ChannelTextMessageType = { const ChannelTextMessageType = {
NORMAL: 0, NORMAL: 0,
@ -315,7 +302,7 @@ const ChannelGroupIface = {
inSignature: 'sauauauauuu' } inSignature: 'sauauauauuu' }
] ]
}; };
let ChannelGroup = makeProxyClass(ChannelGroupIface); let ChannelGroup = DBus.makeProxyClass(ChannelGroupIface);
const ACCOUNT_MANAGER_NAME = TELEPATHY + '.AccountManager'; const ACCOUNT_MANAGER_NAME = TELEPATHY + '.AccountManager';
const AccountManagerIface = { const AccountManagerIface = {
@ -330,7 +317,7 @@ const AccountManagerIface = {
inSignature: 'ob' } inSignature: 'ob' }
] ]
}; };
let AccountManager = makeProxyClass(AccountManagerIface); let AccountManager = DBus.makeProxyClass(AccountManagerIface);
const ACCOUNT_NAME = TELEPATHY + '.Account'; const ACCOUNT_NAME = TELEPATHY + '.Account';
const AccountIface = { const AccountIface = {
@ -341,7 +328,7 @@ const AccountIface = {
access: 'read' } access: 'read' }
] ]
}; };
let Account = makeProxyClass(AccountIface); let Account = DBus.makeProxyClass(AccountIface);
const CHANNEL_DISPATCHER_NAME = TELEPATHY + '.ChannelDispatcher'; const CHANNEL_DISPATCHER_NAME = TELEPATHY + '.ChannelDispatcher';
const ChannelDispatcherIface = { const ChannelDispatcherIface = {
@ -352,7 +339,7 @@ const ChannelDispatcherIface = {
outSignature: 'o' } outSignature: 'o' }
] ]
}; };
let ChannelDispatcher = makeProxyClass(ChannelDispatcherIface); let ChannelDispatcher = DBus.makeProxyClass(ChannelDispatcherIface);
const CHANNEL_REQUEST_NAME = TELEPATHY + '.ChannelRequest'; const CHANNEL_REQUEST_NAME = TELEPATHY + '.ChannelRequest';
const ChannelRequestIface = { const ChannelRequestIface = {
@ -369,4 +356,4 @@ const ChannelRequestIface = {
signature: '' } signature: '' }
] ]
}; };
let ChannelRequest = makeProxyClass(ChannelRequestIface); let ChannelRequest = DBus.makeProxyClass(ChannelRequestIface);

View File

@ -501,11 +501,10 @@ AppWellIcon.prototype = {
} }
})); }));
this._menuManager.addMenu(this._menu, true); this._menuManager.addMenu(this._menu);
} }
this._menu.popup(); this._menu.popup();
this._menuManager.grab();
return false; return false;
}, },

View File

@ -678,9 +678,8 @@ LookingGlass.prototype = {
let toolbar = new St.BoxLayout({ name: 'Toolbar' }); let toolbar = new St.BoxLayout({ name: 'Toolbar' });
this.actor.add_actor(toolbar); this.actor.add_actor(toolbar);
let inspectIcon = St.TextureCache.get_default().load_icon_name('gtk-color-picker', let inspectIcon = new St.Icon({ icon_name: 'gtk-color-picker',
St.IconType.SYMBOLIC, icon_size: 24 });
24);
toolbar.add_actor(inspectIcon); toolbar.add_actor(inspectIcon);
inspectIcon.reactive = true; inspectIcon.reactive = true;
inspectIcon.connect('button-press-event', Lang.bind(this, function () { inspectIcon.connect('button-press-event', Lang.bind(this, function () {
@ -940,7 +939,9 @@ LookingGlass.prototype = {
global.stage.set_key_focus(this._entry); 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', transition: 'easeOutQuad',
y: this._targetY y: this._targetY
}); });
@ -967,7 +968,7 @@ LookingGlass.prototype = {
Main.popModal(this.actor); 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', transition: 'easeOutQuad',
y: this._hiddenY, y: this._hiddenY,
onComplete: Lang.bind(this, function () { onComplete: Lang.bind(this, function () {

View File

@ -15,8 +15,8 @@ const MagnifierDBus = imports.ui.magnifierDBus;
const MouseTrackingMode = { const MouseTrackingMode = {
NONE: 0, NONE: 0,
CENTERED: 1, CENTERED: 1,
PUSH: 2, PROPORTIONAL: 2,
PROPORTIONAL: 3 PUSH: 3
}; };
const ScreenPosition = { const ScreenPosition = {
@ -681,7 +681,7 @@ ZoomRegion.prototype = {
* @mode: One of the enum MouseTrackingMode values. * @mode: One of the enum MouseTrackingMode values.
*/ */
setMouseTrackingMode: function(mode) { setMouseTrackingMode: function(mode) {
if (mode >= MouseTrackingMode.NONE && mode <= MouseTrackingMode.PROPORTIONAL) if (mode >= MouseTrackingMode.NONE && mode <= MouseTrackingMode.PUSH)
this._mouseTrackingMode = mode; this._mouseTrackingMode = mode;
}, },

View File

@ -390,6 +390,7 @@ function pushModal(actor) {
} }
modalActorFocusStack.push([actor, curFocus]); modalActorFocusStack.push([actor, curFocus]);
global.stage.set_key_focus(null);
return true; return true;
} }

View File

@ -22,10 +22,12 @@ const SUMMARY_TIMEOUT = 1;
const HIDE_TIMEOUT = 0.2; const HIDE_TIMEOUT = 0.2;
const LONGER_HIDE_TIMEOUT = 0.6; const LONGER_HIDE_TIMEOUT = 0.6;
const BUTTON_ICON_SIZE = 36;
const MAX_SOURCE_TITLE_WIDTH = 180; 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 = { const State = {
HIDDEN: 0, HIDDEN: 0,
SHOWING: 1, SHOWING: 1,
@ -98,6 +100,7 @@ Notification.prototype = {
this.source = source; this.source = source;
this.urgent = false; this.urgent = false;
this.expanded = false; this.expanded = false;
this._useActionIcons = false;
this._customContent = false; this._customContent = false;
this._bannerBodyText = null; this._bannerBodyText = null;
this._titleFitsInBannerMode = true; this._titleFitsInBannerMode = true;
@ -342,9 +345,9 @@ Notification.prototype = {
let button = new St.Button(); 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.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 { } else {
button.add_style_class_name('notification-button'); button.add_style_class_name('notification-button');
button.label = label; button.label = label;
@ -359,6 +362,10 @@ Notification.prototype = {
this.urgent = urgent; this.urgent = urgent;
}, },
setUseActionIcons: function(useIcons) {
this._useActionIcons = useIcons;
},
_styleChanged: function() { _styleChanged: function() {
this._spacing = this.actor.get_theme_node().get_length('spacing-columns'); this._spacing = this.actor.get_theme_node().get_length('spacing-columns');
}, },
@ -1146,6 +1153,8 @@ MessageTray.prototype = {
if (this._trayLeftTimeoutId) { if (this._trayLeftTimeoutId) {
Mainloop.source_remove(this._trayLeftTimeoutId); Mainloop.source_remove(this._trayLeftTimeoutId);
this._trayLeftTimeoutId = 0; this._trayLeftTimeoutId = 0;
this._trayLeftMouseX = -1;
this._trayLeftMouseY = -1;
return; return;
} }
@ -1167,6 +1176,14 @@ MessageTray.prototype = {
this._pointerInTray = true; this._pointerInTray = true;
this._updateState(); this._updateState();
} else { } 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 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. // 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. // 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() { _onTrayLeftTimeout: function() {
this._useLongerTrayLeftTimeout = false; let [x, y, mods] = global.get_pointer();
this._trayLeftTimeoutId = 0; // We extend the timeout once if the mouse moved no further than MOUSE_LEFT_ACTOR_THRESHOLD to either side or up.
this._pointerInTray = false; // We don't check how far down the mouse moved because any point above the tray, but below the exit coordinate,
this._pointerInSummary = false; // is close to the tray.
this._updateNotificationTimeout(0); if (this._trayLeftMouseX > -1 &&
this._updateState(); 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; return false;
}, },

View File

@ -150,7 +150,9 @@ NotificationDaemon.prototype = {
let uri = GLib.filename_to_uri(icon, null); let uri = GLib.filename_to_uri(icon, null);
return textureCache.load_uri_async(uri, size, size); return textureCache.load_uri_async(uri, size, size);
} else } 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) { } else if (hints.icon_data) {
let [width, height, rowStride, hasAlpha, let [width, height, rowStride, hasAlpha,
bitsPerSample, nChannels, data] = hints.icon_data; bitsPerSample, nChannels, data] = hints.icon_data;
@ -167,7 +169,9 @@ NotificationDaemon.prototype = {
stockIcon = 'gtk-dialog-error'; stockIcon = 'gtk-dialog-error';
break; 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) { if (actions.length) {
notification.setUseActionIcons(hints['action-icons'] == true);
for (let i = 0; i < actions.length - 1; i += 2) for (let i = 0; i < actions.length - 1; i += 2)
notification.addButton(actions[i], actions[i + 1]); notification.addButton(actions[i], actions[i + 1]);
} }
@ -317,6 +322,7 @@ NotificationDaemon.prototype = {
GetCapabilities: function() { GetCapabilities: function() {
return [ return [
'actions', 'actions',
'action-icons',
'body', 'body',
// 'body-hyperlinks', // 'body-hyperlinks',
// 'body-images', // 'body-images',
@ -325,7 +331,6 @@ NotificationDaemon.prototype = {
'icon-static', 'icon-static',
'persistence', 'persistence',
// 'sound', // 'sound',
'x-gnome-icon-buttons'
]; ];
}, },

View File

@ -404,9 +404,9 @@ AppMenuButton.prototype = {
}, },
_onQuit: function() { _onQuit: function() {
if (this._focusedApp == null) if (this._targetApp == null)
return; return;
this._focusedApp.request_quit(); this._targetApp.request_quit();
}, },
_onAppStateChanged: function(tracker, app) { _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". */ /* 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") }); let label = new St.Label({ text: _("Activities") });
this.button = new St.Clickable({ name: 'panelActivities', this.button = new St.Clickable({ name: 'panelActivities',
style_class: 'panel-button', style_class: 'panel-button',
reactive: true }); reactive: true,
can_focus: true });
this.button.set_child(label); this.button.set_child(label);
this._leftBox.add(this.button); this._leftBox.add(this.button);
@ -892,7 +893,8 @@ Panel.prototype = {
}, },
_onTrayIconRemoved: function(o, icon) { _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) { _addRipple : function(delay, time, startScale, startOpacity, finalScale, finalOpacity) {

View File

@ -1,5 +1,6 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Clutter = imports.gi.Clutter;
const St = imports.gi.St; const St = imports.gi.St;
const Lang = imports.lang; const Lang = imports.lang;
const PopupMenu = imports.ui.popupMenu; const PopupMenu = imports.ui.popupMenu;
@ -13,11 +14,13 @@ Button.prototype = {
_init: function(menuAlignment) { _init: function(menuAlignment) {
this.actor = new St.Bin({ style_class: 'panel-button', this.actor = new St.Bin({ style_class: 'panel-button',
reactive: true, reactive: true,
can_focus: true,
x_fill: true, x_fill: true,
y_fill: false, y_fill: false,
track_hover: true }); track_hover: true });
this.actor._delegate = this; this.actor._delegate = this;
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress)); 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 = new PopupMenu.PopupMenu(this.actor, menuAlignment, St.Side.TOP, /* FIXME */ 0);
this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged)); this.menu.connect('open-state-changed', Lang.bind(this, this._onOpenStateChanged));
Main.chrome.addActor(this.menu.actor, { visibleInOverview: true, Main.chrome.addActor(this.menu.actor, { visibleInOverview: true,
@ -29,10 +32,27 @@ Button.prototype = {
this.menu.toggle(); 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) { _onOpenStateChanged: function(menu, open) {
if (open) if (open) {
this.actor.add_style_pseudo_class('pressed'); 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'); this.actor.remove_style_pseudo_class('pressed');
} }
}; };
@ -61,7 +81,8 @@ SystemStatusButton.prototype = {
this._iconName = iconName; this._iconName = iconName;
if (this._iconActor) if (this._iconActor)
this._iconActor.destroy(); 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); this.actor.set_child(this._iconActor);
}, },

View File

@ -158,7 +158,9 @@ PlacesManager.prototype = {
this._connect = new PlaceInfo('special:connect', _("Connect to..."), this._connect = new PlaceInfo('special:connect', _("Connect to..."),
function (size) { 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 () { function () {
new Shell.Process({ args: ['nautilus-connect-server'] }).run(); new Shell.Process({ args: ['nautilus-connect-server'] }).run();
@ -432,7 +434,9 @@ DashPlaceDisplayItem.prototype = {
box.add(text, { expand: true, x_fill: true }); box.add(text, { expand: true, x_fill: true });
if (info.isRemovable()) { 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, let removeIconBox = new St.Clickable({ child: removeIcon,
reactive: true }); reactive: true });
box.add(removeIconBox); box.add(removeIconBox);

View File

@ -58,7 +58,8 @@ PopupBaseMenuItem.prototype = {
hover: true }); hover: true });
this.actor = new Shell.GenericContainer({ style_class: 'popup-menu-item', this.actor = new Shell.GenericContainer({ style_class: 'popup-menu-item',
reactive: params.reactive, 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-width', Lang.bind(this, this._getPreferredWidth));
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight)); this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
this.actor.connect('allocate', Lang.bind(this, this._allocate)); this.actor.connect('allocate', Lang.bind(this, this._allocate));
@ -72,21 +73,39 @@ PopupBaseMenuItem.prototype = {
this.active = false; this.active = false;
if (params.reactive && params.activate) { if (params.reactive && params.activate) {
this.actor.connect('button-release-event', Lang.bind(this, function (actor, event) { this.actor.connect('button-release-event', Lang.bind(this, this._onButtonReleaseEvent));
this.emit('activate', event); this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
}));
} }
if (params.reactive && params.hover) 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) { _onStyleChanged: function (actor) {
let themeNode = actor.get_theme_node(); this._spacing = actor.get_theme_node().get_length('spacing');
let [found, spacing] = themeNode.get_length('spacing', false);
this._spacing = found ? spacing : 0;
}, },
_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); this.setActive(actor.hover);
}, },
@ -99,9 +118,10 @@ PopupBaseMenuItem.prototype = {
if (activeChanged) { if (activeChanged) {
this.active = active; this.active = active;
if (active) if (active) {
this.actor.add_style_pseudo_class('active'); this.actor.add_style_pseudo_class('active');
else this.actor.grab_key_focus();
} else
this.actor.remove_style_pseudo_class('active'); this.actor.remove_style_pseudo_class('active');
this.emit('active-changed', active); this.emit('active-changed', active);
} }
@ -112,10 +132,6 @@ PopupBaseMenuItem.prototype = {
this.emit('destroy'); this.emit('destroy');
}, },
handleKeyPress: function(event) {
return false;
},
// true if non descendant content includes @actor // true if non descendant content includes @actor
contains: function(actor) { contains: function(actor) {
return false; return false;
@ -139,20 +155,24 @@ PopupBaseMenuItem.prototype = {
this._children.push({ actor: child, this._children.push({ actor: child,
column: column, column: column,
span: span }); 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); this.actor.add_actor(child);
}, },
removeActor: function(child) { _removeChild: function(child) {
for (let i = 0; i < this._children.length; i++) { for (let i = 0; i < this._children.length; i++) {
if (this._children[i].actor == child) { if (this._children[i].actor == child) {
this._children.splice(i, 1); this._children.splice(i, 1);
this.actor.remove_actor(child);
return; return;
} }
} }
}, },
removeActor: function(child) {
this.actor.remove_actor(child);
this._removeChild(child);
},
setShowDot: function(show) { setShowDot: function(show) {
if (show) { if (show) {
if (this._dot) if (this._dot)
@ -339,6 +359,8 @@ PopupSliderMenuItem.prototype = {
_init: function(value) { _init: function(value) {
PopupBaseMenuItem.prototype._init.call(this, { activate: false }); PopupBaseMenuItem.prototype._init.call(this, { activate: false });
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
if (isNaN(value)) if (isNaN(value))
// Avoid spreading NaNs around // Avoid spreading NaNs around
throw TypeError('The slider value must be a number'); throw TypeError('The slider value must be a number');
@ -348,7 +370,7 @@ PopupSliderMenuItem.prototype = {
this.addActor(this._slider, 0, -1); this.addActor(this._slider, 0, -1);
this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint)); this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint));
this._slider.connect('button-press-event', Lang.bind(this, this._startDragging)); 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._releaseId = this._motionId = 0;
this._dragging = false; this._dragging = false;
@ -484,10 +506,10 @@ PopupSliderMenuItem.prototype = {
return this._value; return this._value;
}, },
handleKeyPress: function(event) { _onKeyPressEvent: function (actor, event) {
let key = event.get_key_symbol(); let key = event.get_key_symbol();
if (key == Clutter.Right || key == Clutter.Left) { if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
let delta = key == Clutter.Right ? 0.1 : -0.1; let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
this._value = Math.max(0, Math.min(this._value + delta, 1)); this._value = Math.max(0, Math.min(this._value + delta, 1));
this._slider.queue_repaint(); this._slider.queue_repaint();
this.emit('value-changed', this._value); this.emit('value-changed', this._value);
@ -544,22 +566,16 @@ PopupImageMenuItem.prototype = {
_init: function (text, iconName) { _init: function (text, iconName) {
PopupBaseMenuItem.prototype._init.call(this); PopupBaseMenuItem.prototype._init.call(this);
this._size = 16;
this.label = new St.Label({ text: text }); this.label = new St.Label({ text: text });
this.addActor(this.label); this.addActor(this.label);
this._imageBin = new St.Bin({ width: this._size, height: this._size }); this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.addActor(this._imageBin); this.addActor(this._icon);
this.setIcon(iconName); this.setIcon(iconName);
}, },
setIcon: function(name) { setIcon: function(name) {
if (this._imageBin.child) this._icon.icon_name = name;
this._imageBin.child.destroy();
let img = St.TextureCache.get_default().load_icon_name(name, St.IconType.SYMBOLIC, this._size);
this._imageBin.set_child(img);
} }
}; };
@ -613,6 +629,14 @@ PopupMenu.prototype = {
this._boxWrapper.add_actor(this._box); this._boxWrapper.add_actor(this._box);
this.actor.add_style_class_name('popup-menu'); 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.isOpen = false;
this._activeMenuItem = null; this._activeMenuItem = null;
}, },
@ -711,12 +735,10 @@ PopupMenu.prototype = {
} }
}, },
open: function(submenu) { open: function() {
if (this.isOpen) if (this.isOpen)
return; return;
this.emit('opening');
let primary = global.get_primary_monitor(); let primary = global.get_primary_monitor();
// We need to show it now to force an allocation, // We need to show it now to force an allocation,
@ -732,7 +754,7 @@ PopupMenu.prototype = {
let menuWidth = natWidth, menuHeight = natHeight; let menuWidth = natWidth, menuHeight = natHeight;
// Position the non-pointing axis // Position the non-pointing axis
if (submenu) { if (this._isSubmenu) {
if (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM) { if (this._arrowSide == St.Side.TOP || this._arrowSide == St.Side.BOTTOM) {
// vertical submenu // vertical submenu
if (sourceY + sourceHeigth + menuHeight + this._gap < primary.y + primary.height) if (sourceY + sourceHeigth + menuHeight + this._gap < primary.y + primary.height)
@ -765,8 +787,6 @@ PopupMenu.prototype = {
if (!this.isOpen) if (!this.isOpen)
return; return;
this.emit('closing');
if (this._activeMenuItem) if (this._activeMenuItem)
this._activeMenuItem.setActive(false); this._activeMenuItem.setActive(false);
this.actor.reactive = false; this.actor.reactive = false;
@ -775,7 +795,6 @@ PopupMenu.prototype = {
this.emit('open-state-changed', false); this.emit('open-state-changed', false);
}, },
toggle: function() { toggle: function() {
if (this.isOpen) if (this.isOpen)
this.close(); this.close();
@ -783,35 +802,15 @@ PopupMenu.prototype = {
this.open(); this.open();
}, },
handleKeyPress: function(event, submenu) { _onKeyPressEvent: function(actor, event) {
if (!this.isOpen || (submenu && !this._activeMenuItem)) // Move focus back to parent menu if the user types Left.
return false; // (This handler is only connected if the PopupMenu is a
if (this._activeMenuItem && this._activeMenuItem.handleKeyPress(event)) // submenu.)
if (this.isOpen &&
this._activeMenuItem &&
event.get_key_symbol() == Clutter.KEY_Left) {
this._activeMenuItem.setActive(false);
return true; 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; return false;
@ -846,6 +845,7 @@ PopupSubMenuMenuItem.prototype = {
_init: function(text) { _init: function(text) {
PopupBaseMenuItem.prototype._init.call(this, { activate: false, hover: false }); PopupBaseMenuItem.prototype._init.call(this, { activate: false, hover: false });
this.actor.connect('enter-event', Lang.bind(this, this._mouseEnter)); 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.label = new St.Label({ text: text });
this.addActor(this.label); this.addActor(this.label);
@ -890,7 +890,7 @@ PopupSubMenuMenuItem.prototype = {
setActive: function(active) { setActive: function(active) {
if (this.menu) { if (this.menu) {
if (active) if (active)
this.menu.open(true); this.menu.open();
else else
this.menu.close(); this.menu.close();
} }
@ -898,14 +898,14 @@ PopupSubMenuMenuItem.prototype = {
PopupBaseMenuItem.prototype.setActive.call(this, active); PopupBaseMenuItem.prototype.setActive.call(this, active);
}, },
handleKeyPress: function(event) { _onKeyPressEvent: function(actor, event) {
if (!this.menu) if (!this.menu)
return false; return false;
if (event.get_key_symbol() == Clutter.Right) { if (event.get_key_symbol() == Clutter.KEY_Right) {
this.menu.activateFirst(); this.menu.activateFirst();
return true; return true;
} }
return this.menu.handleKeyPress(event, true); return false;
}, },
contains: function(actor) { contains: function(actor) {
@ -931,6 +931,7 @@ PopupMenuManager.prototype = {
this.grabbed = false; this.grabbed = false;
this._eventCaptureId = 0; this._eventCaptureId = 0;
this._keyPressEventId = 0;
this._enterEventId = 0; this._enterEventId = 0;
this._leaveEventId = 0; this._leaveEventId = 0;
this._activeMenu = null; this._activeMenu = null;
@ -938,21 +939,20 @@ PopupMenuManager.prototype = {
this._delayedMenus = []; this._delayedMenus = [];
}, },
addMenu: function(menu, noGrab, position) { addMenu: function(menu, position) {
let menudata = { let menudata = {
menu: menu, menu: menu,
openStateChangeId: menu.connect('open-state-changed', Lang.bind(this, this._onMenuOpenState)), openStateChangeId: menu.connect('open-state-changed', Lang.bind(this, this._onMenuOpenState)),
activateId: menu.connect('activate', Lang.bind(this, this._onMenuActivated)), activateId: menu.connect('activate', Lang.bind(this, this._onMenuActivated)),
destroyId: menu.connect('destroy', Lang.bind(this, this._onMenuDestroy)), destroyId: menu.connect('destroy', Lang.bind(this, this._onMenuDestroy)),
enterId: 0, enterId: 0,
buttonPressId: 0 focusId: 0
}; };
let source = menu.sourceActor; let source = menu.sourceActor;
if (source) { if (source) {
menudata.enterId = source.connect('enter-event', Lang.bind(this, this._onMenuSourceEnter, menu)); menudata.enterId = source.connect('enter-event', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
if (!noGrab) menudata.focusId = source.connect('key-focus-in', Lang.bind(this, function() { this._onMenuSourceEnter(menu); }));
menudata.buttonPressId = source.connect('button-press-event', Lang.bind(this, this._onMenuSourcePress, menu));
} }
if (position == undefined) if (position == undefined)
@ -976,8 +976,8 @@ PopupMenuManager.prototype = {
if (menudata.enterId) if (menudata.enterId)
menu.sourceActor.disconnect(menudata.enterId); menu.sourceActor.disconnect(menudata.enterId);
if (menudata.buttonPressId) if (menudata.focusId)
menu.sourceActor.disconnect(menudata.buttonPressId); menu.sourceActor.disconnect(menudata.focusId);
this._menus.splice(position, 1); this._menus.splice(position, 1);
}, },
@ -986,6 +986,7 @@ PopupMenuManager.prototype = {
Main.pushModal(this._owner.actor); Main.pushModal(this._owner.actor);
this._eventCaptureId = global.stage.connect('captured-event', Lang.bind(this, this._onEventCapture)); 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 // captured-event doesn't see enter/leave events
this._enterEventId = global.stage.connect('enter-event', Lang.bind(this, this._onEventCapture)); this._enterEventId = global.stage.connect('enter-event', Lang.bind(this, this._onEventCapture));
this._leaveEventId = global.stage.connect('leave-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() { ungrab: function() {
global.stage.disconnect(this._eventCaptureId); global.stage.disconnect(this._eventCaptureId);
this._eventCaptureId = 0; this._eventCaptureId = 0;
global.stage.disconnect(this._keyPressEventId);
this._keyPressEventId = 0;
global.stage.disconnect(this._enterEventId); global.stage.disconnect(this._enterEventId);
this._enterEventId = 0; this._enterEventId = 0;
global.stage.disconnect(this._leaveEventId); global.stage.disconnect(this._leaveEventId);
this._leaveEventId = 0; this._leaveEventId = 0;
Main.popModal(this._owner.actor);
this.grabbed = false; this.grabbed = false;
Main.popModal(this._owner.actor);
}, },
_onMenuOpenState: function(menu, open) { _onMenuOpenState: function(menu, open) {
if (!open && menu == this._activeMenu) if (open) {
this._activeMenu = null;
else if (open)
this._activeMenu = menu; 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) if (!this.grabbed || menu == this._activeMenu)
return false; return false;
@ -1023,13 +1030,6 @@ PopupMenuManager.prototype = {
return false; return false;
}, },
_onMenuSourcePress: function(actor, event, menu) {
if (this.grabbed)
return false;
this.grab();
return false;
},
_onMenuActivated: function(menu, item) { _onMenuActivated: function(menu, item) {
if (this.grabbed) if (this.grabbed)
this.ungrab(); this.ungrab();
@ -1086,23 +1086,6 @@ PopupMenuManager.prototype = {
|| (eventType == Clutter.EventType.KEY_PRESS && event.get_key_symbol() == Clutter.Escape)) { || (eventType == Clutter.EventType.KEY_PRESS && event.get_key_symbol() == Clutter.Escape)) {
this._closeMenu(); this._closeMenu();
return true; 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)) { } else if (activeMenuContains || this._eventIsOnAnyMenuSource(event)) {
return false; return false;
} }
@ -1110,9 +1093,32 @@ PopupMenuManager.prototype = {
return true; 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() { _closeMenu: function() {
if (this._activeMenu != null) if (this._activeMenu != null)
this._activeMenu.close(); this._activeMenu.close();
this.ungrab();
} }
}; };

View File

@ -17,16 +17,18 @@ const PopupMenu = imports.ui.popupMenu;
const Gettext = imports.gettext.domain('gnome-shell'); const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext; const _ = Gettext.gettext;
const KEY_A11Y_DIR = "/desktop/gnome/accessibility"; const A11Y_SCHEMA = "org.gnome.desktop.a11y.keyboard";
const KEY_STICKY_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/stickykeys_enable"; const KEY_STICKY_KEYS_ENABLED = "stickykeys-enable";
const KEY_BOUNCE_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/bouncekeys_enable"; const KEY_BOUNCE_KEYS_ENABLED = "bouncekeys-enable";
const KEY_SLOW_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/slowkeys_enable"; const KEY_SLOW_KEYS_ENABLED = "slowkeys-enable";
const KEY_MOUSE_KEYS_ENABLED = KEY_A11Y_DIR + "/keyboard/mousekeys_enable"; const KEY_MOUSE_KEYS_ENABLED = "mousekeys-enable";
const AT_SCREEN_KEYBOARD_SCHEMA = "org.gnome.desktop.default-applications.at.mobility"; 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 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_LOW_REASONABLE_VALUE = 50;
const DPI_HIGH_REASONABLE_VALUE = 500; const DPI_HIGH_REASONABLE_VALUE = 500;
@ -71,8 +73,6 @@ ATIndicator.prototype = {
PanelMenu.SystemStatusButton.prototype._init.call(this, 'preferences-desktop-accessibility', null); PanelMenu.SystemStatusButton.prototype._init.call(this, 'preferences-desktop-accessibility', null);
let client = GConf.Client.get_default(); 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.add_dir(KEY_META_DIR, GConf.ClientPreloadType.PRELOAD_ONELEVEL, null);
client.notify_add(KEY_META_DIR, Lang.bind(this, this._keyChanged), null, null); client.notify_add(KEY_META_DIR, Lang.bind(this, this._keyChanged), null, null);
@ -82,7 +82,7 @@ ATIndicator.prototype = {
let magnifier = this._buildMagItem(); let magnifier = this._buildMagItem();
this.menu.addMenuItem(magnifier); this.menu.addMenuItem(magnifier);
let textZoom = this._buildFontItem(client); let textZoom = this._buildFontItem();
this.menu.addMenuItem(textZoom); this.menu.addMenuItem(textZoom);
let screenReader = this._buildItem(_("Screen Reader"), AT_SCREEN_READER_SCHEMA, 'startup'); 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); let visualBell = this._buildItemGConf(_("Visual Alerts"), client, KEY_VISUAL_BELL);
this.menu.addMenuItem(visualBell); 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); 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); 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); 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(mouseKeys);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
@ -189,31 +189,32 @@ ATIndicator.prototype = {
return highContrast; return highContrast;
}, },
_buildFontItem: function(client) { _buildFontItem: function() {
let first_gconf_value = client.get_without_default(KEY_FONT_DPI); let settings = new Gio.Settings({ schema: XSETTINGS_SCHEMA });
let default_value = getDPIFromX();
let first_value = first_gconf_value ? first_gconf_value.get_float() : default_value; // 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() { function on_get() {
let u_dpi = client.get_float(KEY_FONT_DPI); user_value = settings.get_double(KEY_DPI);
let x_dpi = getDPIFromX(); return (user_value - (DPI_FACTOR_LARGE * x_value) > -1);
return (u_dpi - (DPI_FACTOR_LARGE * x_dpi) > -1);
} }
let initial_setting = on_get(); let initial_setting = on_get();
let default_value = initial_setting ? x_value : user_value;
let widget = this._buildItemExtended(_("Large Text"), let widget = this._buildItemExtended(_("Large Text"),
initial_setting, initial_setting,
client.key_is_writable(KEY_FONT_DPI), settings.is_writable(KEY_DPI),
function (enabled) { function (enabled) {
if (enabled) if (enabled)
client.set_float(KEY_FONT_DPI, DPI_FACTOR_LARGE * getDPIFromX()); settings.set_double(KEY_DPI, DPI_FACTOR_LARGE * default_value);
else 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(); let active = on_get();
if (!active) default_value = active ? x_value : user_value;
// setting was modified manually, update it widget.setToggleState(active);
first_value = client.get_float(KEY_FONT_DPI);
widget.setToggleState(on_get());
}); });
return widget; return widget;
}, },

View File

@ -38,7 +38,7 @@ Indicator.prototype = {
this._output = null; this._output = null;
this._outputVolumeId = 0; this._outputVolumeId = 0;
this._outputMutedId = 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._outputSwitch.connect('toggled', Lang.bind(this, this._switchToggled, '_output'));
this._outputSlider = new PopupMenu.PopupSliderMenuItem(0); this._outputSlider = new PopupMenu.PopupSliderMenuItem(0);
this._outputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_output')); this._outputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_output'));
@ -52,7 +52,7 @@ Indicator.prototype = {
this._input = null; this._input = null;
this._inputVolumeId = 0; this._inputVolumeId = 0;
this._inputMutedId = 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._inputSwitch.connect('toggled', Lang.bind(this, this._switchToggled, '_input'));
this._inputSlider = new PopupMenu.PopupSliderMenuItem(0); this._inputSlider = new PopupMenu.PopupSliderMenuItem(0);
this._inputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_input')); 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(this._inputSlider);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); 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'] }); let p = new Shell.Process({ args: ['gnome-control-center', 'sound'] });
p.run(); p.run();
}); });
@ -103,7 +103,7 @@ Indicator.prototype = {
this._mutedChanged (null, null, '_output'); this._mutedChanged (null, null, '_output');
this._volumeChanged (null, null, '_output'); this._volumeChanged (null, null, '_output');
} else { } else {
this._outputSwitch.label.text = _("Output: Muted"); this._outputSwitch.label.text = _("Volume: Muted");
this._outputSwitch.setToggleState(false); this._outputSwitch.setToggleState(false);
this.setIcon('audio-volume-muted-symbolic'); this.setIcon('audio-volume-muted-symbolic');
} }
@ -214,9 +214,9 @@ Indicator.prototype = {
_updateLabel: function(property) { _updateLabel: function(property) {
let label; let label;
if (this[property].is_muted) if (this[property].is_muted)
label = (property == '_output' ? _("Output: Muted") : _("Input: Muted")); label = (property == '_output' ? _("Volume: Muted") : _("Microphone: Muted"));
else 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; this[property+'Switch'].label.text = label;
} }
}; };

View File

@ -9,7 +9,9 @@ const NotificationDaemon = imports.ui.notificationDaemon;
const STANDARD_TRAY_ICON_IMPLEMENTATIONS = { const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
'bluetooth-applet': 'bluetooth', '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', 'nm-applet': 'network',
'gnome-power-manager': 'battery', 'gnome-power-manager': 'battery',
'keyboard': 'keyboard', 'keyboard': 'keyboard',

View File

@ -43,10 +43,10 @@ StatusMenuButton.prototype = {
box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false }); box.add(this._iconBox, { y_align: St.Align.MIDDLE, y_fill: false });
let textureCache = St.TextureCache.get_default(); let textureCache = St.TextureCache.get_default();
this._availableIcon = textureCache.load_icon_name('user-available', St.IconType.SYMBOLIC, 16); this._availableIcon = new St.Icon({ icon_name: 'user-available', style_class: 'popup-menu-icon' });
this._busyIcon = textureCache.load_icon_name('user-busy', St.IconType.SYMBOLIC, 16); this._busyIcon = new St.Icon({ icon_name: 'user-busy', style_class: 'popup-menu-icon' });
this._invisibleIcon = textureCache.load_icon_name('user-invisible', St.IconType.SYMBOLIC, 16); this._invisibleIcon = new St.Icon({ icon_name: 'user-invisible', style_class: 'popup-menu-icon' });
this._idleIcon = textureCache.load_icon_name('user-idle', St.IconType.SYMBOLIC, 16); 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.connect('StatusChanged', Lang.bind(this, this._updatePresenceIcon));
this._presence.getStatus(Lang.bind(this, this._updatePresenceIcon)); this._presence.getStatus(Lang.bind(this, this._updatePresenceIcon));
@ -108,11 +108,6 @@ StatusMenuButton.prototype = {
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
this._presenceItems[GnomeSession.PresenceStatus.BUSY] = 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(); item = new PopupMenu.PopupSeparatorMenuItem();
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
@ -120,7 +115,7 @@ StatusMenuButton.prototype = {
item.connect('activate', Lang.bind(this, this._onMyAccountActivate)); item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
item = new PopupMenu.PopupMenuItem(_("System Preferences...")); item = new PopupMenu.PopupMenuItem(_("System Settings..."));
item.connect('activate', Lang.bind(this, this._onPreferencesActivate)); item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);
@ -147,10 +142,6 @@ StatusMenuButton.prototype = {
item.connect('activate', Lang.bind(this, this._onShutDownActivate)); item.connect('activate', Lang.bind(this, this._onShutDownActivate));
this.menu.addMenuItem(item); 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 = new PopupMenu.PopupMenuItem(_("Shut Down..."));
item.connect('activate', Lang.bind(this, this._onShutDownActivate)); item.connect('activate', Lang.bind(this, this._onShutDownActivate));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);

View File

@ -347,7 +347,9 @@ ContactManager.prototype = {
let uri = GLib.filename_to_uri(file, null); let uri = GLib.filename_to_uri(file, null);
iconBox.child = textureCache.load_uri_async(uri, iconBox._size, iconBox._size); iconBox.child = textureCache.load_uri_async(uri, iconBox._size, iconBox._size);
} else { } 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 });
} }
}, },

View File

@ -35,6 +35,7 @@ sv
ta ta
th th
tr tr
ug
uk uk
vi vi
zh_CN zh_CN

530
po/ar.po
View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: HEAD\n" "Project-Id-Version: HEAD\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-15 23:40+0300\n" "POT-Creation-Date: 2010-10-30 13:30+0200\n"
"PO-Revision-Date: 2010-05-15 23:40+0300\n" "PO-Revision-Date: 2010-10-30 13:30+0300\n"
"Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n" "Last-Translator: Khaled Hosny <khaledhosny@eglug.org>\n"
"Language-Team: Arabic <doc@arabeyes.org>\n" "Language-Team: Arabic <doc@arabeyes.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -16,7 +16,7 @@ msgstr ""
"Language: ar\n" "Language: ar\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "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" "&& 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 #: ../data/gnome-shell.desktop.in.in.h:1
msgid "GNOME Shell" msgid "GNOME Shell"
@ -34,32 +34,332 @@ msgstr "الساعة"
msgid "Customize the panel clock" msgid "Customize the panel clock"
msgstr "طوّع ساعة اللوحة" 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 **** #. **** Applications ****
#: ../js/ui/appDisplay.js:306 ../js/ui/dash.js:850 #: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
msgid "APPLICATIONS" msgid "APPLICATIONS"
msgstr "التطبيقات" msgstr "التطبيقات"
#: ../js/ui/appDisplay.js:338 #: ../js/ui/appDisplay.js:348
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "التفضيلات" msgstr "التفضيلات"
#: ../js/ui/appDisplay.js:705 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "نافذة جديدة" msgstr "نافذة جديدة"
#: ../js/ui/appDisplay.js:709 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "أزِل من المفضّلة" msgstr "أزِل من المفضّلة"
#: ../js/ui/appDisplay.js:710 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "أضِف إلى المفضّلة" msgstr "أضِف إلى المفضّلة"
#: ../js/ui/appDisplay.js:1037 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "اسحب إلى هنا ليضاف إلى المفضّلة" msgstr "اسحب إلى هنا ليضاف إلى المفضّلة"
#: ../js/ui/appFavorites.js:89 #: ../js/ui/appFavorites.js:88
#, c-format #, c-format
msgid "%s has been added to your favorites." msgid "%s has been added to your favorites."
msgstr "أضيف %s إلى مفضلتك." msgstr "أضيف %s إلى مفضلتك."
@ -69,194 +369,293 @@ msgstr "أضيف %s إلى مفضلتك."
msgid "%s has been removed from your favorites." msgid "%s has been removed from your favorites."
msgstr "أزيل %s من مفضّلتك." msgstr "أزيل %s من مفضّلتك."
#: ../js/ui/dash.js:189 #: ../js/ui/dash.js:142
msgid "Find" msgid "Find"
msgstr "ابحث" msgstr "ابحث"
#: ../js/ui/dash.js:505 #: ../js/ui/dash.js:473
msgid "Searching..." msgid "Searching..."
msgstr "يبحث..." msgstr "يبحث..."
#: ../js/ui/dash.js:519 #: ../js/ui/dash.js:487
msgid "No matching results." msgid "No matching results."
msgstr "لا نتائج مطابقة." msgstr "لا نتائج مطابقة."
#. **** Places **** #. **** Places ****
#. Translators: This is in the sense of locations for documents, #. Translators: This is in the sense of locations for documents,
#. network locations, etc. #. 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" msgid "PLACES & DEVICES"
msgstr "الأماكن والأجهزة" msgstr "الأماكن والأجهزة"
#. **** Documents **** #. **** Documents ****
#: ../js/ui/dash.js:876 ../js/ui/docDisplay.js:489 #: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT ITEMS" msgid "RECENT ITEMS"
msgstr "العناصر الحديثة" msgstr "العناصر الحديثة"
#: ../js/ui/lookingGlass.js:354 #: ../js/ui/lookingGlass.js:552
msgid "No extensions installed" msgid "No extensions installed"
msgstr "لم تثبّت أية امتدادات" msgstr "لم تثبّت أية امتدادات"
#: ../js/ui/lookingGlass.js:391 #: ../js/ui/lookingGlass.js:589
msgid "Enabled" msgid "Enabled"
msgstr "مفعّل" 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" msgid "Disabled"
msgstr "معطّل" msgstr "معطّل"
#: ../js/ui/lookingGlass.js:395 #: ../js/ui/lookingGlass.js:593
msgid "Error" msgid "Error"
msgstr "خطأ" msgstr "خطأ"
#: ../js/ui/lookingGlass.js:397 #: ../js/ui/lookingGlass.js:595
msgid "Out of date" msgid "Out of date"
msgstr "غير محدث" msgstr "غير محدث"
#: ../js/ui/lookingGlass.js:422 #: ../js/ui/lookingGlass.js:620
msgid "View Source" msgid "View Source"
msgstr "اعرض المصدر" msgstr "اعرض المصدر"
#: ../js/ui/lookingGlass.js:428 #: ../js/ui/lookingGlass.js:626
msgid "Web Page" msgid "Web Page"
msgstr "صفحة الوب" msgstr "صفحة الوب"
#: ../js/ui/overview.js:161 #: ../js/ui/overview.js:160
msgid "Undo" msgid "Undo"
msgstr "تراجع" msgstr "تراجع"
#: ../js/ui/panel.js:535 #. TODO - _quit() doesn't really work on apps in state STARTING yet
msgid "Quit" #: ../js/ui/panel.js:469
msgstr "أنهِ" #, c-format
msgid "Quit %s"
msgstr "أغلق %s"
#. Button on the left side of the panel. #: ../js/ui/panel.js:494
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview". msgid "Preferences"
#: ../js/ui/panel.js:740 msgstr "التفضيلات"
msgid "Activities"
msgstr "الأنشطة"
#. Translators: This is the time format with date used #. Translators: This is the time format with date used
#. in 24-hour mode. #. in 24-hour mode.
#: ../js/ui/panel.js:955 #: ../js/ui/panel.js:580
msgid "%a %b %e, %R:%S" msgid "%a %b %e, %R:%S"
msgstr "%A %e %B، %R:%S" msgstr "%A %e %B، %R:%S"
#: ../js/ui/panel.js:956 #: ../js/ui/panel.js:581
msgid "%a %b %e, %R" msgid "%a %b %e, %R"
msgstr "%A %e %B، %R" msgstr "%A %e %B، %R"
#. Translators: This is the time format without date used #. Translators: This is the time format without date used
#. in 24-hour mode. #. in 24-hour mode.
#: ../js/ui/panel.js:960 #: ../js/ui/panel.js:585
msgid "%a %R:%S" msgid "%a %R:%S"
msgstr "%A %R:%S" msgstr "%A %R:%S"
#: ../js/ui/panel.js:961 #: ../js/ui/panel.js:586
msgid "%a %R" msgid "%a %R"
msgstr "%A %R" msgstr "%A %R"
#. Translators: This is a time format with date used #. Translators: This is a time format with date used
#. for AM/PM. #. for AM/PM.
#: ../js/ui/panel.js:968 #: ../js/ui/panel.js:593
msgid "%a %b %e, %l:%M:%S %p" msgid "%a %b %e, %l:%M:%S %p"
msgstr "%A %e %B، %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" msgid "%a %b %e, %l:%M %p"
msgstr "%A %e %B، %l:%M %p" msgstr "%A %e %B، %l:%M %p"
#. Translators: This is a time format without date used #. Translators: This is a time format without date used
#. for AM/PM. #. for AM/PM.
#: ../js/ui/panel.js:973 #: ../js/ui/panel.js:598
msgid "%a %l:%M:%S %p" msgid "%a %l:%M:%S %p"
msgstr "%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" msgid "%a %l:%M %p"
msgstr "%A %Ol:%OM %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 #, c-format
msgid "Failed to unmount '%s'" msgid "Failed to unmount '%s'"
msgstr "فشل فصْل '%s'" msgstr "فشل فصْل '%s'"
#: ../js/ui/placeDisplay.js:111 #: ../js/ui/placeDisplay.js:114
msgid "Retry" msgid "Retry"
msgstr "أعد المحاولة" msgstr "أعد المحاولة"
#: ../js/ui/placeDisplay.js:156 #: ../js/ui/placeDisplay.js:159
msgid "Connect to..." msgid "Connect to..."
msgstr "اتّصل ب‍..." 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:" msgid "Please enter a command:"
msgstr "من فضلك اكتب أمرا:" msgstr "من فضلك اكتب أمرا:"
#: ../js/ui/runDialog.js:375 #: ../js/ui/runDialog.js:378
#, c-format #, c-format
msgid "Execution of '%s' failed:" msgid "Execution of '%s' failed:"
msgstr "فشل تنفيذ '%s':" msgstr "فشل تنفيذ '%s':"
#: ../js/ui/statusMenu.js:90 #: ../js/ui/statusMenu.js:101
msgid "Available" msgid "Available"
msgstr "متاح" msgstr "متاح"
#: ../js/ui/statusMenu.js:94 #: ../js/ui/statusMenu.js:106
msgid "Busy" msgid "Busy"
msgstr "مشغول" msgstr "مشغول"
#: ../js/ui/statusMenu.js:98 #: ../js/ui/statusMenu.js:111
msgid "Invisible" msgid "Invisible"
msgstr "خفي" msgstr "خفي"
#: ../js/ui/statusMenu.js:105 #: ../js/ui/statusMenu.js:119
msgid "Account Information..." msgid "My Account..."
msgstr "معلومات الحساب..." msgstr "حسابي..."
#: ../js/ui/statusMenu.js:109 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." msgid "System Preferences..."
msgstr "تفضيلات النظام..." msgstr "تفضيلات النظام..."
#: ../js/ui/statusMenu.js:116 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
msgstr "أوصد الشاشة" msgstr "أوصد الشاشة"
#: ../js/ui/statusMenu.js:120 #: ../js/ui/statusMenu.js:134
msgid "Switch User" msgid "Switch User"
msgstr "بدّل المستخدم" msgstr "بدّل المستخدم"
#: ../js/ui/statusMenu.js:125 #: ../js/ui/statusMenu.js:139
msgid "Log Out..." msgid "Log Out..."
msgstr "اخرج..." 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..." msgid "Shut Down..."
msgstr "أطفئ..." 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 #, c-format
msgid "%s has finished starting" msgid "%s has finished starting"
msgstr "انتهى %s من البدء" msgstr "انتهى %s من البدء"
#: ../js/ui/windowAttentionHandler.js:49 #: ../js/ui/windowAttentionHandler.js:45
#, c-format #, c-format
msgid "'%s' is ready" msgid "'%s' is ready"
msgstr "'%s' جاهز" msgstr "'%s' جاهز"
#: ../js/ui/workspacesView.js:239 #: ../js/ui/workspacesView.js:229
msgid "" msgid ""
"Can't add a new workspace because maximum workspaces limit has been reached." "Can't add a new workspace because maximum workspaces limit has been reached."
msgstr "تعذّر إضافة مساحة عمل جديدة، لتجاوز أقصى عدد من مساحات العمل." msgstr "تعذّر إضافة مساحة عمل جديدة، لتجاوز أقصى عدد من مساحات العمل."
#: ../js/ui/workspacesView.js:256 #: ../js/ui/workspacesView.js:246
msgid "Can't remove the first workspace." msgid "Can't remove the first workspace."
msgstr "لا يمكن حذف مساحة العمل الأولى." 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" msgid "Less than a minute ago"
msgstr "منذ أقل من دقيقة" msgstr "منذ أقل من دقيقة"
#: ../src/shell-global.c:983 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
@ -267,7 +666,7 @@ msgstr[3] "منذ %d دقائق"
msgstr[4] "منذ %d دقيقة" msgstr[4] "منذ %d دقيقة"
msgstr[5] "منذ %d دقيقة" msgstr[5] "منذ %d دقيقة"
#: ../src/shell-global.c:988 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
@ -278,7 +677,7 @@ msgstr[3] "منذ %d ساعات"
msgstr[4] "منذ %d ساعة" msgstr[4] "منذ %d ساعة"
msgstr[5] "منذ %d ساعة" msgstr[5] "منذ %d ساعة"
#: ../src/shell-global.c:993 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
@ -289,7 +688,7 @@ msgstr[3] "منذ %d أيام"
msgstr[4] "منذ %d يوما" msgstr[4] "منذ %d يوما"
msgstr[5] "منذ %d يوم" msgstr[5] "منذ %d يوم"
#: ../src/shell-global.c:998 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"
@ -324,6 +723,9 @@ msgstr "ابحث"
msgid "%1$s: %2$s" msgid "%1$s: %2$s"
msgstr "%1$s: %2$s" msgstr "%1$s: %2$s"
#~ msgid "Account Information..."
#~ msgstr "معلومات الحساب..."
#~ msgid "%H:%M" #~ msgid "%H:%M"
#~ msgstr "%OH:%OM" #~ msgstr "%OH:%OM"

343
po/cs.po
View File

@ -7,15 +7,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gnome-shell\n" "Project-Id-Version: gnome-shell\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-11 21:54+0200\n" "POT-Creation-Date: 2010-10-31 12:09+0100\n"
"PO-Revision-Date: 2010-07-11 21:51+0200\n" "PO-Revision-Date: 2010-10-31 12:09+0100\n"
"Last-Translator: Petr Kovar <pknbe@volny.cz>\n" "Last-Translator: Petr Kovar <pknbe@volny.cz>\n"
"Language-Team: Czech <gnome-cs-list@gnome.org>\n" "Language-Team: Czech <gnome-cs-list@gnome.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\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 #: ../data/gnome-shell.desktop.in.in.h:1
msgid "GNOME Shell" msgid "GNOME Shell"
@ -219,6 +220,132 @@ msgstr "Uuid rozšíření určených k vypnutí"
msgid "Whether to collect stats about applications usage" msgid "Whether to collect stats about applications usage"
msgstr "Zda sbírat statistická data o používání aplikací" 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 #: ../data/clock-preferences.ui.h:1
msgid "Clock Format" msgid "Clock Format"
msgstr "Formát hodin" msgstr "Formát hodin"
@ -248,27 +375,27 @@ msgid "_24 hour format"
msgstr "_24hodinový formát" msgstr "_24hodinový formát"
#. **** Applications **** #. **** Applications ****
#: ../js/ui/appDisplay.js:388 ../js/ui/dash.js:777 #: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
msgid "APPLICATIONS" msgid "APPLICATIONS"
msgstr "APLIKACE" msgstr "APLIKACE"
#: ../js/ui/appDisplay.js:420 #: ../js/ui/appDisplay.js:348
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "PŘEDVOLBY" msgstr "PŘEDVOLBY"
#: ../js/ui/appDisplay.js:725 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "Nové okno" msgstr "Nové okno"
#: ../js/ui/appDisplay.js:729 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "Odstranit z oblíbených" msgstr "Odstranit z oblíbených"
#: ../js/ui/appDisplay.js:730 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "Přidat mezi oblíbené" msgstr "Přidat mezi oblíbené"
#: ../js/ui/appDisplay.js:1037 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "Oblíbené přidáte přetažením sem" 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." msgid "%s has been added to your favorites."
msgstr "%s byl přidán mezi oblíbené." msgstr "%s byl přidán mezi oblíbené."
#: ../js/ui/appFavorites.js:106 #: ../js/ui/appFavorites.js:107
#, c-format #, c-format
msgid "%s has been removed from your favorites." msgid "%s has been removed from your favorites."
msgstr "%s byl odstraněn z oblíbených." msgstr "%s byl odstraněn z oblíbených."
#: ../js/ui/dash.js:146 #: ../js/ui/dash.js:142
msgid "Find" msgid "Find"
msgstr "Najít" msgstr "Najít"
#: ../js/ui/dash.js:475 #: ../js/ui/dash.js:473
msgid "Searching..." msgid "Searching..."
msgstr "Hledá se..." msgstr "Hledá se..."
#: ../js/ui/dash.js:489 #: ../js/ui/dash.js:487
msgid "No matching results." msgid "No matching results."
msgstr "Neodpovídá ani jeden z výsledků." msgstr "Neodpovídá ani jeden z výsledků."
#. **** Places **** #. **** Places ****
#. Translators: This is in the sense of locations for documents, #. Translators: This is in the sense of locations for documents,
#. network locations, etc. #. 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" msgid "PLACES & DEVICES"
msgstr "MÍSTA A ZAŘÍZENÍ" msgstr "MÍSTA A ZAŘÍZENÍ"
#. **** Documents **** #. **** Documents ****
#: ../js/ui/dash.js:803 ../js/ui/docDisplay.js:497 #: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT ITEMS" msgid "RECENT ITEMS"
msgstr "NEDÁVNÉ POLOŽKY" msgstr "NEDÁVNÉ POLOŽKY"
#: ../js/ui/lookingGlass.js:471 #: ../js/ui/lookingGlass.js:552
msgid "No extensions installed" msgid "No extensions installed"
msgstr "Nejsou nainstalována žádná rozšíření" msgstr "Nejsou nainstalována žádná rozšíření"
#: ../js/ui/lookingGlass.js:508 #: ../js/ui/lookingGlass.js:589
msgid "Enabled" msgid "Enabled"
msgstr "Povoleno" 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" msgid "Disabled"
msgstr "Zakázáno" msgstr "Zakázáno"
#: ../js/ui/lookingGlass.js:512 #: ../js/ui/lookingGlass.js:593
msgid "Error" msgid "Error"
msgstr "Chyba" msgstr "Chyba"
#: ../js/ui/lookingGlass.js:514 #: ../js/ui/lookingGlass.js:595
msgid "Out of date" msgid "Out of date"
msgstr "Neaktuální" msgstr "Neaktuální"
#: ../js/ui/lookingGlass.js:539 #: ../js/ui/lookingGlass.js:620
msgid "View Source" msgid "View Source"
msgstr "Zobrazit zdroj" msgstr "Zobrazit zdroj"
#: ../js/ui/lookingGlass.js:545 #: ../js/ui/lookingGlass.js:626
msgid "Web Page" msgid "Web Page"
msgstr "Webová stránka" msgstr "Webová stránka"
#: ../js/ui/overview.js:165 #: ../js/ui/overview.js:160
msgid "Undo" msgid "Undo"
msgstr "Zpět" 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" msgid "Preferences"
msgstr "Předvolby" msgstr "Předvolby"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A". # 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 #. Translators: This is the time format with date used
#. in 24-hour mode. #. in 24-hour mode.
#: ../js/ui/panel.js:603 #: ../js/ui/panel.js:580
msgid "%a %b %e, %R:%S" msgid "%a %b %e, %R:%S"
msgstr "%A, %e. %B, %R:%S" msgstr "%A, %e. %B, %R:%S"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A". # 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" msgid "%a %b %e, %R"
msgstr "%A, %e. %B, %R" msgstr "%A, %e. %B, %R"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A". # 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 #. Translators: This is the time format without date used
#. in 24-hour mode. #. in 24-hour mode.
#: ../js/ui/panel.js:608 #: ../js/ui/panel.js:585
msgid "%a %R:%S" msgid "%a %R:%S"
msgstr "%A, %R:%S" msgstr "%A, %R:%S"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A". # 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" msgid "%a %R"
msgstr "%A, %R" msgstr "%A, %R"
# Not sure whether we've enough space for it, but anyway, looks more aesthetically with "%A". # 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 #. Translators: This is a time format with date used
#. for AM/PM. #. for AM/PM.
#: ../js/ui/panel.js:616 #: ../js/ui/panel.js:593
msgid "%a %b %e, %l:%M:%S %p" msgid "%a %b %e, %l:%M:%S %p"
msgstr "%A, %e. %B, %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". # 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" msgid "%a %b %e, %l:%M %p"
msgstr "%A, %e. %B, %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". # 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 #. Translators: This is a time format without date used
#. for AM/PM. #. for AM/PM.
#: ../js/ui/panel.js:621 #: ../js/ui/panel.js:598
msgid "%a %l:%M:%S %p" msgid "%a %l:%M:%S %p"
msgstr "%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". # 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" msgid "%a %l:%M %p"
msgstr "%A, %l:%M %p" msgstr "%A, %l:%M %p"
#. Button on the left side of the panel. #. 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". #. 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" msgid "Activities"
msgstr "Činnosti" msgstr "Činnosti"
#: ../js/ui/placeDisplay.js:109 #: ../js/ui/placeDisplay.js:111
#, c-format #, c-format
msgid "Failed to unmount '%s'" msgid "Failed to unmount '%s'"
msgstr "Nelze odpojit \"%s\"" msgstr "Nelze odpojit \"%s\""
#: ../js/ui/placeDisplay.js:112 #: ../js/ui/placeDisplay.js:114
msgid "Retry" msgid "Retry"
msgstr "Opakovat" msgstr "Opakovat"
#: ../js/ui/placeDisplay.js:157 #: ../js/ui/placeDisplay.js:159
msgid "Connect to..." msgid "Connect to..."
msgstr "Připojit se k..." 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:" msgid "Please enter a command:"
msgstr "Zadejte prosím příkaz:" msgstr "Zadejte prosím příkaz:"
#: ../js/ui/runDialog.js:379 #: ../js/ui/runDialog.js:378
#, c-format #, c-format
msgid "Execution of '%s' failed:" msgid "Execution of '%s' failed:"
msgstr "Vykonání \"%s\" selhalo:" msgstr "Vykonání \"%s\" selhalo:"
#: ../js/ui/statusMenu.js:91 #: ../js/ui/statusMenu.js:101
msgid "Available" msgid "Available"
msgstr "Přítomen" msgstr "Přítomen"
#: ../js/ui/statusMenu.js:95 #: ../js/ui/statusMenu.js:106
msgid "Busy" msgid "Busy"
msgstr "Zaneprázdněn" msgstr "Zaneprázdněn"
#: ../js/ui/statusMenu.js:99 #: ../js/ui/statusMenu.js:111
msgid "Invisible" msgid "Invisible"
msgstr "Neviditelný" msgstr "Neviditelný"
#: ../js/ui/statusMenu.js:106 #: ../js/ui/statusMenu.js:119
msgid "Account Information..." msgid "My Account..."
msgstr "Informace o účtu..." msgstr "Můj účet..."
#: ../js/ui/statusMenu.js:110 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." msgid "System Settings..."
msgstr "Předvolby systému..." msgstr "Nastavení systému..."
#: ../js/ui/statusMenu.js:117 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
msgstr "Uzamknout obrazovku" msgstr "Uzamknout obrazovku"
#: ../js/ui/statusMenu.js:121 #: ../js/ui/statusMenu.js:134
msgid "Switch User" msgid "Switch User"
msgstr "Přepnout uživatele" msgstr "Přepnout uživatele"
#: ../js/ui/statusMenu.js:126 #: ../js/ui/statusMenu.js:139
msgid "Log Out..." msgid "Log Out..."
msgstr "Odhlásit..." 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..." msgid "Shut Down..."
msgstr "Vypnout..." 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 #, c-format
msgid "%s has finished starting" msgid "%s has finished starting"
msgstr "Spouštění %s dokončeno" msgstr "Spouštění %s dokončeno"
#: ../js/ui/windowAttentionHandler.js:49 #: ../js/ui/windowAttentionHandler.js:45
#, c-format #, c-format
msgid "'%s' is ready" msgid "'%s' is ready"
msgstr "Připraveno \"%s\"" msgstr "Připraveno \"%s\""
#: ../js/ui/workspacesView.js:237 #: ../js/ui/workspacesView.js:229
msgid "" msgid ""
"Can't add a new workspace because maximum workspaces limit has been reached." "Can't add a new workspace because maximum workspaces limit has been reached."
msgstr "" msgstr ""
"Novou pracovní plochu nelze přidat, jelikož byl dosažen maximální počet " "Novou pracovní plochu nelze přidat, jelikož byl dosažen maximální počet "
"pracovních ploch." "pracovních ploch."
#: ../js/ui/workspacesView.js:254 #: ../js/ui/workspacesView.js:246
msgid "Can't remove the first workspace." msgid "Can't remove the first workspace."
msgstr "Nelze odstranit první pracovní plochu." 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" msgid "Less than a minute ago"
msgstr "Před méně než minutou" msgstr "Před méně než minutou"
#: ../src/shell-global.c:1043 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
@ -487,7 +707,7 @@ msgstr[0] "Před %d minutou"
msgstr[1] "Před %d minutami" msgstr[1] "Před %d minutami"
msgstr[2] "Před %d minutami" msgstr[2] "Před %d minutami"
#: ../src/shell-global.c:1048 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
@ -495,7 +715,7 @@ msgstr[0] "Před %d hodinou"
msgstr[1] "Před %d hodinami" msgstr[1] "Před %d hodinami"
msgstr[2] "Před %d hodinami" msgstr[2] "Před %d hodinami"
#: ../src/shell-global.c:1053 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
@ -503,7 +723,7 @@ msgstr[0] "Před %d dnem"
msgstr[1] "Před %d dny" msgstr[1] "Před %d dny"
msgstr[2] "Před %d dny" msgstr[2] "Před %d dny"
#: ../src/shell-global.c:1058 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"
@ -534,3 +754,6 @@ msgstr "Hledat"
#, c-format #, c-format
msgid "%1$s: %2$s" msgid "%1$s: %2$s"
msgstr "%1$s: %2$s" msgstr "%1$s: %2$s"
#~ msgid "Account Information..."
#~ msgstr "Informace o účtu..."

View File

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: gnome-shell.master\n" "Project-Id-Version: gnome-shell.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&component=general\n" "shell&component=general\n"
"POT-Creation-Date: 2010-10-27 23:15+0000\n" "POT-Creation-Date: 2010-10-30 17:51+0000\n"
"PO-Revision-Date: 2010-10-28 01:42+0200\n" "PO-Revision-Date: 2010-10-31 21:36+0100\n"
"Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n" "Last-Translator: Jorge González <jorgegonz@svn.gnome.org>\n"
"Language-Team: Español <gnome-es-list@gnome.org>\n" "Language-Team: Español <gnome-es-list@gnome.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -420,19 +420,19 @@ msgstr "APLICACIONES"
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "PREFERENCIAS" msgstr "PREFERENCIAS"
#: ../js/ui/appDisplay.js:648 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "Ventana nueva" msgstr "Ventana nueva"
#: ../js/ui/appDisplay.js:652 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "Quitar de los favoritos" msgstr "Quitar de los favoritos"
#: ../js/ui/appDisplay.js:653 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "Añadir a los favoritos" msgstr "Añadir a los favoritos"
#: ../js/ui/appDisplay.js:830 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "Arrastrar aquí para añadir a los favoritos" msgstr "Arrastrar aquí para añadir a los favoritos"
@ -608,8 +608,9 @@ msgid "My Account..."
msgstr "Mi cuenta…" msgstr "Mi cuenta…"
#: ../js/ui/statusMenu.js:123 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." #| msgid "System Preferences..."
msgstr "Preferencias del sistema…" msgid "System Settings..."
msgstr "Ajustes del sistema…"
#: ../js/ui/statusMenu.js:130 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
@ -719,36 +720,35 @@ msgstr[0] "%u entrada"
msgstr[1] "%u entradas" msgstr[1] "%u entradas"
#: ../src/gvc/gvc-mixer-control.c:1402 #: ../src/gvc/gvc-mixer-control.c:1402
#| msgid "System Settings..."
msgid "System Sounds" msgid "System Sounds"
msgstr "Sonidos del sistema" msgstr "Sonidos del sistema"
#: ../src/shell-global.c:1204 #: ../src/shell-global.c:1219
msgid "Less than a minute ago" msgid "Less than a minute ago"
msgstr "Hace menos de un minuto" msgstr "Hace menos de un minuto"
#: ../src/shell-global.c:1208 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
msgstr[0] "Hace %d minuto" msgstr[0] "Hace %d minuto"
msgstr[1] "Hace %d minutos" msgstr[1] "Hace %d minutos"
#: ../src/shell-global.c:1213 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
msgstr[0] "Hace %d hora" msgstr[0] "Hace %d hora"
msgstr[1] "Hace %d horas" msgstr[1] "Hace %d horas"
#: ../src/shell-global.c:1218 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
msgstr[0] "Hace %d día" msgstr[0] "Hace %d día"
msgstr[1] "Hace %d días" msgstr[1] "Hace %d días"
#: ../src/shell-global.c:1223 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"

View File

@ -10,8 +10,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gnome-shell master\n" "Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-26 16:28+0200\n" "POT-Creation-Date: 2010-11-03 00:26+0100\n"
"PO-Revision-Date: 2010-10-26 16:36+0200\n" "PO-Revision-Date: 2010-11-03 00:28+0100\n"
"Last-Translator: Fran Diéguez <frandieguez@ubuntu.com>\n" "Last-Translator: Fran Diéguez <frandieguez@ubuntu.com>\n"
"Language-Team: Galician <gnome-gl-list@gnome.org>\n" "Language-Team: Galician <gnome-gl-list@gnome.org>\n"
"Language: gl\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 #: ../data/org.gnome.shell.gschema.xml.in.h:5
msgid "Framerate used for recording screencasts." 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 #: ../data/org.gnome.shell.gschema.xml.in.h:6
msgid "" msgid ""
@ -73,7 +73,7 @@ msgstr ""
#: ../data/org.gnome.shell.gschema.xml.in.h:7 #: ../data/org.gnome.shell.gschema.xml.in.h:7
msgid "History for command (Alt-F2) dialog" 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 #: ../data/org.gnome.shell.gschema.xml.in.h:8
msgid "Hour format" msgid "Hour format"
@ -418,19 +418,19 @@ msgstr "APLICATIVOS"
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "PREFERENCIAS" msgstr "PREFERENCIAS"
#: ../js/ui/appDisplay.js:648 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "Xanela nova" msgstr "Xanela nova"
#: ../js/ui/appDisplay.js:652 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "Eliminar dos favoritos" msgstr "Eliminar dos favoritos"
#: ../js/ui/appDisplay.js:653 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "Engadir aos favoritos" msgstr "Engadir aos favoritos"
#: ../js/ui/appDisplay.js:830 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "Arrastre aquí para engadir aos favoritos" msgstr "Arrastre aquí para engadir aos favoritos"
@ -476,7 +476,9 @@ msgstr "Non hai ningunha extensión instalada"
msgid "Enabled" msgid "Enabled"
msgstr "Activado" 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" msgid "Disabled"
msgstr "Desactivado" msgstr "Desactivado"
@ -559,7 +561,7 @@ msgstr "Actividades"
#: ../js/ui/placeDisplay.js:111 #: ../js/ui/placeDisplay.js:111
#, c-format #, c-format
msgid "Failed to unmount '%s'" msgid "Failed to unmount '%s'"
msgstr "Produciuse un fallo ao montar «%s»" msgstr "Produciuse un fallo ao desmontar «%s»"
#: ../js/ui/placeDisplay.js:114 #: ../js/ui/placeDisplay.js:114
msgid "Retry" msgid "Retry"
@ -604,8 +606,8 @@ msgid "My Account..."
msgstr "A miña conta..." msgstr "A miña conta..."
#: ../js/ui/statusMenu.js:123 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." msgid "System Settings..."
msgstr "Preferencias do sistema..." msgstr "Configuracións do sistema..."
#: ../js/ui/statusMenu.js:130 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
@ -696,32 +698,54 @@ msgstr ""
msgid "Can't remove the first workspace." msgid "Can't remove the first workspace."
msgstr "Non é posíbel quitar a primeira área de traballo." 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" msgid "Less than a minute ago"
msgstr "Hai menos dun minuto" msgstr "Hai menos dun minuto"
#: ../src/shell-global.c:1208 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
msgstr[0] "hai %d minuto" msgstr[0] "hai %d minuto"
msgstr[1] "hai %d minutos" msgstr[1] "hai %d minutos"
#: ../src/shell-global.c:1213 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
msgstr[0] "hai %d hora" msgstr[0] "hai %d hora"
msgstr[1] "hai %d horas" msgstr[1] "hai %d horas"
#: ../src/shell-global.c:1218 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
msgstr[0] "hai %d día" msgstr[0] "hai %d día"
msgstr[1] "hai %d días" msgstr[1] "hai %d días"
#: ../src/shell-global.c:1223 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"
@ -752,12 +776,12 @@ msgstr "Buscar"
msgid "%1$s: %2$s" msgid "%1$s: %2$s"
msgstr "%1$s: %2$s" msgstr "%1$s: %2$s"
#~ msgid "System Preferences..."
#~ msgstr "Preferencias do sistema..."
#~ msgid "Account Information..." #~ msgid "Account Information..."
#~ msgstr "Información da conta..." #~ msgstr "Información da conta..."
#~ msgid "System Settings..."
#~ msgstr "Configuracións do sistema..."
#~ msgid "ON" #~ msgid "ON"
#~ msgstr "⚫" #~ msgstr "⚫"

View File

@ -8,8 +8,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gnome-shell master\n" "Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-10-28 08:56+0200\n" "POT-Creation-Date: 2010-11-01 07:47+0200\n"
"PO-Revision-Date: 2010-10-28 08:58+0200\n" "PO-Revision-Date: 2010-11-01 07:48+0200\n"
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n" "Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
"Language-Team: Hebrew <he@li.org>\n" "Language-Team: Hebrew <he@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -411,19 +411,19 @@ msgstr "יישומים"
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "העדפות" msgstr "העדפות"
#: ../js/ui/appDisplay.js:648 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "חלון חדש" msgstr "חלון חדש"
#: ../js/ui/appDisplay.js:652 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "הסרה מהמועדפים" msgstr "הסרה מהמועדפים"
#: ../js/ui/appDisplay.js:653 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "הוספה למועדפים" msgstr "הוספה למועדפים"
#: ../js/ui/appDisplay.js:830 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "יש לגרור פריטים לכאן כדי להוסיף מועדפים" msgstr "יש לגרור פריטים לכאן כדי להוסיף מועדפים"
@ -599,8 +599,8 @@ msgid "My Account..."
msgstr "החשבון שלי..." msgstr "החשבון שלי..."
#: ../js/ui/statusMenu.js:123 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." msgid "System Settings..."
msgstr "העדפות המערכת..." msgstr "הגדרות המערכת..."
#: ../js/ui/statusMenu.js:130 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
@ -713,11 +713,11 @@ msgstr[2] "2 קלטים"
msgid "System Sounds" msgid "System Sounds"
msgstr "צלילי מערכת" msgstr "צלילי מערכת"
#: ../src/shell-global.c:1204 #: ../src/shell-global.c:1219
msgid "Less than a minute ago" msgid "Less than a minute ago"
msgstr "לפני פחות מדקה" msgstr "לפני פחות מדקה"
#: ../src/shell-global.c:1208 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
@ -725,7 +725,7 @@ msgstr[0] "לפני דקה"
msgstr[1] "לפני %d דקות" msgstr[1] "לפני %d דקות"
msgstr[2] "לפני 2 דקות" msgstr[2] "לפני 2 דקות"
#: ../src/shell-global.c:1213 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
@ -733,7 +733,7 @@ msgstr[0] "לפני שעה"
msgstr[1] "לפני %d שעות" msgstr[1] "לפני %d שעות"
msgstr[2] "לפני שעתיים" msgstr[2] "לפני שעתיים"
#: ../src/shell-global.c:1218 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
@ -741,7 +741,7 @@ msgstr[0] "לפני יום"
msgstr[1] "לפני %d ימים" msgstr[1] "לפני %d ימים"
msgstr[2] "לפני יומיים" msgstr[2] "לפני יומיים"
#: ../src/shell-global.c:1223 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"

296
po/pa.po
View File

@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n" "Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
"cgi?product=gnome-shell&component=general\n" "cgi?product=gnome-shell&component=general\n"
"POT-Creation-Date: 2010-10-02 20:44+0000\n" "POT-Creation-Date: 2010-10-27 23:15+0000\n"
"PO-Revision-Date: 2010-10-04 07:19+0530\n" "PO-Revision-Date: 2010-10-29 08:13+0530\n"
"Last-Translator: A S Alam <aalam@users.sf.net>\n" "Last-Translator: A S Alam <aalam@users.sf.net>\n"
"Language-Team: Punjabi/Panjabi <punjabi-users@lists.sf.net>\n" "Language-Team: Punjabi/Panjabi <punjabi-users@lists.sf.net>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -166,9 +166,9 @@ msgid ""
"() to obtain a specific format. See the strftime() manual for more " "() to obtain a specific format. See the strftime() manual for more "
"information." "information."
msgstr "" msgstr ""
"ਇਹ ਕੁੰਜੀ ਪੈਨਲ ਘੜੀ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਫਾਰਮੈਟ ਦਿੰਦੀ ਹੈ, ਜਦੋਂ ਕਿ ਫਾਰਮੈਟ ਕੁੰਜੀ \"ਕਸਟਮ\" ਸੈੱਟ " "ਇਹ ਕੁੰਜੀ ਪੈਨਲ ਘੜੀ ਲਈ ਵਰਤਣ ਵਾਸਤੇ ਫਾਰਮੈਟ ਦਿੰਦੀ ਹੈ, ਜਦੋਂ ਕਿ ਫਾਰਮੈਟ ਕੁੰਜੀ \"ਕਸਟਮ\" ਸੈੱਟ ਕੀਤੀ "
"ਕੀਤੀ ਹੋਵੇ। ਤੁਸੀਂ ਖਾਸ ਫਾਰਮੈਟ ਦੇਣ ਲਈ ਹਦਾਇਤਾਂ ਵਾਸਤੇ strftime () ਨੂੰ ਵਰਤ ਸਕਦੇ ਹੋ। " "ਹੋਵੇ। ਤੁਸੀਂ ਖਾਸ ਫਾਰਮੈਟ ਦੇਣ ਲਈ ਹਦਾਇਤਾਂ ਵਾਸਤੇ strftime () ਨੂੰ ਵਰਤ ਸਕਦੇ ਹੋ। ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ "
"ਹੋਰ ਜਾਣਕਾਰੀ ਲਈ strftime () ਦਸਤਾਵੇਜ਼ ਵੇਖੋ।" "strftime () ਦਸਤਾਵੇਜ਼ ਵੇਖੋ।"
#: ../data/org.gnome.shell.gschema.xml.in.h:25 #: ../data/org.gnome.shell.gschema.xml.in.h:25
msgid "" msgid ""
@ -179,12 +179,12 @@ msgid ""
"in the custom_format key. Note that if set to either \"unix\" or \"custom\", " "in the custom_format key. Note that if set to either \"unix\" or \"custom\", "
"the show_date and show_seconds keys are ignored." "the show_date and show_seconds keys are ignored."
msgstr "" msgstr ""
"ਇਹ ਕੁੰਜੀ ਤਹਿ ਕਰਦੀ ਹੈ ਕਿ ਕਿਹੜਾ ਪੈਨਲ ਘੜੀ ਵਿੱਚ ਘੰਟਾ ਫਾਰਮੈਟ ਵਰਤਿਆ ਜਾਵੇ। ਸੰਭਵ ਮੁੱਲ ਹਨ " "ਇਹ ਕੁੰਜੀ ਤਹਿ ਕਰਦੀ ਹੈ ਕਿ ਕਿਹੜਾ ਪੈਨਲ ਘੜੀ ਵਿੱਚ ਘੰਟਾ ਫਾਰਮੈਟ ਵਰਤਿਆ ਜਾਵੇ। ਸੰਭਵ ਮੁੱਲ ਹਨ \"12-"
"\"12-hour\"(੧੨-ਘੰਟੇ), \"24-hour\" (੨੪-ਘੰਟੇ), \"unix\" (ਯੂਨੈਕਸ) ਅਤੇ \"custom\" " "hour\"(੧੨-ਘੰਟੇ), \"24-hour\" (੨੪-ਘੰਟੇ), \"unix\" (ਯੂਨੈਕਸ) ਅਤੇ \"custom\" (ਪਸੰਦੀਦਾ)। "
"(ਪਸੰਦੀਦਾ)। ਜੇ \"ਯੂਨੈਕਸ\" ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ ਘੜੀ ਨੂੰ ਈਪੋਚ (-ਜਨਵਰੀ-੧੯੭੦) ਤੋਂ ਵੇਖਾਇਆ\n" "ਜੇ \"ਯੂਨੈਕਸ\" ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ ਘੜੀ ਨੂੰ ਈਪੋਚ (-ਜਨਵਰੀ-੧੯੭੦) ਤੋਂ ਵੇਖਾਇਆ\n"
"ਜਾਵੇਗਾ। ਜੇ \"ਪਸੰਦੀਦਾ\" ਲਈ ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ, ਘੜੀ ਨੂੰ custom_format ਕੁੰਜੀ ਵਿੱਚ ਦਿੱਤੇ " "ਜਾਵੇਗਾ। ਜੇ \"ਪਸੰਦੀਦਾ\" ਲਈ ਸੈੱਟ ਕੀਤਾ ਗਿਆ ਤਾਂ, ਘੜੀ ਨੂੰ custom_format ਕੁੰਜੀ ਵਿੱਚ ਦਿੱਤੇ ਫਾਰਮੈਟ "
"ਫਾਰਮੈਟ ਮੁਤਾਬਕ ਵੇਖਾਇਆ ਜਾਵੇਗਾ। ਯਾਦ ਰੱਖੋ ਕਿ ਜੇ \"ਯੂਨੈਕਸ\" ਜਾਂ \"ਪਸੰਦੀਦਾ\" ਸੈੱਟ ਕੀਤਾ ਤਾਂ ਅੱਪਗਰੇਡ " "ਮੁਤਾਬਕ ਵੇਖਾਇਆ ਜਾਵੇਗਾ। ਯਾਦ ਰੱਖੋ ਕਿ ਜੇ \"ਯੂਨੈਕਸ\" ਜਾਂ \"ਪਸੰਦੀਦਾ\" ਸੈੱਟ ਕੀਤਾ ਤਾਂ ਅੱਪਗਰੇਡ ਮਿਤੀ "
"ਮਿਤੀ ਵੇਖਾਓ ਤੇ ਸਕਿੰਟ ਵੇਖਾਓ ਨੂੰ ਅਣਡਿੱਠਾ ਕੀਤਾ ਜਾਵੇਗਾ।" "ਵੇਖਾਓ ਤੇ ਸਕਿੰਟ ਵੇਖਾਓ ਨੂੰ ਅਣਡਿੱਠਾ ਕੀਤਾ ਜਾਵੇਗਾ।"
#: ../data/org.gnome.shell.gschema.xml.in.h:26 #: ../data/org.gnome.shell.gschema.xml.in.h:26
msgid "Uuids of extensions to disable" msgid "Uuids of extensions to disable"
@ -194,6 +194,132 @@ msgstr "ਇਕਟੈਨਸ਼ਨ ਦੀ Uuids ਬੰਦ ਹੈ"
msgid "Whether to collect stats about applications usage" msgid "Whether to collect stats about applications usage"
msgstr "ਐਪਲੀਕੇਸ਼ਨ ਵਰਤੋਂ ਬਾਰੇ ਅੰਕੜੇ ਇੱਕਠੇ ਕਰਨੇ ਹਨ" 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 #: ../data/clock-preferences.ui.h:1
msgid "Clock Format" msgid "Clock Format"
msgstr "ਘੜੀ ਫਾਰਮੈਟ" msgstr "ਘੜੀ ਫਾਰਮੈਟ"
@ -289,7 +415,9 @@ msgstr "ਕੋਈ ਇਕਸਟੈਨਸ਼ਨ ਇੰਸਟਾਲ ਨਹੀਂ
msgid "Enabled" msgid "Enabled"
msgstr "ਚਾਲੂ ਹੈ" 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" msgid "Disabled"
msgstr "ਬੰਦ ਹੈ" msgstr "ਬੰਦ ਹੈ"
@ -314,58 +442,58 @@ msgid "Undo"
msgstr "ਵਾਪਸ" msgstr "ਵਾਪਸ"
#. TODO - _quit() doesn't really work on apps in state STARTING yet #. TODO - _quit() doesn't really work on apps in state STARTING yet
#: ../js/ui/panel.js:461 #: ../js/ui/panel.js:469
#, c-format #, c-format
msgid "Quit %s" msgid "Quit %s"
msgstr "%s ਬੰਦ ਕਰੋ" msgstr "%s ਬੰਦ ਕਰੋ"
#: ../js/ui/panel.js:486 #: ../js/ui/panel.js:494
msgid "Preferences" msgid "Preferences"
msgstr "ਮੇਰੀ ਪਸੰਦ" msgstr "ਮੇਰੀ ਪਸੰਦ"
#. Translators: This is the time format with date used #. Translators: This is the time format with date used
#. in 24-hour mode. #. in 24-hour mode.
#: ../js/ui/panel.js:572 #: ../js/ui/panel.js:580
msgid "%a %b %e, %R:%S" msgid "%a %b %e, %R:%S"
msgstr "%a, %e %b %R:%S" msgstr "%a, %e %b %R:%S"
#: ../js/ui/panel.js:573 #: ../js/ui/panel.js:581
msgid "%a %b %e, %R" msgid "%a %b %e, %R"
msgstr "%a %e %b, %R" msgstr "%a %e %b, %R"
#. Translators: This is the time format without date used #. Translators: This is the time format without date used
#. in 24-hour mode. #. in 24-hour mode.
#: ../js/ui/panel.js:577 #: ../js/ui/panel.js:585
msgid "%a %R:%S" msgid "%a %R:%S"
msgstr "%a %R:%S" msgstr "%a %R:%S"
#: ../js/ui/panel.js:578 #: ../js/ui/panel.js:586
msgid "%a %R" msgid "%a %R"
msgstr "%a %R" msgstr "%a %R"
#. Translators: This is a time format with date used #. Translators: This is a time format with date used
#. for AM/PM. #. for AM/PM.
#: ../js/ui/panel.js:585 #: ../js/ui/panel.js:593
msgid "%a %b %e, %l:%M:%S %p" msgid "%a %b %e, %l:%M:%S %p"
msgstr "%a %e %b, %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" msgid "%a %b %e, %l:%M %p"
msgstr "%a %e %b, %l:%M %p" msgstr "%a %e %b, %l:%M %p"
#. Translators: This is a time format without date used #. Translators: This is a time format without date used
#. for AM/PM. #. for AM/PM.
#: ../js/ui/panel.js:590 #: ../js/ui/panel.js:598
msgid "%a %l:%M:%S %p" msgid "%a %l:%M:%S %p"
msgstr "%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" msgid "%a %l:%M %p"
msgstr "%a %l:%M %p" msgstr "%a %l:%M %p"
#. Button on the left side of the panel. #. 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". #. 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" msgid "Activities"
msgstr "ਸਰਗਰਮੀਆਂ" msgstr "ਸਰਗਰਮੀਆਂ"
@ -389,7 +517,7 @@ msgstr "...ਨਾਲ ਕੁਨੈਕਟ ਕਰੋ"
#. simply result in invisible toggle switches. #. simply result in invisible toggle switches.
#: ../js/ui/popupMenu.js:33 #: ../js/ui/popupMenu.js:33
msgid "toggle-switch-us" msgid "toggle-switch-us"
msgstr "" msgstr "toggle-switch-us"
#: ../js/ui/runDialog.js:233 #: ../js/ui/runDialog.js:233
msgid "Please enter a command:" msgid "Please enter a command:"
@ -400,43 +528,95 @@ msgstr "ਕਮਾਂਡ ਦਿਓ ਜੀ:"
msgid "Execution of '%s' failed:" msgid "Execution of '%s' failed:"
msgstr "'%s' ਚਲਾਉਣ ਲਈ ਫੇਲ੍ਹ:" msgstr "'%s' ਚਲਾਉਣ ਲਈ ਫੇਲ੍ਹ:"
#: ../js/ui/statusMenu.js:91 #: ../js/ui/statusMenu.js:101
msgid "Available" msgid "Available"
msgstr "ਉਪਲੱਬਧ" msgstr "ਉਪਲੱਬਧ"
#: ../js/ui/statusMenu.js:95 #: ../js/ui/statusMenu.js:106
msgid "Busy" msgid "Busy"
msgstr "ਰੁਝਿਆ" msgstr "ਰੁਝਿਆ"
#: ../js/ui/statusMenu.js:99 #: ../js/ui/statusMenu.js:111
msgid "Invisible" msgid "Invisible"
msgstr "ਅਦਿੱਖ" msgstr "ਅਦਿੱਖ"
#: ../js/ui/statusMenu.js:106 #: ../js/ui/statusMenu.js:119
msgid "Account Information..." msgid "My Account..."
msgstr "ਅਕਾਊਂਟ ਜਾਣਕਾਰੀ..." msgstr "...ਮੇਰਾ ਅਕਾਊਂਟ"
#: ../js/ui/statusMenu.js:110 #: ../js/ui/statusMenu.js:123
#| msgid "System Preferences..." #| msgid "Preferences"
msgid "System Settings..." msgid "System Preferences..."
msgstr "ਸਿਸਟਮ ਸੈਟਿੰਗ..." msgstr "ਸਿਸਟਮ ਪਸੰਦ..."
#: ../js/ui/statusMenu.js:117 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
msgstr "ਸਕਰੀਨ ਲਾਕ ਕਰੋ" msgstr "ਸਕਰੀਨ ਲਾਕ ਕਰੋ"
#: ../js/ui/statusMenu.js:121 #: ../js/ui/statusMenu.js:134
msgid "Switch User" msgid "Switch User"
msgstr "ਯੂਜ਼ਰ ਬਦਲੋ" msgstr "ਯੂਜ਼ਰ ਬਦਲੋ"
#: ../js/ui/statusMenu.js:126 #: ../js/ui/statusMenu.js:139
msgid "Log Out..." msgid "Log Out..."
msgstr "ਲਾਗਆਉਟ..." 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..." msgid "Shut Down..."
msgstr "ਬੰਦ ਕਰੋ..." 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 #: ../js/ui/windowAttentionHandler.js:43
#, c-format #, c-format
msgid "%s has finished starting" msgid "%s has finished starting"
@ -447,40 +627,63 @@ msgstr "%s ਸ਼ੁਰੂ ਹੋਣਾ ਖਤਮ ਹੋਇਆ"
msgid "'%s' is ready" msgid "'%s' is ready"
msgstr "'%s' ਤਿਆਰ ਹੈ" 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." msgid "Can't add a new workspace because maximum workspaces limit has been reached."
msgstr "ਨਵਾਂ ਵਰਕਸਪੇਸ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ, ਕਿਉਂਕਿ ਵਰਕਸਪੇਸਾਂ ਦੀ ਵੱਧੋ-ਵੱਧ ਗਿਣਤੀ ਪੂਰੀ ਹੋ ਚੁੱਕੀ ਹੈ।" msgstr "ਨਵਾਂ ਵਰਕਸਪੇਸ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ, ਕਿਉਂਕਿ ਵਰਕਸਪੇਸਾਂ ਦੀ ਵੱਧੋ-ਵੱਧ ਗਿਣਤੀ ਪੂਰੀ ਹੋ ਚੁੱਕੀ ਹੈ।"
#: ../js/ui/workspacesView.js:247 #: ../js/ui/workspacesView.js:246
msgid "Can't remove the first workspace." msgid "Can't remove the first workspace."
msgstr "ਪਹਿਲਾਂ ਵਰਕਸਪੇਸ ਨਹੀਂ ਹਟਾਇਆ ਜਾ ਸਕਦਾ।" 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" msgid "Less than a minute ago"
msgstr "ਇੱਕ ਮਿੰਟ ਤੋਂ ਘੱਟ ਚਿਰ ਪਹਿਲਾਂ" msgstr "ਇੱਕ ਮਿੰਟ ਤੋਂ ਘੱਟ ਚਿਰ ਪਹਿਲਾਂ"
#: ../src/shell-global.c:1200 #: ../src/shell-global.c:1208
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
msgstr[0] "%d ਮਿੰਟ ਪਹਿਲਾਂ" msgstr[0] "%d ਮਿੰਟ ਪਹਿਲਾਂ"
msgstr[1] "%d ਮਿੰਟ ਪਹਿਲਾਂ" msgstr[1] "%d ਮਿੰਟ ਪਹਿਲਾਂ"
#: ../src/shell-global.c:1205 #: ../src/shell-global.c:1213
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
msgstr[0] "%d ਘੰਟਾ ਪਹਿਲਾਂ" msgstr[0] "%d ਘੰਟਾ ਪਹਿਲਾਂ"
msgstr[1] "%d ਘੰਟੇ ਪਹਿਲਾਂ" msgstr[1] "%d ਘੰਟੇ ਪਹਿਲਾਂ"
#: ../src/shell-global.c:1210 #: ../src/shell-global.c:1218
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
msgstr[0] "%d ਦਿਨ ਪਹਿਲਾਂ" msgstr[0] "%d ਦਿਨ ਪਹਿਲਾਂ"
msgstr[1] "%d ਦਿਨ ਪਹਿਲਾਂ" msgstr[1] "%d ਦਿਨ ਪਹਿਲਾਂ"
#: ../src/shell-global.c:1215 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"
@ -511,6 +714,9 @@ msgstr "ਖੋਜ"
msgid "%1$s: %2$s" msgid "%1$s: %2$s"
msgstr "%1$s: %2$s" msgstr "%1$s: %2$s"
#~ msgid "Account Information..."
#~ msgstr "ਅਕਾਊਂਟ ਜਾਣਕਾਰੀ..."
#~ msgid "Sidebar" #~ msgid "Sidebar"
#~ msgstr "ਬਾਹੀ" #~ msgstr "ਬਾਹੀ"

View File

@ -4,14 +4,16 @@
# Og Maciel <ogmaciel@gnome.org>, 2009. # Og Maciel <ogmaciel@gnome.org>, 2009.
# Rodrigo Flores <mail@rodrigoflores.org>, 2009. # Rodrigo Flores <mail@rodrigoflores.org>, 2009.
# Felipe Borges <felipe10borges@gmail.com>, 2010. # Felipe Borges <felipe10borges@gmail.com>, 2010.
# Henrique P. Machado <hpmachado@gnome.org>, 2010.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"POT-Creation-Date: 2010-04-17 14:02-0300\n" "shell&component=general\n"
"PO-Revision-Date: 2010-03-02 20:59-0300\n" "POT-Creation-Date: 2010-10-30 17:51+0000\n"
"Last-Translator: Rodrigo Flores <rlmflores@gnome.org>\n" "PO-Revision-Date: 2010-09-02 17:36-0300\n"
"Last-Translator: Henrique P. Machado <hpmachado@gnome.org>\n"
"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -26,32 +28,386 @@ msgstr "GNOME Shell"
msgid "Window management and application launching" msgid "Window management and application launching"
msgstr "Gerenciamento de janelas e lançador de aplicativos" 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 **** #. **** Applications ****
#: ../js/ui/appDisplay.js:306 ../js/ui/dash.js:850 #: ../js/ui/appDisplay.js:316 ../js/ui/dash.js:778
msgid "APPLICATIONS" msgid "APPLICATIONS"
msgstr "APLICATIVOS" msgstr "APLICATIVOS"
#: ../js/ui/appDisplay.js:338 #: ../js/ui/appDisplay.js:348
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "PREFERÊNCIAS" msgstr "PREFERÊNCIAS"
#: ../js/ui/appDisplay.js:697 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "Nova janela" msgstr "Nova janela"
#: ../js/ui/appDisplay.js:701 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "Remover dos Favoritos" msgstr "Remover dos Favoritos"
#: ../js/ui/appDisplay.js:702 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "Adicionar aos Favoritos" msgstr "Adicionar aos Favoritos"
#: ../js/ui/appDisplay.js:1029 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "Arraste até aqui para adicionar aos favoritos" msgstr "Arraste até aqui para adicionar aos favoritos"
#: ../js/ui/appFavorites.js:89 #: ../js/ui/appFavorites.js:88
#, c-format #, c-format
msgid "%s has been added to your favorites." msgid "%s has been added to your favorites."
msgstr "%s foi adicionado aos seus favoritos." 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." msgid "%s has been removed from your favorites."
msgstr "%s foi removido dos seus favoritos." msgstr "%s foi removido dos seus favoritos."
#: ../js/ui/dash.js:189 #: ../js/ui/dash.js:142
msgid "Find" msgid "Find"
msgstr "Localizar" msgstr "Localizar"
#: ../js/ui/dash.js:505 #: ../js/ui/dash.js:473
msgid "Searching..." msgid "Searching..."
msgstr "Pesquisando..." msgstr "Pesquisando..."
#: ../js/ui/dash.js:519 #: ../js/ui/dash.js:487
msgid "No matching results." msgid "No matching results."
msgstr "Nenhum resultado encontrado." msgstr "Nenhum resultado encontrado."
#. **** Places **** #. **** Places ****
#. Translators: This is in the sense of locations for documents, #. Translators: This is in the sense of locations for documents,
#. network locations, etc. #. 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" msgid "PLACES & DEVICES"
msgstr "LOCAIS & DISPOSITIVOS" msgstr "LOCAIS & DISPOSITIVOS"
#. **** Documents **** #. **** Documents ****
#: ../js/ui/dash.js:876 ../js/ui/docDisplay.js:489 #: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT ITEMS" msgid "RECENT ITEMS"
msgstr "DOCUMENTOS RECENTES" msgstr "DOCUMENTOS RECENTES"
#: ../js/ui/lookingGlass.js:362 #: ../js/ui/lookingGlass.js:552
msgid "No extensions installed" msgid "No extensions installed"
msgstr "Nenhuma extensão instalada" msgstr "Nenhuma extensão instalada"
#: ../js/ui/lookingGlass.js:399 #: ../js/ui/lookingGlass.js:589
msgid "Enabled" msgid "Enabled"
msgstr "Habilitado" 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" msgid "Disabled"
msgstr "Desabilitado" msgstr "Desabilitado"
#: ../js/ui/lookingGlass.js:403 #: ../js/ui/lookingGlass.js:593
msgid "Error" msgid "Error"
msgstr "Erro" msgstr "Erro"
#: ../js/ui/lookingGlass.js:405 #: ../js/ui/lookingGlass.js:595
msgid "Out of date" msgid "Out of date"
msgstr "Expirado" msgstr "Expirado"
#: ../js/ui/lookingGlass.js:430 #: ../js/ui/lookingGlass.js:620
msgid "View Source" msgid "View Source"
msgstr "Ver fonte" msgstr "Ver fonte"
#: ../js/ui/lookingGlass.js:436 #: ../js/ui/lookingGlass.js:626
msgid "Web Page" msgid "Web Page"
msgstr "Página Web" msgstr "Página Web"
#: ../js/ui/overview.js:181 #: ../js/ui/overview.js:160
msgid "Undo" msgid "Undo"
msgstr "Desfazer" msgstr "Desfazer"
#. Button on the left side of the panel. #. TODO - _quit() doesn't really work on apps in state STARTING yet
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview". #: ../js/ui/panel.js:469
#: ../js/ui/panel.js:346 #, c-format
msgid "Activities" msgid "Quit %s"
msgstr "Atividades" msgstr "Sair de %s"
#. Translators: This is the time format used in 24-hour mode. #: ../js/ui/panel.js:494
#: ../js/ui/panel.js:566 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" msgid "%a %R"
msgstr "%a %R" msgstr "%a %R"
#. Translators: This is a time format used for AM/PM. #. Translators: This is a time format with date used
#: ../js/ui/panel.js:569 #. for AM/PM.
msgid "%a %l:%M %p" #: ../js/ui/panel.js:593
msgstr "%a %l:%M %p" 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 #, c-format
msgid "Failed to unmount '%s'" msgid "Failed to unmount '%s'"
msgstr "Erro ao desmontar \"%s\"" msgstr "Erro ao desmontar \"%s\""
#: ../js/ui/placeDisplay.js:111 #: ../js/ui/placeDisplay.js:114
msgid "Retry" msgid "Retry"
msgstr "Tentar novamente" msgstr "Tentar novamente"
#: ../js/ui/placeDisplay.js:156 #: ../js/ui/placeDisplay.js:159
msgid "Connect to..." msgid "Connect to..."
msgstr "Conectar ao..." 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:" msgid "Please enter a command:"
msgstr "Por favor digite um comando:" msgstr "Por favor digite um comando:"
#: ../js/ui/runDialog.js:375 #: ../js/ui/runDialog.js:378
#, c-format #, c-format
msgid "Execution of '%s' failed:" msgid "Execution of '%s' failed:"
msgstr "A execução de \"%s\" falhou:" msgstr "A execução de \"%s\" falhou:"
#: ../js/ui/statusMenu.js:105 #: ../js/ui/statusMenu.js:101
msgid "Available" msgid "Available"
msgstr "Disponível" msgstr "Disponível"
#: ../js/ui/statusMenu.js:110 #: ../js/ui/statusMenu.js:106
msgid "Busy" msgid "Busy"
msgstr "Ocupado" msgstr "Ocupado"
#: ../js/ui/statusMenu.js:115 #: ../js/ui/statusMenu.js:111
msgid "Invisible" msgid "Invisible"
msgstr "Invisível" msgstr "Invisível"
#: ../js/ui/statusMenu.js:124 #: ../js/ui/statusMenu.js:119
msgid "Account Information..." msgid "My Account..."
msgstr "Informação da conta..." msgstr ""
#: ../js/ui/statusMenu.js:129 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." #| msgid "System Preferences..."
msgstr "Preferências do sistema..." msgid "System Settings..."
msgstr "Configurações do sistema..."
#: ../js/ui/statusMenu.js:138 #: ../js/ui/statusMenu.js:130
msgid "Lock Screen" msgid "Lock Screen"
msgstr "Travar a tela" msgstr "Travar a tela"
#: ../js/ui/statusMenu.js:143 #: ../js/ui/statusMenu.js:134
msgid "Switch User" msgid "Switch User"
msgstr "Alternar usuário" msgstr "Alternar usuário"
#: ../js/ui/statusMenu.js:149 #: ../js/ui/statusMenu.js:139
msgid "Log Out..." msgid "Log Out..."
msgstr "Encerrar sessão..." 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 #: ../js/ui/statusMenu.js:154
msgid "Shut Down..." msgid "Shut Down..."
msgstr "Desligar..." 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 #, c-format
msgid "%s has finished starting" msgid "%s has finished starting"
msgstr "%s terminou sua inicialização" msgstr "%s terminou sua inicialização"
#: ../js/ui/windowAttentionHandler.js:49 #: ../js/ui/windowAttentionHandler.js:45
#, c-format #, c-format
msgid "'%s' is ready" msgid "'%s' is ready"
msgstr "\"%s\" está pronto" msgstr "\"%s\" está pronto"
#: ../src/shell-global.c:967 #: ../js/ui/workspacesView.js:229
msgid "Less than a minute ago" msgid ""
msgstr "Menos de um minuto atrás" "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 #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
msgstr[0] "%d minuto atrás" msgstr[0] "%d minuto"
msgstr[1] "%d minutos atrás" msgstr[1] "%d minutos"
#: ../src/shell-global.c:976 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
msgstr[0] "%d hora atrás" msgstr[0] "%d hora"
msgstr[1] "%d horas atrás" msgstr[1] "%d horas"
#: ../src/shell-global.c:981 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
msgstr[0] "%d dia atrás" msgstr[0] "%d dia"
msgstr[1] "%d dias atrás" msgstr[1] "%d dias"
#: ../src/shell-global.c:986 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"
msgstr[0] "%d semana atrás" msgstr[0] "%d semana"
msgstr[1] "%d semanas atrás" msgstr[1] "%d semanas"
#: ../src/shell-uri-util.c:89 #: ../src/shell-uri-util.c:89
msgid "Home Folder" msgid "Home Folder"
@ -257,6 +750,15 @@ msgstr "Pesquisar"
msgid "%1$s: %2$s" msgid "%1$s: %2$s"
msgstr "%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" #~ msgid "Sidebar"
#~ msgstr "Barra lateral" #~ msgstr "Barra lateral"

862
po/ro.po
View File

@ -1,20 +1,23 @@
# Romanian translation for gnome-shell. # 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. # This file is distributed under the same license as the gnome-shell package.
# Lucian Adrian Grijincu <lucian.grijincu@gmail.com>, 2009. # Lucian Adrian Grijincu <lucian.grijincu@gmail.com>, 2009, 2010.
# Daniel Șerbănescu <cyber19rider@gmail.com>, 2010.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gnome-shell master\n" "Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"POT-Creation-Date: 2009-10-28 22:25+0200\n" "shell&component=general\n"
"PO-Revision-Date: 2009-10-28 22:33+0200\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 <lucian.grijincu@gmail.com>\n" "Last-Translator: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>\n"
"Language-Team: Romanian <gnomero-list@lists.sourceforge.net>\n" "Language-Team: Romanian Gnome Team <gnomero-list@lists.sourceforge.net>\n"
"Language: ro\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2);;\n" "20)) ? 1 : 2);;\n"
"X-Generator: Virtaal 0.6.1\n"
#: ../data/gnome-shell.desktop.in.in.h:1 #: ../data/gnome-shell.desktop.in.in.h:1
msgid "GNOME Shell" msgid "GNOME Shell"
@ -24,199 +27,737 @@ msgstr "GNOME Shell"
msgid "Window management and application launching" msgid "Window management and application launching"
msgstr "Administrare de ferestre și lansare de aplicații" msgstr "Administrare de ferestre și lansare de aplicații"
#: ../js/ui/appDisplay.js:332 #: ../data/gnome-shell-clock-preferences.desktop.in.in.h:1
msgid "Frequent" msgid "Clock"
msgstr "Frecvent" msgstr "Ceas"
#: ../js/ui/appDisplay.js:867 #: ../data/gnome-shell-clock-preferences.desktop.in.in.h:2
msgid "Drag here to add favorites" msgid "Customize the panel clock"
msgstr "Adăugați aici favorite cu mausul" 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" msgid "New Window"
msgstr "Fereastră nouă" msgstr "Fereastră nouă"
#: ../js/ui/appIcon.js:430 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" 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" msgid "Add to Favorites"
msgstr "Adaugă la favorite" msgstr "Adaugă la favorite"
#: ../js/ui/dash.js:283 #: ../js/ui/appDisplay.js:829
msgid "Find..." msgid "Drag here to add favorites"
msgstr "Caută..." msgstr "Trageți aici pentru a adăuga favorite"
#: ../js/ui/dash.js:400 #: ../js/ui/appFavorites.js:88
msgid "More" #, c-format
msgstr "Mai multe" msgid "%s has been added to your favorites."
msgstr "%s a fost adăugat la favorite."
#: ../js/ui/dash.js:543 #: ../js/ui/appFavorites.js:107
msgid "(see all)" #, c-format
msgstr "(arată tot)" msgid "%s has been removed from your favorites."
msgstr "%s a fost eliminat de la favorite."
#. **** Applications **** #: ../js/ui/dash.js:142
#: ../js/ui/dash.js:725 ../js/ui/dash.js:787 msgid "Find"
msgid "APPLICATIONS" msgstr "Caută"
msgstr "APPLICAȚII"
#: ../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 **** #. **** Places ****
#. Translators: This is in the sense of locations for documents, #. Translators: This is in the sense of locations for documents,
#. network locations, etc. #. network locations, etc.
#: ../js/ui/dash.js:745 #: ../js/ui/dash.js:797 ../js/ui/placeDisplay.js:558
msgid "PLACES" msgid "PLACES & DEVICES"
msgstr "LOCAȚII" msgstr "LOCAȚII & DISPOZITIVE"
#. **** Documents **** #. **** Documents ****
#: ../js/ui/dash.js:752 ../js/ui/dash.js:797 #: ../js/ui/dash.js:804 ../js/ui/docDisplay.js:494
msgid "RECENT DOCUMENTS" msgid "RECENT ITEMS"
msgstr "DOCUMENTE RECENTE" msgstr "ELEMENTE RECENTE"
#. **** Search Results **** #: ../js/ui/lookingGlass.js:552
#: ../js/ui/dash.js:777 ../js/ui/dash.js:961 msgid "No extensions installed"
msgid "SEARCH RESULTS" msgstr "Nicio extensie instalată"
msgstr "REZULTATELE CĂUTĂRII"
#: ../js/ui/dash.js:792 #: ../js/ui/lookingGlass.js:589
msgid "PREFERENCES" msgid "Enabled"
msgstr "PREFERINȚE" msgstr "Activat"
#. Button on the left side of the panel. #. translators:
#. Translators: If there is no suitable word for "Activities" in your language, you can use the word for "Overview". #. * The device has been disabled
#: ../js/ui/panel.js:274 #: ../js/ui/lookingGlass.js:591 ../src/gvc/gvc-mixer-control.c:1087
msgid "Activities" msgid "Disabled"
msgstr "Activități" msgstr "Dezactivat"
#. Translators: This is a time format. #: ../js/ui/lookingGlass.js:593
#: ../js/ui/panel.js:491 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" msgid "%a %l:%M %p"
msgstr "%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..." msgid "Connect to..."
msgstr "Conectare la..." 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:" msgid "Please enter a command:"
msgstr "Introduceți o comandă:" msgstr "Introduceți o comandă:"
#: ../js/ui/runDialog.js:173 #: ../js/ui/runDialog.js:378
#, c-format #, c-format
msgid "Execution of '%s' failed:" msgid "Execution of '%s' failed:"
msgstr "Execuția comenzii „%s” a eșuat:" msgstr "Execuția comenzii „%s” a eșuat:"
#. Translators: This is a time format. #: ../js/ui/statusMenu.js:101
#: ../js/ui/widget.js:163 msgid "Available"
msgid "%H:%M" msgstr "Disponibil"
msgstr "%H:%M"
#: ../js/ui/widget.js:317 #: ../js/ui/statusMenu.js:106
msgid "Applications" msgid "Busy"
msgstr "Aplicații" msgstr "Ocupat"
#: ../js/ui/widget.js:339 #: ../js/ui/statusMenu.js:114
msgid "Recent Documents" msgid "My Account..."
msgstr "Documente recente" 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" 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 #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
msgstr[0] "acum un minut" msgstr[0] "Acum un minut"
msgstr[1] "acum %d minute" msgstr[1] "Acum %d minute"
msgstr[2] "acum %d de minute" msgstr[2] "Acum %d de minute"
#: ../src/shell-global.c:827 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
msgstr[0] "acum o oră" msgstr[0] "Acum o oră"
msgstr[1] "acum %d ore" msgstr[1] "Acum %d ore"
msgstr[2] "acum %d de ore" msgstr[2] "Acum %d de ore"
#: ../src/shell-global.c:830 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
msgstr[0] "acum o zi" msgstr[0] "Acum o zi"
msgstr[1] "acum %d zile" msgstr[1] "Acum %d zile"
msgstr[2] "acum %d de zile" msgstr[2] "Acum %d de zile"
#: ../src/shell-global.c:833 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"
msgstr[0] "acum o săptămână" msgstr[0] "Acum o săptămână"
msgstr[1] "acum %d săptămâni" msgstr[1] "Acum %d săptămâni"
msgstr[2] "acum %d de săptămâni" msgstr[2] "Acum %d de săptămâni"
#: ../src/shell-status-menu.c:156 #: ../src/shell-uri-util.c:89
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
msgid "Home Folder" msgid "Home Folder"
msgstr "Dosar personal" msgstr "Dosar personal"
#. Translators: this is the same string as the one found in #. Translators: this is the same string as the one found in
#. * nautilus #. * nautilus
#: ../src/shell-uri-util.c:102 #: ../src/shell-uri-util.c:104
msgid "File System" msgid "File System"
msgstr "Sistem de fișiere" msgstr "Sistem de fișiere"
#: ../src/shell-uri-util.c:248 #: ../src/shell-uri-util.c:250
msgid "Search" msgid "Search"
msgstr "Caută" msgstr "Caută"
@ -225,8 +766,59 @@ msgstr "Caută"
#. * example, "Trash: some-directory". It means that the #. * example, "Trash: some-directory". It means that the
#. * directory called "some-directory" is in the trash. #. * directory called "some-directory" is in the trash.
#. #.
#: ../src/shell-uri-util.c:298 #: ../src/shell-uri-util.c:300
#, c-format #, c-format
msgid "%1$s: %2$s" msgid "%1$s: %2$s"
msgstr "%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ă"

694
po/ug.po Normal file
View File

@ -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<gheyret@yahoo.com>,2010.
# Sahran <sahran.ug@gmail.com>, 2010.
# Zeper <zeper@msn.com>, 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<gheyret@yahoo.com>\n"
"Language-Team: Uyghur Computer Science Association <UKIJ@yahoogroups.com>\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"

View File

@ -3,21 +3,22 @@
# This file is distributed under the same license as the gnome-shell package. # This file is distributed under the same license as the gnome-shell package.
# Ray Wang <raywang@gnome.org>, 2009. # Ray Wang <raywang@gnome.org>, 2009.
# jiero <lililjlj@gmail.com>, 2010. # jiero <lililjlj@gmail.com>, 2010.
# YunQiang Su <wzssyqa@gmail.com>, 2010.
# Aron Xu <aronxu@gnome.org>, 2010. # Aron Xu <aronxu@gnome.org>, 2010.
# Jessica Ban <bancage@gmail.com>, 2010. # Jessica Ban <bancage@gmail.com>, 2010.
# YunQiang Su <wzssyqa@gmail.com>, 2010.
#
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: gnome-shell master\n" "Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&component=general\n" "shell&component=general\n"
"POT-Creation-Date: 2010-10-25 21:45+0000\n" "POT-Creation-Date: 2010-10-30 17:51+0000\n"
"PO-Revision-Date: 2010-10-28 00:26+0800\n" "PO-Revision-Date: 2010-10-28 01:24+0800\n"
"Last-Translator: Aron Xu <happyaron.xu@gmail.com>\n" "Last-Translator: YunQiang Su <wzssyqa@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\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" "Plural-Forms: nplurals=1; plural=0;\n"
#: ../data/gnome-shell.desktop.in.in.h:1 #: ../data/gnome-shell.desktop.in.in.h:1
@ -206,17 +207,17 @@ msgstr "是否收集应用程序的使用情况"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:1
msgid "Clip the crosshairs at the center" msgid "Clip the crosshairs at the center"
msgstr "" msgstr "将十字夹在中间"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:2
msgid "Color of the crosshairs" msgid "Color of the crosshairs"
msgstr "" msgstr "十字的颜色"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:3
msgid "" msgid ""
"Determines the length of the vertical and horizontal lines that make up the " "Determines the length of the vertical and horizontal lines that make up the "
"crosshairs." "crosshairs."
msgstr "" msgstr "确定组成十字的水平线和竖直线的长度。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:4
msgid "" msgid ""
@ -230,30 +231,35 @@ msgid ""
"push: when the magnified mouse intersects a boundary of the zoom region, the " "push: when the magnified mouse intersects a boundary of the zoom region, the "
"contents are scrolled into view." "contents are scrolled into view."
msgstr "" msgstr ""
"确定放大了的鼠标图像在放大了的视图中的的位置,以及如何对系统鼠标的移动做出反"
"馈。可用的值有 - none鼠标不跟踪- centered鼠标图像显示在放大区域的中心"
"(这也表示系统鼠标下的点),而且放大的内容也随着系统鼠标的移动而滚动;- "
"proportional放大区域中放大的鼠标的位置和系统鼠标在屏幕上的位置成比例相同"
"(数学上的“相似”)- push当放大的鼠标与放大区域的边界相交时将内容滚动进视"
"图。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:5
msgid "" msgid ""
"Determines the transparency of the crosshairs, from fully opaque to fully " "Determines the transparency of the crosshairs, from fully opaque to fully "
"transparent." "transparent."
msgstr "" msgstr "确定十字线的透明度,从全遮蔽到全透明。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:6
msgid "" msgid ""
"Determines whether the crosshairs intersect the magnified mouse sprite, or " "Determines whether the crosshairs intersect the magnified mouse sprite, or "
"are clipped such that the ends of the horizontal and vertical lines surround " "are clipped such that the ends of the horizontal and vertical lines surround "
"the mouse image." "the mouse image."
msgstr "" msgstr "确定十字是和放大的光标精灵交叉,还是固定来让水平和竖直线环绕鼠标形象。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:7
#, fuzzy
msgid "Enable lens mode" msgid "Enable lens mode"
msgstr "启用" msgstr "启用透镜模式"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:8
msgid "" msgid ""
"Enables/disables display of crosshairs centered on the magnified mouse " "Enables/disables display of crosshairs centered on the magnified mouse "
"sprite." "sprite."
msgstr "" msgstr "启用或禁用穿过放大的鼠标精灵的十字。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:9
msgid "" msgid ""
@ -261,22 +267,24 @@ msgid ""
"of the screen, the magnified contents continue to scroll such that the " "of the screen, the magnified contents continue to scroll such that the "
"screen edge moves into the magnified view." "screen edge moves into the magnified view."
msgstr "" msgstr ""
"对于居中的鼠标跟踪,当系统指针位于或者接近屏幕的边缘时,放大的内容继续滚动,"
"以便让屏幕边缘移动到放大的视图。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:10
msgid "Length of the crosshairs" msgid "Length of the crosshairs"
msgstr "" msgstr "十字长度"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:11
msgid "Magnification factor" msgid "Magnification factor"
msgstr "" msgstr "放大因子"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:12
msgid "Mouse Tracking Mode" msgid "Mouse Tracking Mode"
msgstr "" msgstr "鼠标跟随模式"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:13
msgid "Opacity of the crosshairs" msgid "Opacity of the crosshairs"
msgstr "" msgstr "十字的不透明度"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:14
msgid "Screen position" msgid "Screen position"
@ -284,51 +292,51 @@ msgstr "屏幕位置"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:15
msgid "Scroll magnified contents beyond the edges of the desktop" msgid "Scroll magnified contents beyond the edges of the desktop"
msgstr "" msgstr "在桌面边界以外滚动放大内容"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:16
msgid "Show or hide crosshairs" msgid "Show or hide crosshairs"
msgstr "" msgstr "显示或隐藏十字线"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:17
msgid "Show or hide the magnifier" msgid "Show or hide the magnifier"
msgstr "" msgstr "显示或隐藏放大镜"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:18
msgid "Show or hide the magnifier and all of its zoom regions." msgid "Show or hide the magnifier and all of its zoom regions."
msgstr "" msgstr "显示或隐藏放大镜及其全部放大区域。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:19
msgid "" msgid ""
"The color of the the vertical and horizontal lines that make up the " "The color of the the vertical and horizontal lines that make up the "
"crosshairs." "crosshairs."
msgstr "" msgstr "组成十字的水平线和竖直线的颜色。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:20
msgid "" msgid ""
"The magnified view either fills the entire screen, or occupies the top-half, " "The magnified view either fills the entire screen, or occupies the top-half, "
"bottom-half, left-half, or right-half of the screen." "bottom-half, left-half, or right-half of the screen."
msgstr "" msgstr "放大的视图是充满整个屏幕还是占据屏幕的顶半部、底半部、左半部或右半部。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:21
msgid "" msgid ""
"The power of the magnification. A value of 1.0 means no magnification. A " "The power of the magnification. A value of 1.0 means no magnification. A "
"value of 2.0 doubles the size." "value of 2.0 doubles the size."
msgstr "" msgstr "边长的放大倍数。1.0 表示不放大2.0 表示将长度增倍。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:22
msgid "Thickness of the crosshairs" msgid "Thickness of the crosshairs"
msgstr "" msgstr "十字的厚度"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:23
msgid "" msgid ""
"Whether the magnified view should be centered over the location of the " "Whether the magnified view should be centered over the location of the "
"system mouse and move with it." "system mouse and move with it."
msgstr "" msgstr "放大的视图是否以系统鼠标为中心放置并且随之移动。"
#: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24 #: ../data/org.gnome.accessibility.magnifier.gschema.xml.in.h:24
msgid "Width of the vertical and horizontal lines that make up the crosshairs." msgid "Width of the vertical and horizontal lines that make up the crosshairs."
msgstr "" msgstr "组成十字的水平和竖直线的宽度。"
#: ../data/clock-preferences.ui.h:1 #: ../data/clock-preferences.ui.h:1
msgid "Clock Format" msgid "Clock Format"
@ -367,19 +375,19 @@ msgstr "应用程序"
msgid "PREFERENCES" msgid "PREFERENCES"
msgstr "首选项" msgstr "首选项"
#: ../js/ui/appDisplay.js:648 #: ../js/ui/appDisplay.js:647
msgid "New Window" msgid "New Window"
msgstr "新窗口" msgstr "新窗口"
#: ../js/ui/appDisplay.js:652 #: ../js/ui/appDisplay.js:651
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "从收藏夹中移除" msgstr "从收藏夹中移除"
#: ../js/ui/appDisplay.js:653 #: ../js/ui/appDisplay.js:652
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "添加到收藏夹" msgstr "添加到收藏夹"
#: ../js/ui/appDisplay.js:830 #: ../js/ui/appDisplay.js:829
msgid "Drag here to add favorites" msgid "Drag here to add favorites"
msgstr "拖到这里加入收藏夹" msgstr "拖到这里加入收藏夹"
@ -425,7 +433,9 @@ msgstr "未安装扩展"
msgid "Enabled" msgid "Enabled"
msgstr "启用" 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" msgid "Disabled"
msgstr "禁用" msgstr "禁用"
@ -525,7 +535,7 @@ msgstr "连接到..."
#. simply result in invisible toggle switches. #. simply result in invisible toggle switches.
#: ../js/ui/popupMenu.js:33 #: ../js/ui/popupMenu.js:33
msgid "toggle-switch-us" msgid "toggle-switch-us"
msgstr "" msgstr "toggle-switch-intl"
#: ../js/ui/runDialog.js:233 #: ../js/ui/runDialog.js:233
msgid "Please enter a command:" msgid "Please enter a command:"
@ -553,7 +563,9 @@ msgid "My Account..."
msgstr "我的帐户..." msgstr "我的帐户..."
#: ../js/ui/statusMenu.js:123 #: ../js/ui/statusMenu.js:123
msgid "System Preferences..." #, fuzzy
#| msgid "System Preferences..."
msgid "System Settings..."
msgstr "系统首选项..." msgstr "系统首选项..."
#: ../js/ui/statusMenu.js:130 #: ../js/ui/statusMenu.js:130
@ -582,7 +594,7 @@ msgstr "关机..."
#: ../js/ui/status/accessibility.js:88 #: ../js/ui/status/accessibility.js:88
msgid "Screen Reader" msgid "Screen Reader"
msgstr "" msgstr "屏幕阅读器"
#: ../js/ui/status/accessibility.js:91 #: ../js/ui/status/accessibility.js:91
msgid "Screen Keyboard" msgid "Screen Keyboard"
@ -602,15 +614,15 @@ msgstr "慢速键"
#: ../js/ui/status/accessibility.js:103 #: ../js/ui/status/accessibility.js:103
msgid "Bounce Keys" msgid "Bounce Keys"
msgstr "" msgstr "筛选键"
#: ../js/ui/status/accessibility.js:106 #: ../js/ui/status/accessibility.js:106
msgid "Mouse Keys" msgid "Mouse Keys"
msgstr "" msgstr "鼠标按键"
#: ../js/ui/status/accessibility.js:110 #: ../js/ui/status/accessibility.js:110
msgid "Universal Access Settings" msgid "Universal Access Settings"
msgstr "" msgstr "通用访问设置"
#: ../js/ui/status/accessibility.js:163 #: ../js/ui/status/accessibility.js:163
msgid "High Contrast" msgid "High Contrast"
@ -643,29 +655,49 @@ msgstr "无法添加新工作区,因为已经达到了工作区数量限制。
msgid "Can't remove the first workspace." msgid "Can't remove the first workspace."
msgstr "不能移除第一个工作区。" 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" msgid "Less than a minute ago"
msgstr "少于一分钟前" msgstr "少于一分钟前"
#: ../src/shell-global.c:1208 #: ../src/shell-global.c:1223
#, c-format #, c-format
msgid "%d minute ago" msgid "%d minute ago"
msgid_plural "%d minutes ago" msgid_plural "%d minutes ago"
msgstr[0] "%d 分钟前" msgstr[0] "%d 分钟前"
#: ../src/shell-global.c:1213 #: ../src/shell-global.c:1228
#, c-format #, c-format
msgid "%d hour ago" msgid "%d hour ago"
msgid_plural "%d hours ago" msgid_plural "%d hours ago"
msgstr[0] "%d 小时前" msgstr[0] "%d 小时前"
#: ../src/shell-global.c:1218 #: ../src/shell-global.c:1233
#, c-format #, c-format
msgid "%d day ago" msgid "%d day ago"
msgid_plural "%d days ago" msgid_plural "%d days ago"
msgstr[0] "%d 天前" msgstr[0] "%d 天前"
#: ../src/shell-global.c:1223 #: ../src/shell-global.c:1238
#, c-format #, c-format
msgid "%d week ago" msgid "%d week ago"
msgid_plural "%d weeks ago" msgid_plural "%d weeks ago"

View File

@ -77,7 +77,10 @@ st_source_h = \
st/st-container.h \ st/st-container.h \
st/st-drawing-area.h \ st/st-drawing-area.h \
st/st-entry.h \ st/st-entry.h \
st/st-focus-manager.h \
st/st-group.h \ st/st-group.h \
st/st-icon.h \
st/st-icon-colors.h \
st/st-im-text.h \ st/st-im-text.h \
st/st-label.h \ st/st-label.h \
st/st-overflow-box.h \ st/st-overflow-box.h \
@ -86,7 +89,6 @@ st_source_h = \
st/st-scroll-bar.h \ st/st-scroll-bar.h \
st/st-scroll-view.h \ st/st-scroll-view.h \
st/st-shadow.h \ st/st-shadow.h \
st/st-subtexture.h \
st/st-table.h \ st/st-table.h \
st/st-table-child.h \ st/st-table-child.h \
st/st-texture-cache.h \ st/st-texture-cache.h \
@ -126,7 +128,10 @@ st_source_c = \
st/st-container.c \ st/st-container.c \
st/st-drawing-area.c \ st/st-drawing-area.c \
st/st-entry.c \ st/st-entry.c \
st/st-focus-manager.c \
st/st-group.c \ st/st-group.c \
st/st-icon.c \
st/st-icon-colors.c \
st/st-im-text.c \ st/st-im-text.c \
st/st-label.c \ st/st-label.c \
st/st-overflow-box.c \ st/st-overflow-box.c \
@ -135,7 +140,6 @@ st_source_c = \
st/st-scroll-bar.c \ st/st-scroll-bar.c \
st/st-scroll-view.c \ st/st-scroll-view.c \
st/st-shadow.c \ st/st-shadow.c \
st/st-subtexture.c \
st/st-table.c \ st/st-table.c \
st/st-table-child.c \ st/st-table-child.c \
st/st-texture-cache.c \ st/st-texture-cache.c \

View File

@ -117,6 +117,8 @@ libgnome_shell_la_SOURCES = \
libgnome_shell_la_gir_sources = \ libgnome_shell_la_gir_sources = \
$(filter-out %-private.h $(shell_recorder_non_gir_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES)) $(filter-out %-private.h $(shell_recorder_non_gir_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES))
########################################
shell_recorder_sources = \ shell_recorder_sources = \
shell-recorder.c \ shell-recorder.c \
shell-recorder.h shell-recorder.h
@ -139,6 +141,35 @@ test_recorder_SOURCES = \
test-recorder.c test-recorder.c
endif BUILD_RECORDER 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 shell-marshal.h: stamp-shell-marshal.h
@true @true

View File

@ -161,6 +161,8 @@ gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
"/desktop/gnome/shell/windows/button_layout"); "/desktop/gnome/shell/windows/button_layout");
meta_prefs_override_preference_location ("/apps/metacity/general/side_by_side_tiling", meta_prefs_override_preference_location ("/apps/metacity/general/side_by_side_tiling",
"/desktop/gnome/shell/windows/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 static void

View File

@ -717,6 +717,7 @@ function main() {
''') ''')
f.close() f.close()
print "Created extension in %r" % (extension_path, )
subprocess.Popen(['gnome-open', extensionjs_path]) subprocess.Popen(['gnome-open', extensionjs_path])
sys.exit(0) sys.exit(0)

144
src/run-js-test.c Normal file
View File

@ -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 <config.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <clutter/x11/clutter-x11.h>
#include <string.h>
#include <stdlib.h>
#include <locale.h>
#include <gjs/gjs.h>
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 = "<command line>";
} else if (argc <= 1) {
script = g_strdup ("const Console = imports.console; Console.interact();");
len = strlen (script);
filename = "<stdin>";
} 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);
}

View File

@ -9,11 +9,12 @@
#include <gio/gdesktopappinfo.h> #include <gio/gdesktopappinfo.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <glib/gi18n.h>
#include "shell-app-private.h" #include "shell-app-private.h"
#include "shell-global.h" #include "shell-global.h"
#include "st/st-texture-cache.h"
#include "display.h" #include "display.h"
#include "st.h"
#define GMENU_I_KNOW_THIS_IS_UNSTABLE #define GMENU_I_KNOW_THIS_IS_UNSTABLE
#include <gmenu-tree.h> #include <gmenu-tree.h>
@ -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); return g_key_file_get_locale_string (info->keyfile, DESKTOP_ENTRY_GROUP, "Name", NULL, NULL);
case SHELL_APP_INFO_TYPE_WINDOW: case SHELL_APP_INFO_TYPE_WINDOW:
{ {
char *title; const char *name;
g_object_get (info->window, "title", &title, NULL);
if (!title) name = meta_window_get_wm_class (info->window);
title = g_strdup (""); if (!name)
return title; name = _("Unknown");
return g_strdup (name);
} }
} }
g_assert_not_reached (); g_assert_not_reached ();

View File

@ -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: * shell_generic_container_get_n_skip_paint:
* @self: A #ShellGenericContainer * @self: A #ShellGenericContainer
@ -231,6 +250,7 @@ shell_generic_container_class_init (ShellGenericContainerClass *klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
StContainerClass *container_class = ST_CONTAINER_CLASS (klass);
gobject_class->finalize = shell_generic_container_finalize; 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->paint = shell_generic_container_paint;
actor_class->pick = shell_generic_container_pick; 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] = shell_generic_container_signals[GET_PREFERRED_WIDTH] =
g_signal_new ("get-preferred-width", g_signal_new ("get-preferred-width",
G_TYPE_FROM_CLASS (klass), G_TYPE_FROM_CLASS (klass),

View File

@ -7,6 +7,7 @@
#include "shell-perf-log.h" #include "shell-perf-log.h"
#include "shell-window-tracker.h" #include "shell-window-tracker.h"
#include "shell-wm.h" #include "shell-wm.h"
#include "st.h"
#include "display.h" #include "display.h"
#include "util.h" #include "util.h"
@ -59,6 +60,7 @@ struct _ShellGlobal {
const char *datadir; const char *datadir;
const char *imagedir; const char *imagedir;
const char *userdatadir; const char *userdatadir;
StFocusManager *focus_manager;
/* Displays the root window; see shell_global_create_root_pixmap_actor() */ /* Displays the root window; see shell_global_create_root_pixmap_actor() */
ClutterActor *root_pixmap; ClutterActor *root_pixmap;
@ -90,6 +92,7 @@ enum {
PROP_DATADIR, PROP_DATADIR,
PROP_IMAGEDIR, PROP_IMAGEDIR,
PROP_USERDATADIR, PROP_USERDATADIR,
PROP_FOCUS_MANAGER,
}; };
G_DEFINE_TYPE(ShellGlobal, shell_global, G_TYPE_OBJECT); G_DEFINE_TYPE(ShellGlobal, shell_global, G_TYPE_OBJECT);
@ -173,6 +176,9 @@ shell_global_get_property(GObject *object,
case PROP_USERDATADIR: case PROP_USERDATADIR:
g_value_set_string (value, global->userdatadir); g_value_set_string (value, global->userdatadir);
break; break;
case PROP_FOCUS_MANAGER:
g_value_set_object (value, global->focus_manager);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
@ -328,6 +334,13 @@ shell_global_class_init (ShellGlobalClass *klass)
"Directory containing gnome-shell user data", "Directory containing gnome-shell user data",
NULL, NULL,
G_PARAM_READABLE)); 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); display = meta_screen_get_display (screen);
g_signal_connect (display, "notify::focus-window", g_signal_connect (display, "notify::focus-window",
G_CALLBACK (focus_window_changed), global); G_CALLBACK (focus_window_changed), global);
global->focus_manager = st_focus_manager_get_for_stage (CLUTTER_STAGE (stage));
} }
void void

View File

@ -16,9 +16,9 @@
#include "shell-window-tracker-private.h" #include "shell-window-tracker-private.h"
#include "shell-app-system.h" #include "shell-app-system.h"
#include "shell-app-private.h" #include "shell-app-private.h"
#include "st/st-texture-cache.h"
#include "shell-global.h" #include "shell-global.h"
#include "shell-marshal.h" #include "shell-marshal.h"
#include "st.h"
#include "display.h" #include "display.h"
#include "window.h" #include "window.h"

View File

@ -195,11 +195,40 @@ xfixes_cursor_reset_image (ShellXFixesCursor *xfixes_cursor)
{ {
XFixesCursorImage *cursor_image; XFixesCursorImage *cursor_image;
CoglHandle sprite = COGL_INVALID_HANDLE; CoglHandle sprite = COGL_INVALID_HANDLE;
guint8 *cursor_data;
gboolean free_cursor_data;
if (!xfixes_cursor->have_xfixes) if (!xfixes_cursor->have_xfixes)
return; return;
cursor_image = XFixesGetCursorImage (clutter_x11_get_default_display ()); 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, sprite = cogl_texture_new_from_data (cursor_image->width,
cursor_image->height, cursor_image->height,
COGL_TEXTURE_NONE, COGL_TEXTURE_NONE,
@ -210,7 +239,11 @@ xfixes_cursor_reset_image (ShellXFixesCursor *xfixes_cursor)
#endif #endif
COGL_PIXEL_FORMAT_ANY, COGL_PIXEL_FORMAT_ANY,
cursor_image->width * 4, /* stride */ 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 (sprite != COGL_INVALID_HANDLE)
{ {
if (xfixes_cursor->cursor_sprite != NULL) if (xfixes_cursor->cursor_sprite != NULL)

View File

@ -2,8 +2,8 @@
/* /*
* st-adjustment.c: Adjustment object * st-adjustment.c: Adjustment object
* *
* Copyright (C) 2008 OpenedHand * Copyright 2008 OpenedHand
* Copyright (c) 2009 Intel Corporation. * Copyright 2009 Intel Corporation.
* *
* This program is free software; you can redistribute it and/or modify it * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,12 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Chris Lord <chris@openedhand.com>, inspired by GtkAdjustment
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
/** /**

View File

@ -15,12 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Chris Lord <chris@openedhand.com>, inspired by GtkAdjustment
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -2,7 +2,8 @@
/* /*
* st-bin.c: Basic container actor * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,11 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Emmanuele Bassi <ebassi@linux.intel.com>
*
*/ */
/** /**
@ -226,6 +223,28 @@ st_bin_dispose (GObject *gobject)
G_OBJECT_CLASS (st_bin_parent_class)->dispose (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 static void
st_bin_set_property (GObject *gobject, st_bin_set_property (GObject *gobject,
guint prop_id, guint prop_id,
@ -309,6 +328,7 @@ st_bin_class_init (StBinClass *klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
GParamSpec *pspec; GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (StBinPrivate)); 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->paint = st_bin_paint;
actor_class->pick = st_bin_pick; actor_class->pick = st_bin_pick;
widget_class->navigate_focus = st_bin_navigate_focus;
/** /**
* StBin:child: * StBin:child:
* *

View File

@ -14,12 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Emmanuele Bassi <ebassi@linux.intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#include <config.h> #include <config.h>

View File

@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ST_BORDER_IMAGE_H__ #ifndef __ST_BORDER_IMAGE_H__
#define __ST_BORDER_IMAGE_H__ #define __ST_BORDER_IMAGE_H__

View File

@ -14,10 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*/ */
/** /**

View File

@ -14,10 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*/ */
#ifndef _ST_BOX_LAYOUT_CHILD_H #ifndef _ST_BOX_LAYOUT_CHILD_H

View File

@ -3,6 +3,9 @@
* st-box-layout.h: box layout actor * st-box-layout.h: box layout actor
* *
* Copyright 2009 Intel Corporation. * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,11 +17,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*
*/ */
/* Portions copied from Clutter: /* Portions copied from Clutter:

View File

@ -3,6 +3,7 @@
* st-box-layout.h: box layout actor * st-box-layout.h: box layout actor
* *
* Copyright 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,11 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -4,6 +4,7 @@
* *
* Copyright 2007 OpenedHand * Copyright 2007 OpenedHand
* Copyright 2008, 2009 Intel Corporation. * Copyright 2008, 2009 Intel Corporation.
* Copyright 2009, 2010 Red Hat, Inc.
* *
* This program is free software; you can redistribute it and/or modify it * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,12 +16,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Emmanuele Bassi <ebassi@openedhand.com>
* Thomas Wood <thomas@linux.intel.com>
*
*/ */
/** /**
@ -72,9 +68,9 @@ struct _StButtonPrivate
gchar *text; gchar *text;
guint is_pressed : 1; guint is_pressed : 1;
guint is_hover : 1;
guint is_checked : 1; guint is_checked : 1;
guint is_toggle : 1; guint is_toggle : 1;
guint has_grab : 1;
gint spacing; gint spacing;
}; };
@ -88,13 +84,13 @@ st_button_update_label_style (StButton *button)
{ {
ClutterActor *label; ClutterActor *label;
label = st_bin_get_child ((StBin*) button); label = st_bin_get_child (ST_BIN (button));
/* check the child is really a label */ /* check the child is really a label */
if (!CLUTTER_IS_TEXT (label)) if (!CLUTTER_IS_TEXT (label))
return; 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 static void
@ -123,15 +119,32 @@ st_button_style_changed (StWidget *widget)
} }
static void 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 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 static gboolean
@ -143,14 +156,10 @@ st_button_button_press (ClutterActor *actor,
if (event->button == 1) if (event->button == 1)
{ {
StButton *button = ST_BUTTON (actor); StButton *button = ST_BUTTON (actor);
StButtonClass *klass = ST_BUTTON_GET_CLASS (button);
button->priv->is_pressed = TRUE;
clutter_grab_pointer (actor); clutter_grab_pointer (actor);
button->priv->has_grab = TRUE;
if (klass->pressed) st_button_press (button);
klass->pressed (button);
return TRUE; return TRUE;
} }
@ -165,25 +174,47 @@ st_button_button_release (ClutterActor *actor,
if (event->button == 1) if (event->button == 1)
{ {
StButton *button = ST_BUTTON (actor); StButton *button = ST_BUTTON (actor);
StButtonClass *klass = ST_BUTTON_GET_CLASS (button); gboolean is_click;
if (!button->priv->is_pressed) is_click = button->priv->has_grab && st_widget_get_hover (ST_WIDGET (button));
return FALSE; st_button_release (button, is_click);
clutter_ungrab_pointer (); if (button->priv->has_grab)
if (button->priv->is_toggle)
{ {
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) return FALSE;
klass->released (button); }
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; return TRUE;
} }
@ -195,12 +226,19 @@ st_button_enter (ClutterActor *actor,
ClutterCrossingEvent *event) ClutterCrossingEvent *event)
{ {
StButton *button = ST_BUTTON (actor); 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 static gboolean
@ -208,24 +246,19 @@ st_button_leave (ClutterActor *actor,
ClutterCrossingEvent *event) ClutterCrossingEvent *event)
{ {
StButton *button = ST_BUTTON (actor); 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); if (st_widget_get_hover (ST_WIDGET (button)))
st_button_press (button);
clutter_ungrab_pointer (); else
st_button_release (button, FALSE);
button->priv->is_pressed = FALSE;
if (klass->released)
klass->released (button);
} }
st_widget_remove_style_pseudo_class ((StWidget*) button, "hover"); return ret;
return CLUTTER_ACTOR_CLASS (st_button_parent_class)->leave_event (actor, event);
} }
static void static void
@ -302,15 +335,14 @@ st_button_class_init (StButtonClass *klass)
g_type_class_add_private (klass, sizeof (StButtonPrivate)); 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->set_property = st_button_set_property;
gobject_class->get_property = st_button_get_property; gobject_class->get_property = st_button_get_property;
gobject_class->finalize = st_button_finalize; gobject_class->finalize = st_button_finalize;
actor_class->button_press_event = st_button_button_press; actor_class->button_press_event = st_button_button_press;
actor_class->button_release_event = st_button_button_release; 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->enter_event = st_button_enter;
actor_class->leave_event = st_button_leave; 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 = ST_BUTTON_GET_PRIVATE (button);
button->priv->spacing = 6; 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 else
priv->text = g_strdup (""); 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)) if (label && CLUTTER_IS_TEXT (label))
{ {
@ -445,7 +478,7 @@ st_button_set_label (StButton *button,
"ellipsize", PANGO_ELLIPSIZE_END, "ellipsize", PANGO_ELLIPSIZE_END,
"use-markup", TRUE, "use-markup", TRUE,
NULL); 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 */ /* 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; button->priv->is_checked = checked;
if (checked) if (checked)
st_widget_add_style_pseudo_class ((StWidget*) button, "checked"); st_widget_add_style_pseudo_class (ST_WIDGET (button), "checked");
else 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"); g_object_notify (G_OBJECT (button), "checked");

View File

@ -15,13 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Emmanuele Bassi <ebassi@openedhand.com>
* Thomas Wood <thomas@linux.intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
@ -66,8 +60,6 @@ struct _StButtonClass
StBinClass parent_class; StBinClass parent_class;
/* vfuncs, not signals */ /* vfuncs, not signals */
void (* pressed) (StButton *button);
void (* released) (StButton *button);
void (* transition) (StButton *button); void (* transition) (StButton *button);
/* signals */ /* signals */

View File

@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
/** /**
* SECTION:st-clickable * SECTION:st-clickable
@ -158,6 +176,37 @@ st_clickable_button_release_event (ClutterActor *actor,
return TRUE; 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: * st_clickable_fake_release:
* @box: * @box:
@ -240,6 +289,8 @@ st_clickable_class_init (StClickableClass *klass)
actor_class->leave_event = st_clickable_leave_event; actor_class->leave_event = st_clickable_leave_event;
actor_class->button_press_event = st_clickable_button_press_event; actor_class->button_press_event = st_clickable_button_press_event;
actor_class->button_release_event = st_clickable_button_release_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 * StClickable::clicked

View File

@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ST_CLICKABLE_H__ #ifndef __ST_CLICKABLE_H__
#define __ST_CLICKABLE_H__ #define __ST_CLICKABLE_H__

View File

@ -14,11 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*
*/ */
/** /**

View File

@ -14,11 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -4,6 +4,8 @@
* *
* Copyright 2007 OpenedHand * Copyright 2007 OpenedHand
* Copyright 2008, 2009 Intel Corporation. * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,19 +17,15 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Emmanuele Bassi <ebassi@openedhand.com>
* Thomas Wood <thomas@linux.intel.com>
*
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
#include <stdlib.h>
#include "st-container.h" #include "st-container.h"
#define ST_CONTAINER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),ST_TYPE_CONTAINER, StContainerPrivate)) #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; 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 static gint
sort_z_order (gconstpointer a, sort_z_order (gconstpointer a,
gconstpointer b) gconstpointer b)
@ -389,6 +421,289 @@ st_container_dispose (GObject *object)
G_OBJECT_CLASS (st_container_parent_class)->dispose (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 static void
clutter_container_iface_init (ClutterContainerIface *iface) clutter_container_iface_init (ClutterContainerIface *iface)
{ {
@ -410,8 +725,14 @@ static void
st_container_class_init (StContainerClass *klass) st_container_class_init (StContainerClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (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)); g_type_class_add_private (klass, sizeof (StContainerPrivate));
object_class->dispose = st_container_dispose; 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;
} }

View File

@ -15,10 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
@ -50,6 +47,8 @@ struct _StContainer {
struct _StContainerClass { struct _StContainerClass {
StWidgetClass parent_class; StWidgetClass parent_class;
GList * (*get_focus_chain) (StContainer *container);
}; };
GType st_container_get_type (void) G_GNUC_CONST; 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_remove_all (StContainer *container);
void st_container_destroy_children (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 */ /* Only to be used by subclasses of StContainer */
void st_container_move_child (StContainer *container, void st_container_move_child (StContainer *container,
ClutterActor *actor, ClutterActor *actor,
int pos); int pos);
GList *st_container_get_children_list (StContainer *container); GList * st_container_get_children_list (StContainer *container);
G_END_DECLS G_END_DECLS

View File

@ -1,4 +1,22 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
/** /**
* SECTION:st-drawing-area * SECTION:st-drawing-area

View File

@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ST_DRAWING_AREA_H__ #ifndef __ST_DRAWING_AREA_H__
#define __ST_DRAWING_AREA_H__ #define __ST_DRAWING_AREA_H__

View File

@ -3,6 +3,8 @@
* st-entry.c: Plain entry actor * st-entry.c: Plain entry actor
* *
* Copyright 2008, 2009 Intel Corporation * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,11 +16,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*
*/ */
/** /**
@ -219,6 +217,29 @@ st_entry_style_changed (StWidget *self)
ST_WIDGET_CLASS (st_entry_parent_class)->style_changed (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 static void
st_entry_get_preferred_width (ClutterActor *actor, st_entry_get_preferred_width (ClutterActor *actor,
gfloat for_height, gfloat for_height,
@ -632,6 +653,7 @@ st_entry_class_init (StEntryClass *klass)
actor_class->leave_event = st_entry_leave_event; actor_class->leave_event = st_entry_leave_event;
widget_class->style_changed = st_entry_style_changed; widget_class->style_changed = st_entry_style_changed;
widget_class->navigate_focus = st_entry_navigate_focus;
pspec = g_param_spec_object ("clutter-text", pspec = g_param_spec_object ("clutter-text",
"Clutter Text", "Clutter Text",

View File

@ -14,12 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Thomas Wood <thomas@linux.intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

201
src/st/st-focus-manager.c Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/**
* 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 <clutter/clutter.h>
#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);
}

79
src/st/st-focus-manager.h Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
#error "Only <st/st.h> can be included directly.h"
#endif
#ifndef __ST_FOCUS_MANAGER_H__
#define __ST_FOCUS_MANAGER_H__
#include <st/st-types.h>
#include <st/st-widget.h>
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__ */

View File

@ -1,6 +1,8 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -12,9 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
*/ */
/** /**

View File

@ -2,6 +2,8 @@
/* /*
* st-group.h: A fixed layout container based on ClutterGroup * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation. * version 2.1, as published by the Free Software Foundation.
@ -12,10 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

108
src/st/st-icon-colors.c Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#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)

41
src/st/st-icon-colors.h Normal file
View File

@ -0,0 +1,41 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __ST_ICON_COLORS__
#define __ST_ICON_COLORS__
#include <clutter/clutter.h>
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__ */

492
src/st/st-icon.c Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/**
* 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");
}
}

100
src/st/st-icon.h Normal file
View File

@ -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 <thomas.wood@intel.com>
*
*/
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
#error "Only <st/st.h> can be included directly.h"
#endif
#ifndef _ST_ICON
#define _ST_ICON
#include <glib-object.h>
#include <st/st-widget.h>
#include <st/st-types.h>
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 */

View File

@ -1,6 +1,8 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 * This started as a copy of ClutterIMText converted to use
* GtkIMContext rather than ClutterIMContext. Original code: * GtkIMContext rather than ClutterIMContext. Original code:
@ -18,10 +20,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public License
* License along with this library; if not, write to the Free Software * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/ */
/** /**

View File

@ -1,6 +1,8 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 * This is a copy of ClutterIMText converted to use GtkIMContext rather
* than ClutterIMContext. Original code: * than ClutterIMContext. Original code:
@ -18,10 +20,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public License
* License along with this library; if not, write to the Free Software * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -3,6 +3,8 @@
* st-label.c: Plain label actor * st-label.c: Plain label actor
* *
* Copyright 2008,2009 Intel Corporation * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,11 +16,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Thomas Wood <thomas@linux.intel.com>
*
*/ */
/** /**

View File

@ -14,12 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Thomas Wood <thomas@linux.intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -1,9 +1,9 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* /*
* Portions derived from st-box-layout.c, which is * st-overflow-box.c: A vertical box which paints as many actors as it can fit
* Copyright 2009 Intel Corporation. *
* Modified into -overflow-box, by Colin Walters <walters@verbum.org>, which is * Copyright 2009, 2010 Red Hat, Inc.
* Copyright 2009 Red Hat, Inc. * Copyright 2009 Intel Corporation.
* *
* This program is free software; you can redistribute it and/or modify it * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,9 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
*/ */
/** /**
@ -314,27 +312,36 @@ st_overflow_box_allocate (ClutterActor *actor,
} }
static void 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; StOverflowBoxPrivate *priv = box->priv;
GList *l, *children; GList *l;
int i;
i = 0; for (l = *iter; *n < priv->n_visible && l; l = l->next)
children = st_container_get_children_list (ST_CONTAINER (box));
for (l = children; i < priv->n_visible && l; l = l->next)
{ {
ClutterActor *child = (ClutterActor*) l->data; ClutterActor *child = (ClutterActor*) l->data;
if (!CLUTTER_ACTOR_IS_VISIBLE (child)) if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue; continue;
if (!clutter_actor_get_fixed_position_set (child)) 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; ClutterActor *child = (ClutterActor*) l->data;
@ -342,8 +349,25 @@ st_overflow_box_internal_paint (StOverflowBox *box)
continue; continue;
if (clutter_actor_get_fixed_position_set (child)) 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 static void
@ -379,12 +403,29 @@ st_overflow_box_style_changed (StWidget *self)
ST_WIDGET_CLASS (st_overflow_box_parent_class)->style_changed (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 static void
st_overflow_box_class_init (StOverflowBoxClass *klass) st_overflow_box_class_init (StOverflowBoxClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
StWidgetClass *widget_class = ST_WIDGET_CLASS (klass); StWidgetClass *widget_class = ST_WIDGET_CLASS (klass);
StContainerClass *container_class = ST_CONTAINER_CLASS (klass);
GParamSpec *pspec; GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (StOverflowBoxPrivate)); 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; 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", pspec = g_param_spec_uint ("min-children",
"Min Children", "Min Children",
"The actor will request a minimum size large enough to include this many children", "The actor will request a minimum size large enough to include this many children",

View File

@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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. * Copyright 2009 Red Hat, Inc.
* *
@ -14,9 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -1,4 +1,24 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
@ -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 * Shadows

View File

@ -1,9 +1,11 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 2007 OpenedHand
* Copyright 2009 Intel Corporation. * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,10 +17,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
*/ */
#ifndef __ST_PRIVATE_H__ #ifndef __ST_PRIVATE_H__
@ -73,6 +72,8 @@ void _st_allocate_fill (StWidget *parent,
void _st_set_text_from_style (ClutterText *text, void _st_set_text_from_style (ClutterText *text,
StThemeNode *theme_node); StThemeNode *theme_node);
CoglHandle _st_create_texture_material (CoglHandle src_texture);
/* Helper for widgets which need to draw additional shadows */ /* Helper for widgets which need to draw additional shadows */
CoglHandle _st_create_shadow_material (StShadow *shadow_spec, CoglHandle _st_create_shadow_material (StShadow *shadow_spec,
CoglHandle src_texture); CoglHandle src_texture);

View File

@ -3,7 +3,9 @@
* st-scroll-bar.c: Scroll bar actor * st-scroll-bar.c: Scroll bar actor
* *
* Copyright 2008 OpenedHand * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,12 +17,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Chris Lord <chris@openedhand.com>
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
/** /**

View File

@ -15,13 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Chris Lord <chris@openedhand.com>
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -4,6 +4,8 @@
* *
* Copyright 2008 OpenedHand * Copyright 2008 OpenedHand
* Copyright 2009 Intel Corporation. * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,12 +17,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Chris Lord <chris@openedhand.com>
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
/** /**
@ -284,7 +281,7 @@ st_scroll_view_dispose (GObject *object)
{ {
g_object_run_dispose (G_OBJECT (priv->vadjustment)); g_object_run_dispose (G_OBJECT (priv->vadjustment));
g_object_unref (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 /* since it's impossible to get a handle to these actors, we can

View File

@ -4,6 +4,8 @@
* *
* Copyright 2008 OpenedHand * Copyright 2008 OpenedHand
* Copyright 2009 Intel Corporation. * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,13 +17,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Chris Lord <chris@openedhand.com>
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -4,6 +4,7 @@
* *
* Copyright 2008 OpenedHand * Copyright 2008 OpenedHand
* Copyright 2009 Intel Corporation. * Copyright 2009 Intel Corporation.
* Copyright 2010 Red Hat, Inc.
* *
* This program is free software; you can redistribute it and/or modify it * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -15,12 +16,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Chris Lord <chris@openedhand.com>
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
#include "st-scrollable.h" #include "st-scrollable.h"

View File

@ -15,13 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Chris Lord <chris@openedhand.com>
* Port to St by: Robert Staudinger <robsta@openedhand.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#include "config.h" #include "config.h"
#include "st-shadow.h" #include "st-shadow.h"

View File

@ -1,4 +1,23 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ST_SHADOW__ #ifndef __ST_SHADOW__
#define __ST_SHADOW__ #define __ST_SHADOW__

View File

@ -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 <cogl/cogl.h>
#include <clutter/clutter.h>
#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;
}

View File

@ -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 <st/st.h> can be included directly.h"
#endif
#ifndef __ST_SUBTEXTURE_H__
#define __ST_SUBTEXTURE_H__
#include <clutter/clutter.h>
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__ */

View File

@ -3,6 +3,7 @@
* st-table-child.h: Table child implementation * st-table-child.h: Table child implementation
* *
* Copyright 2008, 2009 Intel Corporation. * Copyright 2008, 2009 Intel Corporation.
* Copyright 2010 Red Hat, Inc.
* *
* This program is free software; you can redistribute it and/or modify it * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,12 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Thomas Wood <thomas.wood@intel.com>
*
*/ */
#include "st-private.h" #include "st-private.h"

View File

@ -14,12 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Thomas Wood <thomas@linux.intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -15,10 +15,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
*/ */
#ifndef __ST_TABLE_PRIVATE_H__ #ifndef __ST_TABLE_PRIVATE_H__

View File

@ -3,6 +3,8 @@
* st-table.c: Table layout widget * st-table.c: Table layout widget
* *
* Copyright 2008, 2009 Intel Corporation. * 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 * 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, * under the terms and conditions of the GNU Lesser General Public License,
@ -14,12 +16,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Thomas Wood <thomas@linux.intel.com>
*
*/ */
/** /**

View File

@ -14,12 +14,7 @@
* more details. * more details.
* *
* You should have received a copy of the GNU Lesser General Public License * 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, * along with this program. If not, see <http://www.gnu.org/licenses/>.
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Thomas Wood <thomas@linux.intel.com>
*
*/ */
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION) #if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)

View File

@ -1,11 +1,30 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#include "config.h" #include "config.h"
#include "st-texture-cache.h" #include "st-texture-cache.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#define GNOME_DESKTOP_USE_UNSTABLE_API #define GNOME_DESKTOP_USE_UNSTABLE_API
#include <libgnomeui/gnome-desktop-thumbnail.h> #include <libgnome-desktop/gnome-desktop-thumbnail.h>
#include <string.h> #include <string.h>
#include <glib.h> #include <glib.h>
@ -17,6 +36,8 @@
struct _StTextureCachePrivate struct _StTextureCachePrivate
{ {
GtkIconTheme *icon_theme;
/* Things that were loaded with a cache policy != NONE */ /* Things that were loaded with a cache policy != NONE */
GHashTable *keyed_cache; /* char * -> CoglTexture* */ GHashTable *keyed_cache; /* char * -> CoglTexture* */
/* Presently this is used to de-duplicate requests for GIcons, /* 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_dispose (GObject *object);
static void st_texture_cache_finalize (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); G_DEFINE_TYPE(StTextureCache, st_texture_cache, G_TYPE_OBJECT);
/* We want to preserve the aspect ratio by default, also the default /* 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->dispose = st_texture_cache_dispose;
gobject_class->finalize = st_texture_cache_finalize; 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 static void
st_texture_cache_init (StTextureCache *self) st_texture_cache_init (StTextureCache *self)
{ {
self->priv = g_new0 (StTextureCachePrivate, 1); 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, self->priv->keyed_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, cogl_handle_unref); g_free, cogl_handle_unref);
self->priv->outstanding_requests = g_hash_table_new_full (g_str_hash, g_str_equal, 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; 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) if (self->priv->keyed_cache)
g_hash_table_destroy (self->priv->keyed_cache); g_hash_table_destroy (self->priv->keyed_cache);
self->priv->keyed_cache = NULL; self->priv->keyed_cache = NULL;
@ -108,6 +189,7 @@ typedef struct {
GtkIconInfo *icon_info; GtkIconInfo *icon_info;
gint width; gint width;
gint height; gint height;
StIconColors *colors;
gpointer user_data; gpointer user_data;
} AsyncIconLookupData; } AsyncIconLookupData;
@ -162,16 +244,49 @@ compute_pixbuf_scale (gint width,
return FALSE; 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 * static GdkPixbuf *
impl_load_pixbuf_gicon (GIcon *icon, impl_load_pixbuf_gicon (GIcon *icon,
GtkIconInfo *info, GtkIconInfo *info,
int size, int size,
GError **error) StIconColors *colors,
GError **error)
{ {
int scaled_width, scaled_height; int scaled_width, scaled_height;
GdkPixbuf *pixbuf = gtk_icon_info_load_icon (info, error); GdkPixbuf *pixbuf;
int width, height; 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) if (!pixbuf)
return NULL; return NULL;
@ -212,6 +327,8 @@ icon_lookup_data_destroy (gpointer p)
g_free (data->mimetype); g_free (data->mimetype);
if (data->recent_info) if (data->recent_info)
gtk_recent_info_unref (data->recent_info); gtk_recent_info_unref (data->recent_info);
if (data->colors)
st_icon_colors_unref (data->colors);
g_free (data); g_free (data);
} }
@ -445,7 +562,7 @@ load_pixbuf_thread (GSimpleAsyncResult *result,
else if (data->uri) else if (data->uri)
pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, &error); pixbuf = impl_load_pixbuf_file (data->uri, data->width, data->height, &error);
else if (data->icon) 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 else
g_assert_not_reached (); g_assert_not_reached ();
@ -471,6 +588,7 @@ load_icon_pixbuf_async (StTextureCache *cache,
GIcon *icon, GIcon *icon,
GtkIconInfo *icon_info, GtkIconInfo *icon_info,
gint size, gint size,
StIconColors *colors,
GCancellable *cancellable, GCancellable *cancellable,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data) gpointer user_data)
@ -483,6 +601,10 @@ load_icon_pixbuf_async (StTextureCache *cache,
data->icon = g_object_ref (icon); data->icon = g_object_ref (icon);
data->icon_info = gtk_icon_info_copy (icon_info); data->icon_info = gtk_icon_info_copy (icon_info);
data->width = data->height = size; data->width = data->height = size;
if (colors)
data->colors = st_icon_colors_ref (colors);
else
data->colors = NULL;
data->user_data = user_data; data->user_data = user_data;
result = g_simple_async_result_new (G_OBJECT (cache), callback, user_data, load_icon_pixbuf_async); 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; 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: * st_texture_cache_load_gicon:
* @cache: The texture cache instance * @cache: The texture cache instance
@ -945,52 +1135,7 @@ st_texture_cache_load_gicon (StTextureCache *cache,
GIcon *icon, GIcon *icon,
gint size) gint size)
{ {
AsyncTextureLoadData *request; return load_gicon_with_colors (cache, icon, size, NULL);
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);
} }
typedef struct { typedef struct {
@ -1154,17 +1299,20 @@ st_texture_cache_load_sliced_image (StTextureCache *cache,
/** /**
* st_texture_cache_load_icon_name: * st_texture_cache_load_icon_name:
* @cache: The texture cache instance * @cache: The texture cache instance
* @theme_node: (allow-none): a #StThemeNode
* @name: Name of a themed icon * @name: Name of a themed icon
* @icon_type: the type of icon to load * @icon_type: the type of icon to load
* @size: Size of themed * @size: Size of themed
* *
* Load a themed icon into a texture. See the #StIconType documentation * 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 * Return Value: (transfer none): A new #ClutterTexture for the icon
*/ */
ClutterActor * ClutterActor *
st_texture_cache_load_icon_name (StTextureCache *cache, st_texture_cache_load_icon_name (StTextureCache *cache,
StThemeNode *theme_node,
const char *name, const char *name,
StIconType icon_type, StIconType icon_type,
gint size) gint size)
@ -1173,6 +1321,8 @@ st_texture_cache_load_icon_name (StTextureCache *cache,
GIcon *themed; GIcon *themed;
char *symbolic; char *symbolic;
g_return_val_if_fail (!(icon_type == ST_ICON_SYMBOLIC && theme_node == NULL), NULL);
switch (icon_type) switch (icon_type)
{ {
case ST_ICON_APPLICATION: case ST_ICON_APPLICATION:
@ -1187,7 +1337,8 @@ st_texture_cache_load_icon_name (StTextureCache *cache,
symbolic = g_strconcat (name, "-symbolic", NULL); symbolic = g_strconcat (name, "-symbolic", NULL);
themed = g_themed_icon_new_with_default_fallbacks ((const gchar*)symbolic); themed = g_themed_icon_new_with_default_fallbacks ((const gchar*)symbolic);
g_free (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); g_object_unref (themed);
return CLUTTER_ACTOR (texture); return CLUTTER_ACTOR (texture);
@ -1486,11 +1637,13 @@ st_texture_cache_load_from_raw (StTextureCache *cache,
texture = create_default_texture (cache); texture = create_default_texture (cache);
clutter_actor_set_size (CLUTTER_ACTOR (texture), size, size); clutter_actor_set_size (CLUTTER_ACTOR (texture), size, size);
/* In theory, two images of different size could have the same /* In theory, two images of with different width and height could have the same
* pixel data. We ignore that theory. * 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); 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); g_free (checksum);
texdata = g_hash_table_lookup (cache->priv->keyed_cache, key); texdata = g_hash_table_lookup (cache->priv->keyed_cache, key);

View File

@ -1,12 +1,39 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ST_TEXTURE_CACHE_H__ #ifndef __ST_TEXTURE_CACHE_H__
#define __ST_TEXTURE_CACHE_H__ #define __ST_TEXTURE_CACHE_H__
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
#error "Only <st/st.h> can be included directly.h"
#endif
#include <gio/gio.h> #include <gio/gio.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixbuf.h>
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <st/st-types.h>
#include <st/st-theme-node.h>
#define ST_TYPE_TEXTURE_CACHE (st_texture_cache_get_type ()) #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(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)) #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 { typedef enum {
ST_TEXTURE_CACHE_POLICY_NONE, ST_TEXTURE_CACHE_POLICY_NONE,
ST_TEXTURE_CACHE_POLICY_FOREVER ST_TEXTURE_CACHE_POLICY_FOREVER
@ -59,6 +79,7 @@ ClutterActor *st_texture_cache_bind_pixbuf_property (StTextureCache *cache,
const char *property_name); const char *property_name);
ClutterActor *st_texture_cache_load_icon_name (StTextureCache *cache, ClutterActor *st_texture_cache_load_icon_name (StTextureCache *cache,
StThemeNode *theme_node,
const char *name, const char *name,
StIconType icon_type, StIconType icon_type,
gint size); gint size);

View File

@ -1,7 +1,27 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#include <config.h> #include <config.h>
#include "st-texture-cache.h"
#include "st-theme.h" #include "st-theme.h"
#include "st-theme-context.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) G_DEFINE_TYPE (StThemeContext, st_theme_context, G_TYPE_OBJECT)
static void on_icon_theme_changed (StTextureCache *cache,
StThemeContext *context);
static void static void
st_theme_context_finalize (GObject *object) st_theme_context_finalize (GObject *object)
{ {
StThemeContext *context = ST_THEME_CONTEXT (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) if (context->root_node)
g_object_unref (context->root_node); g_object_unref (context->root_node);
if (context->theme) if (context->theme)
@ -69,6 +96,11 @@ st_theme_context_init (StThemeContext *context)
{ {
context->resolution = DEFAULT_RESOLUTION; context->resolution = DEFAULT_RESOLUTION;
context->font = pango_font_description_from_string (DEFAULT_FONT); 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); 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: * st_theme_context_get_for_stage:
* @stage: a #ClutterStage * @stage: a #ClutterStage

View File

@ -1,4 +1,24 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __ST_THEME_CONTEXT_H__ #ifndef __ST_THEME_CONTEXT_H__
#define __ST_THEME_CONTEXT_H__ #define __ST_THEME_CONTEXT_H__

View File

@ -1,32 +1,30 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Drawing for StWidget. /*
* st-theme-node-drawing.c: Code to draw themed elements
Copyright (C) 2009,2010 Red Hat, Inc. *
* Copyright 2009, 2010 Red Hat, Inc.
Contains code derived from: * Copyright 2009, 2010 Florian Müllner
rectangle.c: Rounded rectangle. * Copyright 2010 Intel Corporation.
Copyright (C) 2008 litl, LLC. *
st-shadow-texture.c: a class for creating soft shadow texture * Contains code derived from:
Copyright (C) 2009 Florian Müllner <fmuellner@src.gnome.org> * rectangle.c: Rounded rectangle.
st-texture-frame.h: Expandible texture actor * Copyright 2008 litl, LLC.
Copyright 2007 OpenedHand * st-texture-frame.h: Expandible texture actor
Copyright 2009 Intel Corporation. * 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 * This program is free software; you can redistribute it and/or modify it
published by the Free Software Foundation; either version 2 of the * under the terms and conditions of the GNU Lesser General Public License,
License, or (at your option) any later version. * version 2.1, as published by the Free Software Foundation.
*
The St is distributed in the hope that it will be useful, * This program is distributed in the hope it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
Library General Public License for more details. * more details.
*
You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Lesser General Public License
License along with the St; see the file COPYING.LIB. * along with this program. If not, see <http://www.gnu.org/licenses/>.
If not, write to the Free Software Foundation, Inc., 59 Temple Place - */
Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
@ -52,7 +50,7 @@ typedef struct {
} StCornerSpec; } StCornerSpec;
static CoglHandle static CoglHandle
create_corner_texture (StCornerSpec *corner) create_corner_material (StCornerSpec *corner)
{ {
CoglHandle texture; CoglHandle texture;
cairo_t *cr; cairo_t *cr;
@ -167,7 +165,7 @@ load_corner (StTextureCache *cache,
{ {
LoadCornerData *data = datap; 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 /* 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, st_theme_node_lookup_corner (StThemeNode *node,
StCorner corner_id) StCorner corner_id)
{ {
CoglHandle texture; CoglHandle texture, material;
char *key; char *key;
StTextureCache *cache; StTextureCache *cache;
StCornerSpec corner; StCornerSpec corner;
@ -264,15 +262,22 @@ st_theme_node_lookup_corner (StThemeNode *node,
break; 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); key = corner_to_string (&corner);
data.node = node; data.node = node;
data.corner = &corner; data.corner = &corner;
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &data, NULL); 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); g_free (key);
return texture; return material;
} }
static void static void
@ -507,16 +512,20 @@ _st_theme_node_free_drawing_state (StThemeNode *node)
if (node->background_texture != COGL_INVALID_HANDLE) if (node->background_texture != COGL_INVALID_HANDLE)
cogl_handle_unref (node->background_texture); 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) if (node->background_shadow_material != COGL_INVALID_HANDLE)
cogl_handle_unref (node->background_shadow_material); cogl_handle_unref (node->background_shadow_material);
if (node->border_texture != COGL_INVALID_HANDLE) if (node->border_texture != COGL_INVALID_HANDLE)
cogl_handle_unref (node->border_texture); 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) if (node->border_shadow_material != COGL_INVALID_HANDLE)
cogl_handle_unref (node->border_shadow_material); cogl_handle_unref (node->border_shadow_material);
for (corner_id = 0; corner_id < 4; corner_id++) 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)
cogl_handle_unref (node->corner_texture[corner_id]); cogl_handle_unref (node->corner_material[corner_id]);
_st_theme_node_init_drawing_state (node); _st_theme_node_init_drawing_state (node);
} }
@ -527,12 +536,14 @@ _st_theme_node_init_drawing_state (StThemeNode *node)
int corner_id; int corner_id;
node->background_texture = COGL_INVALID_HANDLE; node->background_texture = COGL_INVALID_HANDLE;
node->background_material = COGL_INVALID_HANDLE;
node->background_shadow_material = COGL_INVALID_HANDLE; node->background_shadow_material = COGL_INVALID_HANDLE;
node->border_shadow_material = COGL_INVALID_HANDLE; node->border_shadow_material = COGL_INVALID_HANDLE;
node->border_texture = COGL_INVALID_HANDLE; node->border_texture = COGL_INVALID_HANDLE;
node->border_material = COGL_INVALID_HANDLE;
for (corner_id = 0; corner_id < 4; corner_id++) 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, 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); 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 (shadow_spec)
{ {
if (node->border_texture != COGL_INVALID_HANDLE) 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_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) 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); 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); 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); 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); st_theme_node_lookup_corner (node, ST_CORNER_BOTTOMLEFT);
} }
static void static void
paint_texture_with_opacity (CoglHandle texture, paint_material_with_opacity (CoglHandle material,
ClutterActorBox *box, ClutterActorBox *box,
guint8 paint_opacity) 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, cogl_material_set_color4ub (material,
paint_opacity, paint_opacity, paint_opacity, paint_opacity); paint_opacity, paint_opacity, paint_opacity, paint_opacity);
cogl_set_source (material); cogl_set_source (material);
cogl_rectangle (box->x1, box->y1, box->x2, box->y2); cogl_rectangle (box->x1, box->y1, box->x2, box->y2);
cogl_handle_unref (material);
} }
static void static void
@ -678,7 +681,7 @@ st_theme_node_paint_borders (StThemeNode *node,
int max_width_radius[4]; int max_width_radius[4];
int corner_id; int corner_id;
ClutterColor border_color; ClutterColor border_color;
CoglHandle material; guint8 alpha;
width = box->x2 - box->x1; width = box->x2 - box->x1;
height = box->y2 - box->y1; height = box->y2 - box->y1;
@ -700,72 +703,72 @@ st_theme_node_paint_borders (StThemeNode *node,
float x1, y1, x2, y2; float x1, y1, x2, y2;
over (&border_color, &node->background_color, &effective_border); over (&border_color, &node->background_color, &effective_border);
alpha = paint_opacity * effective_border.alpha / 255;
cogl_set_source_color4ub (effective_border.red, if (alpha > 0)
effective_border.green, {
effective_border.blue, cogl_set_source_color4ub (effective_border.red,
paint_opacity * effective_border.alpha / 255); effective_border.green,
effective_border.blue,
alpha);
/* NORTH */ /* NORTH */
skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0; skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0;
skip_corner_2 = node->border_radius[ST_CORNER_TOPRIGHT] > 0; skip_corner_2 = node->border_radius[ST_CORNER_TOPRIGHT] > 0;
x1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : 0; x1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : 0;
y1 = 0; y1 = 0;
x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_TOPRIGHT] : width; x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_TOPRIGHT] : width;
y2 = border_width; y2 = border_width;
cogl_rectangle (x1, y1, x2, y2); cogl_rectangle (x1, y1, x2, y2);
/* EAST */ /* EAST */
skip_corner_1 = node->border_radius[ST_CORNER_TOPRIGHT] > 0; skip_corner_1 = node->border_radius[ST_CORNER_TOPRIGHT] > 0;
skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0; skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0;
x1 = width - border_width; x1 = width - border_width;
y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPRIGHT] : border_width; y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPRIGHT] : border_width;
x2 = width; x2 = width;
y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMRIGHT] y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMRIGHT]
: height - border_width; : height - border_width;
cogl_rectangle (x1, y1, x2, y2); cogl_rectangle (x1, y1, x2, y2);
/* SOUTH */ /* SOUTH */
skip_corner_1 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0; skip_corner_1 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0;
skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0; skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMRIGHT] > 0;
x1 = skip_corner_1 ? max_width_radius[ST_CORNER_BOTTOMLEFT] : 0; x1 = skip_corner_1 ? max_width_radius[ST_CORNER_BOTTOMLEFT] : 0;
y1 = height - border_width; y1 = height - border_width;
x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_BOTTOMRIGHT] x2 = skip_corner_2 ? width - max_width_radius[ST_CORNER_BOTTOMRIGHT]
: width; : width;
y2 = height; y2 = height;
cogl_rectangle (x1, y1, x2, y2); cogl_rectangle (x1, y1, x2, y2);
/* WEST */ /* WEST */
skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0; skip_corner_1 = node->border_radius[ST_CORNER_TOPLEFT] > 0;
skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0; skip_corner_2 = node->border_radius[ST_CORNER_BOTTOMLEFT] > 0;
x1 = 0; x1 = 0;
y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : border_width; y1 = skip_corner_1 ? max_width_radius[ST_CORNER_TOPLEFT] : border_width;
x2 = border_width; x2 = border_width;
y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMLEFT] y2 = skip_corner_2 ? height - max_width_radius[ST_CORNER_BOTTOMLEFT]
: height - border_width; : height - border_width;
cogl_rectangle (x1, y1, x2, y2); cogl_rectangle (x1, y1, x2, y2);
}
} }
/* corners */ /* 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++) 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; continue;
cogl_material_set_layer (material, cogl_material_set_color4ub (node->corner_material[corner_id],
0, node->corner_texture[corner_id]); paint_opacity, paint_opacity,
paint_opacity, paint_opacity);
cogl_set_source (node->corner_material[corner_id]);
switch (corner_id) switch (corner_id)
{ {
@ -791,109 +794,112 @@ st_theme_node_paint_borders (StThemeNode *node,
break; break;
} }
} }
cogl_handle_unref (material);
} }
/* background color */ /* background color */
cogl_set_source_color4ub (node->background_color.red, alpha = paint_opacity * node->background_color.alpha / 255;
node->background_color.green, if (alpha > 0)
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++)
{ {
float verts[8]; cogl_set_source_color4ub (node->background_color.red,
int n_rects; node->background_color.green,
node->background_color.blue,
alpha);
/* corner texture does not need padding */ /* We add padding to each corner, so that all corners end up as if they
if (max_border_radius == node->border_radius[corner_id]) * had a border-radius of max_border_radius, which allows us to treat
continue; * corners as uniform further on.
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, for (corner_id = 0; corner_id < 4; corner_id++)
width - max_border_radius, max_border_radius); {
cogl_rectangle (max_border_radius, height - max_border_radius, float verts[8];
width - max_border_radius, height - border_width); int n_rects;
}
cogl_rectangle (border_width, MAX(border_width, max_border_radius), /* corner texture does not need padding */
width - border_width, height - MAX(border_width, max_border_radius)); 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 static void
@ -930,8 +936,7 @@ st_theme_node_paint_sliced_border_image (StThemeNode *node,
if (ey < 0) if (ey < 0)
ey = border_bottom; /* FIXME ? */ ey = border_bottom; /* FIXME ? */
material = cogl_material_new (); material = node->border_material;
cogl_material_set_layer (material, 0, node->border_texture);
cogl_material_set_color4ub (material, cogl_material_set_color4ub (material,
paint_opacity, paint_opacity, paint_opacity, paint_opacity); 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_rectangles_with_texture_coords (rectangles, 9);
} }
cogl_handle_unref (material);
} }
static void static void
@ -1096,11 +1099,11 @@ st_theme_node_paint (StThemeNode *node,
&allocation, &allocation,
paint_opacity); 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 */ /* Gradients and border images are mutually exclusive at this time */
if (node->background_gradient_type != ST_GRADIENT_NONE) 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 else
st_theme_node_paint_sliced_border_image (node, &allocation, paint_opacity); st_theme_node_paint_sliced_border_image (node, &allocation, paint_opacity);
} }
@ -1133,7 +1136,7 @@ st_theme_node_paint (StThemeNode *node,
&background_box, &background_box,
paint_opacity); 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); node->border_shadow_material = cogl_handle_ref (other->border_shadow_material);
if (other->background_texture) if (other->background_texture)
node->background_texture = cogl_handle_ref (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) if (other->border_texture)
node->border_texture = cogl_handle_ref (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++) for (corner_id = 0; corner_id < 4; corner_id++)
if (other->corner_texture[corner_id]) if (other->corner_material[corner_id])
node->corner_texture[corner_id] = cogl_handle_ref (other->corner_texture[corner_id]); node->corner_material[corner_id] = cogl_handle_ref (other->corner_material[corner_id]);
} }

Some files were not shown because too many files have changed in this diff Show More