By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Remove "unnecessary" flatpak permissions

roundabout,
created on Tuesday, 24 December 2024, 08:24:42 (1735028682), received on Wednesday, 25 December 2024, 08:08:14 (1735114094)
Author identity: vlad <vlad.muntoiu@gmail.com>

040d7899f010a2346c03b9eb28b896f3e356ad16

com.roundabout_host.Izvor.yaml

@@ -9,8 +9,6 @@ finish-args:

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              - --socket=fallback-x11
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              - --share=ipc
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              - --socket=wayland
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          - --filesystem=xdg-data/izvor:create
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          - --filesystem=xdg-config/izvor:create
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              - --talk-name=org.freedesktop.Flatpak
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            modules:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              # flatpak-pip-generator
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/__init__.py

@@ -401,7 +401,7 @@ class Izvor(Gtk.Application):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        config_button = Gtk.Button.new_with_label(_("Configure"))
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        def open_config(widget, stem=provider.stem):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            # User-accessible provider config, not Flatpak sandboxed
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        config_path = str(Path.home() / ".config" / "izvor" / "providers" / f"{stem}.json")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        config_path = str(self.USER_PROVIDER_CONFIGS / f"{stem}.json")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            if os.getenv("FLATPAK_SANDBOX_DIR"):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                subprocess.Popen(["flatpak-spawn", "--host", "xdg-open", config_path])
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            else:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -422,7 +422,7 @@ class Izvor(Gtk.Application):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    def open_provider_directory(widget):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        # User-accessible provider directory, not Flatpak sandboxed
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    provider_directory = str(Path.home() / ".local" / "share" / "izvor" / "providers")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    provider_directory = str(self.USER_PROVIDERS)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        if os.getenv("FLATPAK_SANDBOX_DIR"):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            subprocess.Popen(["flatpak-spawn", "--host", "xdg-open", provider_directory])
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        else: