Skip to content

Export and import feature for WebApps #348

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JW-CodeArt
Copy link

This PR adds a graphical and user-friendly import and export feature. It exports the ".desktop" files and the custom icons to an archive, which can then be imported again. If the browser is missing, it takes the most similar alternative.

Issues related to the feature:
#292
#338
#347
#22
#232

Note: I tried to include the profiles directories, but it was unstable. For example, Firefox couldn't use a profile directory created with a newer version.

There are new menu buttons:
menu

The new shortcuts are also documented in the shortcuts window:
shortcuts

After clicking the "Export" menu button, a file chooser dialog will appear:
export_file_chooser

Once the process has finished, a new dialog will appear. Users can open the containing directory directly from the dialog.
export_success_dialog
import_success_dialog

The archive contains two folders:
/applications/* with all the desktop files
/ice/icons/* with all the icons
archive

- import and export menu entry
- new shortcuts for the import and the export tool
- a new tool window (ei_tool.ui)
- import and export handler in common.py
- remove unnecessary code and simplify it
- remove the unstable profile directory export and import functionality
- remove the abort function and button, as the process is so quick that they are completely unnecessary.
- define gladefiles constants at the beginning of webapp-manager.py
- update text and function names
- removed the ei_task class as it is no longer needed
- created a get_codename() function as this is used twice in common.py
- removed the tool window and the progress tracking because they are not needed
- removed the browser profile export feature because it is unstable. It takes extremely long and does not work with different browser versions
- implemented a function which checks during the import process whether the browser is installed on the device. If not, it searches an alternative browser on the device.
- declared gladefiles paths as constants at the beginning of webapp-manager.py
- removed all trailing spaces
- applied the maximum line length
- bug fix:
application crash
It now uses GLib.idle_add() to prevent the "Segmentation fault (core dumped)" error in GTK3
- try  catch in update_imported_desktop()
@JW-CodeArt JW-CodeArt force-pushed the feature_import_export branch from 58fd0d9 to 8f38735 Compare June 13, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant