Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 24 Nov 2014, 13:54
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Widget-bar (online-widgets on your desktop) -now also P217
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Fri 07 Sep 2007, 19:21    Post subject:  Widget-bar (online-widgets on your desktop) -now also P217  

screenshots:

http://dotpups.de/dotpups/Desktop-Tools/


This application opens a borderless window, that will display a HTML-page.

The window will be below all others, but over the desktop-icons.
It is placed on the right side of your desktop.

So it is no full alternative to the sophisticated widgets of KDE or Gnome, but at least it might please you more than a full webbrowser.

I already had introduced this technique with "Schweizer Uhr" (swiss clock, a flash-application).

The HTML-page displays some gadgets from:
http://www.labpixies.com/

You can add own ones like this:
Search for a nice gadget, like this:
http://www.labpixies.com/gadget_page.php?id=36&ctid=

Now click there on the button "Your own website"
This will show you some code, select and copy all, or just the "iframe" part.

Now paste it in a texteditor in
/usr/local/Widget-bar/bar01-MU/widgets1.htm

Then start the application again, to see your new widget.

The "window" requires that you have seamonkey installed.
I compiled it in Puppy 2.12, maybe with newer seamonkeys, you have to recompile the source:
cd /usr/local/Widget-bar/source
bash build.sh

Then copy the resulting binary one folder up.

Download (25 kb):
http://dotpups.de/dotpups/Desktop-Tools/Widget-bar.pup

One disadvantage:
The window does not store cookies like a full webbrowser.
So it will not remember settings on restart, for example a town you select in the weather-forecast.

Mark

Last edited by MU on Mon 23 Feb 2009, 18:31; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 08 Sep 2007, 15:13    Post subject:  

slight update:
my example HTML-page now includes a button-bar, so you can put your widgets in more than one page.
To add more pages, copy widgets1.htm to widgets3.htm.
Then edit navigation.js , and set the line
var buttons = 2;
to
var buttons = 3;

I already added a second page, that displays the current weather in some german cities.
This is realized by "wetter-netzzeitung.htm", that is put in an iframe like the other gadgets.
This weather is no "gadget", but some simple HTML-code I grabbed from http://www.netzeitung.de/ .

So the nice thing in this approach is, that you could add *any* HTML based stuff as "widget". So you do not rely on a special format.

One thing I noticed:
the window crashed, when I clicked my buttons.
Reason was flash9.
I could fix this by adding some environment-variables in widget-bar.

Mark
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sat 08 Sep 2007, 20:46    Post subject:  

I am using Prism (Puppy 2.17 based) and it crashed

Code:
# ./widget-bar
./mozilla-panel: symbol lookup error: /usr/lib/seamonkey-1.0.8/components/libgfx_gtk.so: undefined symbol: pango_xft_get_font_map
#


Glad to hear you are already compiling for/in 2.20 Smile

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 08 Sep 2007, 20:56    Post subject:  

Lobster, please try:

cd /usr/local/Widget-bar/source
bash build.sh
cp -ax mozilla-panel ../

This will compile the borderless window for the new seamonkey (hopefully).

Mark
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sat 08 Sep 2007, 21:14    Post subject:  

Code:
# cd /usr/local/Widget-bar/source
# bash build.sh
build.sh: line 4: pkg-config: command not found
build.sh: line 4: cc: command not found
build.sh: line 7: strip: command not found
# cp -ax mozilla-panel ../

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 08 Sep 2007, 21:38    Post subject:  

looks like you have no devx_220.sfs installed.
Mark
Back to top
View user's profile Send private message Visit poster's website 
jcagle

Joined: 29 Sep 2005
Posts: 634

PostPosted: Sat 08 Sep 2007, 22:52    Post subject:  

sh-3.00# ./widget-bar
killall: mozilla-panel: no process killed
./widget-bar: line 24: 13544 Segmentation fault ./mozilla-panel /usr/local/Widget-bar/bar01-MU/widgets1.htm $xs 0 $w $y 1
Back to top
View user's profile Send private message AIM Address 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sun 09 Sep 2007, 00:53    Post subject:  

jcagle,
we need to find out, if it segfaults (crashes) because of flash9.

Please install it again, I just updated it.
Then edit
/usr/local/Widget-bar/widget-bar

replace the last line
./mozilla-panel /usr/local/Widget-bar/bar01-MU/widgets1.htm $xs 0 $w $y 1
with:
./mozilla-panel /usr/local/Widget-bar/bar01-MU/widgets4.htm 100 0 300 800 1

That loads a page without flash.
It also does not use puppybasic to calculate the size.
Then we know more...

The update has these changes:
my german weather did not work, I now replaced it with a php-script that runs on one of my servers. It parses a full page from netzeitung.de, and just spits out the weather.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="pragma" content="no-cache">


