Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gtk-WARNING **: Could not find the icon #4417

Closed
ishaantantra opened this issue Oct 6, 2018 · 11 comments
Closed

Gtk-WARNING **: Could not find the icon #4417

ishaantantra opened this issue Oct 6, 2018 · 11 comments
Labels
requires:more-information This Issue requires more information to solve

Comments

@ishaantantra
Copy link

Gtk-WARNING **: Could not find the icon 'window-minimize-symbolic-ltr'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
gtkmm theme error

@phanalax
Copy link

I encountered this problem on windows 10 as well, the fix is fairly simple.
You just have to run msys2 (which is installed to vcpkg/downloads/tools/msys2 when you get gtkmm I think) and use 'pacman' to install either mingw32/mingw-w64-i686-adwaita-icon-theme or mingw64/mingw-w64-x86_64-adwaita-icon-theme.
Then after its installed you create a directory 'shared' in your build directories, and copy the icons directory from msys/mingw64/share/ to your build/share directory.
After that the app should be able to locate the icons properly.

@LilyWangL LilyWangL added the requires:more-information This Issue requires more information to solve label Mar 1, 2019
@LilyWangL
Copy link
Contributor

Thanks for posting this issue. Please open a new issue if this is still a problem for you.

@ketsuban
Copy link

Just to confirm, is this a symptom of #6554?

@furkcom
Copy link

furkcom commented Jul 5, 2019

my share/icons folder has Adwaita and hicolor icons folder.when I run gtk app, there is no warning message display , but icons doesn't showed correctly on titlebar, same as "ishaantantra" report

@kakyoism
Copy link

I encountered this problem on windows 10 as well, the fix is fairly simple.
You just have to run msys2 (which is installed to vcpkg/downloads/tools/msys2 when you get gtkmm I think) and use 'pacman' to install either mingw32/mingw-w64-i686-adwaita-icon-theme or mingw64/mingw-w64-x86_64-adwaita-icon-theme.
Then after its installed you create a directory 'shared' in your build directories, and copy the icons directory from msys/mingw64/share/ to your build/share directory.
After that the app should be able to locate the icons properly.

Are you sure msys2 is installed via gtkmm? I just tried vcpkg install gtkmm:x64-windows and the build was a success, but there is no msys2 under vcpkg/downloads/tools.

@kakyoism
Copy link

kakyoism commented Aug 23, 2019

my share/icons folder has Adwaita and hicolor icons folder.when I run gtk app, there is no warning message display , but icons doesn't showed correctly on titlebar, same as "ishaantantra" report

Where exactly is your share/icons located? Could your share your full path or relative path to the vcpkg root folder?

@ishaantantra
Copy link
Author

I encountered this problem on windows 10 as well, the fix is fairly simple.
You just have to run msys2 (which is installed to vcpkg/downloads/tools/msys2 when you get gtkmm I think) and use 'pacman' to install either mingw32/mingw-w64-i686-adwaita-icon-theme or mingw64/mingw-w64-x86_64-adwaita-icon-theme.
Then after its installed you create a directory 'shared' in your build directories, and copy the icons directory from msys/mingw64/share/ to your build/share directory.
After that the app should be able to locate the icons properly.

Are you sure msys2 is installed via gtkmm? I just tried vcpkg install gtkmm:x64-windows and the build was a success, but there is no msys2 under vcpkg/downloads/tools.

You install mingw-w64-x86_64-adwaita-icon-theme using pacman -S mingw-w64-x86_64-adwaita-icon-theme.

Find the share folder in msys2
<path-to-msys64>\mingw64\share e.g.- C:\msys64\mingw64\share
Here you locate icons folder and copy it to
<path-to-vcpkg>\installed\x64-windows\share e.g.- D:\vcpkg\installed\x64-windows\share

All warnings regarding could not icon are resolved from this.
Kindly note this is the procedure for 64-bit version same can be modified for 32-bit version.

@kakyoism
Copy link

kakyoism commented Aug 23, 2019

@ishaantantra Thank you! Figured that out myself though. vcpkg does not have msys2 package (understandable). But it's a shame that icons and themes are N/A with vcpkg out of the box.

@sam20908
Copy link
Contributor

sam20908 commented Oct 4, 2020

@kakyoism I completely agree with you. If Gtk needs the icons, then icons therefore are a dependency, and something vcpkg should handle automatically.

@1fxe
Copy link

1fxe commented Feb 3, 2021

So are their any plans to include the icons? Or do we have to manually install them?

@homandiy
Copy link

homandiy commented Mar 2, 2021

Easy solution --
Show the path:

  /* icon theme path check */
  GtkIconTheme* icon_theme = gtk_icon_theme_get_default();
  gchar** path;
  gint n_elements;

  gtk_icon_theme_get_search_path(icon_theme, &path, &n_elements);

  g_print("\n\n icons theme: %s, element#: %d\n\n", *path, n_elements);

Now, run your code to find the path on the console:

 invalid for instance '000002ECD36AF8F0' of type 'preview-image'


 icons theme: C:\Users\Homan\AppData\Local\icons, element#: 12


(basic-tutorial-5.exe:32428): GLib-GObject-WARNING **: 10:10:12.532: ../gobject/gsignal.c:2529: signal 'realize' is invalid for instance '000002ECD12B9210' of type 'video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, profile=(string){ main, main-10 }, width=(int)[ 64, 8192 ], height=(int)[ 64, 8192 ]'

Copy the icons from: C:\msys64\mingw64\share\icons
to YOUR path: C:\Users\ YOUR ACCOUNT \AppData\Local\icons

ICONS FIXED!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:more-information This Issue requires more information to solve
Projects
None yet
Development

No branches or pull requests

9 participants