comparison gtk4/dw.c @ 2330:58700e9fcba3

GTK3/4: Add call to g_set_prgname() with the Application ID. This fixes apps showing as "GTK Application" instead of the name in the desktop file on Wayland.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 01 Mar 2021 01:31:12 +0000
parents 47f8f950f377
children addbd7db1e5c
comparison
equal deleted inserted replaced
2329:47f8f950f377 2330:58700e9fcba3
1419 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_FLAGS_NONE); 1419 _DWApp = g_application_new(_dw_app_id, G_APPLICATION_FLAGS_NONE);
1420 if(_DWApp && g_application_register(_DWApp, NULL, NULL)) 1420 if(_DWApp && g_application_register(_DWApp, NULL, NULL))
1421 { 1421 {
1422 /* Creat our notification handler for any notifications */ 1422 /* Creat our notification handler for any notifications */
1423 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64); 1423 GSimpleAction *action = g_simple_action_new("notification", G_VARIANT_TYPE_UINT64);
1424 1424
1425 g_set_prgname(_dw_app_id);
1425 g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL); 1426 g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(_dw_notification_handler), NULL);
1426 g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action)); 1427 g_action_map_add_action(G_ACTION_MAP(_DWApp), G_ACTION(action));
1427 g_signal_connect(_DWApp, "activate", G_CALLBACK(_dw_app_activate), NULL); 1428 g_signal_connect(_DWApp, "activate", G_CALLBACK(_dw_app_activate), NULL);
1428 g_application_activate(_DWApp); 1429 g_application_activate(_DWApp);
1429 } 1430 }