<style type=text/css>
.wetter2007  { width: 120px; margin: 0; padding: 2px 0 5px 0; display: block; font: 10px verdana, arial, sans-serif; color: #006; background: #D7E0E9; border-top: 1px solid #fff; }
.wetter2007 li { margin: 0; padding: 3px 0 0 8px; }
</style>
  </head>
  <body>

<?
$wetter = "";

#loadpage("http://localhost/wetter/test.txt");

loadpage("http://www.netzeitung.de/arbeitundberuf/");

$wetter = preg_replace ("/^.*<UL/" , "<UL" , $wetter);
$wetter = preg_replace ("/<\/UL>.*/" , "</UL>" , $wetter);
print "$wetter";


function loadpage($url){

global $wetter;
$start = 0;
$lines = file ($url);
  foreach ($lines as $line ){
    if (eregi("<UL class=\"wetter" , $line)){
      $wetter = $line;
    }
  }
}
?>
  </body>
</html>


I also added page 3, german videotext.
And page 4, a empty page, with a simple example HTML-page, in case you want to add own stuff.

The widget.htm files now use javascript to load the iframes, this ensures that they will be reloaded and not cached.

Here is a screenshot of the videotext:



Mark

Last edited by MU on Sun 09 Sep 2007, 02:54; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sun 09 Sep 2007, 02:31    Post subject:  

MU wrote:
looks like you have no devx_220.sfs installed.
Mark


I am using Prism (Puppy 2.17 based) without the devx_217.sfs (I thought that was required from your suggestion . . .

Hopefully someone with the required version will test Smile

It was worth a quick try. Looks good Mark Smile

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sun 09 Sep 2007, 02:36    Post subject:  

Lob, you will need the devx, as I compiled with seamonkey 104, but you have 108. So you must compile the window again.



Some general thoughs now:

You might wonder, why I chose a white background.

The reason:
many gadgets, especially those based on flash, have a white background.

If we had widgets with real transparency, we could use /root/Choices/ROX-background.jpg as background-picture.

I made a test-dotpup, that does this, it puts the background in a "div", so that it can be positioned. *removed, now part of the official one*
The position is hardcoded for 1024x768, with a top taskbar.
So this had to be enhanced.

With suitable widgets like my german weather, this gives a perfect illusion of widgets directly integrated in the desktop, see this screenshot:



Well, time to sleep now, why are weekends so short Question ... Confused
Mark

Last edited by MU on Sun 09 Sep 2007, 06:59; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sun 09 Sep 2007, 05:53    Post subject:  

Code:
# ./widget-bar
./mozilla-panel: symbol lookup error: /usr/lib/seamonkey-1.0.8/components/libgfx_gtk.so: undefined symbol: pango_xft_get_font_map
#


I get the same error in Puppy 2.17.
Even if I recompile. Note: to compile, in the source "deskwindow.c" you must remove the line 57, or it will not compile::
#pt = stpcpy (pt, "/.mozilla/default/r3y1skkw.slt");

I then copied over Seamonkey 104, and symlinked it as /usr/lib/mozilla, but it still does not work.
I don't understand it, as all the Gtk and Pango-libraries seem to be the same as in my Puppy (2.12, Muppy 007).

I'm out of idea at moment Sad

**edit: it seems, Barry had the same trouble:
http://forums.mozillazine.org/viewtopic.php?p=2445337

Will try that immedeatly Smile

Mak
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sun 09 Sep 2007, 06:55    Post subject:  

Hooray, that was it.
Updated the dotpup.

Also added a small start-dialog, where you can close the window or choose different backgrounds Razz Smile Cool

It should set the background-properties automatically depending on your screen-resolution.
Now what we need next, are some nice widgets without flash, because of the transparency-problem when choosing the desktop-background.
I will add a IP - display later, maybe you have some nice things, too? Javascript-calendars and such?

Mark
Back to top
View user's profile Send private message Visit poster's website 
jcagle

Joined: 29 Sep 2005
Posts: 634

PostPosted: Sun 09 Sep 2007, 07:50    Post subject:  

I'll re-download tonight, if I remember. I've got church and work today, so I don't have much time right now.
Back to top
View user's profile Send private message AIM Address 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Mon 10 Sep 2007, 20:31    Post subject:  

Updated dotpup.

New: Button to visit a site from Adobe.
It allows to disable the nasty security popups for specific folders, if you start a flash from your harddisk (what is the case with the included clocks).

New:
You now can add iframes or flashs with 2 simple Javascript-functions.

These allow to set the exact position of each widget.
They also allow to add a inner border (it is white), and an outer border.
The outer border uses a bitmap.

Like this non-transparent Flash-widgets look much nicer, see these screenshots:







Oh my, just 4 hours left for sleep..

good night, Mark
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Tue 11 Sep 2007, 19:32    Post subject:  

Updated dotpup.

Cleaned up the code.
Added some fixes, now also rounded, transparent borders can be used.

I also added a scientific calculator.
It was an Opera Widget, I just had to modify it slightly, as it used some special inbuilt objects of opera.

But it seems, most widgets can be used without modifications.

In Opera, start a widget.
Then you get a zip in
/root/.opera/widgets
Unzip it to a new folder, and move it to
/usr/local/Widget-bar/bar01-MU/HTML/

Then add it to widgetX.htm like the calculator.

Here are 2 screenshots, the transparent borders and the calculator:






If you want to use a different picture for the border, edit:
/usr/local/Widget-bar/bar01-MU/javascript/borderpicture.js

It has just 1 line:
borderpic="border3.png";

Mark
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0894s ][ Queries: 12 (0.0045s) ][ GZIP on ]