Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gparted gparted
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 45
    • Issues 45
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gpartedgparted
  • Merge requests
  • !43

WIP: Modern Gtk3 - part 2

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Luca Bacci requested to merge lb90/gparted:modern-gtk3-part-2 into master May 24, 2019
  • Overview 1
  • Commits 2
  • Pipelines 4
  • Changes 21

This is about migrating away from stock items which have been deprecated in Gtk 3.10.

Stock items just make it way easy to provide common UI elements that are found on many UIs: new, quit, cut, copy, paste, about, etc.

A stock item bundles:

  • a translatable, underscorized label text.
  • an icon name.
  • a keyboard accelerator (this one does not change with language).

For example, with stock id GTK_STOCK_QUIT you get:

  • "_Quit" label text
  • "application-exit" icon name
  • "Ctrl+Q" keyboard accelerator

Tanslations for stock label texts are provided by Gtk.

So stock items make it easy and direct to build menu items, toolbar buttons and even simple buttons, labels or images, because they bundle all that's needed. The underscore in label text is for keyboard navigation in menus.

Some references:

  • announcement of deprecation on the gtk-devel mailing list: https://mail.gnome.org/archives/gtk-devel-list/2013-July/msg00000.html, http://gtk.10911.n7.nabble.com/Stock-Items-Deprecation-td81617.html.
  • migration doc: https://docs.google.com/document/d/1KCVPoYQBqMbDP11tHPpjW6uaEHrvLUmcDPqKAppCY8o/pub
  • migration table: https://docs.google.com/spreadsheets/d/1HavJQRPpMuq-N0GoN1wJR-9KEGXpKy3-NEPpZZkUGJY/pub?output=html (this one is partial, see below)
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: modern-gtk3-part-2