Older blog entries for RyanPavlik (starting at number 42)

ListBox to TreeView - Join Dialog v2!

I’ve had a productive morning here - implementing a major UI upgrade to my still-bright-shiny-and-new AbiCollab dialogs on Win32. Both the Accounts and Join dialogs had been created with Listboxes, because they’re pretty simple. The Linux GUI has some more sophisticated GTK control, but my first priority was getting it working.

Now that it works, I have some time to go back and make things nice. In this case, re-doing the Join dialog so that we have Buddies as “parent nodes” and their shared documents as child nodes. I’ll refrain from discussing the few minor snags in figuring out the Win32 API to get this to go, and just give you the juicy screenshots.


Join dialog - Document Selected


Join Dialog v2 - Now with Treeview Goodness!

Isn’t that much nicer?

Now back to hacking…

Syndicated 2007-08-15 18:36:20 from code art life - Ryan Pavlik on ClearDefinition

Spit and Shoepolish

Well, I’ve been working more on the Win32 port of AbiCollab. It’s certainly more rewarding now that it actually basically works, and I’ve gotten it to the point where most of the asserts have been hammered out and the interface is usable, if not ideal. Only one crasher, and one UI blocker - more info later.

However, I’d like to show off some screen shots of the dialogs in their current state. These images are all from the latest SVN build of my own running on Windows 2000.

Accounts Dialog

Accounts Dialog - When you go to Collaboration, Accounts, you’ll see this dialog. You can see I’ve already added an account, and so the appropriate items are available here. Buttons/controls that make no sense given the context are disabled in this and all other dialogs, with one exception.

Add Account dialog

Add Account Dialog - Click the Add button in the Accounts dialog, and you’ll see this. I’ve figured out how to get the fonts fixed, though the appearance of the text boxes and their sizing is still weird. Combining the backend-drawn controls (in the Account Details region) with the rest of the dialog handled in the core has proven to be some of the trickiest problems - this is the only dialog that doesn’t have context-sensitive control enabling, though not for lack of trying. I can’t get the DlgProc for the overall dialog to even receive notifications about the contained controls from the backend, though once I do figure out how to get them in the AddAccount DlgProc, I already have the passthrough and context-sensitive logic implemented in the backend.

Join dialog - No Selection Join dialog - Document Selected Join dialog - Buddy Selected

Three states of the Join dialog - Just to prove it to those who don’t run Windows, here is the Join dialog. It’s available under Collaboration, Available Documents, and lists “Buddies” (right now only the TCP servers we’re connected to) and documents being shared by those buddies (here, “The cha cha slide.abw”). Since there are additional backends that support multiple buddies per connection (like Jabber/XMPP), that’s why the buddy management gadgetry is in here. It will all work, actually, just need a backend to use it. The only “hidden feature” of this dialog is that double-clicking a document on the list will toggle your joined status. Most people will probably just select a document and click join, then close the document window to leave, but this option is available too. (Partially so that I can more easily break things and fix them.)

Now, the one interface blocker:

 Add Account dialog - Bug on Windows XP

Windows XP and its Visual Styles come to smite my Radio Buttons. I’ve tried a variety of control/window styles when creating these (they are created with CreateWindowEx, not with a resource file), tried adding a manifest to the Abi core, AbiCollab, and both, and nothing seems to be helping. This is why those weird (Join) (Serve) labels were redundantly visible in the previous screenshot of this dialog - Windows XP displays STATIC labels just fine, so I’ve added those as a temporary workaround. If anyone has any pointers or information regarding this issue or what I could do to solve it, please comment - I have spent quite a bit of time unsuccessfully trying to squash this bug, and it saddens me that my stuff has to look so ugly on what is probably the primary platform, WIndows XP. (I think it has to do with the same reason the text entries on that dialog are ugly. And, FYI, I’d prefer not to just move the label out of the Radio Button control since that breaks some important accessibility bits, though I might do it for a release if I can’t figure it out by then.)

The other issue is the one crasher bug - you can’t disconnect from an account or delete an account. I’ve traced through that code, and it seems to be destroying the account fine and works until I choose “continue”, but the backtrace is all weird, and Marc (my mentor) suspects stack corruption. Again, any insight is beneficial, though I think this is probably going to be my own dragon to slay, since it’s a lot more specialized of a problem.

If you’d like to try it for yourself, get a nightly build from my web site (it’s in the Tools plugins, you also need to get the latest 2.5.x core from the nightly build) and give it a shot! Please file bugs if you find any.

Keep on hacking, ants!

Syndicated 2007-08-12 19:29:52 from code art life - Ryan Pavlik on ClearDefinition

AbiCollab on Windows WORKS!

