hkdb / Densify

A GTK+ GUI Application written in Python that simplifies compressing PDF files with Ghostscript
MIT License
88 stars 24 forks source link

Bug on displaying Icon in Application #3

Closed armandhaa closed 3 years ago

armandhaa commented 5 years ago

Issue: The app cannot find 'icon.png' ehrn running from different directory. No problem when running from Densify drectory message: _Traceback (most recent call last): File "./Densify/densify", line 428, in win.set_icon_fromfile("icon.png") # Set App Icon GLib.Error: g-file-error-quark: Failed to open file 'icon.png': No such file or directory (4) quick solution: I have to exclude lines in app referring to showing icon.png and header.png icons to make it work / runnable from any directory

hkdb commented 5 years ago

Deleted my previous comment. I know what you mean now. Looks like what I should do is do full path for both icon.png and header.png. Will keep that in mind for the future release.

When I run the app with .desktop though, this is not a problem so I never even noticed before.

Thanks!

armandhaa commented 5 years ago

you're welcome, great app!

On Sun, Jun 30, 2019, 13:06 hkdb notifications@github.com wrote:

Deleted my previous comment. I know what you mean now. Looks like what I should do is do full path for both icon.png and header.png. Will keep that in mind for the future release.

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hkdb/Densify/issues/3?email_source=notifications&email_token=ALGW2AIBAUCC3KKVUK5OAE3P5BEPZA5CNFSM4GSIJTVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY4F5IA#issuecomment-507010720, or mute the thread https://github.com/notifications/unsubscribe-auth/ALGW2AP44WO7ACH7M2J347TP5BEPZANCNFSM4GSIJTVA .

hkdb commented 4 years ago

I have gone ahead and put in a fix for this in the latest release - v0.3.0. Thanks again!

hkdb commented 4 years ago

I just re-read your issue once again and realized that you might have been moving the script else where but not the png's? Even my latest fix assumes that the png's are always in the same directory as the script. So if you moved the images over to the same directory at the script, it should work. Either that or comment out the lines like you did.

Perhaps adding some error handling would be good though. Maybe just dismiss the images altogether if they don't exist automatically?

hkdb commented 3 years ago

Closing due to lack of response.