Commit 16863f6c authored by Michael Liang's avatar Michael Liang
Browse files

le-interface: change thunderbird to evolution


Signed-off-by: default avatarMichael Liang <ml09@c3sl.ufpr.br>
parent fd05e6c0
/*
********************************************************************************
* This code is written by Red Hat, and modified by C3SL for the development of *
* LE5. *
********************************************************************************
*/
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const GLib = imports.gi.GLib;
......@@ -184,41 +178,32 @@ const DateMenuButton = new Lang.Class({
let clockFormat;
let dateFormat;
switch (format) {
case '24h':
if (showDate)
/* Translators: This is the time format with date used
in 24-hour mode. */
// clockFormat = showSeconds ? _("%a %b %e, %R:%S")
// : _("%a %b %e, %R");
clockFormat = showSeconds ? _("%A %B %e, %R:%S")
: _("%e/%m/%Y %R");
//: _("%A, %e %B %Y\n %R");
clockFormat = showSeconds ? _("%a %b %e, %R:%S")
: _("%a %b %e, %R");
else
/* Translators: This is the time format without date used
in 24-hour mode. */
// clockFormat = showSeconds ? _("%a %R:%S")
// : _("%a %R");
clockFormat = showSeconds ? _("%A %R:%S")
: _("%e/%m/%Y %R");
clockFormat = showSeconds ? _("%a %R:%S")
: _("%a %R");
break;
case '12h':
default:
if (showDate)
/* Translators: This is a time format with date used
for AM/PM. */
//clockFormat = showSeconds ? _("%a %b %e, %l:%M:%S %p")
// : _("%a %b %e, %l:%M %p");
clockFormat = showSeconds ? _("%A %B %e, %l:%M:%S %p")
: _("%e/%m/%Y %R");
clockFormat = showSeconds ? _("%a %b %e, %l:%M:%S %p")
: _("%a %b %e, %l:%M %p");
else
/* Translators: This is a time format without date used
for AM/PM. */
//clockFormat = showSeconds ? _("%a %l:%M:%S %p")
// : _("%a %l:%M %p");
clockFormat = showSeconds ? _("%A %l:%M:%S %p")
: _("%e/%m/%Y %R");
clockFormat = showSeconds ? _("%a %l:%M:%S %p")
: _("%a %l:%M %p");
break;
}
......@@ -230,8 +215,8 @@ const DateMenuButton = new Lang.Class({
* shown - it is shown just below the time in the shell (e.g. "Tue 9:29 AM").
*/
dateFormat = _("%A %B %e, %Y");
this._date.set_text(displayDate.toLocaleFormat(dateFormat));
/* this._clock.set_text(displayDate.toLocaleFormat(_("%A %d %B %Y \n %H:%M %p")));*/
this._date.set_text(displayDate.toLocaleFormat(dateFormat));
Mainloop.timeout_add_seconds(1, Lang.bind(this, this._updateClockAndDate));
return false;
},
......@@ -240,9 +225,9 @@ const DateMenuButton = new Lang.Class({
this.menu.close();
let calendarSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.office.calendar' });
let tool = calendarSettings.get_string('exec');
if (tool.length == 0 || tool == 'thunderbird') {
if (tool.length == 0 || tool == 'evolution') {
// TODO: pass the selected day
Util.spawn(['thunderbird']);
Util.spawn(['evolution', '-c', 'calendar']);
} else {
let needTerm = calendarSettings.get_boolean('needs-term');
if (needTerm) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment