Active Topics

 



Notices


Reply
Thread Tools
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#21
Okay. Let's see if we can't bang out an answer to all of this hot mess.

Code:
dpkg -s librsvg2-common
Package: librsvg2-common
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 156
Maintainer: Terje Bergstrom <terje@terje.fi>
Architecture: armel
Source: librsvg
Version: 2.18.2-1terje2
Depends: libc6 (>= 2.5.0-1), libglib2.0-0 (>= 2.12.12-1osso10), libgtk2.0-0 (>= 2:2.10.12-0osso15), librsvg2-2 (= 2.18.2-1terje2)
Conflicts: gnome-games (<< 1:2.12)
Description: SAX-based renderer library for SVG files (extra runtime)
The rsvg library is an efficient renderer for Scalable Vector Graphics (SVG) pictures.
This package includes the gdk-pixbuf loader and a GTK+ engine, allowing to load SVG images transparently inside GTK+ applications.
No idea why I have gnome-games installed. Maybe this comes as a default with Diablo?

Code:
dpkg -s librsvg2-2
Package: librsvg2-2
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 280
Maintainer: Terje Bergstrom <terje@terje.fi>
Architecture: armel
Source: librsvg
Version: 2.18.2-1terje2
Depends: libc6 (>= 2.5.0-1), libcairo2 (>= 1.4.10), libfontconfig1 (>= 2.4.1), libfreetype6 (>= 2.3.5), libglib2.0-0 (>= 2.12.12-1osso10), libgtk2.0-0 (>= 2:2.10.12-0osso15), libpango1.0-0 (>= 1.16.4), libxml2 (>= 2.6.27)
Suggests: librsvg2-bin
Conflicts: librsvg2-common (<< 2.12)
Description: SAX-based renderer library for SVG files (runtime)
The rsvg library is an efficient renderer for Scalable Vector Graphics (SVG) pictures.
This package contains the runtime library, necessary to run applications using librsvg.
Could this possibly be the issue?

Code:
dpkg -s libart-2.0-2
Package: libart-2.0-2
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 184
Maintainer: Thomas Schmidt <tschmidt@debian.org>
Architecture: armel
Source: libart-lgpl
Version: 2.3.17-1diablo1
Depends: libc6 (>= 2.5.0-1)
Description: Library of functions for 2D graphics - runtime files
A library of functions for 2D graphics supporting a superset of the PostScript imaging model, designed to be integrated with graphics, artwork, and illustration programs. It is written in optimized C, and is fully compatible with C++. With a small footprint of 10,000 lines of code, it is especially suitable for embedded applications.
Code:
dpkg -s gnome-python-desktop
Package: gnome-python-desktop
Status: install ok installed
Priority: extra
Section: python
Installed-Size: 192
Maintainer: Michael Thompson <michaelnt@gmail.com>
Architecture: armel
Version: 2.25.91-1
Depends: libc6 (>= 2.5.0-1), libcairo2 (>= 1.4.10), libdbus-1-3 (>= 0.94), libdbus-glib-1-2 (>= 0.74), libebook (>= 1.4.2.1), libedataserver (>= 1.4.2.1), libgconf2-6 (>= 2.13.5), libglib2.0-0 (>= 2.12.12-1osso10), libgtk2.0-0 (>= 2:2.10.12-0osso15), libpango1.0-0 (>= 1.16.4), librsvg2-2 (>= 2.18.1), libxml2 (>= 2.6.27)
Description: Python bindings for the GNOME desktop environment - documentation
This archive contains modules that allow you to write GNOME programs in Python.
Do I have the permissions set correctly for your theme folder?
Your instructions were to start off as root but it was unclear if that was still needed when I untarred the Themes file.


And yeah, it looks like everything is set up correctly on my end so there has to be a small dependency issue here that we're missing.


Well, hopefully your big brain will problem solve this stupid crud you've created.

Thanks for hanging in there with me.
 
Posts: 133 | Thanked: 172 times | Joined on Jul 2009 @ Travel bag
#22
your permissions on the theme folder look okey to me. And the conflict messages that you posted above for librsvg2-common and librsvg2-2, I have them too.

