Philipp Hörist pushed to branch master at gajim / gajim

Commits:

4 changed files:

Changes:

  • gajim/common/app.py
    ... ... @@ -55,7 +55,7 @@
    55 55
     
    
    56 56
     if typing.TYPE_CHECKING:
    
    57 57
         from gajim.gui.main import MainWindow
    
    58
    -    from gajim.application import GajimApplication
    
    58
    +    from gajim.gui.application import GajimApplication
    
    59 59
         from gajim.common.storage.cache import CacheStorage
    
    60 60
         from gajim.common.storage.archive import MessageArchiveStorage
    
    61 61
     
    

  • gajim/gajim.py
    ... ... @@ -114,7 +114,7 @@ def _init_gtk():
    114 114
     
    
    115 115
     
    
    116 116
     def _run_app():
    
    117
    -    from gajim.application import GajimApplication
    
    117
    +    from gajim.gui.application import GajimApplication
    
    118 118
         application = GajimApplication()
    
    119 119
         _install_signal_handlers(application)
    
    120 120
         application.run(sys.argv)
    

  • gajim/application.py → gajim/gtk/application.py

  • scripts/ci/link-gtk.py
    ... ... @@ -17,17 +17,30 @@
    17 17
     gtk_path = cwd / 'gajim' / 'gtk'
    
    18 18
     
    
    19 19
     
    
    20
    -def link(target):
    
    20
    +def cleanup_dir(target_dir: Path) -> None:
    
    21
    +    for path in target_dir.iterdir():
    
    22
    +        if path.name in IGNORED_FILES:
    
    23
    +            continue
    
    24
    +        path.unlink()
    
    25
    +
    
    26
    +
    
    27
    +def link(target: Path) -> None:
    
    21 28
         source = str(target)
    
    22 29
         source = source.replace('gajim/gtk', 'gajim/gui')
    
    23 30
         source = Path(source)
    
    24 31
         source.symlink_to(target)
    
    25 32
         print('create symlink from', source, 'to', target)
    
    26 33
     
    
    27
    -for path in gtk_path.iterdir():
    
    28
    -    if path.is_dir():
    
    29
    -        if path.name not in IGNORED_DIRS:
    
    34
    +
    
    35
    +def link_files(source_dir: Path) -> None:
    
    36
    +    for path in source_dir.iterdir():
    
    37
    +        if path.is_dir():
    
    38
    +            if path.name not in IGNORED_DIRS:
    
    39
    +                link(path)
    
    40
    +
    
    41
    +        elif path.name not in IGNORED_FILES:
    
    30 42
                 link(path)
    
    31 43
     
    
    32
    -    elif path.name not in IGNORED_FILES:
    
    33
    -        link(path)
    44
    +
    
    45
    +cleanup_dir(gui_path)
    
    46
    +link_files(gtk_path)