Posts



Looking through the code I have for the .NET dreamhost library I can now say that I have 100% of the private server API covered. Unless I have overlooked something, as far as I can tell I only have the Announcement list left to do.

This has been an interesting project and a nice introduction to a few simple aspects of .NET programming. Once the announcement API is finished I am not sure if I will continue with this project. If I do continue I will clean up the code somewhat and make the error reporting more useful.

The example user interface that I have been programming along with the library is also coming along. It does not implement all the library features yet but you can adjust your memory usage, list private server history and stats, list: users, domains, dns information.

Still to be done with the GUI is to is: save user information in a configuration file and load it when the program opens, setting most of the private server settings, announcements, and adding and removing DNS.


A couple of months ago I sort of forked off a version of oggconvert and called it video2theora. Basically what I did was take the oggconverts projects glade file as a base and instead of using gstreamer I used ffmpeg to create a program that would allow converting video files to theora videos for use with the new firefox and opera video tags.

I hope this is only a temporary situation until gstreamer codecs on windows is in better shape. I attempted to get oggconvert to work on windows following the instructions on the website but gstreamer kept crashing. Hopefully this will improve in the future. Until then I will be using the gui based on ffmpeg.


Check out http://majorsilence.com/pygtk_book for the most up to date version.

The best way to describe clutter is to quote its home page which states:

Clutter is an open source software library for creating fast, visually rich and animate graphical user interfaces.

Clutter can be integrated with many Linux technologies including GStreamer, Cairo a GTK+. It also is portable and runs on Windows and OSX, which allows for cross platform goodness.

But how is clutter used? This is actually very simple. Instead of creating a gtk.Window as in using PyGTK, with clutter, a clutter.Stage is created. And instead of using widgets, Actors are used. This is actually rather neat. We have Stages to do the work on with Actors that perform.

Some base Actors included with clutter are:

  • Label - displaying Labels
  • Rectangle - For creating Rectangles
  • Entry - For entering text

A stage is created by using the clutter.Stage object like so:     stage = clutter.Stage()

The size of stage can be set:     stage.set_size(800, 400)

The title of the stage can be set using the stage.set_title() method:     stage.set_title(“Hey Hey, My First Clutter App”)

Colors

The colour of a stage can be set using set_color() method and using the clutter.color_parse() method. The clutter parse method can take several different colour inputs including the colours as Text or HTML Notation.

The colour of a stage can be set:

    stage.set_color(clutter.color_parse(“red”))     stage.set_color(clutter.color(“#FF0000”))

Or the colour may be set directly using the clutter.Color() using RGB colors.     stage.set_color(clutter.Color(255, 0, 0))

Colours can not just be applied to a stage as has been shown here but may also be applied to all the Actors that will be shown in the next section.

Your First Actor

The clutter.Label Actor allows the programmer to put text labels anywhere on the stage. These are useful to display information to the user of the program. A small example of labels changing the font type and size of the letters. If no position is set it will default to placing the labels in the upper most left corner.

import clutter

stage = clutter.Stage()
stage.set_size(400, 400)

label = clutter.Label()
label.set_text("Clutter Label Text")
# If no position is given it defaults to the upper most left corner.

stage.add(label)
stage.show_all()

clutter.main()

Thats it for now. In the next installment I will cover basic animations.


I have spent a few hours the last couple of days doing some work on the zenphoto uploader I found a few days ago. I now consider the work I did on it to be good enough to use.

The source can be downloaded http://files.majorsilence.com/apps/zpu/zpu-0.3A2.zip or the diffs to version 2 can be found at http://files.majorsilence.com/apps/zpu/zpu2.diff and http://files.majorsilence.com/apps/zpu/zpu2_glade.diff.

Some of the differences from version 2 are I have changed the GUI a bit. Added the ability to create a new album. Added the ability to preview image que.

These changes have not been accepted into the main zpu (not yet at least) but I will be creating a Windows installer package and page to go along with it at http://www.majorsilence.com/zpu.