Commit 18df8e1b authored by Michael Liang's avatar Michael Liang

Fix#927: Remove DASH from Aluno account

Signed-off-by: default avatarMichael Liang <ml09@c3sl.ufpr.br>
parent 9b9add77
// Copyright (C) 2011-2012 R M Yorston
// Licence: GPLv2+
const Lang = imports.lang;
const DBus = imports.dbus;
const St = imports.gi.St;
const Clutter = imports.gi.Clutter;
const EndSessionDialog = imports.ui.endSessionDialog;
const Main = imports.ui.main;
const UserMenu = imports.ui.userMenu;
const _f = imports.gettext.domain('frippery-shut-down-menu').gettext;
let usermenu = null;
let updateSuspendOrPowerOff;
let fakeUpdateSuspendOrPowerOff;
let originalDialogContent;
function init(extensionMeta) {
let localePath = extensionMeta.path + '/locale';
imports.gettext.bindtextdomain('frippery-shut-down-menu', localePath);
usermenu = Main.panel._statusArea['userMenu'];
if ( !usermenu ) {
return;
}
updateSuspendOrPowerOff = usermenu._updateSuspendOrPowerOff;
originalDialogContent = EndSessionDialog.DialogContent[1];
fakeUpdateSuspendOrPowerOff = function() {
this._haveSuspend = false;
this._suspendOrPowerOffItem.updateText(_f("Shut Down..."), null);
}
EndSessionDialog.EndSessionDialog.prototype._onHibernate = function() {
this._stopTimer();
this._dbusImpl.emit_signal('Canceled', null);
this.close(global.get_current_time());
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
this._upClient.hibernate_sync(null);
}));
};
EndSessionDialog.EndSessionDialog.prototype._onSuspend = function() {
this._stopTimer();
this._dbusImpl.emit_signal('Canceled', null);
this.close(global.get_current_time());
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
this._upClient.suspend_sync(null);
}));
};
EndSessionDialog.EndSessionDialog.prototype._updateButtons = function() {
let dialogContent = EndSessionDialog.DialogContent[this._type];
let buttons = [];
let usermenu = Main.panel._statusArea['userMenu'];
this._upClient = usermenu._upClient;
this._screenSaverProxy = usermenu._screenSaverProxy;
if ( dialogContent.secondaryButtons ) {
for (let i = 0; i < dialogContent.secondaryButtons.length; i++) {
let signal = dialogContent.secondaryButtons[i].signal;
let label = dialogContent.secondaryButtons[i].label;
if ( signal == 'ConfirmedHibernate' ) {
if ( this._upClient && this._upClient.get_can_hibernate() ) {
buttons.push({ action: Lang.bind(this, this._onHibernate),
label: label });
}
}
else if ( signal == 'ConfirmedSuspend' ) {
if ( this._upClient && this._upClient.get_can_suspend() ) {
buttons.push({ action: Lang.bind(this, this._onSuspend),
label: label });
}
}
else {
buttons.push({ action: Lang.bind(this, function() {
this._confirm(signal);
}),
label: label });
}
}
}
buttons.push({ action: Lang.bind(this, this.cancel),
label: _("Cancel"),
key: Clutter.Escape });
for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
let signal = dialogContent.confirmButtons[i].signal;
let label = dialogContent.confirmButtons[i].label;
buttons.push({ action: Lang.bind(this, function() {
this._confirm(signal);
}),
label: label });
}
this.setButtons(buttons);
};
}
function enable() {
const shutdownDialogContent = {
subject: C_("title", "Power Off"),
inhibitedDescription: _("Click Power Off to quit these applications and power off the system."),
uninhibitedDescription: function(seconds) {
return ngettext("The system will power off automatically in %d second.",
"The system will power off automatically in %d seconds.",
seconds).format(seconds);
},
endDescription: _("Powering off the system."),
secondaryButtons: [{ signal: 'ConfirmedSuspend',
label: _("Suspend") },
{ signal: 'ConfirmedHibernate',
label: _f("Hibernate") },
{ signal: 'ConfirmedReboot',
label: C_("button", "Restart") }],
confirmButtons: [{ signal: 'ConfirmedShutdown',
label: C_("button", "Power Off") }],
iconName: 'system-shutdown',
iconStyleClass: 'end-session-dialog-shutdown-icon'
};
if ( usermenu ) {
usermenu._updateSuspendOrPowerOff = fakeUpdateSuspendOrPowerOff;
EndSessionDialog.DialogContent[1] = shutdownDialogContent;
usermenu._updateSuspendOrPowerOff();
}
}
function disable() {
if ( usermenu ) {
usermenu._updateSuspendOrPowerOff = updateSuspendOrPowerOff;
EndSessionDialog.DialogContent[1] = originalDialogContent;
usermenu._updateSuspendOrPowerOff();
}
}
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Skakel af..."
msgid "Hibernate"
msgstr "Hiberneer"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "أطفئ..."
msgid "Hibernate"
msgstr "أسبِت"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "বন্ধ কৰক..."
msgid "Hibernate"
msgstr "নিদ্ৰিত অৱস্থা"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Apagar..."
msgid "Hibernate"
msgstr "Ivernar"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Выключыць…"
msgid "Hibernate"
msgstr "Усыпіць"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Vyklučeńnie kamputara..."
msgid "Hibernate"
msgstr "Zhibernuj"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Изключване на компютъра…"
msgid "Hibernate"
msgstr "Дълбоко приспиване"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "বন্ধ করুন..."
msgid "Hibernate"
msgstr "সুপ্ত করা"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "বন্ধ করুন..."
msgid "Hibernate"
msgstr "নিদ্রিত অবস্থা"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Lazhañ..."
msgid "Hibernate"
msgstr "Goañviñ"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Atura..."
msgid "Hibernate"
msgstr "Hiberna"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Atura..."
msgid "Hibernate"
msgstr "Hiberna"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Qapat..."
msgid "Hibernate"
msgstr "Yuqlat"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Vypnout..."
msgid "Hibernate"
msgstr "Uspat na disk"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Cau i Lawr..."
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Sluk..."
msgid "Hibernate"
msgstr "Dvale"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Ausschalten …"
msgid "Hibernate"
msgstr "Ruhezustand"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "སྒོ་བསྡམས་..."
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Κλείσιμο..."
msgid "Hibernate"
msgstr "Αδρανοποίηση"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "𐑖𐑳𐑑 𐑛𐑬𐑯..."
msgid "Hibernate"
msgstr "𐑣𐑲𐑚𐑼𐑯𐑱𐑑"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Shut Down…"
msgid "Hibernate"
msgstr "Hibernate"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Elŝalti..."
msgid "Hibernate"
msgstr "Pasivumigi"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Apagar…"
msgid "Hibernate"
msgstr "Hibernar"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Väljalülitamine..."
msgid "Hibernate"
msgstr "Alusta talveund"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Itzali..."
msgid "Hibernate"
msgstr "Hibernatu"
#, fuzzy
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Shut Down..."
msgstr "Sammuta…"