Packing it next to the divemaster/buddy information may work great on a
big screen with lots of pixes, but it makes the minimum window size way
wide for a small screen. So don't do it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Aronsen points out that we've not made it possible to edit the He
percentages for trimix diving. It's easy enough to do, I just didn't
have any dives that needed it myself. So here goes.
Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This works ok-ish, but doesn't allow us to click on the stars and edit
them in the divelist, which a user might expect to be able to do - in
most "star rating UIs" you simply click on the n-th star to set that
rating. Here you need to edit the dive and pick the rating from a drop
down menu.
Minor oddity: you can actually (if you force it) write anything you want
into the star rating. But anything that isn't one of the predefined
strings simply results in a zero star rating.
Overall the UI feels a bit... forced. But I think this is quite useful
anyway.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way, when you have a new dive that you just imported from your dive
computer, you can just double-click on the dive and fill out all the
relevant information: location, notes, buddies and cylinder info.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It's pretty basic information, and might be hidden behind the dialog
especially on a small screen.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It just pops up the dive info edit box. This way you can be in the dive
info tab, and not have to go to the dive list just to double-click on
the dive.
This thing still needs some polish, but it's now usable.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Now that the dive info window is read-only, we need to edit the dives
some other way. We bring up a dive info edit dialog when you
double-click on the dive list entry for that dive.
I do want to have an "edit" button or keyboard shortcut or something
too, though.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We always keep the focus on the dive list, so that the random gtk focus
handling doesn't suddenly randomly make us edit the combo boxes when the
cursor up/down keys start changing them instead of the dive list.
This means that dive location, notes and buddy/divemaster aren't
editable at all any more, but I'll fix that by making a separate dive
edit popup window.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lubomir's solution to fill them with a newline doesn't work. Well, it
may work on some versions of gtk, but on mine it just results in an ugly
box for the control character '000a' that tries to show the newline.
So this is a third approach: if we reset the text to empty, first set it
to space (to clear it), and then set it to empty. That seems to work on
at least one version of gtk, and doesn't have the problem with the space
*remaining* when you cut-and-paste something into the combo box.
Let's see if it breaks anything else, but at worst it should be no worse
than the old "set it to space" approach - iow the combo box might
remember the space, but at least not some random data from the previous
dive that it happened to show.
Lovely gtk bugs.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Passing -1 to gtk_combo_box_set_active, seems not to work as the gtk
documentation explains; there might be a bug in the library or some
special case that is not explained.
could be related to:
http://mail.gnome.org/archives/gtk-devel-list/2004-March/msg00170.html
passing \n seems to "trick" the cell renderer to clear the entry
completely. This is a temporary solution.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Setting the gtk_combo_box_entry test to th eempty string doesn't "take":
the old text remains. Which does all kinds of funky things when you
switch between dives, and the location (or buddy or divemaster) entry
contains some random stale entry from another dive.
This works around it by using a string with a single space in it
instead, and then removing the space when reading. Not pretty, and
certainly not correct, but it pinpoints the odd behavior. I'm sure
somebody will figure out what the magic gtk incantation is for this.
Also remove the never-used flags for whether the entries have changed.
They were designed to be set by change callbacks, but we never bothered
with it, and just always read the value of the entries instead.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The code that allowed a user to start typing the name of a location, buddy
or divemaster and that would then offer completions has one flaw - it
doesn't add any new names that you enter to its store of names until you
save and restart the app. This patch fixes that.
When reading the code I also noted that the location_changed,
divemaster_changed, buddy_changed variables have become meaningless. They
are set to 1 and tested, but never changed. I wasn't sure if I should
remove the variables (as the code seems to work without them having any
impact), or if we should go back to actually tracking these changes to
prevent unnecessarily marking the divelist as changed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The text entries have completions, but if you want to see the full list
of possibilities, I'm not seeing how to do that without turning the
GtkEntry into a GtkComboBoxEntry.
The list of people/locations are not sorted, though, which makes the
full list less than readable. Will have to do that too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This way you can just type the first few characters of a location you've
been to before, and it will show you a list of possible completions.
Same for buddies and divemasters (which take the completions from a list
of people you've used before).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is left-overs from an earlier age when we did this. But we just do
the "show_all" at the end.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Track whether things changed in the global dive_list
So far this actually works if changing dive info (but only if dive
selected was changed after the dive info was changed).
We are not tracking changes to the cylinder information, yet.
also remove the duplicate static dive_list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The following are UI toolkit specific:
gtk-gui.c - overall layout, main window of the UI
divelist.c - list of dives subsurface maintains
equipment.c - equipment / tank information for each dive
info.c - detailed dive info
print.c - printing
The rest is independent of the UI:
main.c i - program frame
dive.c i - creates and maintaines the internal dive list structure
libdivecomputer.c
uemis.c
parse-xml.c
save-xml.c - interface with dive computers and the XML files
profile.c - creates the data for the profile and draws it using cairo
This commit should contain NO functional changes, just moving code around
and a couple of minor abstractions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It got removed by some of my overly aggressive cleanup in commit
fefcbf125e ("Remove dive info frame") because the dive info frame
initialization also initialized the main window title..
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It has always been problematic, and I've been moving things in and out
of it.
And it just isn't a very powerful widget. You can't *do* anything with
it. The information it shows you may be useful, but the core stuff
already shows up in the dive list.
And the dive list is actually a much superior widget over that static
dive info frame. The information that shows up in the dive list can be
sorted by column, for example.
So when we show temperatures or SAC numbers in the dive info frame,
that's actually a very bad place to show them: we would be much better
off showing it in the dive list, and then we could sort by SAC or by
temperature.
In other words: just remove the thing. Instead, plan to extend the dive
list to contain all the information. That will probably mean that we
need to change the current pane widget to be a vertical pane, rather
than a horizontal one, but what's wrong with that?
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This gives the airconsumption label a fixed size and changes its alignment
so it is anchored to the right.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Even though we go down to an 8pt font the info_frame changes size when the
air info is added. I don't like this but want to see how Linus would like
this resolved before going overboard.
Minor tweaks to the formating (we don't need two decimals when printing
the liters of air consumed).
This patch does NOT remove the plot of the air information in the profile
graph. I think we want to remove that once we like the text where it is,
but I wanted to do one thing at a time.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's now in the window title - no point in having it twice.
Also added a little "Dive #xx - " template. The old "##. " was a bit too
minimalistic for my liking.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I suspect the "info" area is better used for actual values, so move the
dive location into the window title instead (using date if no location
info), and title the info frame with date and time.
This just means that the date/time gets removed from inside the frame:
we may want to put air consumption info in there instead?
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
I have it in some of my notes, and Dirk seems to fill that in too, so
let's just show it, save it, and allow editing of it..
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Make it denser by putting the dive number/location in the frame label,
and make it size up and down more naturally.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Make it about general equipment management, and start hooking up
functions to show new equipment information when changing dives (and to
flush changes to equipment information for the previously active dive).
Nothing is hooked up yet, and it's now showing just one (really big)
cylinder choice, so this is all broken. But it should make it possible
to at least get somewhere some day.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This should take care of it all, unless I missed some case.
Now we should just save the default units somewhere, and I should do the
divelist update much cleaner (instead of re-doing the divelist entirely,
it should just repaint it - now we lose the highlited dive etc).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Uppercase first letter for each label word
Tweak the paddings for easier reading
Rename File menu to Log menu
Add a separator before Quit in the Log menu
Remove frame in extended diving info and add 6px padding
Signed-off-by: Hylke Bons <hylkebons@gmail.com>
I really don't understand the packing rules. This does not look like
what I intended.
Oh well.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If it exists, it really does help identify the dive. At least it does
for me: "local or Maui"?
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This tweaks:
- packing to be what you'd kind of expect
- makes the "summary info" always visible
- the "extended info" is now on a notebook page of its own
- dive profile the first notebook page, since the summary
information is visible regardless.
which all just seems a lot more logical.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It's still the ugliest application ever, but now it at least gives you
some basic dive info.
I'd love to add a way to edit the dives to add new data (name, buddies,
location etc), but that would also require the ability to save the end
result. Maybe some day.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>