Commit Graph
305 Commits
Author SHA1 Message Date
alfrix 2c582acc7b memory leak fix
the leak started in v0.2.9 (e1ea41f147) with the addition of del self.panel[panel].
del cannot be called on self.panels because some panels have bound methods that prevent them from being collected by the gc.
so, instead of trying to remove them, reinitialize the panels if it's needed (before v0.2.9 initialize was always called, so it's still better than it was)
at the moment leaving the panels on memory doesn't seem like a big issue, once all panels are loaded memory should remain stable

fixes #1019
fixes #1008
2023-06-21 16:10:29 -03:00
alfrix 92ed72e48b fix panel removal not working correctly
previous fix addresed the leaking memory, but created more issues:
fixes #1012
fixes #1015
fixes #1017
2023-06-16 14:11:10 -03:00
alfrix 4920720c99 return False on Glib functions 2023-06-16 10:05:43 -03:00
alfrix 2241b54153 use only one jinja env
slightly improves performance
2023-06-16 10:05:24 -03:00
alfrix 8a29b6e125 fix not reconnecting to moonraker and prevent simultaneous reconnections
fixes #999
2023-06-13 13:39:23 -03:00
alfrix c5522b29da screen: Log resolution/size changes 2023-06-13 13:39:23 -03:00
alfrix c1d8a4f033 menu: get rid of initalize 2023-06-13 13:39:23 -03:00
alfrix ff94b45c45 close dialogs when transitioning to printing
also simplify the transition
2023-06-13 11:08:18 -03:00
alfrix 1813533bec Revert "always unload panels fixes #932" and fix it in a different way
it did not work as expected (#996) and caused other issues with macros and menus
del self.panels causes a memory leak
2023-06-13 11:07:46 -03:00
alfrix b74b1b600f screen: fix some warnings about init_check and define ind 2023-06-09 08:59:32 -03:00
alfrix 88afa50ea3 change getdefaultlocale to getlocale since it's getting deprecated in python 3.13 2023-06-06 05:34:35 -03:00
alfrix 791938d733 rework screensaver timeout should fix #992 2023-06-04 10:29:41 -03:00
alfrix 1e4885d291 do not close popups when changing state 2023-05-28 09:18:32 -06:00
alfrix c38a3273f3 fix Print panel not showing fixes #993 2023-05-27 20:53:32 -06:00
alfrix be13c1086e make the language list a menu instead of a dropdown fixes #915 2023-05-20 05:00:45 -06:00
alfrix 4db7fd288c always clear the popup timer fixes #967 2023-05-20 03:12:52 -06:00
alfrix 3dc535f8fb always unload panels fixes #932 2023-05-20 02:59:06 -06:00
alfrix 49d910af2b fix popup timer close #946 2023-05-09 07:51:09 -06:00
Jookiaandalfrix 5f3827a2cb screen: Only switch layouts if the window has been majorly resized (#913)
* screen: Only switch layouts if the window has been majorly resized

Changing the layout can cause the window to resize on some systems.
This can create a feedback loop on systems with square displays.

Keep track of the vertical aspect ratio associated with the current
mode and only switch between vertical and horizontal mode when a
significant aspect ratio change has been detected.

* fixup

---------

Co-authored-by: alfrix <alfredomonclus@gmail.com>
2023-03-17 07:49:28 -06:00
alfrix 0f0c6f9b6e always maintain printers data, should avoid a bunch of issues 2023-03-09 07:32:46 -06:00
alfrix e426b06b8b lint fix 2023-02-13 21:10:53 -06:00
alfrix c722674918 fix popup word wrap 2023-02-13 21:08:21 -06:00
alfrix a6bb0fd02e zcalibrate: fix dialog loop, fix popup errors not showing at end #844 2023-02-06 18:27:35 -06:00
alfrix f31ae7a829 hide popups from panel initialization
ideally the initialization should not contain this commands but at the moment klipper nor moonraker provide a way to identify the required status
2022-12-11 09:17:18 -03:00
alfrix 7120c424d4 gtk: resizability
doesn't rescale the fonts or images
2022-12-11 09:17:18 -03:00
alfrix 413e822fa5 screen: separate matchbox-keyboard 2022-12-11 09:17:18 -03:00
alfrix 75c716f9a1 screen: convert state execute into a function since it doesn't depend on self 2022-12-11 09:17:18 -03:00
alfrix 41a8ebf084 print: add move/rename, make delete a visible button close #636 2022-12-11 09:17:18 -03:00
alfrix 06bf269862 feat: turn on_off power devices with the screensaver close #518 2022-12-05 12:31:44 -03:00
alfrix 904dd24c10 tempstore get the max length configured in moonraker 2022-12-04 13:56:33 -03:00
alfrix 02b69d0d39 theme fix ks using dark theme on desktop 2022-12-04 11:27:12 -03:00
alfrix de252643c1 do not change the state directly from the callback because it causes double initialization issues 2022-12-04 01:08:58 -03:00
alfrix 548fc4de69 do more cleanups while changing printers 2022-12-04 01:08:58 -03:00
alfrix 72599b5ba7 moonraker tempstore takes a while to register device changes, call it again after a few seconds
with this change there should be no need to reinit on every state change, this was the cause of missing devices after init
2022-12-04 01:07:58 -03:00
northcoastam fcb6861119 Fix not starting on Wayland
fix #829
2022-12-03 15:51:02 -03:00
alfrix 34a9151910 warn about dpms failures 2022-12-03 15:46:26 -03:00
alfrix 683b72ab20 simplify keyboard calls 2022-12-03 15:46:26 -03:00
alfrix 7651b892b8 print: allow directory deletion 2022-12-01 13:27:31 -03:00
alfrix 8ebc855ddd improve the speed of the updates, also affects showing panels 2022-11-30 19:45:49 -03:00
alfrix 9de058b0d7 dialogs: set title 2022-11-30 11:51:24 -03:00
alfrix 79afa3620a fix error modal for job_status 2022-11-30 11:00:10 -03:00
alfrix d161c3f1e4 splash_screen: use initialized for klipper restart buttons 2022-11-30 11:00:10 -03:00
alfrix ec86403056 create attach panel 2022-11-30 11:00:10 -03:00
alfrix b1a6d5c182 improve panel initialization
just make a notify_status_update from printer data, it's much simpler
2022-11-30 11:00:10 -03:00
alfrix d6161539a6 Update translation add japanese thanks to yhira1023 2022-11-28 11:57:12 -03:00
alfrix 217b185730 try to restart ks if an update fails to restart it 2022-11-27 19:38:03 -03:00
alfrix 741d9b654d restart ks on error, do not warn on ks restart when changing options
i don't see it necessary ks can be restarted while printing it will generate a bit of load but shouldn't be a problem, i've done it too many times at this point
2022-11-27 14:30:28 -03:00
alfrix 959f7e3401 disable backspace return if keyboard is open 2022-11-26 15:57:50 -03:00
alfrix f8cde7bfe1 Add busy state, and disable buttons that usually take time during the state 2022-11-26 00:17:30 -03:00
alfrix 9604c159b5 fix file permissions 2022-11-25 15:50:33 -03:00