-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'linuxmint:master' into master
- Loading branch information
Showing
30 changed files
with
867 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,7 @@ def process_po(path_to_po: str, po_info: list, uuid: str) -> CapturedOutput: | |
content = po.read() | ||
content = content.replace('SOME DESCRIPTIVE TITLE.', name) | ||
content = content.replace('FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.', f'{po_author}, {year}') | ||
content = content.replace('#: ', '#. ') | ||
po.seek(0) | ||
po.write(content) | ||
po.truncate() | ||
|
@@ -213,6 +214,8 @@ def make_pot(uuid: str) -> CapturedOutput: | |
|
||
if os.path.exists(pot_file_path): | ||
pot_file_path.chmod(0o0644) | ||
else: | ||
return output | ||
|
||
# Extract translatable strings from glade | ||
glade_list = glob('**/*.glade', recursive=True, root_dir=output_dir) | ||
|
@@ -294,6 +297,7 @@ def make_pot(uuid: str) -> CapturedOutput: | |
content = content.replace('YEAR-MO-DA HO:MI+ZONE', '') | ||
content = content.replace('FULL NAME <EMAIL@ADDRESS>', '') | ||
content = content.replace('LANGUAGE <[email protected]>', '') | ||
content = content.replace('#: ', '#. ') | ||
po.seek(0) | ||
po.write(content) | ||
po.truncate() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,74 @@ | ||
const St = imports.gi.St; | ||
const Desklet = imports.ui.desklet; | ||
const Lang = imports.lang; | ||
const GLib = imports.gi.GLib; | ||
const Util = imports.misc.util; | ||
const Gettext = imports.gettext; | ||
|
||
const uuid = "mintoo@sujitagarwal"; | ||
|
||
Gettext.bindtextdomain(uuid, GLib.get_home_dir() + "/.local/share/locale") | ||
Gettext.bindtextdomain(uuid, GLib.get_home_dir() + "/.local/share/locale"); | ||
|
||
function _(str) { | ||
return Gettext.dgettext(uuid, str); | ||
return Gettext.dgettext(uuid, str); | ||
} | ||
|
||
function MintooDesklet(metadata) { | ||
this._init(metadata); | ||
} | ||
class MintooDesklet extends Desklet.Desklet { | ||
constructor(metadata) { | ||
super(metadata); | ||
this.metadata = metadata; | ||
this.uuid = this.metadata["uuid"]; | ||
|
||
MintooDesklet.prototype = { | ||
__proto__: Desklet.Desklet.prototype, | ||
this._createUI(); | ||
} | ||
|
||
_init: function (metadata) { | ||
Desklet.Desklet.prototype._init.call(this, metadata); | ||
_createUI() { | ||
this._container = new St.BoxLayout({ vertical: true, style_class: "mintoo-main-container" }); | ||
|
||
this.metadata = metadata; | ||
this.uuid = this.metadata["uuid"]; | ||
this._row1 = new St.BoxLayout({ style_class: "mintoo-row-container" }); | ||
this._row2 = new St.BoxLayout({ style_class: "mintoo-row-container" }); | ||
|
||
this._container = new St.BoxLayout({vertical:true, style_class: "MintooMainContainer"}); | ||
this._row1 = new St.BoxLayout({style_class: "MintooRowContainer"}); | ||
this._row2 = new St.BoxLayout({style_class: "MintooRowContainer"}); | ||
this._mintoolabel = new St.Label({ style_class: "mintoo-button-move" }); | ||
|
||
this._mintoolabel = new St.Label({style_class: "MintooButtonMove"}); | ||
this._container.add(this._mintoolabel); | ||
const buttonSettings = [ | ||
{ className: "mintoo-button mintoo-button-one", action: this._lockClickAction }, | ||
{ className: "mintoo-button mintoo-button-two", action: this._logoutClickAction }, | ||
{ className: "mintoo-button mintoo-button-three", action: this._shutdownClickAction }, | ||
{ className: "mintoo-button mintoo-button-four", action: this._rebootClickAction } | ||
]; | ||
|
||
this._btnLockDesktop = new St.Button({style_class: "MintooButtonOne"}); | ||
this._btnLogoutSession = new St.Button({style_class: "MintooButtonTwo"}); | ||
this._btnLogoutSession.connect("clicked", Lang.bind(this, this._logoutClickAction)); | ||
this._btnLockDesktop.connect("clicked", Lang.bind(this, this._lockClickAction)); | ||
buttonSettings.forEach((btn, index) => { | ||
const button = new St.Button({ style_class: btn.className }); | ||
button.connect("clicked", btn.action.bind(this)); | ||
if (index < 2) { | ||
this._row1.add(button); | ||
} else { | ||
this._row2.add(button); | ||
} | ||
}); | ||
|
||
this._row1.add(this._btnLockDesktop); | ||
this._row1.add(this._btnLogoutSession); | ||
this._container.add(this._row1); | ||
|
||
this._btnShutdown = new St.Button({style_class: "MintooButtonThree"}); | ||
this._btnReboot = new St.Button({style_class: "MintooButtonFour"}); | ||
this._btnShutdown.connect("clicked", Lang.bind(this, this._shutdownClickAction)); | ||
this._btnReboot.connect("clicked", Lang.bind(this, this._rebootClickAction)); | ||
this._row2.add(this._btnShutdown); | ||
this._row2.add(this._btnReboot); | ||
this._container.add(this._row2); | ||
|
||
this.setContent(this._container); | ||
}, | ||
} | ||
|
||
_lockClickAction: function () { | ||
_lockClickAction() { | ||
Util.spawnCommandLine("cinnamon-screensaver-command -l"); | ||
}, | ||
} | ||
|
||
_logoutClickAction: function () { | ||
_logoutClickAction() { | ||
Util.spawnCommandLine("cinnamon-session-quit --logout"); | ||
}, | ||
} | ||
|
||
_shutdownClickAction: function () { | ||
_shutdownClickAction() { | ||
Util.spawnCommandLine("cinnamon-session-quit --power-off"); | ||
}, | ||
} | ||
|
||
_rebootClickAction: function () { | ||
_rebootClickAction() { | ||
Util.spawnCommandLine("cinnamon-session-quit --reboot"); | ||
} | ||
} | ||
|
||
function main(metadata, desklet_id) { | ||
let desklet = new MintooDesklet(metadata, desklet_id); | ||
return desklet; | ||
function main(metadata) { | ||
return new MintooDesklet(metadata); | ||
} |
Binary file modified
BIN
+20.3 KB
(2900%)
mintoo@sujitagarwal/files/mintoo@sujitagarwal/image/logout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified
BIN
+22.4 KB
(1800%)
mintoo@sujitagarwal/files/mintoo@sujitagarwal/image/reboot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
165 changes: 40 additions & 125 deletions
165
mintoo@sujitagarwal/files/mintoo@sujitagarwal/stylesheet.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,53 @@ | ||
.MintooMainContainer { | ||
min-width:92px; | ||
/* General Container Styles */ | ||
.mintoo-main-container, | ||
.mintoo-row-container { | ||
min-width: 92px; | ||
} | ||
|
||
.MintooRowContainer { | ||
min-width:92px; | ||
/* Button Base Styles */ | ||
.mintoo-button { | ||
background-color: #333333; | ||
text-decoration: none; | ||
text-indent: 0; | ||
line-height: 30px; | ||
display: inline-block; | ||
font-size: 20px; | ||
color: #ffffff; | ||
width: 30px; | ||
height: 30px; | ||
padding: 20px; | ||
border: 0 solid #aba367; | ||
background-position: 20px 20px; | ||
background-size: 32px 32px; | ||
cursor: pointer; | ||
} | ||
|
||
.MintooButtonMove { | ||
cursor:pointer; | ||
color:#ffffff; | ||
font-family:Arial; | ||
font-size: 8px; | ||
padding: 0px 16px; | ||
min-height:14px; | ||
min-width:92px; | ||
text-decoration:none; | ||
text-shadow:0px 1px 0px #2f6627; | ||
background-position: 46px -5px; | ||
background-size: 32px 32px; | ||
background-image: url('image/move.png'); | ||
margin-bottom: 5px; | ||
margin-right: 5px; | ||
cursor:move; | ||
} | ||
.MintooButtonMove:hover { | ||
background-color:#5cbf2a; | ||
.mintoo-button:hover { | ||
background-color: #5cbf2a; | ||
} | ||
|
||
.MintooButtonOne { | ||
background-color:#333333; | ||
text-decoration:none; | ||
text-indent:0px; | ||
line-height:30px; | ||
-moz-border-radius:30px 30px 0 30px; | ||
-webkit-border-radius:30px 30px 0 30px; | ||
border-radius:30px 30px 0 30px; | ||
display:inline-block; | ||
font-size:20px; | ||
color:#ffffff; | ||
width:30px; | ||
height:30px; | ||
padding:15px; | ||
border-color:#aba367; | ||
border-width:0px; | ||
border-style:solid; | ||
background-position: 15px 15px; | ||
background-size: 32px 32px; | ||
background-image: url('image/lock.png'); | ||
margin-bottom: 5px; | ||
margin-right: 5px; | ||
cursor:pointer; | ||
} | ||
.MintooButtonOne:hover { | ||
background-color:#5cbf2a; | ||
} | ||
/* Button-Specific Styles */ | ||
|
||
.MintooButtonTwo { | ||
background-color:#333333; | ||
text-decoration:none; | ||
text-indent:0px; | ||
line-height:30px; | ||
-moz-border-radius:30px 30px 30px 0; | ||
-webkit-border-radius:30px 30px 30px 0; | ||
border-radius:30px 30px 30px 0; | ||
display:inline-block; | ||
font-size:20px; | ||
color:#ffffff; | ||
width:30px; | ||
height:30px; | ||
padding:15px; | ||
border-color:#aba367; | ||
border-width:0px; | ||
border-style:solid; | ||
background-position: 15px 15px; | ||
background-size: 32px 32px; | ||
background-image: url('image/logout.png'); | ||
margin-bottom: 5px; | ||
cursor:pointer; | ||
} | ||
.MintooButtonTwo:hover { | ||
background-color:#5cbf2a; | ||
.mintoo-button-one { | ||
border-radius: 30px 30px 0 30px; | ||
background-image: url('image/lock.png'); | ||
margin-right: 10px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.MintooButtonThree { | ||
background-color:#333333; | ||
text-decoration:none; | ||
text-indent:0px; | ||
line-height:30px; | ||
-moz-border-radius:30px 0px 30px 30px; | ||
-webkit-border-radius:30px 0px 30px 30px; | ||
border-radius:30px 0px 30px 30px; | ||
display:inline-block; | ||
font-size:20px; | ||
color:#ffffff; | ||
width:30px; | ||
height:30px; | ||
padding:15px; | ||
border-color:#aba367; | ||
border-width:0px; | ||
border-style:solid; | ||
background-position: 15px 15px; | ||
background-size: 32px 32px; | ||
background-image: url('image/shutdown.png'); | ||
margin-bottom: 5px; | ||
margin-right: 5px; | ||
cursor:pointer; | ||
} | ||
.MintooButtonThree:hover { | ||
background-color:#5cbf2a; | ||
.mintoo-button-two { | ||
border-radius: 30px 30px 30px 0; | ||
background-image: url('image/logout.png'); | ||
margin-bottom: 10px; | ||
} | ||
|
||
.MintooButtonFour { | ||
background-color:#333333; | ||
text-decoration:none; | ||
text-indent:0px; | ||
line-height:30px; | ||
-moz-border-radius:0 30px 30px 30px; | ||
-webkit-border-radius:0 30px 30px 30px; | ||
border-radius:0 30px 30px 30px; | ||
display:inline-block; | ||
font-size:20px; | ||
color:#ffffff; | ||
width:30px; | ||
height:30px; | ||
padding:15px; | ||
border-color:#aba367; | ||
border-width:0px; | ||
border-style:solid; | ||
background-position: 15px 15px; | ||
background-size: 32px 32px; | ||
background-image: url('image/reboot.png'); | ||
margin-bottom: 5px; | ||
cursor:pointer; | ||
.mintoo-button-three { | ||
border-radius: 30px 0 30px 30px; | ||
background-image: url('image/shutdown.png'); | ||
margin-right: 10px; | ||
} | ||
.MintooButtonFour:hover { | ||
background-color:#5cbf2a; | ||
|
||
.mintoo-button-four { | ||
border-radius: 0 30px 30px 30px; | ||
background-image: url('image/reboot.png'); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
[email protected]/files/[email protected]/themes/modern.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* A themeable desklet that shows the time. | ||
* | ||
* Copyright (C) 2024 Gobinath | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http:*www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// Import dependencies | ||
const St = imports.gi.St; | ||
const GLib = imports.gi.GLib; | ||
imports.searchPath.unshift(GLib.get_home_dir() + "/.local/share/cinnamon/desklets/[email protected]/themes"); | ||
const Theme = imports.theme.Theme; | ||
|
||
/** | ||
* Modern theme class. | ||
*/ | ||
var ModernTheme = class ModernTheme extends Theme { | ||
|
||
constructor(config) { | ||
super(config); | ||
} | ||
|
||
getWidget() { | ||
this._clockContainer = new St.BoxLayout({ vertical: true }); | ||
|
||
this._weekday = this.createLabel("Anurati", 72, "center"); | ||
this._date = this.createLabel("Ubuntu", 20, "left"); | ||
this._time = this.createLabel("Ubuntu", 20, "right"); | ||
|
||
this._weekday.style += "font-weight: 300;"; | ||
this._date.style += "font-weight: 300; padding-top: 10px;"; | ||
this._time.style += "font-weight: 300; padding-top: 10px;"; | ||
|
||
this._clockContainer.add(this._weekday, { x_fill: false, x_align: St.Align.MIDDLE }); | ||
this._clockContainer.add(this._date, { x_fill: false, x_align: St.Align.MIDDLE }); | ||
this._clockContainer.add(this._time, { x_fill: false, x_align: St.Align.MIDDLE }); | ||
return this._clockContainer; | ||
} | ||
|
||
setDateTime(date, locale) { | ||
let time = this.to2Digit(this.is24H() ? date.getHours() : this.to12Hours(date.getHours())) + ":" + this.to2Digit(date.getMinutes()); | ||
if (!this.is24H()) { | ||
time += " " + this.toPeriod(date.getHours()); | ||
} | ||
this._weekday.set_text(this.formatDateTime(date, locale, { weekday: "long" }).toUpperCase()); | ||
this._date.set_text(this.formatDateTime(date, locale, { day: "2-digit", month: "short", year: "numeric" })); | ||
this._time.set_text("- " + time + " -"); | ||
} | ||
} |
Oops, something went wrong.