With moving to the new server I thought I would take a leaf out of Paul’s book and change the theme for the site. I have been using the current theme fluid blue since I started this blog in October 2006 so it probably long overdue for a change. When making this decision there is one factor I did not count on – I am a very picky person. After spending about an hour going through themes on the wordpress themes site I got sick of it and decided that I would be able to come up with something.
Now I don’t claim to be a designer, my hopes with this theme is to create something that I like and won’t make your eyes bleed if you stare at it too long. The goals I had in mind when working on this was a clean, minimal design that incorporated curves, I wanted curves because the current theme is all straight lines and right angles.
Currently I have completed a mock-up which can be found at mlowen.com/mockup and is currently filled with dummy data from this site, if you have any feedback it would be appreciated.
In a small return to blogging I thought I would start off with some transformers news. Earlier today I saw some new transformers footage over at Seibertron so I thought I would share it with you all.
The footage is originally from Michael Bay’s website, I’m also giving a link to the Seibertron story as well because there are a lot of still shots there. Hopefully later tonight I should be making another post about more coding related stuff.
Edit (~approx 5:50pm NZ): Well I took the video off of this post because I didn’t have permission to show it, which is a bugger but meh. You can see the footage either here or here.
Edit 2 (6:10pm NZ): It would seem that the official versions of the video are being pulled from everywhere seibertron no longer can show it and there is no sign of it anywhere on Michael Bay’s site. luckily though I found it on youtube, who knows how long this one is going to last though.
Can you tell I’ve recently begun coding on personal projects again? In a follow up to yesterdays post about loading a file with Giomm, last night I decided to upgrade a project I am working on from GtkSourceviewmm 1.0 to 2.0. This turned out to be more difficult than I initially expected as the API documentation provided with Ubuntu seems to be horribly wrong, it includes functionality that doesn’t exist anymore. So after referring to the GtkSourceview 2.0 documentation I got it all working so below is a simplified version with all error checking removed but should do the trick.
void load_highlightable_text(Glib::ustring file_name, Glib::RefPtr<gtksourceview::SourceBuffer> buffer){
Glib::RefPtr<gio::File> fp = Gio::File::create_for_uri(file_name);char*raw;
gsize read_bytes;
std::string e_tag;
fp->load_contents(raw, read_bytes, m_e_tag);
Glib::ustring buf = raw;
buffer->begin_not_undoable_action();
buffer->set_text(buf);
buffer->end_not_undoable_action();// Retrieve the mime type of the file.
Glib::RefPtr<gio::FileInfo> info = fp->query_info();
Glib::ustring mime_type = Gio::content_type_get_mime_type(info->get_content_type());// variables needed for getting the language
Glib::RefPtr<gtksourceview::SourceLanguageManager> manager = gtksourceview::SourceLanguageManager::create();
Glib::RefPtr<gtksourceview::SourceLanguage> language;
std::vector<glib::ustring> lang_ids = manager->get_language_ids();
std::vector<glib::ustring> mime_types;// Cycle through all available languages matching the first one that will highlight the given mime typefor(std::vector<glib::ustring>::iterator i = lang_ids.begin(); i != lang_ids.end(); i++){
language = manager->get_language(*i);if(language){
mime_types = language->get_mime_types();for(std::vector<glib::ustring>::iterator j = mime_types.begin(); j != mime_types.end(); j++){if(*j == mime_type){
buffer->set_language(language);
buffer->set_highlight_syntax(true);return;}}}}return;}
If anyone knows of a more sane way to do this please tell me as what I have currently looks bloody horrible to me.
Last week my desktop computer (Spidey) died which was a bit of a bitch as I had assignments due, though it had thankfully lasted a good 4 years so I wasn’t too angry (if it had waited a week I would’ve been a lot happier).
But every cloud has a silver lining, this one was I got me a new desktop computer, zeddicus. It’s a 3 Ghz Intel core 2 duo with 4 Gigs of ram, unfortunately I don’t game much anymore so I couldn’t justify buying a new graphics card so it’s using the GeForce 7950 GT from spidey.
All in all I’m very happy with my and a little sad to see my old machine die after having it so long.
Earlier today I installed some new ram in my laptop (NEC Versa E2000) which was really starting to feel the crunch with only 256 ram. After adding a GB of ram I decided to re-installing stock Ubuntu and once again ran across the problem of my key which is meant to produce | and \ instead produced < and > I found the fix to this at the Ubuntu forums but decided to document it here as well.
To fix this problem you need to have the following command run when you log in:
hmmm these hello world posts seem to be compulsory, well things are slowly coming together, using a bit of a different setup than last time, but should have a reasonably working site by tonight, unfortunatly the theme is a little broken at the moment so that’s the first priority followed up by a gallery, in the end I hope to have a similar setup to paul.