After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 358092 - Add drag-and-drop layout
Add drag-and-drop layout
Status: RESOLVED FIXED
Product: glom
Classification: Other
Component: design
git master
Other All
: Normal normal
: ---
Assigned To: Johannes Schmid
Murray Cumming
: 425145 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-28 06:44 UTC by Murray Cumming
Modified: 2009-12-29 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A tiny DND experiment. (7.84 KB, patch)
2007-04-05 13:00 UTC, 28872d13
none Details | Review
Another test program for dnd (13.76 KB, patch)
2007-04-25 13:27 UTC, Johannes Schmid
none Details | Review
Some dnd test code integrated in glom (31.43 KB, patch)
2007-04-30 10:08 UTC, Johannes Schmid
needs-work Details | Review
Yet another dnd test (23.51 KB, patch)
2007-05-09 15:40 UTC, Johannes Schmid
none Details | Review
Prelimitery dnd layout (36.99 KB, patch)
2007-05-23 17:14 UTC, Johannes Schmid
none Details | Review
one of the missing files (954 bytes, text/x-c++src)
2007-09-17 13:24 UTC, Johannes Schmid
  Details
floweventbox.h (1.05 KB, text/x-chdr)
2007-09-17 13:24 UTC, Johannes Schmid
  Details
floweventbox.cc (949 bytes, text/x-c++src)
2007-09-17 13:25 UTC, Johannes Schmid
  Details
glomdragdrop.patch (25.64 KB, patch)
2007-09-18 09:43 UTC, Murray Cumming
none Details | Review
Updated version of the patch (41.61 KB, patch)
2007-09-27 13:50 UTC, Johannes Schmid
needs-work Details | Review
Merged changes from trunk into the patch (42.87 KB, patch)
2007-10-12 13:56 UTC, Johannes Schmid
needs-work Details | Review
Preview/Placeholder handling (46.95 KB, patch)
2007-10-23 13:57 UTC, Johannes Schmid
none Details | Review

Comment 1 Murray Cumming 2007-04-05 12:46:46 UTC
*** Bug 425145 has been marked as a duplicate of this bug. ***
Comment 2 28872d13 2007-04-05 13:00:29 UTC
Created attachment 85848 [details] [review]
A tiny DND experiment.
Comment 3 Johannes Schmid 2007-04-20 12:20:47 UTC
I will have a look at this though I am quite sure that this will take some time. The 60 hours stated in the proposal look realistic.
Comment 4 Murray Cumming 2007-04-20 12:23:12 UTC
Yeah, feel free to take simpler tasks first.
Comment 5 Johannes Schmid 2007-04-25 13:27:09 UTC
Created attachment 86988 [details] [review]
Another test program for dnd

This one is based on the tiny DND experiment but has some differences:

- Instead of dragging on the items you can drag items into the flowtable
- Some preview rectangle is shown as user feedback

Still todo:
- If a FlowItem has no second item it should be possible to drag a second item
- make it look pretty
- integrate with glom

This is work in progress, the code is also not very nice yet but I want some basic functionality before I start to integrate this in glom.
Comment 6 Johannes Schmid 2007-04-27 19:09:51 UTC
OK, I have some working dnd code now but I have a question on the generic workflow of interface creation.

In the moment you can define new Fields in the Table and later add a LayoutItem by selecting one of the fields. This will always create a Label + Widget (Button, Entry, Combo, etc).

In the new workflow I propose the following:
- Define the fields in the dialog as before
- Have a generic drag button to be able to arrange a new Layoutitem
- When the LayoutItem is dropped the dialog to select the field would pop up and after the user selects a field the appropriate widget is created.

Is this your intention or did you think of something different.
Comment 7 Murray Cumming 2007-04-27 21:52:09 UTC
Yes, you would drap-and-drop a generic field layout item. And when you drop it, you would be forced to choose an actual field. Then it would just show itself appropriately, as now. For now, this will not offer any way to add a field to the underlying table - the fields must exist already.
Comment 8 Johannes Schmid 2007-04-30 10:08:29 UTC
Created attachment 87264 [details] [review]
Some dnd test code integrated in glom

Dnd test code - do not commit!
To test dnd, open a database, choose Designer mode and use the Designer->Fields menu entry. This will popup a little window where you can drag from. The preview does not yet work like in the test program, I have to figure out why.
Comment 9 Murray Cumming 2007-05-05 12:19:48 UTC
> To test dnd, open a database, choose Designer mode and use the Designer->Fields
menu entry.

Feel free to add an extra menu item for this, even if it's just for testing. It's odd having it together with the table fields definition.

> This will popup a little window where you can drag from.

Unfortunately, I can't seem to start a drag from that "Drag Widget" button.

Comment 10 Murray Cumming 2007-05-05 12:20:28 UTC
> I can't seem to start a drag

Ah, I can when I close the fields definitions window.
Comment 11 Johannes Schmid 2007-05-09 15:40:50 UTC
Created attachment 87888 [details] [review]
Yet another dnd test

Yet another test!

I added a new menu item "Fields interactive" which shows the drag button now. Some preview is also provided for the dragging though it needs to be improved a lot.

Somehow, the drawing does no longer work after one widget was added or the "Fields"-Window was used. I have to investigate that.
Comment 12 Johannes Schmid 2007-05-14 19:38:51 UTC
OK, after some more experimenting I finally asked on gtk-app-devel list why it does not work as expected.

The problem is that FlowTableWithFields is a nested container meaning that it can contain yet another FlowTable. As classes derived from GtkContainer do not have a GdkWindow and thus do not receive X events it's impossible to use them for drag and drop more or less.

See: http://mail.gnome.org/archives/gtk-app-devel-list/2007-May/msg00069.html (hopefully the answer I already got will appear there soon...)

We have to think of a completely different solution.

What came into my mind was to use glade internally (glade3 can be embedded) and strip it down so that only the useful features are availible but that's also going to be complicated.
Comment 13 Murray Cumming 2007-05-14 20:20:23 UTC
Can we fix this by using a GtkEventBox? I wonder if there are other examples of drag-and-drop happening in containers? There must be.

I'd rather avoid messing with glade.
Comment 14 Johannes Schmid 2007-05-18 14:10:20 UTC
Thanks for the hint! GtkEventBox solves most of the problems. I have experimented a bit with moving other widgets away (up or down a bit) while dragging to have a better preview. It's working for the test program but not in glom, yet. More to come soon...
Comment 15 Johannes Schmid 2007-05-23 17:14:22 UTC
Created attachment 88685 [details] [review]
Prelimitery dnd layout

This is a slightly more useful patch.

You can now drag items on the layout and they will be added (to the interface, not yet to the database). The position of the items is often wrong especially when you want to drag something in the top-level frame. As before, the missing GdkWindows are a probleme here.
Comment 16 Murray Cumming 2007-09-17 10:21:41 UTC
The patch is missing the floweventbox.[h|c] files.
Comment 17 Johannes Schmid 2007-09-17 13:24:00 UTC
Created attachment 95727 [details]
one of the missing files
Comment 18 Johannes Schmid 2007-09-17 13:24:32 UTC
Created attachment 95728 [details]
floweventbox.h
Comment 19 Johannes Schmid 2007-09-17 13:25:44 UTC
Created attachment 95729 [details]
floweventbox.cc
Comment 20 Murray Cumming 2007-09-18 09:41:31 UTC
I've just tried this.

Dragging either an item or a group to the layout causes the target group to be highlighted. That's maybe useful, but we really need to draw a placeholder to show where the actual item would be dropped, and the other items need to flow out of the way to make room for it.

But you probably know that already.
Comment 21 Murray Cumming 2007-09-18 09:43:01 UTC
Created attachment 95785 [details] [review]
glomdragdrop.patch

This is a version of the patch that applies cleanly against svn trunk.
Comment 22 Johannes Schmid 2007-09-27 13:50:51 UTC
Created attachment 96286 [details] [review]
Updated version of the patch

This patch now adds a placeholder where the widget will be added later. Unfortunately it does only add items and the end of the FlowTable. I have to investigate the use of more EventBoxes to change this
Comment 23 Johannes Schmid 2007-10-12 13:56:56 UTC
Created attachment 97121 [details] [review]
Merged changes from trunk into the patch

