Compare commits

..

2 Commits

Author SHA1 Message Date
Jasper St. Pierre
5c2c60aaf4 implement maximize 2015-07-05 23:11:50 -07:00
Jasper St. Pierre
d20789bc61 status menu hackery 2015-07-05 23:11:14 -07:00
13 changed files with 650 additions and 694 deletions

View File

@@ -95,10 +95,10 @@ StScrollBar {
background-color: transparent; }
StScrollBar StButton#vhandle, StScrollBar StButton#hhandle {
border-radius: 8px;
background-color: #999999;
background-color: #000;
margin: 3px; }
StScrollBar StButton#vhandle:hover, StScrollBar StButton#hhandle:hover {
background-color: #cccccc; }
background-color: #1a1a1a; }
StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active {
background-color: #215d9c; }

View File

@@ -95,10 +95,10 @@ StScrollBar {
background-color: transparent; }
StScrollBar StButton#vhandle, StScrollBar StButton#hhandle {
border-radius: 8px;
background-color: #a5a8a6;
background-color: #393f3f;
margin: 3px; }
StScrollBar StButton#vhandle:hover, StScrollBar StButton#hhandle:hover {
background-color: #c9cbc9; }
background-color: #515a5a; }
StScrollBar StButton#vhandle:active, StScrollBar StButton#hhandle:active {
background-color: #215d9c; }

View File

@@ -25,8 +25,8 @@ const RemoteMenu = imports.ui.remoteMenu;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const PANEL_ICON_SIZE = 16;
const APP_MENU_ICON_MARGIN = 0;
const PANEL_ICON_SIZE = 24;
const APP_MENU_ICON_MARGIN = 2;
const BUTTON_DND_ACTIVATION_TIMEOUT = 250;
@@ -697,7 +697,6 @@ const AggregateMenu = new Lang.Class({
this.menu.addMenuItem(this._location.menu);
this.menu.addMenuItem(this._rfkill.menu);
this.menu.addMenuItem(this._power.menu);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addMenuItem(this._system.menu);
},
});

View File

