mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Remove banners when clicking close button
This commit is contained in:
parent
20f94add47
commit
3ddfa6486b
7 changed files with 76 additions and 23 deletions
|
@ -572,6 +572,10 @@ class CuraApplication(QtApplication):
|
|||
|
||||
preferences.addPreference("general/accepted_user_agreement", False)
|
||||
|
||||
preferences.addPreference("cura/market_place_show_plugin_banner", True)
|
||||
preferences.addPreference("cura/market_place_show_material_banner", True)
|
||||
preferences.addPreference("cura/market_place_show_manage_packages_banner", True)
|
||||
|
||||
for key in [
|
||||
"dialog_load_path", # dialog_save_path is in LocalFileOutputDevicePlugin
|
||||
"dialog_profile_path",
|
||||
|
@ -2011,6 +2015,33 @@ class CuraApplication(QtApplication):
|
|||
show_whatsnew_only = has_active_machine and has_app_just_upgraded
|
||||
return show_whatsnew_only
|
||||
|
||||
@pyqtSlot(result = bool)
|
||||
def shouldShowMarketPlacePluginBanner(self) -> bool:
|
||||
return self._preferences.getValue("cura/market_place_show_plugin_banner")
|
||||
|
||||
@pyqtSlot(result = bool)
|
||||
def shouldShowMarketPlaceMaterialBanner(self) -> bool:
|
||||
return self._preferences.getValue("cura/market_place_show_material_banner")
|
||||
|
||||
@pyqtSlot(result = bool)
|
||||
def shouldShowMarketPlaceManagePackagesBanner(self) -> bool:
|
||||
return self._preferences.getValue("cura/market_place_show_manage_packages_banner")
|
||||
|
||||
@pyqtSlot()
|
||||
def closeMarketPlacePluginBanner(self) -> None:
|
||||
Logger.log("i", "Close market place plugin banner")
|
||||
self._preferences.setValue("cura/market_place_show_plugin_banner", False)
|
||||
|
||||
@pyqtSlot()
|
||||
def closeMarketPlaceMaterialBanner(self) -> None:
|
||||
Logger.log("i", "Close market place material banner")
|
||||
self._preferences.setValue("cura/market_place_show_material_banner", False)
|
||||
|
||||
@pyqtSlot()
|
||||
def closeMarketPlaceManagePackagesBanner(self) -> None:
|
||||
Logger.log("i", "Close market place manage packages banner")
|
||||
self._preferences.setValue("cura/market_place_show_manage_packages_banner", False)
|
||||
|
||||
@pyqtSlot(result = int)
|
||||
def appWidth(self) -> int:
|
||||
main_window = QtApplication.getInstance().getMainWindow()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue