GitCasts — Screencasts about using Git
Stumbled over the site GitCasts which publishes regular screencasts about using Git. Should be worth a look for anyone who which to learn more about Git.
Stumbled over the site GitCasts which publishes regular screencasts about using Git. Should be worth a look for anyone who which to learn more about Git.
Went to town and bought an ipod touch during the weekend in order to be able to try out the UI a bit first hand. Quite a lot of the effects and animations should be possible to implement in a GTK+ UI fairly easily while some others will obviously want some kind of 3D acceleration.
I hacked up a quick test for making the kind of “unlock slider” that the ipod have for locking the screen from input. I am simply subclassing the GtkHScale and adding some animation to it.

I started by adding my own handler for value-changed which checks whether the threshold for when to emit the unlocked signal is met. Otherwise an animation to bring the slider back to the original state is started:
static void
slider_value_changed (GtkRange *range)
{
UnlockSliderPriv *priv;
priv = GET_PRIV (range);
if (priv->start_value != 0.0) {
return;
}
if (gtk_range_get_value (range) < THRESHOLD) {
priv->start_value = gtk_range_get_value (range);
gtk_timeline_start (priv->timeline);
} else {
gtk_range_set_value (range, 1.0);
priv->start_value = 0.0;
g_signal_emit (range, signals[UNLOCKED], 0);
}
}
This is using the GtkTimeline from #444659 . I’m then using the frame and finished signals from the timeline to update the slider to create the desired animation.
static void
slider_frame_cb (GtkTimeline *timeline,
gdouble progress,
UnlockSlider *slider)
{
UnlockSliderPriv *priv;
priv = GET_PRIV (slider);
gtk_range_set_value (GTK_RANGE (slider), (1.0 - progress) * priv->start_value);
}
static void
slider_finished_cb (GtkTimeline *timeline, UnlockSlider *slider)
{
UnlockSliderPriv *priv;
priv = GET_PRIV (slider);
gtk_range_set_value (GTK_RANGE (slider), 0.0);
priv->start_value = 0.0;
gtk_timeline_rewind (priv->timeline);
}
That’s about it for creating a simple animation looking as the video above. The full code (including the boilerplate and window creation code can be found in our git repository.
It would obviously need some artistic love and subclassing the GtkHScale is probably not the approach I would take for a real world application but it served well for a quick example.
A few weeks back I started trying out Eclipse after reading that Eclipse 3.3 with CDT 4.0 (C/C++ Development Tools) was released.
For anyone who want to try this out, don’t use gcj. I started out trying the gcj compiled version which turned out to be a lot slower (to the point where it was lagging when you typed). After switching to Suns JDK, speed of the UI was great.
I’ve semi-followed CDT for a while in the hope that it will be able to provide a nice IDE for C development. Not only an editor with GDB-integration (Emacs and Vim does that
) but also some of the nicer features you can find in modern IDEs. Like code awareness, indexing of symbols, type-ahead completion, refactoring capabilities etc.
With CDT 4.0 it is definitely becoming usable for programming C and comes with many nice features that can improve your productivity and reduce jumping around in the code just to look at definitions/implementations of certain functions.
For example when you hover a function call you get a tooltip with as much information possible (if Eclipse can access the implementation it will show it, otherwise the declaration).
A short screencast showing a session hacking Loudmouth 2 which is the project I’ve used for trying Eclipse out over the last few weeks.