... | ... | @@ -336,4 +336,39 @@ And in config-options of your module section add: |
|
|
|
|
|
For the stable flatpak branch, change the id to the regular one and the profile to the stable one.
|
|
|
|
|
|
### Application handling
|
|
|
Now we need to handle inside the code itself the proper id. Now you can include the config.h generated with the selected ID from the build. In your GtkApplication implementation:
|
|
|
|
|
|
In the startup vfunc, make sure to apply the correct application id:
|
|
|
```
|
|
|
gtk_window_set_default_icon_name (APPLICATION_ID);
|
|
|
```
|
|
|
In the creation of the GtkApplication, make sure to pass the correct id too:
|
|
|
```
|
|
|
g_object_new (APP_NAME_TYPE_APPLICATION,
|
|
|
"application-id", APPLICATION_ID,
|
|
|
"flags", G_APPLICATION_HANDLES_COMMAND_LINE | G_APPLICATION_HANDLES_OPEN,
|
|
|
NULL);
|
|
|
```
|
|
|
For your preferences dialog, make sure to set the proper icon name:
|
|
|
```
|
|
|
gtk_window_set_icon_name (GTK_WINDOW (preferences_window), APPLICATION_ID);
|
|
|
```
|
|
|
Same for the about dialog:
|
|
|
```
|
|
|
program_name = g_strconcat (_("App Name"), NAME_SUFFIX, NULL);
|
|
|
gtk_show_about_dialog (window ? GTK_WINDOW (window) : NULL,
|
|
|
"program-name", program_name,
|
|
|
"logo-icon-name", APPLICATION_ID,
|
|
|
...,
|
|
|
NULL);
|
|
|
|
|
|
```
|
|
|
And lately, if you have a Shell search provider, pass the correct id too:
|
|
|
```
|
|
|
g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->skeleton),
|
|
|
connection,
|
|
|
"/org/gnome/AppName" PROFILE "/SearchProvider", error);
|
|
|
```
|
|
|
|
|
|
# Adding a visual hint for development |