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

Remove extension from icons? #45

Closed
andia89 opened this issue Jul 5, 2015 · 34 comments
Closed

Remove extension from icons? #45

andia89 opened this issue Jul 5, 2015 · 34 comments

Comments

@andia89
Copy link
Collaborator

andia89 commented Jul 5, 2015

When looking at for example the flarget database file it looks something like this:

300c99bb493a7061e9852c73b89a09e4.png, flareget-panel.svg, qt-tray

Since HC-tray fixer is in principle a theme agnostic tool, shouldn't the .svg be removed from the second column? It is irrelevant because we are splitting it afterwards and throwing it away anyways

@bilelmoussaoui
Copy link
Owner

for the Qt applications we can remove the extension, and i don't think that we can do that for the rest of applications. As we can not symlink/copy png icons and the application uses svg ones, correct me if i'm wrong

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

But the only important thing is the icon Name not the extension (that's of course only true for the second column)

@bilelmoussaoui
Copy link
Owner

I forgot that the second column is for the symlink icon name 👍

@bilelmoussaoui
Copy link
Owner

Done in my latest commit

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

The question is: Is there something that needs to be changed in the script as well?

@bilelmoussaoui
Copy link
Owner

Yeah, there's something that does not work when i run the script. It's due to extension_orig as the new icon name does not have any extension

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Everything works for me!?

@bilelmoussaoui
Copy link
Owner

Do you have telegram? It's not working here :/

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

I guess there are some fundamental problems when computing extension_orig there's something fishy there

@bilelmoussaoui bilelmoussaoui reopened this Jul 5, 2015
@bilelmoussaoui
Copy link
Owner

I did some tests, the problem is in
theme_icon = theme.lookup_icon(base_icon, default_icon_size, 0)
even if the icon do exists, the result of theme_icon is a None

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

No. I think the problem is that base_icon and extension_orig should be computed with symlink icon instead of icon I think

andia89 pushed a commit to andia89/Hardcode-Tray that referenced this issue Jul 5, 2015
@bilelmoussaoui
Copy link
Owner

Indeed, the extension_org must have the extension of the symlink icon. But that won't solve the problem..
i'm getting this when the script tries to fix telegram

Traceback (most recent call last):
  File "script.py", line 189, in <module>
    copy_files()
  File "script.py", line 161, in copy_files
    convert2svg(filename,output)
  File "script.py", line 113, in convert2svg
    svg = content_file.read()
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

oO on my machine this works. This seems to be a svg error? there is an error o the convert2svg function

@bilelmoussaoui
Copy link
Owner

@wa4557 I think so as the error is in the svg file, when i do print the filename and øutput_file everything looks fine to me

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Does the telegram svg looks ok in the numix-base theme?

@bilelmoussaoui
Copy link
Owner

Yeah, before removing the extension the script was working fine

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

I think that was a coincidence. It was definitely wrong before as well

Bilal Elmoussaoui notifications@github.com schrieb am So., 05.07.2015,
18:19:

Yeah, before removing the extension the script was working fine


Reply to this email directly or view it on GitHub
#45 (comment)
.

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

The question is:why is it even calling this function? Arent both svgs? That's prltobably also the reason it breaks

@bilelmoussaoui
Copy link
Owner

Nop, the original icons are svg but the symlink icons are png

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Does it work now with the PR merged?

@bilelmoussaoui
Copy link
Owner

Nop still the same issue..:/

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Weird it works perfectly for me. Can you try something like (in the path of the Hardcode tray fixer python3 ./database/scripty/svg2png.py /usr/share/icons/Numix/22x22/status/telegram-pane.svg ~/test.png?

@bilelmoussaoui
Copy link
Owner

 File "svg2png.py", line 10, in <module>
    svg = content_file.read()
  File "/usr/lib/python3.4/codecs.py", line 313, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

The same thing

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Ok and with any other svg?

@bilelmoussaoui
Copy link
Owner

Works fine converting owncloud svg icons to png..this only happens with telegram icons

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Tried reinstall numix? It seems that this is a corrupt svg

@bilelmoussaoui
Copy link
Owner

I just did that, the only icon that was fixed this time is :
telegram -- fixed using /usr/share/icons/Numix/22x22/status/telegram-panel.svg

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

the only difference between your computer and mine is, that since you are using elementaryOS you are using the 24x24 panels, I'm using the 22x22 ones. Have you tried deleting the icons before reinstalling? I think a reinstall doen't necessarily overwrites all the files

@bilelmoussaoui
Copy link
Owner

It's not the case.. the icons used are 22x22 instead of 24x24

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Can you open the file in inkscape?

@bilelmoussaoui
Copy link
Owner

This is fixed now, the issue was the icon size?? i fixed the issue with pantheon as the icons must be 24x24 and now everything works fine

@bilelmoussaoui
Copy link
Owner

and when i try to open using inkscape /usr/share/icons/Numix/22x22/status/telegram-attention-panel.svg i got an error

@andia89
Copy link
Collaborator Author

andia89 commented Jul 5, 2015

Ok But that means that you somehow corrupted your svg. No Bug in the script
Can this be closed then?

@bilelmoussaoui
Copy link
Owner

Yeah, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants