|
Post by alexfish on Jul 14, 2020 1:44:14 GMT 1
Hi Vovchik You just posted as I solved it Now listening but the graphics can get rubbed out if under a window ? & then unresponsive to click + delete event memory seams to increase + cpu looks like the ui is clocking all the time Now looking further , since it was making this post difficult , till it either crash or the delete button worked after about 5 minutes BR Alex Attachments:
|
|
|
Post by alexfish on Jul 14, 2020 1:56:59 GMT 1
Well Found the Culprit Window the steals the bits "Chromium:" Very Now it Runs fine and mem seems ok BR Alex
|
|
|
Post by alexfish on Jul 14, 2020 2:24:55 GMT 1
Found another problem
The Clipboard is chocking
one can not copy text & and if try to do so, then can only paste what is in the clipboard
example of stuck clipboard
Smetana Quartet - Strijkkwartet 13 5_Cavatina-Adagio molto espresivo
ADDED had to switch the app off to post what the problem may be
TIMEOUT_ADD(500, TRACK_INFO) the clipboard looks as if gets updated at TRACK_INFO every half a second
BR Alex
|
|
|
Post by alexfish on Jul 14, 2020 2:56:35 GMT 1
Hi Vovchik & All I put the track info on the window title BR Alex
|
|
|
Post by vovchik on Jul 14, 2020 9:48:01 GMT 1
Dear Alex,
Thanks. It seems to be working nicely. The only thing now missing, as Joe has noted, is a popup for editing the stations file. Food for thought...
With kind regards, vovchik
|
|
|
Post by bigbass on Jul 14, 2020 15:07:18 GMT 1
Hello vovchik
Thanks working nicely!
I was having unrelated troubles with my internet connection and could not connect to any music streaming from any app had to hard reset my modem all is well again and I can continue testing (where I am the internet is not stable)
Joe
|
|
|
Post by bigbass on Jul 14, 2020 18:32:34 GMT 1
all apps should include one of these
'--- bigbass GTK3 with FIXED placement and some new macros '--- for the lack of a name we can call it gtk3 bassix '--- a simple 'HUG' looking syntax idea but include only what you need as you go '--- June 25 2020 '--- panic button :)
OPTION PARSE FALSE PRAGMA INCLUDE <gtk-3.0/gtk/gtk.h> PRAGMA OPTIONS `pkg-config --cflags gtk+-3.0` PRAGMA LDFLAGS `pkg-config --libs gtk+-3.0` PRAGMA OPTIONS -Wno-deprecated-declarations
'--- new signal handlers to simplify the callbacks DEF FN WINDOW_ADD() = gtk_window_new(GTK_WINDOW_TOPLEVEL) DEF FN CONNECT( widget, event,cb) = g_signal_connect_data(widget,event,cb, 0, 0, 0) DEF FN CONNECT_DATA( widget, event,cb,t) = g_signal_connect_data(G_OBJECT (widget),event,G_CALLBACK (cb),(gpointer) t, 0, 0) DEF FN NEW(widget,...) = g_object_new(widget, __VA_ARGS__,NULL) DEF FN PLACE( widget, name,wid,high) = gtk_fixed_put(GTK_FIXED(widget), GTK_WIDGET(name),wid,high) DEF FN ADD_FIXED( widget, name) = gtk_container_add(GTK_CONTAINER(widget), GTK_WIDGET(name)) DEF FN SET(widget, name, ...) = g_object_set(GTK_WIDGET(widget), name, __VA_ARGS__, NULL) DEF FN GET( widget, name, ...) = g_object_get(widget, name, __VA_ARGS__, NULL) DEF FN SHOW( widget) = gtk_widget_show_all(GTK_WIDGET(widget)) DEF FN HIDE( widget) = gtk_widget_hide(GTK_WIDGET(widget)) DEF FN INIT() = gtk_init(0,0) DEF FN LABEL(t) = gtk_label_new(t) DEF FN BUTTON_ADD(t) = gtk_button_new_with_label(t) DEF FN TEXT_VIEW() = gtk_text_view_new () DEF FN FIXED() = gtk_fixed_new() DEF FN DISPLAY() = gtk_main() DEF FN ATTACH() = gtk_container_add() DEF FN SCROLLED_WINDOW() = gtk_scrolled_window_new (NULL, NULL)
DEF FN STREAM(im) = g_memory_input_stream_new_from_data(im, -1, g_free) DEF FN PIXBUF_MEM(stm) = gdk_pixbuf_new_from_stream(stm, NULL, NULL) DEF FN PIXBUFF(p) = gtk_image_new_from_pixbuf (p )
DEF FN SET_IMAGE(widget,im) = gtk_button_set_image (GTK_BUTTON (widget), im) DEF FN IMAGE_FILE(f) = gtk_image_new_from_file(f)
ALIAS GTK_TYPE_WINDOW TO WINDOW ALIAS GTK_TYPE_BUTTON TO BUTTON ALIAS GTK_WIDGET TO WIDGET ALIAS GTK_CONTAINER TO CONTAINER ALIAS g_free TO FREE
DECLARE window, scrolled_win ,exit_btn ,image TYPE GtkWidget* DECLARE fixed TYPE GtkWidget* DECLARE image2 TYPE GtkWidget*
' svg for icon and gui RED_BUTTON$ = "<svg width='50mm' height='50mm' version='1.1' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>" \ "<defs>" \ "<filter id='filter3717' color-interpolation-filters='sRGB'>" \ "<feGaussianBlur result='fbSourceGraphic' stdDeviation='2 2'/>" \ "<feColorMatrix in='fbSourceGraphic' result='fbSourceGraphicAlpha' values='0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0'/>" \ "<feGaussianBlur in='fbSourceGraphic' result='blur' stdDeviation='2 2'/> " \ "</filter> " \ "</defs> " \ "<metadata> " \ "<rdf:RDF>" \ "<cc:Work rdf:about=''>" \ "<dc:format>image/svg+xml</dc:format>" \ "<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>" \ " <dc:title/> " \ "</cc:Work>" \ "</rdf:RDF> " \ "</metadata>" \ " <rect x='0.54' y='0.99' width='100.45' height='100.238' fill='#d40000' filter='url(#filter3717)' stroke-width='.26458'/> " \ "</svg>"
'===================== SUB exit_prog '===================== END END SUB
'===================== SUB exit_clicked () '===================== END END SUB
INIT window = WINDOW_ADD() SET(window, "icon-name","gtk-about") SET(window, "title","Bassix progress demo ") SET(window, "border-width",10) SET(window, "default-height",200) SET(window, "default-width",240) SET(window, "resizable", TRUE)
fixed = FIXED() ADD_FIXED(window, fixed)
exit_btn = BUTTON_ADD ("")
'--------------------------------------------------------------------- '---Image from PIXBUF LOCAL stream TYPE GInputStream* LOCAL pixbuf TYPE GdkPixbuf* stream = STREAM(RED_BUTTON$) pixbuf = PIXBUF_MEM(stream) image = PIXBUFF(pixbuf)
'--------------------------------------------------------------------
SET(window, "icon", pixbuf) SET(window, "title", "PANIC") '--- widget ,property , value or string SET(exit_btn, "width_request", 100 ,"height_request",30) SET(exit_btn, "tooltip-text", "Press the red button!")
'---make sure its visible SET(exit_btn, "always_show_image",TRUE) SET(exit_btn, "image", image)
'--------------------------------------------------------------------
'---placement inside fixed,widget,X,Y PLACE (fixed, exit_btn, 0, 0)
'--- handle callbacks CONNECT(window, "delete-event", exit_prog) CONNECT(exit_btn, "clicked" ,exit_clicked )
SHOW(window) DISPLAY
|
|
|
Post by vovchik on Jul 14, 2020 19:49:40 GMT 1
|
|
|
Post by bigbass on Jul 14, 2020 20:02:33 GMT 1
Hello vovchik a little joke we can play with this one Joe
|
|
|
Post by vovchik on Jul 15, 2020 20:01:57 GMT 1
Dear Joe, Works great - on Mint 19 and Pi4. Thanks. Will now play with it and look at the code. The binary is under 30k on both platforms! With kind regards, vovchik UPDATED: Added icon and preliminary local file loading.
|
|
|
Post by vovchik on Jul 16, 2020 9:30:07 GMT 1
Dear Joe, Very nice. I added a "bigbass" icon. With kind regards, vovchik
|
|
|
Post by bigbass on Jul 16, 2020 16:24:40 GMT 1
Hello vovchik
Your fish icon and arrow keys look much better I tried some fish icons before but they all look bad when you reduce the size down very small and yours maintains the look of a fish
Thanks
just a detail for the record my nickname bigbass is a fish called a large mouth bass a fresh water fish which is very common in the US but not in all the world they grow very large in Florida! I like to go fishing and that is the fish I go out to catch and I always let them go free later catch and release
Joe
|
|
|
Post by vovchik on Jul 16, 2020 17:21:23 GMT 1
Dear Joe, I'm glad the icon seems OK. I know small-mouthed and large-mouthed bass, too. And when they bite, they plunge downwards and then do some acrobatics. I also used to release them when I fished. I added a command-line uri feature that can take files or urls (e.g. "http://www.yahoo.com"). And dragging a file to the URL_INPUT and pressing enter will show that file, too. With kind regards, vovchik
|
|
|
Post by vovchik on Jul 16, 2020 19:53:47 GMT 1
Dear Joe, I like the zoom feature. Thanks. Another thing we need to have in it is proper UTF8 support. I tried with local cyrillic text files, and they show garbage at the moment, so there must be a webkit utf8 "on" setting for local URIs. Have to check the documentation. With kind regards, vovchik UPDATED: Rearranged things a bit - not much....just for testing purposes. Also fixed a property: width/height-request and not width/height_request (hyphen, not underscore, I think).
|
|
|
Post by vovchik on Jul 17, 2020 16:35:58 GMT 1
Dear Joe, I solved the local utf file problem. Check my source and you will see a lot of "settings". Most are there for testing and they work. Youtube also works, as do some radio streams. With kind regards, vovchik
|
|