This patch does just merge the changes from trunk and applies cleanly. No new/better functionality.
Comment 24 Johannes Schmid 2007-10-23 13:57:54 UTC
Created attachment 97730 [details] [review]
Preview/Placeholder handling

With this patch, the preview/placeholder handling is mostly complete. Currently only the preview is drawn and no widget is really added. This is because of changes in Glom::DataWidget that I have not yet merged. Preview works good for most cases but is off by some pixels for FlowTables inside of GtkNotebooks.

Some other questions:
- How should the GUI look like in the end. Do you want to keep the floating window (with better icons, etc.) or should we add a toolbar.
- Do you have an idea how the placeholder could look like? Currently it is really not nice but I am not artist and no UI designer so any idea would be nice.
Comment 25 Murray Cumming 2007-10-23 14:08:41 UTC
Tell me when I should take a look, and at what branch. Then I'll make some decisions. Well done so far.
Comment 26 Johannes Schmid 2007-10-23 14:14:17 UTC
Hi Murray!

The patch is against trunk. I can create a branch if you like.

As I asked, it mostly about how to design the UI around drag and drop and how to present everything to the user in a convenient way. I will make some screenshots and blog about it soon to get some more feedback.
Comment 27 Murray Cumming 2007-10-23 14:22:12 UTC
A blog entry would be good. Thanks. Let's apply this to trunk soon, but not just yet.

I think that a simple rectangle for the drop preview is fine, but let's see.
Comment 28 Murray Cumming 2007-10-23 14:24:13 UTC
> How should the GUI look like in the end. Do you want to keep the floating
> window (with better icons, etc.) or should we add a toolbar.

I would like a (maybe undockable) vertical toolbar. I need this for the print layout too, so it would be great if you investigated how best to do this.
Comment 29 Murray Cumming 2007-12-18 12:32:45 UTC
This is looking pretty good, though I have not yet tested it with an empty or almost-empty layout.

I notice that the placeholder is not visible if I drag over a field entry, though it works when dragging over the field label.

Note that Mathias is working on a glade-3-like reusable tool palette widget that we can use for this and my print layout work. 
Comment 30 Johannes Schmid 2007-12-19 12:48:44 UTC
> I notice that the placeholder is not visible if I drag over a field entry,
> though it works when dragging over the field label.

Yes, that because the field has it's own GdkWindow and catches the drag events itself. I'am working on a way to chain those events up to the FlowTable but it's not entirely easy.

> Note that Mathias is working on a glade-3-like reusable tool palette widget
> that we can use for this and my print layout work.

It shouldn't be difficult to integrate this later. We already discussed that the buttons have to work for dragging and he found out how to do it.

Another problem that remains is that it's not yet possible to drag empty containers. Here, some kind of "sticky" placeholders is needed that is inserted until the user drags some real layout element into the container.

Comment 31 Murray Cumming 2007-12-19 13:05:55 UTC
> Another problem that remains is that it's not yet possible to drag empty
> containers. Here, some kind of "sticky" placeholders is needed that is inserted
> until the user drags some real layout element into the container.

Yeah, or we could just make sure that FlowTable has a certain default height when it has no children. We could even make it have a "<empty>" label as the child in this case.

By the way, there are already dialogs for editing text and button items - see what happens when you edit them in the old layout editing dialog. Also, they should maybe just start with the same default contents that they have when you add them there (or via right-click).
Comment 32 Johannes Schmid 2008-01-14 14:52:39 UTC
> I notice that the placeholder is not visible if I drag over a field entry,
> though it works when dragging over the field label.

Fixed now for entries though it's not very pretty and I have to do some work to support texts and images. Also fixed some alignment problem for the placeholders.

Adding new fields with default properties could be easier because using the editable cells in the layout editing dialog directly is not very pretty IMHO.

That should be finished soon and I will concentrate on making it possible to start with an empty layout. Integrating Mathias toolbar should not be a big deal later when it's API is half-way frozen (and there is a C++ wraper...).

