Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
System Monitoring Center
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
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Kayıtlar (commit)
Kenar çubuğunu aç
Hakan Dündar
System Monitoring Center
Commits
3eb4d554
Kaydet (Commit)
3eb4d554
authored
Kas 20, 2022
tarafından
Hakan Dündar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix: Application crash after changing remembering last tabs
üst
1ee66745
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
33 deletions
+32
-33
MainWindow.py
src/MainWindow.py
+15
-16
SettingsWindow.py
src/SettingsWindow.py
+16
-16
__version__
src/__version__
+1
-1
No files found.
src/MainWindow.py
Dosyayı görüntüle @
3eb4d554
...
...
@@ -16,7 +16,7 @@ from Config import Config
from
Performance
import
Performance
class
MainWindow
(
Gtk
.
ApplicationWindow
):
class
MainWindow
():
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
()
.
__init__
(
*
args
,
**
kwargs
)
...
...
@@ -56,18 +56,6 @@ class MainWindow(Gtk.ApplicationWindow):
# Connect GUI signals
self
.
main_gui_connect_signals
()
# Run main tab function after main window is shown (this function is also called when main tab togglebuttons are toggled).
self
.
main_gui_tab_switch
()
# Start the main loop function
self
.
main_gui_tab_loop
()
# Hide Services tab if systemd is not used on the system.
self
.
main_gui_hide_services_tab
()
# Check for updates (Python package only)
self
.
main_gui_check_for_updates
()
def
main_gui_main_window
(
self
):
"""
...
...
@@ -75,7 +63,7 @@ class MainWindow(Gtk.ApplicationWindow):
"""
# Application window
self
.
main_window
=
self
self
.
main_window
=
Gtk
.
ApplicationWindow
()
#self.main_window.set_default_size(670, 570)
self
.
main_window
.
set_size_request
(
670
,
570
)
self
.
main_window
.
set_title
(
_tr
(
"System Monitoring Center"
))
...
...
@@ -626,7 +614,18 @@ class MainWindow(Gtk.ApplicationWindow):
Some functions (such as hardware selection, performance backround function, etc.)
are run after main window is shown in order to reduce window display delay.
"""
pass
# Run main tab function after main window is shown (this function is also called when main tab togglebuttons are toggled).
self
.
main_gui_tab_switch
()
# Start the main loop function
self
.
main_gui_tab_loop
()
# Hide Services tab if systemd is not used on the system.
self
.
main_gui_hide_services_tab
()
# Check for updates (Python package only)
self
.
main_gui_check_for_updates
()
def
main_gui_main_menu
(
self
):
...
...
@@ -1068,7 +1067,7 @@ class MainWindow(Gtk.ApplicationWindow):
# Prevent error if this is the first tab switch and there is no scrolledwindow.
except
AttributeError
:
pass
tooltip_text
=
"-"
# Define variables for device list, selected device number and row number to be used for
# adding scrolledwindow into the grid.
performance_tab_current_sub_tab
=
Config
.
performance_tab_current_sub_tab
...
...
src/SettingsWindow.py
Dosyayı görüntüle @
3eb4d554
...
...
@@ -383,15 +383,15 @@ class SettingsWindow:
# Get currently opened tabs and save them if preferred.
if
widget
.
get_active
()
==
True
:
Config
.
remember_last_opened_tabs_on_application_start
=
1
self
.
combobox2003
.
set_sensitive
(
False
)
self
.
combobox2004
.
set_sensitive
(
False
)
self
.
default_main_tab_cmb
.
set_sensitive
(
False
)
self
.
default_sub_tab_cmb
.
set_sensitive
(
False
)
self
.
settings_gui_default_tab_func
()
# Set setting for not remembering las opened tabs if preferred.
if
widget
.
get_active
()
==
False
:
Config
.
remember_last_opened_tabs_on_application_start
=
0
self
.
combobox2003
.
set_sensitive
(
True
)
self
.
combobox2004
.
set_sensitive
(
True
)
self
.
default_main_tab_cmb
.
set_sensitive
(
True
)
self
.
default_sub_tab_cmb
.
set_sensitive
(
True
)
Config
.
config_save_func
()
...
...
@@ -799,30 +799,30 @@ class SettingsWindow:
# ----------------------- Called for saving default main tab and performace tab sub-tab when "Remember last opened tabs" option is enabled -----------------------
def
settings_gui_default_tab_func
(
self
):
if
MainWindow
.
radiobutton1
.
get_active
()
==
True
:
if
MainWindow
.
performance_tb
.
get_active
()
==
True
:
Config
.
default_main_tab
=
0
elif
MainWindow
.
radiobutton2
.
get_active
()
==
True
:
elif
MainWindow
.
processes_tb
.
get_active
()
==
True
:
Config
.
default_main_tab
=
1
elif
MainWindow
.
radiobutton3
.
get_active
()
==
True
:
elif
MainWindow
.
users_tb
.
get_active
()
==
True
:
Config
.
default_main_tab
=
2
elif
MainWindow
.
radiobutton6
.
get_active
()
==
True
:
elif
MainWindow
.
services_tb
.
get_active
()
==
True
:
Config
.
default_main_tab
=
3
elif
MainWindow
.
radiobutton8
.
get_active
()
==
True
:
elif
MainWindow
.
system_tb
.
get_active
()
==
True
:
Config
.
default_main_tab
=
4
if
MainWindow
.
radiobutton1007
.
get_active
()
==
True
:
if
MainWindow
.
summary_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
0
elif
MainWindow
.
radiobutton1001
.
get_active
()
==
True
:
elif
MainWindow
.
cpu_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
1
elif
MainWindow
.
radiobutton1002
.
get_active
()
==
True
:
elif
MainWindow
.
memory_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
2
elif
MainWindow
.
radiobutton1003
.
get_active
()
==
True
:
elif
MainWindow
.
disk_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
3
elif
MainWindow
.
radiobutton1004
.
get_active
()
==
True
:
elif
MainWindow
.
network_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
4
elif
MainWindow
.
radiobutton1005
.
get_active
()
==
True
:
elif
MainWindow
.
gpu_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
5
elif
MainWindow
.
radiobutton1006
.
get_active
()
==
True
:
elif
MainWindow
.
sensors_tb
.
get_active
()
==
True
:
Config
.
performance_tab_default_sub_tab
=
6
...
...
src/__version__
Dosyayı görüntüle @
3eb4d554
2.0.
0
2.0.
1
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