@@ -1059,11 +1059,6 @@ const PopupSubMenuMenuItem = new Lang.Class({
let expander = new St.Bin({ style_class: 'popup-menu-item-expander' });
this.actor.add(expander, { expand: true });
this.status = new St.Label({ style_class: 'popup-status-menu-item',
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.actor.add_child(this.status);
this._triangle = arrowIcon(St.Side.RIGHT);
this._triangle.pivot_point = new Clutter.Point({ x: 0.5, y: 0.6 });

View File

@@ -101,8 +101,8 @@ const Indicator = new Lang.Class({
this._item.actor.visible = this._proxy.BluetoothHasAirplaneMode && !this._proxy.BluetoothAirplaneMode;
if (nDevices > 0)
this._item.status.text = ngettext("%d Connected Device", "%d Connected Devices", nDevices).format(nDevices);
this._item.label.text = ngettext("%d Connected Device", "%d Connected Devices", nDevices).format(nDevices);
else
this._item.status.text = _("Not Connected");
this._item.label.text = _("Not Connected");
},
});

View File

@@ -68,7 +68,7 @@ const Indicator = new Lang.Class({
this._agent = Gio.DBusExportedObject.wrapJSObject(AgentIface, this);
this._agent.export(Gio.DBus.system, '/org/freedesktop/GeoClue2/Agent');
this._item.status.text = _("Enabled");
this._item.label.text = _("Location Services in Use");
this._onOffAction = this._item.menu.addAction(_("Disable"), Lang.bind(this, this._onOnOffAction));
this._item.menu.addSettingsAction(_("Privacy Settings"), 'gnome-privacy-panel.desktop');
@@ -112,7 +112,6 @@ const Indicator = new Lang.Class({
this._indicator.visible = this._proxy.InUse;
this._item.actor.visible = this._indicator.visible;
this._updateMenuLabels();
},
_connectToGeoclue: function() {
@@ -171,19 +170,7 @@ const Indicator = new Lang.Class({
this.menu.setSensitive(sensitive);
},
_updateMenuLabels: function() {
if (this._settings.get_boolean(ENABLED)) {
this._item.status.text = this._indicator.visible ? _("In Use") : _("Enabled");
this._onOffAction.label.text = _("Disable");
} else {
this._item.status.text = _("Disabled");
this._onOffAction.label.text = _("Enable");
}
},
_onMaxAccuracyLevelChanged: function() {
this._updateMenuLabels();
// Gotta ensure geoclue is up and we are registered as agent to it
// before we emit the notify for this property change.
if (!this._connectToGeoclue())

View File

@@ -257,16 +257,8 @@ const NMConnectionSection = new Lang.Class({
this._radioSection.actor.visible = (nItems > 1);
this._labelSection.actor.visible = (nItems == 1);
this.item.status.text = this._getStatus();
this.item.label.text = this._getStatus();
this.item.icon.icon_name = this._getMenuIcon();
// desc can be undefined at cold-plug, before we called
// NMGtk.disambiguate_device_names() at least once
let desc = this._getDescription();
if (desc)
this.item.label.text = desc;
else
this.item.label.text = '';
},
_getMenuIcon: function() {
@@ -1282,9 +1274,8 @@ const NMDeviceWireless = new Lang.Class({
this._toggleItem.label.text = this._client.wireless_enabled ? _("Turn Off") : _("Turn On");
this._toggleItem.actor.visible = this._client.wireless_hardware_enabled;
this.item.status.text = this._getStatus();
this.item.icon.icon_name = this._getMenuIcon();
this.item.label.text = this._description;
this.item.label.text = this._getStatus();
},
setDeviceDescription: function(desc) {

View File

@@ -112,12 +112,6 @@ const Indicator = new Lang.Class({
this._item.icon.icon_name = icon;
// The status label
this._item.status.text = this._getStatus();
// The sub-menu heading
if (this._proxy.Type == UPower.DeviceKind.UPS)
this._item.label.text = _("UPS");
else
this._item.label.text = _("Battery");
this._item.label.text = this._getStatus();
},
});

View File

@@ -85,9 +85,8 @@ const Indicator = new Lang.Class({
// The menu only appears when airplane mode is on, so just
// statically build it as if it was on, rather than dynamically
// changing the menu contents.
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Airplane Mode"), true);
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Airplane Mode On"), true);
this._item.icon.icon_name = 'airplane-mode-symbolic';
this._item.status.text = _("On");
this._offItem = this._item.menu.addAction(_("Turn Off"), Lang.bind(this, function() {
this._manager.airplaneMode = false;
}));

View File

@@ -477,64 +477,6 @@ const TilePreview = new Lang.Class({
}
});
const TouchpadWorkspaceSwitchAction = new Lang.Class({
Name: 'TouchpadWorkspaceSwitchAction',
_checkActivated: function() {
const MOTION_THRESHOLD = 50;
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
let dir;
if ((allowedModes & Main.actionMode) == 0)
return;
if (this._dy < MOTION_THRESHOLD)
dir = Meta.MotionDirection.DOWN;
else if (this._dy > MOTION_THRESHOLD)
dir = Meta.MotionDirection.UP;
else if (this._dx < MOTION_THRESHOLD)
dir = Meta.MotionDirection.RIGHT;
else if (this._dx > MOTION_THRESHOLD)
dir = Meta.MotionDirection.LEFT;
else
return;
this.emit('activated', dir);
},
_handleEvent: function(actor, event) {
if (event.type() != Clutter.EventType.TOUCHPAD_SWIPE_BEGIN &&
event.type() != Clutter.EventType.TOUCHPAD_SWIPE_UPDATE &&
event.type() != Clutter.EventType.TOUCHPAD_SWIPE_END)
return Clutter.EVENT_PROPAGATE;
if (event.get_gesture_swipe_finger_count() != 4)
return Clutter.EVENT_PROPAGATE;
if (event.type() == Clutter.EventType.TOUCHPAD_SWIPE_UPDATE) {
let [dx, dy] = event.get_gesture_motion_delta(event);
this._dx += dx;
this._dy += dy;
} else {
if (event.type() == Clutter.EventType.TOUCHPAD_SWIPE_END)
this._checkActivated();
this._dx = 0;
this._dy = 0;
}
return Clutter.EVENT_STOP;
},
_init: function(actor) {
this._dx = 0;
this._dy = 0;
actor.connect('captured-event', Lang.bind(this, this._handleEvent));
},
});
Signals.addSignalMethods(TouchpadWorkspaceSwitchAction.prototype);
const WorkspaceSwitchAction = new Lang.Class({
Name: 'WorkspaceSwitchAction',
Extends: Clutter.SwipeAction,
@@ -680,6 +622,7 @@ const WindowManager = new Lang.Class({
this._minimizing = [];
this._unminimizing = [];
this._sizeChanging = [];
this._mapping = [];
this._destroying = [];
this._movingWindow = null;
@@ -694,6 +637,7 @@ const WindowManager = new Lang.Class({
this._shellwm.connect('kill-switch-workspace', Lang.bind(this, this._switchWorkspaceDone));
this._shellwm.connect('kill-window-effects', Lang.bind(this, function (shellwm, actor) {
this._minimizeWindowDone(shellwm, actor);
this._sizeChangeWindowDone(shellwm, actor);
this._mapWindowDone(shellwm, actor);
this._destroyWindowDone(shellwm, actor);
}));
@@ -924,22 +868,15 @@ const WindowManager = new Lang.Class({
false, -1, 1);
let gesture = new WorkspaceSwitchAction();
gesture.connect('activated', Lang.bind(this, this._actionSwitchWorkspace));
gesture.connect('activated', Lang.bind(this, function(action, direction) {
let newWs = global.screen.get_active_workspace().get_neighbor(direction);
this.actionMoveWorkspace(newWs);
}));
global.stage.add_action(gesture);
// This is not a normal Clutter.GestureAction, doesn't need add_action()
gesture = new TouchpadWorkspaceSwitchAction(global.stage);
gesture.connect('activated', Lang.bind(this, this._actionSwitchWorkspace));
gesture = new AppSwitchAction();
gesture.connect('activated', Lang.bind(this, this._switchApp));
global.stage.add_action(gesture);
},
_actionSwitchWorkspace: function(action, direction) {
let newWs = global.screen.get_active_workspace().get_neighbor(direction);
this.actionMoveWorkspace(newWs);
},
_lookupIndex: function (windows, metaWindow) {
@@ -1222,6 +1159,60 @@ const WindowManager = new Lang.Class({
},
_sizeChangeWindow : function(shellwm, actor, whichChange, oldFrameRect, oldBufferRect) {
let types = [Meta.WindowType.NORMAL];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_size_change(actor);
return;
}
this._sizeChanging.push(actor);
let targetRect = actor.meta_window.get_frame_rect();
// The actor is in its old, "frozen" state. The borders that we have here
// are the difference between the frame and buffer rects. Offset the target
// with the same difference so it lines up nicely.
targetRect.x += oldBufferRect.x - oldFrameRect.x;
targetRect.y += oldBufferRect.y - oldFrameRect.y;
let frameX2 = oldFrameRect.x + oldFrameRect.width;
let bufferX2 = oldBufferRect.x + oldBufferRect.width;
targetRect.width += bufferX2 - frameX2;
let frameY2 = oldFrameRect.y + oldFrameRect.width;
let bufferY2 = oldBufferRect.y + oldBufferRect.width;
targetRect.width += bufferY2 - frameY2;
let scaleX = targetRect.width / actor.width;
let scaleY = targetRect.height / actor.height;
Tweener.addTween(actor,
{ x: targetRect.x,
y: targetRect.y,
scale_x: scaleX,
scale_y: scaleY,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: () => { this._sizeChangeWindowDone(shellwm, actor); },
onOverwrite: () => { this._sizeChangeWindowOverwritten(shellwm, actor); },
});
},
_sizeChangeWindowDone: function(shellwm, actor) {
if (!this._removeEffect(this._sizeChanging, actor))
return;
Tweener.removeTweens(actor);
actor.scale_x = 1;
actor.scale_y = 1;
shellwm.completed_size_change(actor);
},
_sizeChangeWindowOverwritten: function(shellwm, actor) {
if (!this._removeEffect(this._sizeChanging, actor))
return;
shellwm.completed_size_change(actor);
},

1066
po/fur.po

File diff suppressed because it is too large Load Diff

View File

@@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-07-08 08:07+0000\n"
"PO-Revision-Date: 2015-07-08 15:46+0100\n"
"POT-Creation-Date: 2015-05-10 08:30+0000\n"
"PO-Revision-Date: 2015-05-10 20:54+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl\n"
@@ -340,17 +340,17 @@ msgstr "Izbor seje"
msgid "Not listed?"
msgstr "Ali je ni na seznamu?"
#: ../js/gdm/loginDialog.js:847
#: ../js/gdm/loginDialog.js:840
#, javascript-format
msgid "(e.g., user or %s)"
msgstr "(na primer, uporabnika ali %s)"
#: ../js/gdm/loginDialog.js:852 ../js/ui/components/networkAgent.js:271
#: ../js/gdm/loginDialog.js:845 ../js/ui/components/networkAgent.js:271
#: ../js/ui/components/networkAgent.js:289
msgid "Username: "
msgstr "Uporabniško ime: "
#: ../js/gdm/loginDialog.js:1180
#: ../js/gdm/loginDialog.js:1173
msgid "Login Window"
msgstr "Prijavno okno"
@@ -443,31 +443,31 @@ msgstr "%B %d %Y, %l%M %p"
msgid "Web Authentication Redirect"
msgstr "Preusmeritev spletnega overjanja"
#: ../js/ui/appDisplay.js:789
#: ../js/ui/appDisplay.js:788
msgid "Frequently used applications will appear here"
msgstr "Pogosto uporabljeni programi bodo prikazani tu"
#: ../js/ui/appDisplay.js:909
#: ../js/ui/appDisplay.js:908
msgid "Frequent"
msgstr "Pogosto"
#: ../js/ui/appDisplay.js:916
#: ../js/ui/appDisplay.js:915
msgid "All"
msgstr "Vse"
#: ../js/ui/appDisplay.js:1845
#: ../js/ui/appDisplay.js:1844
msgid "New Window"
msgstr "Novo okno"
#: ../js/ui/appDisplay.js:1873 ../js/ui/dash.js:289
#: ../js/ui/appDisplay.js:1872 ../js/ui/dash.js:289
msgid "Remove from Favorites"
msgstr "Odstrani iz priljubljenih"
#: ../js/ui/appDisplay.js:1879
#: ../js/ui/appDisplay.js:1878
msgid "Add to Favorites"
msgstr "Dodaj med priljubljene"
#: ../js/ui/appDisplay.js:1889
#: ../js/ui/appDisplay.js:1888
msgid "Show Details"
msgstr "Pokaži besedilo"
@@ -490,7 +490,7 @@ msgid "Display Settings"
msgstr "Nastavitve zaslona"
#: ../js/ui/backgroundMenu.js:22 ../js/ui/panel.js:650
#: ../js/ui/status/system.js:357
#: ../js/ui/status/system.js:334
msgid "Settings"
msgstr "Nastavitve"
@@ -920,7 +920,7 @@ msgstr "Namesti"
msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "Prejmi in namesti “%s” preko povezave na extensions.gnome.org?"
#: ../js/ui/keyboard.js:747 ../js/ui/status/keyboard.js:713
#: ../js/ui/keyboard.js:718 ../js/ui/status/keyboard.js:713
msgid "Keyboard"
msgstr "Tipkovnica"
@@ -985,7 +985,7 @@ msgstr "Poglej vir"
msgid "Web Page"
msgstr "Spletna stran"
#: ../js/ui/messageTray.js:1486
#: ../js/ui/messageTray.js:1504
msgid "System Information"
msgstr "Podrobnosti sistema"
@@ -1027,7 +1027,7 @@ msgstr "toggle-switch-intl"
msgid "Enter a Command"
msgstr "Vnos ukaza"
#: ../js/ui/runDialog.js:110 ../js/ui/windowMenu.js:162
#: ../js/ui/runDialog.js:110 ../js/ui/windowMenu.js:153
msgid "Close"
msgstr "Zapri"
@@ -1059,19 +1059,19 @@ msgstr[1] "%d novo obvestilo"
msgstr[2] "%d novi obvestili"
msgstr[3] "%d nova obvestila"
#: ../js/ui/screenShield.js:432 ../js/ui/status/system.js:365
#: ../js/ui/screenShield.js:432 ../js/ui/status/system.js:342
msgid "Lock"
msgstr "Zakleni"
#: ../js/ui/screenShield.js:684
#: ../js/ui/screenShield.js:668
msgid "GNOME needs to lock the screen"
msgstr "Zakleniti je treba zaslon"
#: ../js/ui/screenShield.js:805 ../js/ui/screenShield.js:1271
#: ../js/ui/screenShield.js:795 ../js/ui/screenShield.js:1271
msgid "Unable to lock"
msgstr "Zaklep ni mogoč"
#: ../js/ui/screenShield.js:806 ../js/ui/screenShield.js:1272
#: ../js/ui/screenShield.js:796 ../js/ui/screenShield.js:1272
msgid "Lock was blocked by an application"
msgstr "Zaklep je preprečil program"
@@ -1394,23 +1394,23 @@ msgstr "Način letala"
msgid "On"
msgstr "Povezano"
#: ../js/ui/status/system.js:337
#: ../js/ui/status/system.js:314
msgid "Switch User"
msgstr "Preklopi uporabnika"
#: ../js/ui/status/system.js:342
#: ../js/ui/status/system.js:319
msgid "Log Out"
msgstr "Odjava"
#: ../js/ui/status/system.js:361
#: ../js/ui/status/system.js:338
msgid "Orientation Lock"
msgstr "Zaklep položaja"
#: ../js/ui/status/system.js:369
#: ../js/ui/status/system.js:346
msgid "Suspend"
msgstr "Zaustavi"
#: ../js/ui/status/system.js:372
#: ../js/ui/status/system.js:349
msgid "Power Off"
msgstr "Izklop"
@@ -1442,27 +1442,27 @@ msgstr "Programi"
msgid "Search"
msgstr "Poišči"
#: ../js/ui/windowAttentionHandler.js:20
#: ../js/ui/windowAttentionHandler.js:19
#, javascript-format
msgid "“%s” is ready"
msgstr "“%s” storitev je pripravljena"
#: ../js/ui/windowManager.js:63
#: ../js/ui/windowManager.js:65
msgid "Do you want to keep these display settings?"
msgstr "Ali želite ohraniti te nastavitve zaslona?"
#. Translators: this and the following message should be limited in lenght,
#. to avoid ellipsizing the labels.
#. */
#: ../js/ui/windowManager.js:82
#: ../js/ui/windowManager.js:84
msgid "Revert Settings"
msgstr "Povrni nastavitve"
#: ../js/ui/windowManager.js:86
#: ../js/ui/windowManager.js:88
msgid "Keep Changes"
msgstr "Sledi spremembam"
#: ../js/ui/windowManager.js:105
#: ../js/ui/windowManager.js:107
#, javascript-format
msgid "Settings changes will revert in %d second"
msgid_plural "Settings changes will revert in %d seconds"
@@ -1473,7 +1473,7 @@ msgstr[3] "Spremembe nastavitev bodo povrnjene v %d sekundah."
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height. */
#: ../js/ui/windowManager.js:604
#: ../js/ui/windowManager.js:613
#, javascript-format
msgid "%d x %d"
msgstr "%d x %d"
@@ -1510,35 +1510,27 @@ msgstr "Vedno na vrhu"
msgid "Always on Visible Workspace"
msgstr "Vedno na dejavni delovni površini"
#: ../js/ui/windowMenu.js:105
msgid "Move to Workspace Left"
msgstr "Premakni na delovno površino na levi"
#: ../js/ui/windowMenu.js:110
msgid "Move to Workspace Right"
msgstr "Premakni na delovno površino na desni"
#: ../js/ui/windowMenu.js:115
#: ../js/ui/windowMenu.js:106
msgid "Move to Workspace Up"
msgstr "Premakni na zgornjo delovno površino"
#: ../js/ui/windowMenu.js:120
#: ../js/ui/windowMenu.js:111
msgid "Move to Workspace Down"
msgstr "Premakni na spodnjo delovno površino"
#: ../js/ui/windowMenu.js:136
#: ../js/ui/windowMenu.js:127
msgid "Move to Monitor Up"
msgstr "\t"
#: ../js/ui/windowMenu.js:142
#: ../js/ui/windowMenu.js:133
msgid "Move to Monitor Down"
msgstr "Premakni na zaslon spodaj"
#: ../js/ui/windowMenu.js:148
#: ../js/ui/windowMenu.js:139
msgid "Move to Monitor Left"
msgstr "Premakni na zaslon levo"
#: ../js/ui/windowMenu.js:154
#: ../js/ui/windowMenu.js:145
msgid "Move to Monitor Right"
msgstr "Premakni na zaslon desno"
@@ -1598,11 +1590,11 @@ msgstr "Neznano"
msgid "Failed to launch “%s”"
msgstr "Zaganjanje “%s” je spodletelo"
#: ../src/shell-keyring-prompt.c:742
#: ../src/shell-keyring-prompt.c:714
msgid "Passwords do not match."
msgstr "Gesli se ne skladata."
#: ../src/shell-keyring-prompt.c:750
#: ../src/shell-keyring-prompt.c:722
msgid "Password cannot be blank"
msgstr "Geslo ne more biti prazno"