Pastey MyLinks

/* My Links

 * Puts a transparent panel (if you are using compiz or similar) 
 * on screen that gives quick access to your favorite websites without 
 * having to run a  web browser in the background all the time. 
include GtkEngine.e 
object links = { -- modify or add to this list; 
    {"Euphoria Forum","euphoria.png",""}, 
    css = create(GtkCssProvider,"#links {background: transparent;}"), 
    box = create(GtkButtonBox,"name=linkbox;orientation=vertical"), 
    lbl = create(GtkLabel,"markup=Web Links;color=yellow") 
for i = 1 to length(links) do 
    links[i] = pad_tail(links[i],4,0) 
    links[i][IMAGE] = canonical_path(links[i][IMAGE]) 
    if file_exists(links[i][IMAGE]) then 
        links[i][IMAGE] = create(GtkImage,links[i][IMAGE]) 
        links[i][IMAGE] = create(GIcon,links[i][IMAGE]) 
    end if 
    links[i][BTN] = create(GtkLinkButton,links[i][URI],links[i][TITLE]) 
end for 
-- change or eliminate the x and y positioning if you wish, and change the image if 
-- it bothers you too much :) 
global function TryToConnect(object ctl, object data) 
ifdef UNIX then  
object net = "network-offline", web = "www" 
end ifdef 
ifdef WINDOWS then 
object net = "./thumbnails/net0.png", web = "./thumbnails/face-cry.png" 
end ifdef 
if not networked() then  
    Warn(,,"Sorry","This computer is not on a network", 
    return 1  
end if 
if not inet_connected() then 
    Error(,,"Sorry","Internet not accessible!",GTK_BUTTONS_CLOSE,web) 
    return 1 
end if 
return 0 -- returning 0 allows the link button to complete the connection; 
end function 

1. Comment by irv in August

For a better appearance, delete these two lines:

lbl = create(GtkLabel,"markup=Web Links;color=yellow") add(box,lbl)

and add title=Web Links; to the Custom() line.

2. Comment by irv in August

Note: I have included icons in the web links, but they're not used here. This is for "future expansion" :) IOW, I forgot!

Next version will make use of the icons,I promise.