You heard me right! After some struggling with the use of a message-only window to integrate the TCP asynchronous IO into the single-threaded Abi mainloop, as well as some bughunting in the cross-platform parts of the code, it works!

 AbiCollab on Win32 - The First Document

First message sent over AbiCollab on Win32: “Mr. Watson, come here. I want to see you.” I thought it was prudent from a historical standpoint.

AbiCollab on Win32 - The First Document

With the initial document sent over, I proceeded to test: with only intermittent ASSERTs, two-way editing of a document over AbiCollab on Win32 works! I also tested it across the real Internet, with Marc (instead of with Localhost), and it also works there!

Once I got it working, I went ahead and cleaned up some portions of the code and fixed some bugs - it is much easier to test things when you know how much is working. My schedule for the rest of the Summer of Code is as follows: Fix bugs until it feels “polished”, then, with any remaining time, work on the Gremlin to allow automated testing. The cooperative collision resolving will come later, when everything else is more stable.

For the daring or crazy, I have nightly builds which now include AbiCollab. To ensure that nobody thinks this is a real release (THIS IS NOT A REAL RELEASE!), I will only tell you that they are on my web site (Ryan Pavlik - Code Art Life on ClearDefinition), and that you should wait until Friday the 10th since they build late at night. (For the rest of you crazy enough to use a dev release but not crazy enough to use a nightly build, 2.5.2 will be coming down the Intertubes soon enough.) Have fun!

Syndicated 2007-08-10 00:10:30 from code art life - Ryan Pavlik on ClearDefinition

Off to San Jose!

I’m headed to MathFest 2007, the annual summer meeting of the Mathematics Association of America. I’ll be presenting some of my (non-AbiWord) research at one of the Pi Mu Epsilon student paper sessions, as well as attending others’ presentations and enjoying a talk by the one and only Donald Knuth. (Yes, I’m excited!)

If anyone has ideas of fun things to do in the general vicinity of San Jose State University - let me know. I’ll have my N800 with me and will check this post for comments. (Student-level, aka cheap, restaurant suggestions and local quirky attractions are especially appreciated.)

The downside: I’ll be silent on the code front until Monday. I’m currently wrestling with a run-time segfault, as well as a failed assert that seemed to magically appear.

Catch y’all later! Keep hacking, ants!

Syndicated 2007-08-01 06:13:47 from code art life - Ryan Pavlik on ClearDefinition

Somebody Else’s Project!

Yes, I’m writing about somebody else’s project (not Sum1’s project - just his student). This is mostly because I don’t have a screen shot for what I’ve done since my last update. (I have brought the Account and Add Account dialogs into feature parity with their Unix counterparts, which means a little bit of poking on the backend side, a “Join” dialog, and a Windows message-based synchronizer, and Windows collaborates!)

PhilM has been working hard on the MS Office OpenXML format support, and has built an importer for it. Always the advocate for feature parity, I’ve been watching the development and poking at the Windows makefiles for the plugin as I had moments to do so, with the goal of letting Phil release simultaneously on Linux and Windows at the conclusion of SoC. I had been stumped for a little while by a weird compiler error - I was in fact segfaulting G++, and I very nearly congratulated Phil on this accomplishment. Turns out, though the Makefiles for that plugin were consistent with themselves, not looking at them along side those for other projects had permitted me to overlook a vital detail: each include path should have been (but was not) prepended with -I. After figuring that out tonight, fixing it, then upgrading the LibGSF in my build environment (which I could have sworn I did before, but clearly had neglected to do), the OpenXML plugin built without a problem! Here’s a pretty screenshot of the second result on Google for “filetype:docx“, along with the first successful compiler message.

 Thanks, PhilM, for giving me something screenshot-worthy to blog about!  OpenXML import on Windows!

(PS. Phil - The third one on google (”THE_BRONX_PUERTO_RICAN_DAY_PARADE_2007″) has what appear to be formatting commands (”centertop”) as part of the text. May be a useful test document. Congratulations on getting accented characters to import, by the way - the rest of that doc looks nice! :D )

Summer of Code is so cool!

Syndicated 2007-07-27 04:40:24 from code art life - Ryan Pavlik on ClearDefinition

So busy I don’t even blog!

I’ve been really buckling down and working hard on the Win32 port of AbiCollab recently. I’ve made some very large (at least, for me) commits without even posting ridiculously long blog posts about them, so you should either be a) proud I’m reforming my writing style or b) disappointed at the apparent lack of progress.

Last blog, all we had was a single, non-functional dialog. Well, now that dialog has a properly hooked-up “Add” button that really does bring up the Add Account dialog. This was a bit of a process: turns out the MinGW resource compiler doesn’t like compiling more than one resource file. After considering some Makefile-foo to call it repeatedly, I settled instead on a single over-arching resource file including each of the dialogs. (Which, by the way, are all completely designed and have functional resource files - I just can’t “get to them” in the UI yet so I haven’t copied and pasted the standard code behind them yet).

