Opened 13 years ago

Closed 13 years ago

#1418 closed defect (fixed)

Fix up errors in new loader GUI and add dumper support

Reported by: mcayland Owned by: mcayland
Priority: blocker Milestone: PostGIS 2.0.0
Component: utils/loader-dumper Version: master
Keywords: Cc:

Description

From my email to postgis-devel yesterday:

1) Instead of passing around structures, the existing code manipulates the GUI directly in multiple places. This makes it harder to add new flags etc. since the logic is no longer in one place.

2) To add to 1) above, the code introduces a new FILENODE type to shadow SHPLOADERCONFIG when in fact this should be completely removed and a linked list of SHPLOADERCONFIGs used instead.

3) Adding dumper support.

4) Remove the large number of Gtk assertions thrown on the console during normal operation.

Change History (16)

comment:1 by mcayland, 13 years ago

I've just committed as r8706 the majority of the reworked shp2pgsql-gui. Note that while this contains the GUI changes required to include a separate "Export" tab, I wanted to get what I've done so far out there for further testing/bugfixing.

Regina - I'm particularly interested to make sure that this still builds on Windows ;)

comment:2 by robe, 13 years ago

I tried on my 8.4 and it still builds :) and I can see the changes in the screen.

I'll try next on my 9.0 and 9.1 but don't forsee any issues. I haven't tried it yet though to import a file.

comment:3 by robe, 13 years ago

One cosmetic comment. Is see the add file section width is about half what it was before. I think this might be an issue as paths can get very long and table names so will be a bit hard to see things are right. If we can make it streatchable that would be even better.

It's hard for me to tell how small it is because I'm looking on a ridiculously huge monitor.

comment:4 by robe, 13 years ago

Mark,

Okay I was comparing the old and the new. For my default the old is 25% wider but shorter so I think that was why I thought it was 50%. however the older version I can stretch the columns individually or the width/height of the whole window so I can see a longish file path etc if I need to. The new one seems to be fixed width/height both width of window and columns like a standard dialog. It would be nice to get that user-stretch capability back. You never know you wanted something until you don't have it anymore :)

comment:5 by mcayland, 13 years ago

Okay. One thing to bear in mind is that the form now autoresizes up to a maximum of 60 chars which is the same limit that was enforced on the old one. I've had a quick look and its not immediately obvious what I need to change to enable this again so will have to take a look later :/

comment:6 by mcayland, 13 years ago

Okay - I've fixed this and made a few more tweaks with r8746. Please continue to test and see what happens :)

BTW one thing I did notice during the refactoring which I was not aware before, was that Mark added drag and drop support to the listview. Unfortunately I don't have GNOME to test this, and I don't know whether it ever worked in Windows, but you may like to experiment.

comment:7 by robe, 13 years ago

hmm never knew about the drag and drop but it does work on windows (at least the old). I'll compile your new changes later — not near my compiler.

I can't say I'm much of a drag and drop person as I don't have that much dexterity.

comment:8 by robe, 13 years ago

Mark,

I tried the new one and its better. I like the new log info and the fact that window is larger and there seems to be more information than I recall getting with the old one which is good.

Now I can widen the file field. However I can't widen any other column. I still have the annoying issue that the information I overwrite is sometimes not taken unless I click on the row. I had this issue before with the old one so it's not a new thing and its kind of intermittent.

The more annoying issue I see is that the append/create/.. drop down seems to be overlaid on top of the table name column so I click in there to change the value and sometimes I can guess where the drop down is and sometimes I can't. IT's like some maze backdoor.

comment:9 by robe, 13 years ago

By the way the Geometry Column seems to take up an unnecessary amount of space. That's one column I don't think few poeple need a lot of space with and its using up valuable real estate. Perhaps we can shorten the column to Geom Col or something. I think people will know what it means since its prepopulated anyway.

comment:10 by mcayland, 13 years ago

Thanks for the feedback :)

Per your request, I enabled resizing of the filename column which I believe should be sufficient? The other columns are generally quite small and set to auto-size themselves based upon the content, so you won't ever need to resize them. I'm not sure I understand your comment about information is sometimes not take unless you click on a row? It sounds like this may be some kind of GTK bug - which version are you running?

In terms of the mode dropdown, here I see that GTK aligns the drop-down based upon its currently selected value. Note that this behaviour is unchanged from Mark's version, and I'm not sure whether you can always make it drop lower? This may need some research.

Finally the reason that the geometry column takes so much space is because it is set to auto-size, it currently sizes itself based upon the column title which is "Geometry Column". If you would like to suggest a shorter column name I'd be happy to change it.

comment:11 by robe, 13 years ago

Yes I asssumed its because of the column name which is why I suggested "Geom Col" above

comment:12 by mcayland, 13 years ago

Okay - I went with "Geo Column" for r8800 because it seemed less like to cause confusion if people wanted to load files into geography rather than geometry columns.

comment:13 by robe, 13 years ago

Good call. Things fit nicely now. Are you done with this or more to do. I did some quick tests to confirm I can upload data, but nothing intensive.

comment:14 by mcayland, 13 years ago

I'm fairly happy the loader section is now complete, however I'm still working on adding some basic dumper support to the GUI too. I'd suggest that we either change the priority down from blocker and keep this ticket open until that part is done, or we track the dumper functionality as a separate ticket. I'm happy with whatever makes you happy :)

comment:15 by robe, 13 years ago

Lets close this out and create a new one for dumper. I think of them as very separate things.

comment:16 by mcayland, 13 years ago

Resolution: fixed
Status: newclosed

Okay - I'll close this one for the time being and create a separate one for the dumper.

Note: See TracTickets for help on using tickets.