Skip to content

Commit

Permalink
remove convenience.js, clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
biji committed Mar 3, 2022
1 parent 1025e6a commit 5f1cbc7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 137 deletions.
92 changes: 0 additions & 92 deletions convenience.js

This file was deleted.

8 changes: 4 additions & 4 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const ByteArray = imports.byteArray;

const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;

const PREFS_SCHEMA = 'org.gnome.shell.extensions.simplenetspeed';
const refreshTime = 3;
Expand Down Expand Up @@ -38,7 +37,7 @@ function changeMode(widget, event) {
fontmode=0;
}
settings.set_int('fontmode', fontmode);
button.set_child(chooseLabel());
chooseLabel();
parseStat();
}
else if (event.get_button() == 1) {
Expand All @@ -47,7 +46,7 @@ function changeMode(widget, event) {
mode = 0;
}
settings.set_int('mode', mode);
button.set_child(chooseLabel());
chooseLabel();
parseStat();
}
log('mode:' + mode + ' font:' + fontmode);
Expand Down Expand Up @@ -173,7 +172,7 @@ function speedToString(amount) {
}

function enable() {
settings = Convenience.getSettings(PREFS_SCHEMA);
settings = ExtensionUtils.getSettings(PREFS_SCHEMA);

mode = settings.get_int('mode'); // default mode using bit (bps, kbps)
fontmode = settings.get_int('fontmode');
Expand Down Expand Up @@ -208,5 +207,6 @@ function disable() {
timeout = null;
Main.panel._rightBox.remove_child(button);
button.destroy();
settings = button = ioSpeed = null;
}
}
19 changes: 1 addition & 18 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
"description": "Simply showing network speed. Left click to change modes:\n\n1. Total net speed in bits per second\n2. Total net speed in Bytes per second\n3. Up & down speed in bits per second\n4. Up & down speed in Bytes per second\n5. Total of downloaded in Bytes (Right click to reset counter)\n\nMiddle click to change font size",
"name": "Simple net speed",
"shell-version": [
"3.14",
"3.15",
"3.16",
"3.17",
"3.18",
"3.19",
"3.20",
"3.21",
"3.22",
"3.23",
"3.24",
"3.25",
"3.26",
"3.27",
"3.28",
"3.29",
"3.30",
"3.32",
"3.34",
"3.36",
Expand All @@ -29,5 +12,5 @@
],
"url": "https://github.com/biji/simplenetspeed",
"uuid": "[email protected]",
"version": 23
"version": 24
}
33 changes: 10 additions & 23 deletions stylesheet.css
Original file line number Diff line number Diff line change
@@ -1,92 +1,79 @@
.simplenetspeed-label {
width: 7em;
min-width: 7em;
text-align: right;
margin-left: 1px;
margin-right: 2px;
font-size: 1em;
}

.simplenetspeed-label-w {
width: 12em;
min-width: 13em;
text-align: right;
margin-left: 1px;
margin-right: 1px;
font-size: 1em;
}

.simplenetspeed-label-1 {
width: 7em;
min-width: 7em;
text-align: right;
margin-left: 1px;
margin-right: 2px;
font-size: .65em;
}

.simplenetspeed-label-w-1 {
width: 12em;
min-width: 13em;
text-align: right;
margin-left: 1px;
margin-right: 1px;
font-size: .65em;
}

.simplenetspeed-label-2 {
width: 7em;
min-width: 7em;
text-align: right;
margin-left: 1px;
margin-right: 2px;
font-size: .7em;
}

.simplenetspeed-label-w-2 {
width: 12em;
min-width: 13em;
text-align: right;
margin-left: 1px;
margin-right: 1px;
font-size: .7em;
}

.simplenetspeed-label-3 {
width: 7em;
min-width: 7em;
text-align: right;
margin-left: 1px;
margin-right: 2px;
font-size: .9em;
}

.simplenetspeed-label-w-3 {
width: 12em;
min-width: 13em;
text-align: right;
margin-left: 1px;
margin-right: 1px;
font-size: .9em;
}

.simplenetspeed-label-4 {
width: 7em;
min-width: 7em;
text-align: right;
margin-left: 1px;
margin-right: 2px;
font-size: 1.1em;
}

.simplenetspeed-label-w-4 {
width: 12em;
min-width: 13em;
text-align: right;
margin-left: 1px;
margin-right: 1px;
font-size: 1.1em;
}

/*.simplenetspeed-static-icon {
font-size: 14px;
width: 15px;
text-align: left;
}
.simplenetspeed-icon {
font-size: 12px;
width: 14px;
text-align: center;
color: lime;
}*/

0 comments on commit 5f1cbc7

Please sign in to comment.