More menus

As we saw in the last post, I was struggling to use the newer style GtkBuilder methods to start replacing bits of the application kludge3d. But my simple minded approach was giving me some grief:

 #include <gtk/gtk>
int main(int argc, char **argv)
    GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    GtkBuilder* builder = gtk_builder_new_from_file ("test.ui");
    GtkWidget* menubar = GTK_WIDGET(gtk_builder_get_object (builder, "menubar"));
    gtk_container_remove(GTK_CONTAINER(gtk_builder_get_object (builder, "mainvbox")), menubar);
    GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10);
    gtk_box_pack_start(GTK_BOX(vbox), menubar, TRUE, TRUE, 2);
    gtk_container_add(GTK_CONTAINER(window), vbox);
    return 0;

This isn’t so promising:
and the runtime warning isn’t clear (though as we’ll see, it’s correct)

(a.out:5940): Gtk-CRITICAL **: gtk_box_pack: assertion ‘gtk_widget_get_parent (child) == NULL’ failed

ToGoogle! Ok, consensus is that my menubar widget already has a parent and so the mainvbox is complaining when I try to add the menubar.

Memories of making my own container widgets in Windows and Gtk+2.x, I need to reparent my menubar.


gtk_widget_reparent has been deprecated since version 3.14 and should not be used in newly-written code.

Use gtk_container_remove() and gtk_container_add().

Great, at least I know to add :

gtk_container_remove(GTK_CONTAINER(gtk_builder_get_object (builder, "mainvbox")), menubar);

And, it works:


blank and sad film

So, I have a 400′ roll of colour film.

Test strip comes out blank.

Processed in known good B&W developer comes out blank (not even edge markings).

Ok. I guess there is something wring with the film. Storage? (ebay purchase)

Last try, take some out into the sunlight. Then pour fresh developer into the tray with the lights on. Remjet wipes off the back, and a blank pink frame emerges from the fix. I hate it when stuff doesn’t turn out. It was cheap though.

What now?

GTK+3.x and menus

So, having got kludge3d to the “starts, but doesn’t work” stage, I need to start implementing all the bits that got commented out along the way. For example, there are no menus because the method that was being used (GtkItemFactory) is deprecated (and so is a pain to compile) – time to move to the current methods.

Which would be great if the docs were clear for my use case.

See, I don’t want to just move the whole application over to a Glade designed interface, or use GtkApplication. The sane choice (I thought) was bring things over in a working, if minimal state.

So, I can use glade to build a menubar, save the result to xml. Then I’m failing to add the GObject I load out of the GtkBuilder to the application window I’ve created manually. And every tutorial assumes that I plan to just move everything to glade.

Frustrated, and considering my options…

Porting to GTK+3

For a long time I’ve used kludge3d as the basis for a geometry editing front end to my DPS program. kludge3d is a GTK+2.x app using gtkglext for OpenGL access and I regularly used it under windows and Linux.

Now, kludge3d hasn’t had much upstream development (last release 22/8/2004). That said, I’ve been able to keep it useful against the GTK+2.x series. However recently, getting a GTK+2.x bundle and adding gtkglext to is under windows has become too hard.

Its time to move to GTK+3.0.

First up, oh no, GTK has picked gtkglarea instead of gtkglext. More code churn.

However, though there is lots of code just stubbed out, I at least have a kludge3d binary launching under Linux:


My old Dell Inspiron 9300

A long time a ago, I bought a Dell Inspiron 9300 with a 1920×1200 screen. We are only just getting back to this sort of resolution being available again in 2015.

Later, this went to my dad. Now, the CPU/GPU is not doing it for him in Photoshop anymore, so I guess my 6 year old is the winner!

For various reasons, we have an Ubuntu installation here (15.10). As usual, stuff could be better:

  • Touch pad only is recognised as a mouse. No tap to click, let alone gestures. Kernel issue apparently.
  • Close the lid, suspend/hibernate sort of works. It goes off, but never comes back.
  • Weird UI
  • Weird UI

I love Linux and have been a keen user since the mid 90’s. Just want me to be the target market without putting in any effort or cash to make that happen.

I guess that makes me the “average” user, right?

So, I bought a pile of 65mm negative film

I found a good deal on some 65mm film. Now what?

My plan is to slit it down to make 220 film. I like my Hasselblad 500c/m and the E6 out of it is just amazing on the lighttable. So, how to cost effectively shoot more? Hence, the 65mm film.

Since 120/220 is nominally 60mm wide, how hard can it be to accurately trim 2.5mm off each side? Hmm…


But I’m getting ahead of myself here. What are my options for exposing this stuff? With a usable space between the sprocket holes of ~52mm, we are not very far from the actual 56x56mm image area of normal Hasselblad images.


The A12V back is a 4.5×6 back that gives you portrait format 645 on standard 120 film, at the expense of image area on the right and left. Given I have the sprocket holes already taking up space, the loss offends me a lot less. So lets slip the film into the back and mark the maximum image with a pen:


It doesn’t look too bad. By the way, the thick (badly aligned) lines are actually a 60mmx45mm. So the A12V is noticeably smaller than that. Closer to ~53×39, but still a very good option and likely to give the A12V more work than it currently gets.

IMG_3032 IMG_3034

What about an A12 6×6? Actually, this doesn’t look too bad does it? The sprocket holes are only just intruding into the image area. I’m liking this more and more.


Ok, can I process this stuff? If I can’t easily get it into my reels, then life gets much harder. On my first try, the radial spokes in my stainless steel reel kinked the film and made loading impossible. So, I trimmed ~2mm off one side. Much better, I could load, but the film still kinked at each spoke, so another 2mm off the other side. Very good. The film loads easily (the base is much stiffer than the commercial 120 I’m used to) and has a very small amount of play side to side. Just like normal 120.

IMG_3035 IMG_3036

Now, of course, I need some way to slit 33 inches (840mm) of the stuff to make 120 and twice that for 220. In the dark. Without cutting me too. Time to go to the hardware store and start experimenting.


Hot crossed buns

I have been making at least a few batches of hot crossed buns every year for many years. But Amelia turned out to be so sensitive to wheat that initially I couldn’t even cook wheat containing meals in the same kitchen. I tried making various wheat free versions. But now that we are wheat, egg, rice and corn free…. I’ve not succeeded in making an acceptable tapioca bun.

This year, things are under better control. I can make some wheat things like pancakes without bad reactions, so I started a small batch of buns last night

When I baked them today we got tasty light buns. So happy.