With these being in place, I would suspect the standard Python modules.. following libraries are imported in the python code and hence I would see these as the dependencies
Code:
import pango
import pygtk
import gtk
from gtk import gdk
import hildondesktop
import cairo
import rsvg
import math
Code:
hildon-desktop-python-loader, python2.5-hildondesktop, python2.5-hildon, python2.5-gobject, python2.5-dbus, python2.5-osso, python2.5-cairo, python2.5-gtk2
All these requirements are readily packaged part of the Cairoclock. Could you please try installing it from here or from the application manager. With that we should see the SVGClock on the desktop
 

The Following User Says Thank You to shin For This Useful Post:
BrentDC's Avatar
Posts: 903 | Thanked: 632 times | Joined on Apr 2008
#23
Addison,

Could you just try running, as root:

apt-get -f install

I think that'll resolve all the problems.
__________________
-Brent

Author of TouchSearch -- web searching software for Maemo 5.

Mobile Device lineage: Palm Z22 -> Palm TX -> Nokia N800 -> Nokia N900
 

The Following User Says Thank You to BrentDC For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#24
Originally Posted by BrentDC View Post
Addison,

Could you just try running, as root:

apt-get -f install

I think that'll resolve all the problems.
I really hate that command.

Last two times I've used that, it chucked out Xterm, Tear, and a ton of other junk to the point where I couldn't even recognize what was left on my tablet anymore.

But since I live on the edge, I went ahead anyway.

Code:
[1|root@Nokia-N800-43-7|~]apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  osso-software-version-rx34
0 upgraded, 0 newly installed, 1 to remove and 19 not upgraded.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
Then I chickened out.

I remember before having to type something like "Yes, do as I say!" so at least I didn't receive that unhappy message again.

I'll follow up on Shin's suggestion and post back tomorrow.

Seriously, any of you idgits got this working or even tried to install SVGClock?

I know that I'm slightly stupid, but this has to be a new low for me.
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#25
Got it!

Cairoclock install did the trick.

So last of the newbie questioning from me.

I'm trying to load up this theme.
http://gnome-look.org/content/show.p...?content=61952

This is what I'm seeing in Xterm:
Code:
[1|user@Nokia-N800-43-7|~]cd /media/mmc2
[1|user@Nokia-N800-43-7|/media/mmc2]tar zxvf 61952-voda.tar.gz
tar: invalid gzip magic
Any ideas to what I'm doing wrong?
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#26
Hey shin.

Okay, I guess I used the wrong command to unzip a theme file. I originally just copied your command (tar zxvf) to decompress it instead of what was required (tar xvf).

Sorry, I should have first googled before asking what was wrong.

So I'm all good here now.

Happiness!



Holy crud though dude, your clock really chunks up the tablet.

Even doing something simple like scrolling through the application menu is horribly slow now.

Oh well, it's still slick looking!

Thanks again for this, shin.

It's a solid, first release.
 

The Following User Says Thank You to Addison For This Useful Post:
Posts: 133 | Thanked: 172 times | Joined on Jul 2009 @ Travel bag
#27
Addison - happy to see that it is working for you now and a very good selection of the clock face, to go with your background / theme.

As you can see in the first post of this thread, I have talked about the scope to improve performance.. Yes, there is a performance issue and I kind of know what the issue is.. Now I only hope I know how to fix it.. As I said I am a noob on the linux /Maemo platform and more so on the Python programming. I have learnt quite a bit, working on this. But dont have a clue yet on fixing the performance issue. I trying to read up on Python within the limited time I have. I hope to fix this performance issue and release it on the Extras repository, with some help from the Python gurus we have here..
 
Posts: 133 | Thanked: 172 times | Joined on Jul 2009 @ Travel bag
#28
Request to the Python experts here

I think I know the issue with this SVGClock performance..

Actually I am rendering all the SVG components of the clock together. Since the static components such as the background ( clock face, clock markings) and foreground ( Clock frame, Clock glass, frame) parts get rendered every time along with the moving parts such as the Minute/Hour hand, they end up consuming far too many CPU cycles, I think. This overloads device that we have on hand, making the N8x0 too slow, as reported by Addison.

I would really appreciate it, if some one can take a look at the code and help tell me how I can do some kind of buffering or pre-rendering of the above static components ( Background and Foreground parts), so that they are not read and rendered every time the second/minute hands are being refreshed. I believe this can be done within Python itself ( without worrying too much about, Cairo or rsvg)

To look at the code, pls see SVGClock.py under /usr/lib/hildon-desktop/SVGClock.py

If I get some directions on this buffering of the SVG files and pre rendering, I will be more than happy to package this with all dependencies to release it to Extras-Devel and then Extras..

TiA
Shin

Though lengthy, thought I will paste the code here for anyone interested:

Code:
#All imports we need
import sys, os
import gobject
import pango
import pygtk
pygtk.require('2.0')
import gtk
from gtk import gdk
import hildondesktop
import cairo
from datetime import datetime
import time
import rsvg
import math

# set this to False to disable display of seconds and update 
# only once per minute (saves CPU cycles on the tablet)
enable_seconds = True

supports_alpha = False

class SVGClock(hildondesktop.HomeItem):
    def __init__(self):
        hildondesktop.HomeItem.__init__(self)

        self.set_resize_type(hildondesktop.HOME_ITEM_RESIZE_BOTH)
        self.set_size_request(200, 200)
        self.connect("expose-event", self.expose)
        self.connect("screen-changed", self.screen_changed)
        self.connect ("background", self.set_timer, False)
        self.connect ("foreground", self.set_timer, True)
        self.connect ("unrealize", self.unrealize)

        # set a timeout to update the clock, depending
        # on whether we are in the foreground or background
        self.timer = None
        self.set_timer(self, True)

        self.show_all()

    def expose(self, widget, event):

        global supports_alpha

        width, height = self.allocation[2], self.allocation[3]

        #Get a cairo context
        cr = widget.window.cairo_create()

        if supports_alpha == True:
            cr.set_source_rgba(0.0, 0.0, 0.0, 0.0) # Transparent
        else:
            cr.set_source_rgb(1.0, 1.0, 1.0) # Opaque white

        # Draw the background
        cr.set_operator(cairo.OPERATOR_SOURCE)
        cr.paint()

        #And draw everything we want
        if width < height:
           radius = float(width)/2 - 0.8
        else:
           radius = float(height)/2 - 0.8
        
        SVGH_Drop_Shadow = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-drop-shadow.svg")
        SVGH_Face = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-face.svg")
        SVGH_Face_Shadow = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-face-shadow.svg")
        SVGH_Marks = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-marks.svg")
        SVGH_Frame = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-frame.svg")
        SVGH_Glass = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-glass.svg")
        SVGH_Hour_Hand = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-hour-hand.svg")
        SVGH_Minute_Hand = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-minute-hand.svg")
        SVGH_Second_Hand = rsvg.Handle(file="/home/user/MyDocs/Themes/default/clock-second-hand.svg")    

        cr.scale(2.0,2.0)
        cr.save()
        # Draw foreground
        SVGH_Face_Shadow.render_cairo(cr)
        SVGH_Glass.render_cairo(cr)
        SVGH_Frame.render_cairo(cr)

        # Draw Background
        cr.set_operator(cairo.OPERATOR_OVER)
        SVGH_Drop_Shadow.render_cairo(cr)
        SVGH_Face.render_cairo(cr)
        SVGH_Marks.render_cairo(cr)
        
        #Draw the clock glass face with shadow
        cr.set_operator(cairo.OPERATOR_OVER)
        SVGH_Glass.render_cairo(cr)	


        cr.translate(50,50)
        cr.save()

        #Draw the hours/minutes and seconds hands		
        time = datetime.now()
        hour = time.hour
        minutes = time.minute
        seconds = time.second

        cr.set_operator(cairo.OPERATOR_OVER)
        #cr.rotate((360/12) * (hour+9) * (3.141593/180))
        cr.rotate(((360/12) * (hour+9) * (3.141593/180)) + (((360/60) * minutes * (3.141593/180)) / 12))
        SVGH_Hour_Hand.render_cairo(cr)
        cr.restore()
        cr.save()

        cr.rotate((360/60) * (minutes+45) * (3.141593/180))
        SVGH_Minute_Hand.render_cairo(cr)
        cr.restore()
        cr.save()

        # only draw seconds when in foreground
        if enable_seconds: # disable seconds, to much work for little tablets
           cr.rotate((360/60) * (seconds+45) * (3.141593/180))
           cr.set_operator(cairo.OPERATOR_OVER)
           SVGH_Second_Hand.render_cairo(cr)
           cr.restore()
        
        #Once everything has been drawn, create our XShape mask
        #Our window content is contained inside the big circle,
        #so let's use that one as our mask
        """pm = gtk.gdk.Pixmap(None, width, height, 1)
        pmcr = pm.cairo_create()
        pmcr.arc(float(width)/2, float(height)/2, radius, 0, 2.0*3.14)
        pmcr.fill()
        pmcr.stroke()
        #Apply input mask
        self.input_shape_combine_mask(pm, 0, 0)"""

        return False

    def screen_changed(self, widget, old_screen=None):
        global supports_alpha
        # print "screen changed"

        # To check if the display supports alpha channels, get the colormap
        screen = self.get_screen()
        colormap = screen.get_rgba_colormap()
        if colormap == None:
            # print 'Your screen does not support alpha channels!'
            colormap = screen.get_rgb_colormap()
            supports_alpha = False
        else:
            # print 'Your screen supports alpha channels!'
            supports_alpha = True

        # Now we have a colormap appropriate for the screen, use it
        self.set_colormap(colormap)

        return False
