mirror of
https://github.com/c9moser/sgbackup.git
synced 2026-01-19 19:40:13 +00:00
2025.02.19 15:14:33 ()
This commit is contained in:
parent
21d6a286c9
commit
e2302d79d4
@ -29,7 +29,8 @@ from ..settings import settings
|
|||||||
from ._settingsdialog import SettingsDialog
|
from ._settingsdialog import SettingsDialog
|
||||||
from ._gamedialog import GameDialog
|
from ._gamedialog import GameDialog
|
||||||
from ..game import Game,GameManager,SAVEGAME_TYPE_ICONS
|
from ..game import Game,GameManager,SAVEGAME_TYPE_ICONS
|
||||||
from ._steam import SteamLibrariesDialog,NewSteamAppsDialog
|
from ._steam import SteamLibrariesDialog,NewSteamAppsDialog,NoNewSteamAppsDialog
|
||||||
|
from ..steam import Steam
|
||||||
from ._backupdialog import BackupSingleDialog
|
from ._backupdialog import BackupSingleDialog
|
||||||
from ..archiver import ArchiverManager
|
from ..archiver import ArchiverManager
|
||||||
|
|
||||||
@ -147,10 +148,7 @@ class GameView(Gtk.Box):
|
|||||||
backup_active_live_button.connect('clicked',self._on_backup_active_live_button_clicked)
|
backup_active_live_button.connect('clicked',self._on_backup_active_live_button_clicked)
|
||||||
self.actionbar.pack_start(backup_active_live_button)
|
self.actionbar.pack_start(backup_active_live_button)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Add a the search entry
|
# Add a the search entry
|
||||||
|
|
||||||
self.__search_entry = Gtk.Entry()
|
self.__search_entry = Gtk.Entry()
|
||||||
self.__search_entry.set_hexpand(True)
|
self.__search_entry.set_hexpand(True)
|
||||||
self.actionbar.pack_end(self.__search_entry)
|
self.actionbar.pack_end(self.__search_entry)
|
||||||
@ -275,9 +273,14 @@ class GameView(Gtk.Box):
|
|||||||
dialog.present()
|
dialog.present()
|
||||||
|
|
||||||
def _on_new_steam_games_button_clicked(self,button):
|
def _on_new_steam_games_button_clicked(self,button):
|
||||||
|
steam = Steam()
|
||||||
|
if steam.find_new_steamapps():
|
||||||
dialog = NewSteamAppsDialog(parent=self.get_root())
|
dialog = NewSteamAppsDialog(parent=self.get_root())
|
||||||
dialog.connect('response',self._on_new_steamapps_dialog_response)
|
dialog.connect('response',self._on_new_steamapps_dialog_response)
|
||||||
dialog.present()
|
dialog.present()
|
||||||
|
else:
|
||||||
|
dialog = NoNewSteamAppsDialog(parent=self.get_root())
|
||||||
|
dialog.present()
|
||||||
|
|
||||||
def _on_backup_active_live_button_clicked(self,button):
|
def _on_backup_active_live_button_clicked(self,button):
|
||||||
backup_games = []
|
backup_games = []
|
||||||
@ -1004,9 +1007,14 @@ class Application(Gtk.Application):
|
|||||||
def on_dialog_response(dialog,response):
|
def on_dialog_response(dialog,response):
|
||||||
self.appwindow.refresh()
|
self.appwindow.refresh()
|
||||||
|
|
||||||
|
steam = Steam()
|
||||||
|
if steam.find_new_steamapps():
|
||||||
dialog = NewSteamAppsDialog(self.appwindow)
|
dialog = NewSteamAppsDialog(self.appwindow)
|
||||||
dialog.connect('response',on_dialog_response)
|
dialog.connect('response',on_dialog_response)
|
||||||
dialog.present()
|
dialog.present()
|
||||||
|
else:
|
||||||
|
dialog = NoNewSteamAppsDialog(self.appwindow)
|
||||||
|
dialog.present()
|
||||||
|
|
||||||
def new_settings_dialog(self)->SettingsDialog:
|
def new_settings_dialog(self)->SettingsDialog:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -378,3 +378,15 @@ class NewSteamAppsDialog(Gtk.Dialog):
|
|||||||
self.hide()
|
self.hide()
|
||||||
self.destroy()
|
self.destroy()
|
||||||
|
|
||||||
|
class NoNewSteamAppsDialog(Gtk.MessageDialog):
|
||||||
|
def __init__(self,parent:Gtk.Window|None=None):
|
||||||
|
Gtk.MessageDialog.__init__(self,buttons=Gtk.ButtonsType.OK)
|
||||||
|
if parent:
|
||||||
|
self.set_transient_for(parent)
|
||||||
|
|
||||||
|
self.props.text = "There were no new Steam-Apps found!"
|
||||||
|
self.props.use_markup = False
|
||||||
|
|
||||||
|
def do_response(self,response):
|
||||||
|
self.hide()
|
||||||
|
self.destroy()
|
||||||
Loading…
Reference in New Issue
Block a user