Comment 33 Murray Cumming 2008-01-14 15:56:01 UTC
> Adding new fields with default properties could be easier because using the
> editable cells in the layout editing dialog directly is not very pretty IMHO.

I don't understand this. Could you try again to explain?
Comment 34 Johannes Schmid 2008-01-14 21:06:48 UTC
Sorry, this was meant as reply to comment #31:

> By the way, there are already dialogs for editing text and button items - see
> what happens when you edit them in the old layout editing dialog. Also, they
> should maybe just start with the same default contents that they have when you
> add them there (or via right-click).

And I would agree that starting with the default contents would be the simplest solution. Sorry for the confusion.

Comment 35 Johannes Schmid 2008-01-25 14:02:31 UTC
I am currently investigating why adding of groups does not work correctly to make it possible to start with am empty layout (had to fix some bugs that causes crashes when the layout is empty...).

Anyway, there is signal_layout_item_added() which is emitted by FlowTableWithFields but does not seem to be caught anywhere. Was there some plan to do something with it? create_layout() somehow seems to miss out the new group and thus it disappears some milliseconds after it was added.
Comment 36 Murray Cumming 2008-01-25 14:04:49 UTC
Not that I know of. If the signal is really not used, feel free to comment it out.
Comment 37 Johannes Schmid 2008-01-28 22:08:38 UTC
Some general ideas that I want to have approved before starting coding:

- Adding Fields:
The user can simply add fields at any position he wants (at least if there is some group). No dialog will be shown because the field is self-contained.

- Adding Buttons/Text
After adding the item, the LayoutDetails dialog will pop up with the added item selected so that the user can change the name and other things

- Adding groups/portals
More or less the same that happens for buttons/text but the group will be added in the dialog at the correct position after dropping it. Once the dialog has been closed the group will be added to the document and the view will be refreshed. Of course the user will have the preview widget.

Before that, I wanted to give the user the choice to open the dialog when he feels he wants to change something. Anyway, it is very difficult to add a single layout_group to the document and seems much more efficient to use the tree model of the layout details dialog and to refresh the whole layout.

To archive all that I have to extend the interface of the layout details dialog with things like:

- add_group_at_position()
- select_layout_item()

What do you think? Maybe there is a better solution that I miss.
Comment 38 Murray Cumming 2008-01-28 23:14:57 UTC
(In reply to comment #37)
> Some general ideas that I want to have approved before starting coding:
> 
> - Adding Fields:
> The user can simply add fields at any position he wants (at least if there is
> some group). No dialog will be shown because the field is self-contained.

I don't know what you mean. Why wouldn't he be able to add a field where he wants? What does self-contained mean? In general, I don't want dialogs shown automatically after the drop.

> - Adding Buttons/Text
> After adding the item, the LayoutDetails dialog will pop up with the added item
> selected so that the user can change the name and other things

No, I'd prefer them just to have default text/names, with no dialog shown automatically after the drop.

> - Adding groups/portals
> More or less the same that happens for buttons/text but the group will be added
> in the dialog at the correct position after dropping it. Once the dialog has
> been closed

Again, I don't want a dialog. What would it ask?

> the group will be added to the document and the view will be
> refreshed. Of course the user will have the preview widget.
> 
> Before that, I wanted to give the user the choice to open the dialog when he
> feels he wants to change something. Anyway, it is very difficult to add a
> single layout_group to the document and seems much more efficient to use the
> tree model of the layout details dialog and to refresh the whole layout.

That's fine. It will look the same to the user (well, maybe with a little flicker, but that's OK)

> To archive all that I have to extend the interface of the layout details dialog
> with things like:
> 
> - add_group_at_position()
> - select_layout_item()

That sounds fine.
Comment 39 Johannes Schmid 2008-01-30 15:28:45 UTC
> I don't know what you mean. Why wouldn't he be able to add a field where he
> wants? What does self-contained mean? In general, I don't want dialogs shown
> automatically after the drop.

OK, maybe "self-contained" is the wrong word. I just wanted to say that there isn't any layout information that the user would want to edit for a field, like label or name. 
Glom forces that fields are organized in groups and does not allow to add a field that does not belong to a group. Anyway, it's unlikely that the user will find a place where there is no group.

> That's fine. It will look the same to the user (well, maybe with a little
> flicker, but that's OK)

OK, I have halfway implemented this but have to care about dragging items into empty groups now. 

Comment 40 Murray Cumming 2008-01-30 17:10:38 UTC
OK.

By the way, I get the idea from some comments that you are using the TreeModel to read/change the groups instead of the LayoutGroup directly. If so, this does seem odd because the TreeModel is just an implementation detail of the ugly old layout dialog.
Comment 41 Johannes Schmid 2008-01-30 18:16:13 UTC
Yes, because I didn't find a way to add a layout_group to the document. The only API that exists saves all (existing) groups as a whole. And from the internal data structure I could not figure out how single groups could be added.
Comment 42 Murray Cumming 2008-01-30 19:17:41 UTC
I think it would be best to add some API to the document class then, or to some part of the data structure that the document gives you. I can do that if you like, but I won't get to it until maybe Friday.
Comment 43 Johannes Schmid 2008-01-30 22:29:23 UTC
I will have a look at it tommorow and see what I can do. Until now I have not much clue how this data structure is organized. In any case I will post some more details (and maybe detailed questions).
Comment 44 Johannes Schmid 2008-01-31 15:16:53 UTC
OK, I think I got it. The API is actually there but it's a bit difficult to find out how it works and I had to read quite a bunch of code to find out (maybe I am also just to stupid...)! What a mad idea to use the layout dialog...
Comment 45 Johannes Schmid 2008-02-18 14:29:59 UTC
Finally I got dragging for groups working. Anyway, there is a problem with the correct positioning:

The drag code determines the Gtk::Widget next to the drop zone. It then casts the widget to the corresponding LayoutWidgetBase* widget. To insert at the correct position of the group LayoutGroup::add_item() is used. For the item, LayoutWidgetBase::get_layout_item() is used.

This works fine for LayoutItemField but somehow LayoutItemButton for example has no layout item attached and get_layout_item() returns 0. Thus it is not inserted at the correct position but at the end of the group.
Comment 46 Johannes Schmid 2008-02-20 13:57:51 UTC
OK, I could fixed the problem mentioned in comment #45.

Anyway, seems like the layout is not saved/restored correctly when you quit glom. Have to investigate that, probably I broke something.
Comment 47 Johannes Schmid 2008-02-20 14:16:46 UTC
Would be have been clever to set the document modified when the layout changed ;-) So, comment #46 is also fixed!

I think the drag and drop stuff is in a quite nice shape now. I would really like to have some feedback from your side. It might of course still have some problem here and there and it still uses a quite ugly sidebar but the rest more or less works.

For the issues mentioned yesterday on IRC I added a new bug report: bug 517665
Comment 48 Murray Cumming 2008-02-20 15:18:41 UTC
Sorry, I'm currently having difficulties getting Postgres to work at all in Ubuntu Hardy Heron. I'll try it in a Gutsy vmware if I don't fix that soon.

It's probably a good idea to try using the EggToolPallette already.
Comment 49 Murray Cumming 2008-02-26 19:36:33 UTC
I tried this on Gutsy, and I see that it's working quite well, though the drop position doesn't seem to work quite right next to a text item. It will all look even nicer when it uses eggtoolpallette.

There are some extra things that need to be done to make editing with this really possible:
- All layout widgets should show a context menu when you right click them, so you can edit them, for instance to choose a different field, or to set the text, or to change the number of columns. Some of them have this already.
- Drag-to-move of existing layout items should be possible.
Comment 50 Johannes Schmid 2008-02-27 14:53:02 UTC
(In reply to comment #49)
> I tried this on Gutsy, and I see that it's working quite well, though the drop
> position doesn't seem to work quite right next to a text item. It will all look
> even nicer when it uses eggtoolpallette.

Yeah, text labels are a bit tricky because they don't have it's own GdkWindow. Maybe I have to do some Gtk::EventBox magic but it shouldn't be that difficult.

> There are some extra things that need to be done to make editing with this
> really possible:
> - All layout widgets should show a context menu when you right click them, so
> you can edit them, for instance to choose a different field, or to set the
> text, or to change the number of columns. Some of them have this already.

Technical this shouldn't be a big problem though we need some new dialog I guess.

> - Drag-to-move of existing layout items should be possible.

Haven't thought about this yet. Should be possible to do but the dnd code is always very tricky.

Comment 51 Murray Cumming 2008-02-27 15:08:01 UTC
> > - All layout widgets should show a context menu when you right click them, so
> > you can edit them, for instance to choose a different field, or to set the
> > text, or to change the number of columns. Some of them have this already.
>
> Technical this shouldn't be a big problem though we need some new dialog I
> guess.

Most of the necessary dialogs should exist already - you can already edit these layout items in the old treeview dialog, and some layout items already have context menus.
Comment 52 Johannes Schmid 2008-03-06 16:22:45 UTC
The text item problem is now fixed.

About the dialogs:
Yeah, you can edit the titles and things like that in the old layout dialog but just by editing the cells so this is not really an option for the popup menu because I really don't want to show the whole layout dialog if someone selects "Change title".

The only dialog that I found yet was the dialog to edit the python code of a GlomButton.

What is your prefered way to edit the titles and names of groups/labels/fields/buttons, etc.?
Comment 53 Murray Cumming 2008-03-06 16:38:44 UTC
> What is your prefered way to edit the titles and names of
> groups/labels/fields/buttons, etc.?

I guess you need to create new dialogs, making them generic where possible.
Comment 54 Murray Cumming 2008-03-26 17:07:35 UTC
I tried the recent code briefly. I noticed a small problem when dragging a text item (or maybe any item) onto a group that contains fields. If I drag over the field labels then I can add at the start and end positions, but not if I drag over the field labels.
Comment 55 Johannes Schmid 2008-03-27 21:26:50 UTC
It should when you drag on a GtkEntry but it does not work yet when you drag on a GtkTextView or a GtkImage. I will try to fix this.
Comment 56 Murray Cumming 2008-03-29 14:21:44 UTC
Dropping-above still doesn't work on a combobox (when a field has choices), and dropping-below still doesn't work for an entry. Dropping-above does work now for an entry. I'm using the small business example's contacts details to test. 
Comment 57 Johannes Schmid 2008-03-29 16:39:53 UTC
It's not fully fixed yet -  I have to rework the dnd logic a bit to get all cases working.
Comment 58 Johannes Schmid 2008-03-30 22:01:47 UTC
(In reply to comment #56)
> Dropping-above still doesn't work on a combobox (when a field has choices), and
> dropping-below still doesn't work for an entry. Dropping-above does work now
> for an entry. I'm using the small business example's contacts details to test. 

Both should now work. Dropping on a combobox did not work at all because it has a rather strage widget tree but I have fixed this.
The dropping-below problem for fields (or anything that has it's own GdkWindow) should also be fixed. I use an g_idle_add hack which seems to work quite reliable though is not entirely nice.

I am going on to add more context menus to the items.
Comment 59 Murray Cumming 2008-04-07 11:28:58 UTC
I notice that there is now lots of quite glom-specific dnd stuff in FlowTable. If possible, it would be nice if this was in FlowTableWithFields (or a further-derived class, to keep code nicely separated) so that FlowTable stays simple and generic.
Comment 60 Johannes Schmid 2008-04-07 13:08:24 UTC
It's now cleaned up and moved to FlowTableDnd.

As a next I am planing to add "Remove" menuitems to all LayoutItems to avoid having to use the LayoutDialog just to remove items.
Comment 61 Murray Cumming 2008-04-07 14:35:22 UTC
Thanks. There are a few tabs in there. Please do remove them.
Comment 62 Murray Cumming 2008-04-07 15:14:22 UTC
More importantly, the build is broken. There are many errors but this is the first:

flowtable.cc: In constructor ‘Glom::FlowTable::FlowTable()’:
flowtable.cc:295: error: class ‘Glom::FlowTable’ does not have any field named ‘m_current_dnd_item’
flowtable.cc:296: error: class ‘Glom::FlowTable’ does not have any field named ‘m_dnd_in_progress’

Comment 63 Johannes Schmid 2008-04-07 15:52:42 UTC
Fixed - sorry! Files have been in conflict and where as such not commited correctly.
Comment 64 Murray Cumming 2008-04-09 09:38:05 UTC
It's looking better all the time. Some random comments:

1.
When choosing "Details" from the context menu on a button, it crashes beause of this:
(glom:19303): libglademm-CRITICAL **: widget `textview_calculation' not found in glade file `/opt/gnome220/share/glom/glade//glom_developer.glade'
Maybe that's something that I broke because the same thing happens from the Layout dialog.

2.
The Tool palette should really be inside the Details tab, so we can have a slightly different tool palette for the list view in future. It should be detachable/dockable for people with small screens.

3.
Ideally, for buttons (and maybe this is happening for other items too), the title would be on the same dialog as the details. So for buttons, the name, title and the script would be on the same dialog. It though it used to be like this, but I could be wrong. But now there is a "properties" context menu item for changing the button label. By the way, please use "Title" rather than "label" in general.


Comment 65 Murray Cumming 2008-04-10 07:49:31 UTC
When firsting viewing details (I think) there is this warning:
  (glom:4040): Gtk-WARNING **: Inserting action group 'NavTablesActions' into UI manager which already has a group with this name


And each time after that there is this warning:
  (glom:4040): Gtk-WARNING **: Inserting action group 'NavPrintLayoutsActions' into UI manager which already has a group with this name
Comment 66 Johannes Schmid 2008-04-11 09:00:20 UTC
(In reply to comment #65)
> When firsting viewing details (I think) there is this warning:
>   (glom:4040): Gtk-WARNING **: Inserting action group 'NavTablesActions' into
> UI manager which already has a group with this name
> 
Sorry, I cannot reproduce this and I doubt that it has anything todo with my changes but I can be wrong of course.

> 1.
> When choosing "Details" from the context menu on a button, it crashes beause of
> this:
> (glom:19303): libglademm-CRITICAL **: widget `textview_calculation' not found
> in glade file `/opt/gnome220/share/glom/glade//glom_developer.glade'
> Maybe that's something that I broke because the same thing happens from the
> Layout dialog.

Fixed!
 
> 2.
> The Tool palette should really be inside the Details tab, so we can have a
> slightly different tool palette for the list view in future. It should be
> detachable/dockable for people with small screens.

I will have a look at this now - there were some problem with the initial size of the toolbar last time I tried.
 
> 3.
> Ideally, for buttons (and maybe this is happening for other items too), the
> title would be on the same dialog as the details. So for buttons, the name,
> title and the script would be on the same dialog. It though it used to be like
> this, but I could be wrong. But now there is a "properties" context menu item
> for changing the button label. By the way, please use "Title" rather than
> "label" in general.

I have added a title label to the dialog now and the "Details" menu item is gone.

Comment 67 Johannes Schmid 2008-05-21 15:36:52 UTC
OK, all the requested features should now be implemented but there might be some bugs and of course a lot of things could be improved but it would be good if you could have a short look at it.

One bug I know of is that when moving the mouse over an image or a bigger text field, the placeholder jumps around. I will have a look at this.
Comment 68 Murray Cumming 2008-05-21 17:42:06 UTC
Using the Small Business Example, I notice a problem when dragging fields to other groups. Sometimes they land 1 position lower than the drag indicator showed. It doesn't happen always though. For instance try dragging First Name below the Picture from a fresh from-the-example Glom system.
Comment 69 Johannes Schmid 2008-05-22 14:24:14 UTC
Could not really reproduce the problem from comment #68 but at least fixed the flickering (comment #67) which might be the same reason.
Comment 70 Murray Cumming 2008-05-22 18:48:59 UTC
Yes, that seems to have fixed that problem. Thanks. I now notice two other little problems:

- When dragging over the label of a field, the drag position doesn't show. If I drag (vertically) over the Entry widgets of the fields then it works.

- It doesn't seem to work when dragging near the button item in the small business example.
Comment 71 Johannes Schmid 2008-05-23 20:26:27 UTC
(In reply to comment #70)
> - When dragging over the label of a field, the drag position doesn't show. If I
> drag (vertically) over the Entry widgets of the fields then it works.

hmm, this works for me! Could you please be a bit more specific how to reproduce it. E.g. which item do you drag which way in the small business example.

> - It doesn't seem to work when dragging near the button item in the small
> business example.

What do you mean with "It doesn't work"? Is the preview shown incorrectly or is the item not dropped correctly?

Thanks!

Comment 72 Murray Cumming 2008-08-19 11:44:45 UTC
(In reply to comment #71)
> (In reply to comment #70)
> > - When dragging over the label of a field, the drag position doesn't show. If I
> > drag (vertically) over the Entry widgets of the fields then it works.
> 
> hmm, this works for me! Could you please be a bit more specific how to
> reproduce it. E.g. which item do you drag which way in the small business
> example.

Yeah, it seems to work for me now. Sorry.

> > - It doesn't seem to work when dragging near the button item in the small
> > business example.
> 
> What do you mean with "It doesn't work"? Is the preview shown incorrectly or is
> the item not dropped correctly?

This seems to work too.

Comment 73 Murray Cumming 2008-08-19 11:51:56 UTC
Could you please add some tooltips for these eggtoolpallete items. That will make up for the icons being a bit cryptic when only items are seen.

Please also make it default to showing horizontal icons+text. Maybe eggtoolpallete should be showing icons+text already, as per my GNOME settings.

Please also add a Show Layout Toolbar toggle menu item to the developer menu, defaulting to off. I worry that it needs more testing and maybe some more UI work to make it seem less confusing, so it would be nice to make it optional by doing that.

This will let us do a Glom 1.8 release soon, needed by Ubuntu Intrepid. 
Comment 74 Johannes Schmid 2008-08-26 14:42:16 UTC
Should be done now, please note that the horizontal icons+text layout won't work with gtk+ > 2.13/14.
Comment 75 Murray Cumming 2008-08-27 08:33:41 UTC
(In reply to comment #74)
> Should be done now, please note that the horizontal icons+text layout won't
> work with gtk+ > 2.13/14.

That's looking good. However, there's one small problem:

If you show the toolbar, switch to operator mode, then switch back to developer mode, the toolbar is not visible, though the radio menu item is still checked.

Comment 76 Murray Cumming 2008-08-27 10:57:30 UTC
The toolbar also vanishes after dragging something to the layout. That's probably a bigger clue.
Comment 77 Johannes Schmid 2008-08-28 12:09:47 UTC
These two should be fixed now in trunk.
Comment 78 Murray Cumming 2008-08-28 12:45:59 UTC
Yes. It's a little annoying that Show Layout Toolbar unchecks itself (and hides the toolbar) automatically while switching to operator mode and then back to developer mode, but at least it's consistent now.
Comment 79 Murray Cumming 2008-09-01 15:23:42 UTC
Another thing: It needs a Related Records (portal) item that can be dragged to the layout.

Maybe you could also dig up some icons for horizontal-line and vertical-line, which I need for the print layouts toolbar.
Comment 80 Murray Cumming 2008-09-04 22:49:53 UTC
My commit today allows a portal to be added without specifying the relationship, specifying the parent table instead. That should help.
Comment 81 Johannes Schmid 2008-09-26 14:25:57 UTC
It's now implemented that way that the user chooses the relationship before the portal is added to the layout. I think this is the most convinient way.
Comment 82 Murray Cumming 2008-12-23 21:45:00 UTC
Johannes, the layout palette shows up in Find mode, even as operator. It shouldn't show up in Find either as operator or developer.
Comment 83 Murray Cumming 2008-12-23 21:49:05 UTC
Nevermind. It's easy to hide() it in the code.
Comment 84 Murray Cumming 2009-12-29 12:52:58 UTC
> Johannes, the layout palette shows up in Find mode, even as operator. It
> shouldn't show up in Find either as operator or developer.

I think I fixed that a while ago. It doesn't happen now.

Closing this bug. We should deal with individual problems with the drag-and-drop-layout in individual bugs. For instance, Bug #599232.