July 20 - The Second Dialog Appears!

Dialog #2 - Date of Birth: July 20, 2007 

Furthermore, we have an account backend (the TCP Backend) that is at least being registered and responding to our requests - it even draws (ugly-looking) controls in the Add Account dialog when it is selected from the drop down. And, even though it would be easier to not do so, I’ve implemented load and unload for the backend controls: even though only TCP realistically will run on WIndows for now, the dialog knows no such thing, and willingly destroys and re-creates the controls each time I select TCP. Exciting!

July 22 - A Backend Says Hello - in an ugly fixed font!

Tonight: Beauty only the programmer who was confused for quite some time by a non-standard definition of “height” could love.  (Yes, the TCP backend builds and loads!) 

(Note to others: the height of a ComboBox DropDownList control determines the maximum extent of the drop down menu, not the height of the edit control! Don’t let this fool you!)

So what’s next? Well, I’m considering adding a function to the AbiWord core (GASP!) to allow me to set the dialog handle manually in a DialogHelper, so I don’t have to essentially duplicate those functions. (This gets back to the instance thing I mentioned before: since we’re in a seperate executable image and need to use our own instance calling Win32 directly, we don’t use the DialogHelper’s tools to do that which would also initialize the hDlg in that class)

Furthermore, I’d like to figure out why the controls I’m painting in the TCP backend are both a) ugly and b) the wrong size. Hopefully from here on out, now that I have a useful amount of Win32 API experience, implementation will be reduced to just plugging the gaps between the WinFE and the cross-platform goodies Marc already wrote. (The second and a half dialogs went way quicker than the first…) I also need to work on some sort of signalling mechanism since the TCP backend uses an async/threaded system for handling packets. It looks like a message-only Win32 window is the way to go: fortunately I found a good tutorial.

Well, I must not have reformed my writing much - this is still really long! Oh well, it corresponds with a lot of progress. Keep on hacking, ants!

Syndicated 2007-07-23 05:38:46 from code art life - Ryan Pavlik on ClearDefinition


Hot on the tails of the midterm survey for Summer of Code, I achieve a breakthrough on the Win32 implementation of AbiCollab. I’ve made a few medium-size commits working to get the Win32 API and dialog resources in external executable images working. I had what seemed to be correct code, but I was getting a bogus (actually, 0) handle from Windows. One brief email to the Dev list later, and Dom suggests that perhaps the define for the DllMain function should be wrapped in an extern “C”. (That’s a 12-character patch, for those of you who are counting.)

Anyway, that was in fact the last piece needed: immediately after adding that and compiling, I got the following screenshot! As you can see, my very simple dialog primarily based off of the Tabs dialog is being displayed! In this shot (and SVN), none of the buttons are actually hooked up to anything, so once the dialog comes up your AbiWord fun is over until you kill the process, but I fixed that too, along with working on some code cleanups. Now that I have something workable that I can play with, development should go much more rapidly.

First Dialog Displays in AbiCollab!

Thanks go to Sum1 who helped me debug my dialog code, and Dom for the missing piece, and Uwog for being a great mentor!

Keep hacking, ants!

Syndicated 2007-07-17 21:57:29 from code art life - Ryan Pavlik on ClearDefinition

Fully Qualified Paths and Paths to Solutions

(Please excuse my cheesy attempt to link the two topics of this blog post.)
First off - the Windows nightly builds (graciously hosted by Marc) have been fixed. I changed the scripts pretty severely recently when I moved them to look at SVN instead of CVS. The result is a lot nicer, more modular build scripts. However, it hadn’t been actually seeing the updates, and I had been so busy working on Summer of Code stuff that I hadn’t had a chance to figure out why. Well, it turns out I was specifying a relative path to one of my scripts, from the wrong directory. The script was the one that does the updating. Oops. Fixed that with a fully qualified path (absolute), fixed a similar issue with the location of files being uploaded to FTP, et voila - it works! While I was at it, I updated the version of LibGSF to 1.14.4 in anticipation of the progressing OpenXML support (Thanks to TML for the libgsf binaries and PhilM for the SoC OpenXML work!), so do test these builds and see if they work for you.

Now to my second topic - paths to solutions. My progress on Summer of Code has brought me into some rarely-explored bits of code in AbiWord: displaying dialogs from plugins on Windows. One plugin did this (Aiksaurus) but I am told it hasn’t compiled in a while, and its dialog code looks very little like the other dialog code in AbiWord. The failure mode is amusing, at least before you spend a good deal of time trying to figure out why it happens (Windows compilation is slow….): The Collaboration Accounts menu item brings up the Change Case dialog. I’ve tossed some debugging lines in there, and I’m told the ID that the SessionManager (in charge of registering the dialogs) is getting okay IDs, AbiWord core is just returning/displaying the wrong dialog. I’ve emailed the AbiWord developer’s list to try to figure out what is going on from someone with more experience in these parts of the code: hopefully a solution can be found soon so that my work on the Win32 part of the project can move forward.

On the other part of my project, I’ve worked on some “thinking and documenting” parts, which are showing up at my Summer of Code page. Marc has been doing some pretty serious work on the conflict resolution for OLPC, and so I’m waiting on the code part of this project component until that seems to settle a bit, giving me time to analyze the situation without being keyboard-addicted. I’ve also started working on a “gremlin” plugin which will eventually be used to run fully-automated torture testing of AbiCollab and its conflict resolution by making random changes to the document. After hurdling a few difficulties (who knew that nextgen.sh and autotools would have such a hard time with DOS line endings?) the basics of that plugin compile and run on Windows and Linux, inserting a one-off secret message into your document upon execution.

If anybody has any ideas or advice to offer based on what I’ve talked about, please feel free to email me. My username is abiryan, and the domain name is that of my company, ryand.net. I’ll let you figure that out, so I minimize spam… (In a pinch, I have a spammy address listed on my company page…)

Till next time, keep hacking, ants!

Syndicated 2007-07-09 05:27:13 from code art life - Ryan Pavlik on ClearDefinition

N800 Synchronization - Nearly Demystified!

So through the graciousness of a developer and their donated code, I have a Nokia N800. It’s an awesome device: I cannot overstate the value of using the same software on my desktop as on my portable device. I refer to it as my laptop replacement: with a new Bluetooth keyboard, it can essentially do everything my outdated laptop did and faster, except for slide presentations.

Unfortunately, I had been using a (slightly flaky) Palm Vx, and was hoping I could replace it with the N800. Yes, I knew when I got it that it wasn’t a PDA, and that there was no officially supported PIM software, and that anything for it was probably a little flaky, but that didn’t bother me - I never was a Palm addict and most of the time used it more to take notes on than actually organize my life.

However, I did install as much of the Pimlico Project stuff as possible, as well as the GPE PIM suite. The “hacker” synchronization of Evolution on my desktop to the Pimlico stuff (copying files from my .evolution directory) worked ok the first time, but the lack of 2-way interaction and the restriction of the system to relatively manual, calendar-only operation made it essentially not functional. (And, when I clicked on a date intending to look only at that day, it liked to add events instead, and Cancel didn’t always work, so I had random events scattered on my calendar.)

With some trepidation, I decided that I would use the GPE stuff - I believed it would be harder because it wasn’t the same data store as Evolution, but only GPE had all the features (calendar and todo) that I needed, and people had, at least in theory, synced with it before. Today I took some time and, for probably the fourth time, looked at all the OpenSync tutorials I could handle. It strikes me as very powerful software that is still very much under development. My version in Ubuntu Feisty was too old to have the GPE plugin, and the additional repo on the OpenSync site was i386 only (and I’m AMD64). So, I rebuilt the source packages from their repo for 0.22 (the latest stable version) and attempted to use it.

This brings me to the good news point - I got it to work! Basing my steps heavily on the instructions to sync a GPE iPaq with Evolution, and opting to use GUI tools instead of CLI whenever available, I was able to get syncing to work relatively well! There are a few issues, but I’ve documented them on my instructions and when I figure out whose fault they are, I will fix them or file bugs.

So, for the sheer sake of making these instructions available to other potentially frustrated N800 users: How To Synchronize an N800 (with GPE) and Evolution. It is my hope that the next person using an N800 who wants to try some cutting-edge PIM stuff will have this guide to get them started, so they won’t get sidetracked on a million and one different paths. There’s obviously some great development going on with these PIM apps, but I fear not many people end up actually syncing things anymore, and those who do know how already, so they don’t write up instructions. Hopefully these instructions will let more people take advantage of all the real work the devs are doing.

Till next time, keep it in sync!

Syndicated 2007-07-02 01:19:22 from code art life - Ryan Pavlik on ClearDefinition

It Builds!

Thanks to the wonderful help of my mentor Marc (uwog) and the help of Hub who was productively loitering in #abiword at the time, I am proud to announce the following:ABICOLLAB BUILDS AND LOADS ON WINDOWS! Because I’m in favor of eliminating black magic, the build instructions are on my web site, http://www.cleardefinition.com/  for the enjoyment of anyone with some free time and a Windows computer.  I’ve definitely got a ways to go still (the dialogs are just stubbed in, etc), but this is a major milestone.  Enjoy the screenshot!

AbiCollab Builds on Windows - See the Collaborate menu?

Syndicated 2007-06-12 22:08:42 from code art life - Ryan Pavlik on ClearDefinition

33 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!