Taschenorakel.de

Postings tagged with GNOME

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))

...

See you at the Prater Biergarten

Let's have a small GNOMEr's come-together in Berlin's Prater Biergarten this Friday at 16:00.

Audio File Preview

I am probably the last guy who discovered the preview feature for audio files in GNOME. Nevertheless I have a strong opinion about it, perhaps because of the way I made my first contact with it.

I have auto-login enabled for my GNOME session, which means the mouse pointer starts in the center of the screen. Now I also have a cluttered desktop and some of the files ...

Reviewing Patches

One of the new Giggle features I am most proud of is the new patch view, which only shows one chunk at a time and let's you navigate between chunks using the file list, toolbar buttons or hotkeys (Alt+Up, Alt+Down). At the same time it also is the most criticised feature of the new Giggle. So I wonder how to improve that view.

<img alt="Giggle Diff View" src="http://taschenorakel.de/media/movies/giggle-diff-view.jpg" ...

Giggle 0.4.90

Lennart just poked me if it isn't about time to make a Giggle release. There are more than 248 commits since the last release, seems he is right.

Code, wiki and bug tracker have been moved from Immendio to github, live.gnome.org and bugzilla.gnome.org.

What has changed since 0.4? Quite alot. Most important changes are those:

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 ...

GtkBuilder based Plugin System

Seems like GtkBuilder is extremly useful to build efficient plugin systems:

The prettyness of this system is, that it only loads the plugin when some related action is activated:

Implementing this was straightforward. I am pretty sure that I've reinvented some wheel.

Blur Effect with cairo

Wondered how to apply convolution filters, like for instance gaussian blur in cairo. Doesn't seem to be possible yet. Well, unless you remember that cairo uses pixman as backend for its image surface. Result of my hacks below:

Blur Effect with cairo

The code is in the blur_image_surface() function of blur-effect.c. Now the question is how to make a nice cairo ...

Static Panel Nonsense

Vuntz, you ask for angry reactions, here is your first one: This static panel stuff is the biggest nonsense I've seen in years! You've presented us an early April's fool joke, didn't you?

Please visit some real people and look at their Windows or OSX desktop, look how they customized the Quick-Launch area respectively their dock and then come again, please.

Important hint: Whenever you try to improve something, you should be ...

libtool aware gdb wrapper and mergetool

Just want to mention some small and rough tools I've written recently to easy my daily hacker's life:

Changelogs and Fortune Cookies

Nasrudin walked into a teahouse and declaimed, "The moon is more useful than the sun."
"Why?", he was asked.
"Because at night we need the light more."

Regularly applaud myself for changing my prepare-changelog script to yield a random fortune cookie with each changelog entry:

`/usr/games/fortune -s wisdom`

Quite entertaining.

...

GNOME makes happy people

GNOME is fun. Proof below:

Happy Marc-André stands in the GNOME swag bag

Extensive Gimp tutorial on spiegel.de

http://www.spiegel.de/netzwelt/tech/0,1518,565794,00.html (german only?) - already on the first page the article shows that this time, somebody did his homework, explaining the difference between stable and dev versions.

It then goes further into detail, in a way you would normally expect from your common computer mag.

I wish there were more articles like that in regular newspaper, if only ...

Back from Istanbul

Back from Istanbul. Wow, what an experience. What a vibrant city, thirsty for life! I still have short flashbacks blending memories from Istanbul into my consciousness. Strange experience. Obviously a sign for how much I enjoyed my time there. Quite a mistake to not convince Ulrike to join me for that trip. Awesome how happy Marc-André was when having me back. For ...

Leaving Gentoo behind - UPDATE

Today I freed myself from that incredible mess Gentoo had become on my box. Having shiny new software again should let me forget the pain quickly. Also, reconfiguring my GNOME desktop was a mere by-product of copying my home folder back onto the box (yay!).

UPDATE: Wow, it makes a huge difference whether you evaluate a distro thouroughly or just give it ...

Karl, calm down!

Karl, calm down please! Well, and don't spread lies !

As you can check yourself in our SVN repository, Zeeshan never has been removed from Planet GNOME. Recent changes to the configuration file all were additions. There is no single removal in the log for the last few weeks!

I really start to worry about all the hateress recently seen on Planet GNOME. I am guilty by ...

Nag Screens have reached GNOME now

Dude, this sucks! Really. Nag screens[1] finally have reached GNOME: When you insert a CD unknown to the MusicBrainz database, Sound Juicer shows a nag screen asking you to upload that information to MusicBrainz.

MusicBrainz Nag Screen in Sound Juicer

I understand that people want to support their favorite service, but in the case of MusicBrainz this is support is really annoying: MusicBrainz - at least as ...

LIRC Properties hosted on gnome.org now

Murray did the neccessary steps for moving GNOME LIRC Properties to GNOME infrastructure now last week. Bugs are tracked in Bugzilla now, and latest source code can be found here: http://svn.gnome.org/svn/gnome-lirc-properties/.

Thanks infrastructure for doing this job quickly. Thanks Fluendo for allowing to move the code.

Just wondering now, when GNOME's awesome I18N team find the module and ...

GNOME LIRC Properties

Some time ago Murray announced this little GUI to configure IR remote controls we Openismus guys did for Fluendo. Last Friday the program finally got uploaded to Ubuntu's package archive, since yesterday its package is in Hardy's Universe repository.

The program can detect your IR receiver and suggest a remote control. Success of that ...

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 ...

Projector for GNOME Events Box

The GTK+ Hackfest has its first positive result already: The GNOME Events Box got a brand new DLP projector. Decision was made to buy one, since renting a projector for a week costs about 200 EUR, wereas you get entry level projectors for only 600 EUR. The Foundation's brand new projector was about 580,99 EUR - including shipment (projector with bag and cables, back side).

...

Stop Energy

Wouter - seems I have to reply, since partly I feel responsible for what you call "stop energy". I feel quite sorry, that you experience this as "stop energy", especially since Olav asked for comments. Don't ask for comments, if you do not want to deal with concerns!

Maybe I really should start rationalizing my guts feeling before posting, but as you ...

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.

...

How to participate, when your ISP is blacklisted?

Dear Lazy Web, how can I send messages to gtk-devel-list, when my public IP address (better the public IP address of a NAT router in Vodafone's network) is black listed? Using a smart host doesn't help, as that blocked IP address shows up in the "Received:" mail headers. Using web mail also doesn't help for the same reason.

Is it time to give up mail, and move all activities to web forums? I'd hate that. ...

New Year

A new year started, let's see if it can match the last one.

It did a good start with finally bringing new anti-smoking laws into action. It was an really embarrassing situation, that you had to choose between entering a restaurant/cafe/ice-parlor or keeping your health. It was annoying that you had change clothes immediatly after leaving such a place ...

No Privacy for FOSS Developers?

Benjamin, thank you for ruining this year's Chrismas days for me. I know, you didn't do this intentionally, but I have really bad days since I am aware of the privacy strip each Free Software developer does due ill-considered "services" like ohloh.net.

I don't want anyone to do statistics about FOSS contributions. Those stats make me feel naked. What follows is some longish explaination of my feelings regarding such "services", those not interested should just skip to my proposal.

Also I do not like the stats at ohloh.net, because they draw ...

Aren't Tomboy Notebooks redundant?

Boyd, don't you think that notebooks are redundant for an application that got tags already?

(Sorry, for commenting on PGO, but appearently you disabled comments for people without blogger.com account.)

libepc 0.3 released

A new version of the Easy Publish and Consume Library has found its way on GNOME's FTP servers.

This release has seen many API changes to make the library more versatile. For instance streaming capabilities and support for ZeroConf bookmarks have been added. Also noteworthy is the new service monitor, which provides a very easy method for finding libepc (and DNS-SD) services.

...

Totem Playlist Sharing

To test versatility of libepc I've written a Totem plugin for sharing the current playlist.

Screencast of the Plugin

Seems we've got another cool feature now, and libepc is in much better shape. Code is commited to Totem trunk, and also depends - surprise - on libepc trunk.

Disclaimer: Yes, demonstrating ...

Car Broken Open

This morning I had to find my car broken open. Since coming back to Berlin one year ago, this is the second time, some asocial bastard damaged my car. Its not even a new or expensive car. It's a trusty, 15 years old Vectra. What has happend to this place?

Is is time to leave this city of criminal ...

Mathias, with one “t” (and “h”)

Btw: There are several spellings for the name my parents gave me, and I've got this variant:

Mathias with one “t” (and “h”)

I don't know why my parents have choosen this variant. People really seem to have problems with it. Every time someone writes it down, I have to explain the spelling: *“Oh, just one 't', please” - “But with ...

Re: g-thread-cancel

Richard, I'd really like to answer you, and this is the second time I'd like to do that, but unfortunatly you do not allow comments on your blog.

Well, before my karma reaches unknown depths let's add some real content to this posting:

I don't really know, why that function is missing, but my guess it, that randomly killing threads is quite dangerous, as threads share the process with your program. Stopping the thread at some random ...

Use gtk-doc to find required package version

Usually I am quite unsettled when adding package requirements to README files and configure scripts. AI never really know if the version I specified is correct.

This morning I had enough of this uncertainness and hacked a short Python script to extract that information from our find gtk-doc manuals: gtkdoc-check-symbol-versions.

Libxml2 cannot parse the HTML gtk-doc generates, so the script reads the gtk-doc manuals line by line, throws regular expressions at them and puts the ...

Simple description of libepc

Seems I failed to give a simple description of libepc. People still ask what it really is.

Well, its nothing fancy. It's really just a public hash table.

Sounds trivial to implement, but isn't.

At least the discovery part: Current DNS-SD APIs provide a robust state monitoring API, and evilly ...

Easy Publish and Consume Library

As GNOME remembers the meaning of the 'N' in its name, more and more GNOME applications become network aware. GNOME provides excellent libraries for implementing network capabilities, nevertheless quite some effort is needed to glue them together to provide a smooth user experience.

When starting to add network support to Glom, we at Openismus decided it would be time to stop this frequent reinvention of the wheel, and put some of this glue code into an easy to use library. So the Easy Publish and Consume Library (libepc) was born.

The Easy Publish and Consume Library is ...

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:

  • The index.sgml files in the gtk-doc ...

Playing with Reinteract

Found Owen's Reinteract Demo on Planet GNOME this morning and had to play with it immediately:

Reshell and Reglade

Source code: reshell.py and reglade.py.

Update: Some Steve asked for PIL support in Reinteract. The reimage.py module supports PIL images, GDK pixbufs, GTK widgets and file names. Screenshot.

iconv transliterations

This is a lazy web request.

In GNOME world we use the g_convert, which conveniently wraps the iconv library, to convert between character sets. A feature I considered quite useful was the builtin transliteration support: When adding the "//TRANSLIT" suffix to the target character set's name, iconv shall try to convert characters not present in the target charset to their most reasonable equivialent. For example "Schlüssel" should become "Schluessel" when converting from UTF-8 to ASCII and "доброй вечер" could become ...

Facebook and friends

On the school yard all the cool kids smoked.

I don't smoke.
I don't do Facebook, GMail, and friends.
I hope you see the link.

More elaborateled: I've grown up in a country having big brother organizations like the Stasi. They were wrong. The fact that big-brother-like organizations are run by private entities those days doesn't ...

Doubts about voice chat

Voice Chat: Andrew, please no! I am one of those persons getting very distracted by people talking in the same room and I am one of those nasty guys requesting fellows to take a cigarette break (even if they do not smoke), when they start lenghtly discussions. Also you should consider, that written English seems much easier than talking for non-native speaker ...

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. ...

Dear Kids

Dear Davyd and Anonymous: I really hope you guys grow up one day and realize something must be wrong with your attitude when you react on slight critism with words like "Politely, please go eat a dick" or "It's like a murderer hating to see the police, sry...".

Update: I took the "vegetarian" out the title, 'cause I do ...

Spell Checking for the Masses

Recently I needed spell checking support for some cairo (and Pango) based canvas widget. Should be easy to pick, considering there are several aproaches to implement spell checking for GTK+ widgets, like gtkspell or libsexy. Unfortunatly those pretty libraries have the fault of focusing on one single widget only. So equiped with the power of Vala I wrote some small generic spell checking library for GTK+. Instead of directly attaching to some widget this library uses a [simple ...

Automake support for Vala

Using Vala together with automake was quite painful so far. When looking into libvala's Makefile.am for instance you'll see alot of duplication.

So I hacked a little script generating the automake rules needed for vala code. After adding the vala-support script to your autogen.sh script your Makefile.am can look as simple as this:

lib_LTLIBRARIES = libtest.la

libtest_la_CFLAGS = $(AM_CFLAGS) $(GTK_CFLAGS)
libtest_la_VALAFLAGS = --library=test --pkg=gtk+-2.0
libtest_la_LIBADD = $(GTK_LIBS)

...

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.

...

Liquid Bomb Complot

Luis, there was no prevented assault involving liquid bombs in London. There just are airport owners who want to force you to enter their overpriced "duty free" shopping malls. ;-)

At least that's the idea I had when waiting for my flight on Nottingham East-Midlands: My brand-new water bottle was thrown away at the security check, after the check there was ...

GUADEC 2007

Uch, it's almost a week ago, that GUADEC 2007 ended for me early. Appoligies for those of you I've meet, but could not say goodbye on Thursday - I had to get my flight back home. This goes especially to Federico and Phillip. After meeting many GNOME people in person, I know even more than I knew before, that GNOME is the community I belong to. Once again its an ...

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 ...

Stripping down GNU make

After reading Thomas' rant about automake 1.10 rejecting GNU-makeism in its script I wondered if it wouldn't possible to ship GNU make with all tarballs, instead of all the autotools crap. So I did some experiments this morning.

Raw GNU make 3.81 as distributed by the FSF requires 1.1 MB. After unpacking 6.4 MB of disk space are used:

 576     config/
1052    ...

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.

  • I've increased my involvement with the GTK+ team: Took care about some GTK+ bugs. Got permissions to close bugs after applying reviewed patches (see: GtkTasks). During that process I've got more familiar with git-svn - had my first dcommits.
  • Wasted time on extending libzip to support extracting PPMd compressed ZIP files ...

Saving Bandwidth with git-svn

git-svn is a cool tool to have the joy of local branches and git's outstanding performance, whilest working with a Subversion repository. Unfortunatly git-svn has the disadvantage of wasting insane amounts of bandwidth when cloning a Subversion repository: Cloning for instance the GTK+ repository costs serveral gigs of bandwidth - just do end with about 200 MB of compressed data on your disk. It's told this happens due a bug in ...

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 ...