[epiphany/wip/exalm/gtk4-cleanups-2: 6/27] web-app-utils: Stop setting default icon
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/gtk4-cleanups-2: 6/27] web-app-utils: Stop setting default icon
- Date: Tue, 30 Nov 2021 15:11:09 +0000 (UTC)
commit 1ff83ffe33ebb03637d7b450c514cbb3326f27e3
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Nov 30 02:46:29 2021 +0500
web-app-utils: Stop setting default icon
Turns out it doesn't work even in GTK3, and in GTK4 it won't be possible
to do this from a file, only by icon name.
lib/ephy-web-app-utils.c | 22 ----------------------
1 file changed, 22 deletions(-)
---
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
index 62463b0b0..1ba24a64f 100644
--- a/lib/ephy-web-app-utils.c
+++ b/lib/ephy-web-app-utils.c
@@ -480,7 +480,6 @@ ephy_web_application_setup_from_profile_directory (const char *profile_directory
{
const char *program_name;
const char *id;
- char *app_icon;
char *desktop_basename;
char *desktop_filename;
GDesktopAppInfo *desktop_info;
@@ -507,10 +506,6 @@ ephy_web_application_setup_from_profile_directory (const char *profile_directory
}
g_set_application_name (g_app_info_get_name (G_APP_INFO (desktop_info)));
- app_icon = g_build_filename (profile_directory, EPHY_WEB_APP_ICON_NAME, NULL);
- gtk_window_set_default_icon_from_file (app_icon, NULL);
-
- g_free (app_icon);
g_free (desktop_basename);
g_free (desktop_filename);
g_object_unref (desktop_info);
@@ -520,29 +515,12 @@ void
ephy_web_application_setup_from_desktop_file (GDesktopAppInfo *desktop_info)
{
GAppInfo *app_info;
- GIcon *icon;
g_assert (G_IS_DESKTOP_APP_INFO (desktop_info));
app_info = G_APP_INFO (desktop_info);
g_set_prgname (g_app_info_get_name (app_info));
g_set_application_name (g_app_info_get_display_name (app_info));
-
- icon = g_app_info_get_icon (app_info);
- if (G_IS_FILE_ICON (icon)) {
- GFile *file = g_file_icon_get_file (G_FILE_ICON (icon));
- char *path = file ? g_file_get_path (file) : NULL;
-
- if (path) {
- gtk_window_set_default_icon_from_file (path, NULL);
- g_free (path);
- }
- g_clear_object (&file);
- } else if (G_IS_THEMED_ICON (icon)) {
- const char * const *names = g_themed_icon_get_names (G_THEMED_ICON (icon));
- if (names)
- gtk_window_set_default_icon_name (names[0]);
- }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]