Taschenorakel.de

Postings tagged with GTK+

Back from Maemo Summit 2009

So I am back from Maemo Summit 2009. Great people. Great show. Great talks. Great venue: Enjoyed it quite much to walk arround in the Westerpark, Marc-André loved the petting zoo.

Hotest topic, of course: The N900. Thank you Nokia for lending those devices: Feels so good to finally have one for personal use! Finally got ideas for some private N900 hacking when reflecting ...

Application Theming Tricks

From time to time applications need custom theming rules. Especially when the project has professional UI designers involved. So how to achieve this with GTK+?

Trivial Theming

Most easy and very wrong:

if (gdk_color_parse ("pink", &color))
    gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color);

This will break and look childish as soon as your users use a custom color scheme.

Better:

static void
style_set_cb (GtkWidget *widget,
              GtkStyle *old_style)
{
    GtkStyle *style = gtk_widget_get_style (widget);

    if (gtk_style_lookup_color (style, "SecondaryTextColor", &color))

...

Undocumented Widgets?

I accidently the GTK+ tutorial!!! So that is why people struggle with tree views!

Debugging signals in GTK+

So I ran over an odd signal flow in the GTK+, and I needed to get helpful debug information. Daniel quickly pointed me to the GTypeDebugFlags, which contains the pro-tip to use the environment variable GOBJECT_DEBUG instead (the glib docs that come with the source has the same advice)[1]. Great!

$ GOBJECT_DEBUG=signals my_gtk_app

and I ...

Learning GTK+

During the last weeks I started to learn about the GTK+. I mostly followed the official tutorial but soon tried to walk on my own legs. Perhaps that was not always the best choice, as I ran into dead ends later (I skipped some chapters which probably were important, but their title did not give it away). Requiring sequential reading is so 1999 ...

Now why is the GTK+ awesome ...

GTK+ Binding Usage

Misread a statement from Mikael Hallendal on gtk-devel-list today.

He wrote:

For example the C# bindings are not on the GNOME bindings page, even
though it is one of the most used and high quality bindings for GTK+.

I read:

it is the most used and high quality bindings for GTK+

Wanted to counter proof this statement he never did, so I ran this tiny script on apt's package list:

for b in libgtk2.0 python-gtk libgtk2.0-cil libgtk2-perl libgtk2-ruby
do
  c=$(expr 0 $(grep -c "^Depends:.*\\<$b" \
  ...

GTK+ Hackfest is over

So the GTK+ Hackfest really ended yesterday. I absolutely enjoyed having all you guys arround me. I am absolutely confident, that all the ideas collected and exchanged here will lead to some great GTK+ 3.0 release. It cannot be said often enough, but even in our highly connected world face-to-face meetings are invaluable for our work. This can be understand as invitation to order your tickets ...

GtkCalendar Details

Hmm... Too much whining on this blog recently. So let's demonstrate some small, but exiting code I've wrote for Openismus, and which will show up in GTK+ 2.16:

/**
 * gtk_calendar_set_detail_func:
 * @calendar: a #GtkCalendar.
 * @func: a function providing details for each day.
 * @data: data to pass to @func invokations.

...

Linking to library.gnome.org

Recently the brave gtk-doc guys introduced a tool called gtkdoc-rebase, which updates external links in your API docs to point on the GNOME Library. The gtk-doc.make script has been updated to run gtkdoc-rebase on make dist. Unfortunatly all this pretty stuff doesn't work out of the box on Gutsy, as two premise have to be fulfilled to make this voodoo work:

Canvas Review

As announced by Murray already I am working for Openismus now. First task I got assigned was providing patches for some binding glitches in GooCanvas. Seems I complained too much about GooCanvas' code during that task. So Murray asked me to review GooCanvas, HippoCanvas and libccc to figure out which canvas would fit best for diagrams and reports in Glom.

As we have that nice canvas overview on the GNOME Wiki already, I added additional information to that wiki page. Thank you Emmanuele for updating the clutter records, btw. ...

Final SoC-Status

So the summer of code has reached its hands-down phasis and few minutes before the deadline finally height-for-width support has landed:

Height for Width Support in GTK+

Proper support for rotated labels with ellipses also has been backported to GTK+:

Rotated text with ellipses backported .

...

SoC-Status 2007/08/02

I didn't provide a status report for some time, so what happend in extended layout world?

I stopped to waste time with baseline alignment and switched to spreading natural size support over GTK+. As a result of this effort many widgets and one cell renderer are providing and interpreting natural size information now: GtkAlignment, GtkBin, GtkButton, GtkCellRendererText, GtkCellView, GtkFrame, GtkHBox, GtkLabel, GtkSocket, GtkTable and GtkVBox.

...

SoC-Status 2007/07/02

Extended layout Screencast Last week I wanted to implement something to show, so I started on baseline alignment. First lesson I've learned: The original idea, of just changing the vertical position of the widgets turned out to be thought too simple. Instead of applying the baseline adjustments from the outside by tweaking the ...

SoC-Status 2007/06/28

During the last week I've adding GtkExtendedLayout support to GtkLabel and GtkBin. GtkVBox got some first code to use this extended layout information. Results are not that fancy yet, but the next days should bring some nice break-through.

The test program got rather confusing with all the guides drawn, so it got checkboxes to toggle visibility of certain guide types ...

SoC-Status 2007/06/19

Here comes a new Summer of Code status report.

SoC-Status 2007/06/07

No much progress on my SoC project: This year the LinuxTag took place in my home town Berlin, so I helped out at GNOME booth there. Nice opportunity to meet some GNOME people. Tim Janik told me about some height-for-width traps - looks like I have to extend my unit tests. Talked with Rob Taylor about some document centric usability improvements for GNOME ...