#        return True


    def unrealize(self, widget, date=None):
        # cancel timeout
        if self.timer:
            v = gobject.source_remove(self.timer)
            print "canceled svgclock timeout:", v
            self.timer = None

    def set_timer(self, widget, on):
        # when called first time from __init__ widget is None
        if self.timer != None:
            # print "removing old timer"
            gobject.source_remove(self.timer)
        if on:
            # print "creating new timer"
            delay = 1000 if enable_seconds else 60000
            self.timer = gobject.timeout_add(delay, self.update)
            # repaint immediately when coming to the foreground
            self.update()

    def update(self):
        # print "updating svgclock"
        self.queue_draw()
        return True

def hd_plugin_get_objects():
    plugin = SVGClock()
    return [plugin]

Last edited by shin; 2010-01-12 at 16:59. Reason: pasted the code for svgclock.y for reference
 

The Following 2 Users Say Thank You to shin For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#29
If only you would have posted this a year ago.

I don't think there's too many of us N8x0 survivors left here anymore.

Well, this was the best I could find on the net, and even so, I'm not sure it's what you're looking for.
http://www.gossamer-threads.com/list...velopers/56269

If you want, I have no problem bumping this thread forever until someone responds. *lol*
 

The Following 2 Users Say Thank You to Addison For This Useful Post:
Posts: 133 | Thanked: 172 times | Joined on Jul 2009 @ Travel bag
#30
I agree with you on the N8x0 survivors.. Actually I am surprised how fast the tablet community became a minority here within a couple of months..

I joined the party late ( as you can see from my profile ), though I was lurking in these forums before deciding to jump in.. I was one of those people who thought Nokia was actually coming out with a superior 'internet tablet', as a sequel to the N810. Anyways I love my internet tablet/N810 and the various great apps the community has developed for it ( such as the Easy debian by qole, Penguinbait's boot from mmc card method, bunanson's world tv , t_moyashi's Quasar/Dillo etc - I know I am missing to mention other great apps here).

So it is this spirit of sharing that made me release this, not so complete applet to the community, created with what little knowledge I gathered with my spare time. Because I thought it would look good on your tablet!

I am hopeful that someone would help in the buffering/ pre-rendering query above ( yes the code is kind of 'messy' now), to better the clock performance and I plan to take it to Extras anyways with some clean up..

Having said that, you can see immediate performance improvement by disabling the second hand of the clock. This can be done by setting the "enable_seconds" parameter to "False" in /usr/lib/hildon-desktop/SVGClock.py, that is immediately after the 'import' section ( or cairoclock.py, if you used my original installation method):
Code:
# set this to False to disable display of seconds and update 
# only once per minute (saves CPU cycles on the tablet)
enable_seconds = True
Change this line as below to see immediate improvement in performance ( but the Seconds hand does not display any more)

Code:
# set this to False to disable display of seconds and update 
# only once per minute (saves CPU cycles on the tablet)
#enable_seconds = True
enable_seconds = False

Last edited by shin; 2010-01-13 at 15:49.
 

The Following 2 Users Say Thank You to shin For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 22:26.