Hello Keya,
Concerning filenames...
it's possible that Linux Filename encoding isn't really fix, but Desktop systems like Ubuntu etc. with Glib/gtk handle it with UTF8.
In functions like
g_file_read_link() you can read "
...The returned string is in the encoding used for filenames. Use g_filename_to_utf8() to convert it to UTF-8"
I'm sure there are filenames which can't be properly handled in Ascii so UTF8 poses the least risk.
Interesting regarding the error you encountered during the formats enumeration ... is that problem solved if we have a window and messageloop? *fingers crossed*
Yes! But i made a similar test to yours and thought (due to the error messages) the commands are not available in the current PureBasic.
I never had problems with short test-snippets on PB. But it seems that any use of gtk-commands need a
window and event loop OR a
MessageRequester.
Maybe, only this way PB calls an
gtk_init() etc. Otherwise the functions are unknown to PB?
And it's a bit strange that the
PixbufEnumeration does't list "svg" on my Xubuntu as "gdk-pixbuf-query-loaders" in a terminal does. But vectorgraphics works well like bitmap formats according to my tests.
Concern DevHelp-Dokumentation:
I should more often take a look at the online documentation because the 'gdk_pixbuf_format..' and 'gdk_pixbuf_loader' are not included like so many other gtk/gdk-functions.
ps. Oma what is the reason your original button demo has ButtonImages_Activate commented out? (i couldnt see any icons until i uncommented it)
Only a very few distributions like Mint with -X-themes don't show separator lines, frames and images on buttons on their 'very empty' surfaces. They are disabled/hided by default. (
Edit: Just saw that in Mint 17.2 (updated this weekend) the images or visible without activation!)
On the most distributions this widgets are visible without a change of the setting.
I think if a user chooses the theme, he doesn't want to see this decorations.
I placed it as a hint to the programmer, to see the possiblity to override the theme-default-setting or to solve the "this sh.. programm is not working"-problem. Or (maybe) the programmer thinks it's always necessary to see them.
Perhaps it would be better to place a comment about the theme problem in the library code?
And you could check the button images system setting this way (not tested on Mint) ...
Code: Select all
ImportC ""
g_object_get_property(*widget.GtkWidget, property.p-utf8, *gval)
EndImport
Global.i gEvent, gQuit
#G_TYPE_BOOLEAN = 20
Procedure ButtonImages_isActivated()
Protected gVal.GValue
Protected.i Ret
g_value_init_(@gval, #G_TYPE_BOOLEAN)
g_object_get_property(gtk_settings_get_default_(), "gtk-button-images", @gval)
Ret= g_value_get_boolean_(@gval)
g_value_unset_(@gval)
ProcedureReturn Ret
EndProcedure
If OpenWindow(0, 300, 200, 500, 200, "Check ButtonImagesState", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TextGadget(0, 5, 5, 490, 40, "")
If ButtonImages_isActivated()
SetGadgetText(0, "ButtonImages are shown on this system")
Else
SetGadgetText(0, "ButtonImages aren't shown on this system. Use ButtonImages_Activate(Show)")
EndIf
Repeat
If WaitWindowEvent() = #PB_Event_CloseWindow
gQuit= #True
EndIf
Until gQuit
EndIf
@Vera
I'll send you a mail the next days or weekend.
So, back to the real word
Bye, Charly