Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G GLib
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 859
    • Issues 859
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 35
    • Merge requests 35
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GLib
  • Merge requests
  • !683

WIP: GApplication: Add RestartData property, and setter

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Bastien Nocera requested to merge wip/hadess/gapp-restart-data into master Feb 20, 2019
  • Overview 8
  • Commits 1
  • Pipelines 1
  • Changes 4

The RestartData property on the org.gtk.Application interface can be used by session services to save some data to disk should the application disappear.

The application would call g_application_set_restart_data() when the state of the application changes, with enough information for the application to restart itself in the same "position".

FIXME:

  1. API docs
  2. note about restart data size
  3. have one example implementation of the session side

One idea would be for xdg-desktop-portal to save a stringified RestartData to ~/.var/app/$ID/config/state.gvariant if none empty when the application disappears from the bus.

Questions:

  • Can we enforce to only do this for unique applications?
  • Can we detect applications leaving the bus suddenly, or do we want to rely on them clearing RestartData if they're "done" (or should they always save state, some state)
  • Should we implement this via org.gnome.SessionManager.Client and the app calling out to gnome-session instead?
  • Or is this API fine, and gnome-session can do what xdg-desktop-portal does above?
Edited Dec 19, 2019 by Marc-André Lureau
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/hadess/gapp-restart-data