Setting the GTK app id
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Área
- desktop
Línea de trabajo
Comienza en gui-lib/mred/private/wx/gtk/unique.rkt, en la llamada a gtk_application_new, y después inspecciona drracket/info.rkt y las rutas get-aux-from-path y make-gracket-launcher. El trabajo estará completo cuando se pueda controlar el ID de la aplicación, este siga siendo válido para GTK y D-Bus, y el nombre del desktop-file instalado se mantenga coordinado con él.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I've started looking at the guide to porting from GTK 3 to GTK 4. A lot of it seems fairly straightforward, but I see some challenges around this point:
Set a proper application ID
In GTK 4 we want the application’s
GApplication‘application-id’ (and therefore the D-Bus name), the desktop file basename and Wayland’s xdg-shellapp_idto match. In order to achieve this with GTK 3.x callg_set_prgname()with the same application ID you passed toGtkApplication. Rename your desktop files to match the application ID if needed.The call to
g_set_prgname()can be removed once you fully migrated to GTK 4.
Currently, this is what racket/gui passes to gtk_application_new:
There are several problems:
-
It certainly doesn't match the base name of anyone's
.desktopfile, particularly given the use ofgethostname. -
There is no guarantee that it will satisfy
g_application_id_is_valid, particularly the limit of 255 characters and the restriction to[A-Z][a-z][0-9]_-in labels. -
It will never be valid for D-Bus due to the hyphen in
org.racket-lang. From theg_application_id_is_validdocs:Note that the hyphen (
-) character is allowed in application identifiers, but is problematic or not allowed in various specifications and APIs that refer to D-Bus, such as Flatpak application IDs, theDBusActivatableinterface in the Desktop Entry Specification, and the convention that an application’s “main” interface and object path resemble its application identifier and bus name. To avoid situations that require special-case handling, it is recommended that new application identifiers consistently replace hyphens with underscores.Like D-Bus interface names, application identifiers should start with the reversed DNS domain name of the author of the interface (in lower-case), and it is conventional for the rest of the application identifier to consist of words run together, with initial capital letters.
As with D-Bus interface names, if the author’s DNS domain name contains hyphen/minus characters they should be replaced by underscores, and if it contains leading digits they should be escaped by prepending an underscore. For example, if the owner of 7-zip.org used an application identifier for an archiving application, it might be named
org._7_zip.Archiver.These rules would suggest something like
org.racket_lang.DrRacket.
More broadly, it seems like the application ID should be under the control of the programmer.
I'm not sure how best to communicate the application ID to the point where it's needed. Maybe it could us one of the special command-line options to gracket that translate to unsafe-register-process-global? (Or maybe some existing one should be used?)
Then there's the aspect of getting the .desktop file installed under the corresponding name, particularly for something like DrRacket where we have, and presumably want to keep:
which implies that we continue to use the name drracket.desktop to work with get-aux-from-path. Maybe we should add another kind of aux entry to specify the application ID, and use that when installing the file? Maybe there's something analogous to the rewriting make-gracket-launcher already does to the Exec entry in the .desktop file.
- Lenguaje dominante
- Racket
- Estrellas
- 68
- Forks
- 83
- Merge medio
- 21 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de racket/gui
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de racket/gui
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
[Feature] 外观设置背景图片透明度高时,聚焦当前页面搜索框颜色太浅,有点看不到了Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoenhancement user-priority/P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
[i18n] 安装实例完成后的成功提示未正确本地化Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
PCL-Community/PCL-CE#3658 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
egoist/mygo#175 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día