Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
P
Pardus APT Update Indicator - GNOME Shell Extension
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Erdem Ersoy
Pardus APT Update Indicator - GNOME Shell Extension
Commits
27fb5d63
Kaydet (Commit)
27fb5d63
authored
Ara 02, 2016
tarafından
franglais125
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Finalize the password-less check for updates
üst
10285df8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
3 deletions
+134
-3
extension.js
extension.js
+13
-2
prefs.js
prefs.js
+15
-0
prefs.xml
prefs.xml
+94
-1
org.gnome.shell.extensions.apt-update-indicator.gschema.xml
...g.gnome.shell.extensions.apt-update-indicator.gschema.xml
+12
-0
No files found.
extension.js
Dosyayı görüntüle @
27fb5d63
...
...
@@ -137,6 +137,7 @@ const AptUpdateIndicator = new Lang.Class({
},
_applySettings
:
function
()
{
// Parse the various commands
if
(
this
.
_settings
.
get_string
(
'update-cmd'
)
!==
""
)
UPDATE_CMD
=
PREPEND_CMD
+
this
.
_settings
.
get_string
(
'update-cmd'
);
else
...
...
@@ -147,14 +148,24 @@ const AptUpdateIndicator = new Lang.Class({
else
CHECK_CMD
=
PREPEND_CMD
+
STOCK_CHECK_CMD
;
if
(
this
.
_settings
.
get_boolean
(
'allow-no-passwd'
))
CHECK_CMD
=
this
.
_settings
.
get_string
(
'check-cmd-no-passwd'
);
// Remove the periodic check before adding a new one
if
(
this
.
_TimeoutId
)
GLib
.
source_remove
(
this
.
_TimeoutId
);
let
that
=
this
;
let
CHECK_INTERVAL
=
this
.
_settings
.
get_int
(
'check-interval'
)
*
60
;
if
(
CHECK_INTERVAL
)
this
.
_TimeoutId
=
GLib
.
timeout_add_seconds
(
GLib
.
PRIORITY_DEFAULT
,
CHECK_INTERVAL
,
function
(){
that
.
_checkUpdates
();});
this
.
_TimeoutId
=
GLib
.
timeout_add_seconds
(
GLib
.
PRIORITY_DEFAULT
,
CHECK_INTERVAL
,
function
()
{
that
.
_checkUpdates
();
return
true
;
});
// Finalize application of settings
this
.
_checkShowHide
();
},
...
...
prefs.js
Dosyayı görüntüle @
27fb5d63
...
...
@@ -50,10 +50,25 @@ function buildPrefsWidget(){
settings
.
bind
(
'transient'
,
buildable
.
get_object
(
'field_transient'
),
'active'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'strip-versions'
,
buildable
.
get_object
(
'field_stripversions'
)
,
'active'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'check-cmd'
,
buildable
.
get_object
(
'field_checkcmd'
)
,
'text'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'check-cmd-no-passwd'
,
buildable
.
get_object
(
'field_checkcmd_no_password'
)
,
'text'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'allow-no-passwd'
,
buildable
.
get_object
(
'checkcmd_no_password_checkbutton'
)
,
'active'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'allow-no-passwd'
,
buildable
.
get_object
(
'field_checkcmd_no_password'
)
,
'sensitive'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'update-cmd'
,
buildable
.
get_object
(
'field_updatecmd'
)
,
'text'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
settings
.
bind
(
'auto-expand-list'
,
buildable
.
get_object
(
'field_autoexpandlist'
),
'value'
,
Gio
.
SettingsBindFlags
.
DEFAULT
);
box
.
show_all
();
buildable
.
get_object
(
'reset_button'
).
connect
(
'clicked'
,
Lang
.
bind
(
this
,
function
()
{
// restore default settings for the relevant keys
let
keys
=
[
'update-cmd'
,
'check-cmd'
,
'allow-no-passwd'
,
'check-cmd-no-passwd'
];
keys
.
forEach
(
function
(
val
)
{
settings
.
set_value
(
val
,
settings
.
get_default_value
(
val
));
},
this
);
}));
return
box
;
};
prefs.xml
Dosyayı görüntüle @
27fb5d63
...
...
@@ -23,7 +23,7 @@
</object>
<object
class=
"GtkAdjustment"
id=
"Adjust_2"
>
<property
name=
"lower"
>
0
</property>
<property
name=
"upper"
>
2
000
</property>
<property
name=
"upper"
>
100
000
</property>
<property
name=
"step_increment"
>
5
</property>
</object>
<object
class=
"GtkAdjustment"
id=
"Adjust_3"
>
...
...
@@ -282,6 +282,30 @@
<property
name=
"row-homogeneous"
>
false
</property>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkBox"
>
<property
name=
"spacing"
>
12
</property>
<child>
<object
class=
"GtkLabel"
>
<property
translatable=
"yes"
name=
"label"
>
Reset to default values
</property>
<property
name=
"hexpand"
>
true
</property>
<property
name=
"halign"
>
1
</property>
<attributes>
<attribute
name=
"weight"
value=
"PANGO_WEIGHT_BOLD"
/>
</attributes>
</object>
</child>
<child>
<object
class=
"GtkButton"
id=
"reset_button"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"label"
>
Reset
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkVBox"
>
<property
name=
"spacing"
>
6
</property>
...
...
@@ -314,8 +338,77 @@
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkGrid"
>
<child>
<object
class=
"GtkLabel"
>
<property
name=
"label"
translatable=
"yes"
>
Check for updates without a password. Please read the wiki for instructions:
</property>
<property
name=
"hexpand"
>
true
</property>
<property
name=
"wrap"
>
True
</property>
<property
name=
"halign"
>
1
</property>
</object>
<packing>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"left_attach"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLinkButton"
id=
"homepage_link"
>
<property
name=
"label"
translatable=
"yes"
>
Wiki
</property>
<property
name=
"hexpand"
>
true
</property>
<property
name=
"halign"
>
1
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"events"
/>
<property
name=
"relief"
>
none
</property>
<property
name=
"uri"
>
https://github.com/franglais125/apt-update-indicator/wiki
</property>
</object>
<packing>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"left_attach"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"checkcmd_no_password_checkbutton"
>
<property
name=
"label"
translatable=
"yes"
>
Enabled
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"draw_indicator"
>
True
</property>
<property
name=
"margin_top"
>
12
</property>
</object>
<packing>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"left_attach"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkVBox"
>
<property
name=
"spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
>
<property
name=
"label"
translatable=
"yes"
>
Command to check for updates with no password
</property>
<property
name=
"hexpand"
>
true
</property>
<property
name=
"halign"
>
1
</property>
</object>
</child>
<child>
<object
class=
"GtkEntry"
id=
"field_checkcmd_no_password"
>
</object>
</child>
</object>
<packing>
<property
name=
"top_attach"
>
3
</property>
<property
name=
"left_attach"
>
0
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
...
...
schemas/org.gnome.shell.extensions.apt-update-indicator.gschema.xml
Dosyayı görüntüle @
27fb5d63
...
...
@@ -56,6 +56,18 @@
<description>
Command to run to check for updated packages.
</description>
</key>
<key
name=
"allow-no-passwd"
type=
"b"
>
<default>
false
</default>
<summary>
Allow checks for updates without a passwrd
</summary>
<description></description>
</key>
<key
name=
"check-cmd-no-passwd"
type=
"s"
>
<default>
"/usr/bin/sudo /usr/local/bin/updater"
</default>
<summary>
Command to run to check for updates without password.
</summary>
<description>
Command to run to check for updates without passowrd.
</description>
</key>
<key
name=
"update-cmd"
type=
"s"
>
<default>
"apt upgrade -y"
</default>
<summary>
Command to run to update packages.
</summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment