Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.2 #103

Merged
merged 37 commits into from May 4, 2020
Merged

0.9.2 #103

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c838503
[ui] icons, buttons and colors changes
vinifmor Apr 27, 2020
ae2a710
Merge branch 'master' into staging
vinifmor Apr 28, 2020
3b3d1dc
[i18n] fix Turkey key
vinifmor Apr 28, 2020
7662150
update ru
mountain-biker85 Apr 28, 2020
64b59d1
update ru
mountain-biker85 Apr 28, 2020
f8847c9
update ru
mountain-biker85 Apr 28, 2020
7240805
update ru
mountain-biker85 Apr 28, 2020
f8199bd
Merge pull request #96 from mountain-biker85/patch-12
vinifmor Apr 28, 2020
0c0fbc9
Merge pull request #97 from mountain-biker85/patch-13
vinifmor Apr 28, 2020
1da9552
Merge pull request #98 from mountain-biker85/patch-14
vinifmor Apr 28, 2020
6b41974
Merge pull request #99 from mountain-biker85/patch-16
vinifmor Apr 28, 2020
6916e7d
Merge branch 'master' into staging
vinifmor Apr 28, 2020
7c154c0
[ui] improving style
vinifmor Apr 28, 2020
f60c68d
[i18n] adding missing 'turkish' locale translations
vinifmor Apr 28, 2020
f860be1
[fix][arch] checking mapped data during mutual conflict checking
vinifmor Apr 28, 2020
6364692
[backup] allowing to specify the Timeshift mode: rsync or btrfs
vinifmor Apr 28, 2020
54f40d4
Merge branch 'master' into staging
vinifmor Apr 29, 2020
43ff8d0
[improvement][trim] the dialog is now displayed before the upgrading …
vinifmor Apr 29, 2020
9995a9d
[ui] changing uninstall and settings icons colors
vinifmor Apr 29, 2020
a03b853
[improvement][settings] new option to disable the reboot dialog after…
vinifmor Apr 29, 2020
5bd6858
[ui] changing uninstall and settings colors
vinifmor Apr 29, 2020
780667f
[ui] removed more unnecessary 'x' buttons from some dialogs
vinifmor Apr 29, 2020
4fc3ab4
[CHANGELOG]
vinifmor Apr 29, 2020
e2e4074
[fix][arch] file not found error while organizing the data of install…
vinifmor May 2, 2020
600f006
[feature][ui] it is possible to view details of some initialization t…
vinifmor May 3, 2020
9d3c12c
[i18n] adding missing i18n key for the 'Hide details' button of the i…
vinifmor May 3, 2020
3b86888
[ui] "click" cursor set for most "clickable" components
vinifmor May 3, 2020
6a14c20
[CHANGELOG]
vinifmor May 3, 2020
08ddea5
[fix][settings] crashing when an unknown Qt style is set
vinifmor May 3, 2020
76e6194
[improvement][arch] able to handle upgrade scenarios when a package w…
vinifmor May 3, 2020
9f2b3f6
[CHANGELOG]
vinifmor May 3, 2020
a4af68a
[improvement][arch] displaying 'pre-transaction hooks' substatus
vinifmor May 3, 2020
33647da
[CHANGELOG]
vinifmor May 4, 2020
36d5261
[pictures]
vinifmor May 4, 2020
42ce6ae
[CHANGELOG]
vinifmor May 4, 2020
c2619b0
[CHANGELOG]
vinifmor May 4, 2020
f98486e
[CHANGELOG]
vinifmor May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 55 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,61 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.9.2] 2020-05-04
### Features
- UI
- it is possible to view details of some initialization tasks by clicking on their icons
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh/staging/pictures/releases/0.9.2/prepare_icon.png">
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh/staging/pictures/releases/0.9.2/prepare_output.png">
</p>

### Improvements
- Backup
- new **type** field on settings to specify the Timeshift backup mode: **RSYNC** or **BTRFS**
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh/staging/pictures/releases/0.9.2/backup_mode.png">
</p>
- Trim
- the dialog is now displayed before the upgrading process (but the operation is only executed after a successful upgrade)
- Settings
- new option to disable the reboot dialog after a successful upgrade (`updates.ask_for_reboot`)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh/staging/pictures/releases/0.9.2/ask_reboot.png">
</p>
- Arch
- able to handle upgrade scenarios when a package wants to overwrite files of another installed package
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh/staging/pictures/releases/0.9.2/files_conflict.png">
</p>
- displaying more upgrade substatus

### Fixes
- Arch
- file not found error while organizing the data of installed packages [#101](https://github.com/vinifmor/bauh/issues/101)
- Settings
- crashing when an unknown Qt style is set [#69](https://github.com/vinifmor/bauh/issues/69)

### UI
- icons, buttons and colors changes

<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh/staging/pictures/releases/0.9.2/color_design.png">
</p>

- more unnecessary **x** buttons were removed from dialogs
- "click" cursor set for most "clickable" components
- minor improvements

### i18n contributors
- Turkish (tr): [tuliana](https://github.com/tulliana)
- Russian (ru): [mountain-biker85](https://github.com/mountain-biker85)

#### Code changes (PullRequest): [#103](https://github.com/vinifmor/bauh/pull/103/files)


## [0.9.1] 2020-04-24
### Features
- Tray
Expand Down
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -277,6 +277,7 @@ ui:
auto_scale: false # activates Qt auto screen scale factor (QT_AUTO_SCREEN_SCALE_FACTOR). It fixes scaling issues for some desktop environments ( like Gnome )
updates:
check_interval: 30 # the updates checking interval in SECONDS
ask_for_reboot: true # if a dialog asking for a system reboot should be displayed after a successful upgrade
disk:
trim:
after_upgrade: false # it trims the hard disk after a successfull packages upgrade ( `fstrim -a -v` ). 'true' will automatically perform the trim and 'null' will display a confirmation dialog
Expand All @@ -288,7 +289,7 @@ backup:
uninstall: null # defines if the backup should be performed before uninstalling a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation
upgrade: null # defines if the backup should be performed before upgrading a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation
downgrade: null # defines if the backup should be performed before downgrading a package. Allowed values: null (a dialog will be displayed asking if a snapshot should be generated), true: generates the backup without asking. false: disables the backup for this operation

type: rsync # defines the Timeshift backup mode -> 'rsync' (default) or 'btrfs'
```
#### Tray icons
Priority:
Expand Down
2 changes: 1 addition & 1 deletion bauh/__init__.py
@@ -1,4 +1,4 @@
__version__ = '0.9.1'
__version__ = '0.9.2'
__app_name__ = 'bauh'

import os
Expand Down
3 changes: 3 additions & 0 deletions bauh/api/abstract/context.py
Expand Up @@ -43,3 +43,6 @@ def __init__(self, download_icons: bool, http_client: HttpClient, app_root_dir:

def is_system_x86_64(self):
return self.arch_x86_64

def get_view_path(self):
return self.app_root_dir + '/view'
11 changes: 10 additions & 1 deletion bauh/api/abstract/handler.py
Expand Up @@ -18,7 +18,7 @@ def print(self, msg: str):
pass

def request_confirmation(self, title: str, body: str, components: List[ViewComponent] = None, confirmation_label: str = None,
deny_label: str = None, deny_button: bool = True, window_cancel: bool = True) -> bool:
deny_label: str = None, deny_button: bool = True, window_cancel: bool = False) -> bool:
"""
request a user confirmation. In the current GUI implementation, it shows a popup to the user.
:param title: popup title
Expand Down Expand Up @@ -102,6 +102,15 @@ def update_progress(self, task_id: str, progress: float, substatus: str):
"""
pass

def update_output(self, task_id: str, output: str):
"""
updates the task output
:param task_id:
:param output:
:return:
"""
pass

def finish_task(self, task_id: str):
"""
marks a task as finished
Expand Down
2 changes: 2 additions & 0 deletions bauh/desktop/bauh.desktop
Expand Up @@ -6,6 +6,7 @@ Name[es]=Aplicaciones (bauh)
Name[ca]=Aplicacions (bauh)
Name[it]=Applicazioni (bauh)
Name[de]=Anwendungen (bauh)
Name[ru]=Приложения (bauh)
Name[tr]=Uygulamalar (bauh)
Categories=System;
Comment=Install and remove applications ( AppImage, Arch, Flatpak, Snap, Web )
Expand All @@ -14,6 +15,7 @@ Comment[es]=Instalar y eliminar aplicaciones ( AppImage, Arch, Flatpak, Snap, We
Comment[it]=Installa e rimuovi applicazioni ( AppImage, Arch, Flatpak, Snap, Web )
Comment[de]=Anwendungen installieren und entfernen ( AppImage, Arch, Flatpak, Snap, Web )
Comment[ca]=Instal·lar i eliminar aplicacions ( AppImage, Arch, Flatpak, Snap, Web )
Comment[ru]=Установка и удаление приложений ( AppImage, Arch, Flatpak, Snap, Web )
Comment[tr]=Uygulama yükle/kaldır ( AppImage, Arch, Flatpak, Snap, Web )
Exec=/usr/bin/bauh
Icon=bauh
2 changes: 2 additions & 0 deletions bauh/desktop/bauh_tray.desktop
Expand Up @@ -6,6 +6,7 @@ Name[es]=Aplicaciones (bauh-bandeja)
Name[ca]=Aplicacions (bauh-safata)
Name[it]=Applicazioni (bauh-vassoio)
Name[de]=Anwendungen (bauh - tablett)
Name[ru]=Приложения (bauh)
Name[tr]=Uygulamalar (bauh-sistem tepsi)
Categories=System;
Comment=Install and remove applications (AppImage, Arch, Flatpak, Snap, Web)
Expand All @@ -14,6 +15,7 @@ Comment[es]=Instalar y eliminar aplicaciones (AppImage, Arch, Flatpak, Snap, Web
Comment[it]=Installa e rimuovi applicazioni (AppImage, Arch, Flatpak, Snap, Web)
Comment[de]=Anwendungen installieren und entfernen (AppImage, Arch, Flatpak, Snap, Web)
Comment[ca]=Instal·lar i eliminar aplicacions (AppImage, Arch, Flatpak, Snap, Web)
Comment[ru]=Установка и удаление приложений ( AppImage, Arch, Flatpak, Snap, Web )
Comment[tr]=Uygulama yükle/kaldır ( AppImage, Arch, Flatpak, Snap, Web )
Exec=/usr/bin/bauh-tray
Icon=bauh
13 changes: 9 additions & 4 deletions bauh/gems/appimage/controller.py
Expand Up @@ -60,6 +60,11 @@ def __init__(self, context: ApplicationContext):
manager_method='install_file',
icon_path=resource.get_path('img/appimage.svg', ROOT_DIR),
requires_root=False)]
self.custom_app_actions = [CustomSoftwareAction(i18_label_key='appimage.custom_action.manual_update',
i18n_status_key='appimage.custom_action.manual_update.status',
manager_method='update_file',
requires_root=False,
icon_path=resource.get_path('img/upgrade.svg', ROOT_DIR))]

def install_file(self, root_password: str, watcher: ProcessWatcher) -> bool:
file_chooser = FileChooserComponent(label=self.i18n['file'].capitalize(), allowed_extensions={'AppImage'})
Expand Down Expand Up @@ -92,7 +97,7 @@ def install_file(self, root_password: str, watcher: ProcessWatcher) -> bool:
else:
return False

appim = AppImage(i18n=self.i18n, imported=True)
appim = AppImage(i18n=self.i18n, imported=True, custom_actions=self.custom_app_actions)
appim.name = input_name.get_value().strip()
appim.local_file_path = file_chooser.file_path
appim.version = input_version.get_value()
Expand Down Expand Up @@ -164,7 +169,7 @@ def search(self, words: str, disk_loader: DiskCacheLoader, limit: int = -1, is_u
found_map = {}
idx = 0
for l in cursor.fetchall():
app = AppImage(*l, i18n=self.i18n)
app = AppImage(*l, i18n=self.i18n, custom_actions=self.custom_app_actions)
res.new.append(app)
found_map[self._gen_app_key(app)] = {'app': app, 'idx': idx}
idx += 1
Expand Down Expand Up @@ -200,7 +205,7 @@ def read_installed(self, disk_loader: DiskCacheLoader, limit: int = -1, only_app
for path in installed.split('\n'):
if path:
with open(path) as f:
app = AppImage(installed=True, i18n=self.i18n, **json.loads(f.read()))
app = AppImage(installed=True, i18n=self.i18n, custom_actions=self.custom_app_actions, **json.loads(f.read()))
app.icon_url = app.icon_path

res.installed.append(app)
Expand Down Expand Up @@ -576,7 +581,7 @@ def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSu
cursor.execute(query.FIND_APPS_BY_NAME_FULL.format(','.join(["'{}'".format(s) for s in sugs_map.keys()])))

for t in cursor.fetchall():
app = AppImage(*t, i18n=self.i18n)
app = AppImage(*t, i18n=self.i18n, custom_actions=self.custom_app_actions)
res.append(PackageSuggestion(app, sugs_map[app.name.lower()]))
self.logger.info("Mapped {} suggestions".format(len(res)))
except:
Expand Down
11 changes: 3 additions & 8 deletions bauh/gems/appimage/model.py
Expand Up @@ -8,20 +8,14 @@
CACHED_ATTRS = {'name', 'description', 'version', 'url_download', 'author', 'license', 'source',
'icon_path', 'github', 'categories', 'imported', 'install_dir'}

CUSTOM_ACTIONS = [CustomSoftwareAction(i18_label_key='appimage.custom_action.manual_update',
i18n_status_key='appimage.custom_action.manual_update.status',
manager_method='update_file',
requires_root=False,
icon_path=resource.get_path('img/refresh.svg', ROOT_DIR))]


class AppImage(SoftwarePackage):

def __init__(self, name: str = None, description: str = None, github: str = None, source: str = None, version: str = None,
url_download: str = None, url_icon: str = None, url_screenshot: str = None, license: str = None, author: str = None,
categories=None, icon_path: str = None, installed: bool = False,
url_download_latest_version: str = None, local_file_path: str = None, imported: bool = False,
i18n: I18n = None, install_dir: str = None, **kwargs):
i18n: I18n = None, install_dir: str = None, custom_actions: List[CustomSoftwareAction] = None, **kwargs):
super(AppImage, self).__init__(id=name, name=name, version=version, latest_version=version,
icon_url=url_icon, license=license, description=description,
installed=installed)
Expand All @@ -37,6 +31,7 @@ def __init__(self, name: str = None, description: str = None, github: str = None
self.imported = imported
self.i18n = i18n
self.install_dir = install_dir
self.custom_actions = custom_actions

def __repr__(self):
return "{} (name={}, github={})".format(self.__class__.__name__, self.name, self.github)
Expand Down Expand Up @@ -108,7 +103,7 @@ def get_display_name(self) -> str:

def get_custom_supported_actions(self) -> List[CustomSoftwareAction]:
if self.imported:
return CUSTOM_ACTIONS
return self.custom_actions

def supports_backup(self) -> bool:
return False
146 changes: 0 additions & 146 deletions bauh/gems/appimage/resources/img/refresh.svg

This file was deleted.