summaryrefslogtreecommitdiffstats
path: root/info.c
AgeCommit message (Collapse)Author
2011-10-23Enable inline completion/selection for the location/buddy/dm fieldsGravatar Linus Torvalds
This makes Tab completion work, and seems a whole lot more natural. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-23Keep the people/location lists sortedGravatar Linus Torvalds
This makes the combo box entry drop-down list be a whole lot more useful. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-23Make the divemaster/buddy/location text entries be combo box entriesGravatar Linus Torvalds
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>
2011-10-23Add completions to the dive location, buddy and divemaster entriesGravatar Linus Torvalds
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>
2011-09-22Don't do individual 'gtk_widget_show()' callsGravatar Linus Torvalds
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>
2011-09-21Simplistic first attempt to get changes saved when quitting subsurfaceGravatar Dirk Hohndel
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>
2011-09-20Separate out the UI from the program logicGravatar Dirk Hohndel
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>
2011-09-19Reinstate the main window titleGravatar Linus Torvalds
It got removed by some of my overly aggressive cleanup in commit fefcbf125e89 ("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>
2011-09-19Remove dive info frameGravatar Linus Torvalds
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>
2011-09-16Stop plotting the gas / consumption information into the profileGravatar Dirk Hohndel
And move the code into info.c where it now belongs Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-09-16Make handling of empty airconsumption string consistentGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-09-16More fixes to positioning of gas / consumption information in info_frameGravatar Dirk Hohndel
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>
2011-09-16Show tank / nitrox / air consumption information in the info_frameGravatar Dirk Hohndel
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>
2011-09-16Dirk can't count to tenGravatar Linus Torvalds
That's ok, Dirk. I've got your back. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-16Remove dive number from frame labelGravatar Dirk Hohndel
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>
2011-09-16Put the dive number and location in the window title barGravatar Linus Torvalds
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>
2011-09-13Add divemaster/buddy field and text entryGravatar Linus Torvalds
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>
2011-09-11Clean up dive info box tooGravatar Linus Torvalds
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>
2011-09-11Fix up dive number namingGravatar Linus Torvalds
Use "dive->number" instead of "dive->nr". And make the XML match too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-11Show dive number (if it exists) in the location noteGravatar Linus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-09Rename 'cylinder.c' as 'equipment.c'Gravatar Linus Torvalds
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>
2011-09-07Do output unit conversion in the dive info window tooGravatar Linus Torvalds
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>
2011-09-05Open File works. I refactored the code and introduced a new type. I never ↵Gravatar Nathan Samson
used it as a pointer (their was no real reason), but I'm not really satisfied. Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Merge hbonse's UI tweaks, but fixing the compile warnings. Also bringing it ↵Gravatar Nathan Samson
up to date with the master (and my own UI improvements) Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Some UI beauty patches:Gravatar Hylke Bons
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>
2011-09-04Merge branch 'master' into ui-improvementsGravatar Nathan Samson
2011-09-04Remove the redundant frames in the notebook. Closes #9Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Word wrap the info textview. Also do not show the scrollbars if not necessary.Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04Change location to a text entry instead of text view.Gravatar Nathan Samson
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-03Improve the layout of the text entries in gtk3. For gtk2 this could also be ↵Gravatar Nathan Samson
useful Signed-off-by: Nathan Samson <nathansamson@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-02Add location note to the top bar too.Gravatar Linus Torvalds
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>
2011-09-01Show temperature in the info summaryGravatar Linus Torvalds
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>
2011-09-01Save and parse notes and locationsGravatar Linus Torvalds
It's pretty rough, but it seems to work. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Add some extended dive info fieldsGravatar Linus Torvalds
.. and tweak the basic info layout a bit. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Make the main display sanerGravatar Linus Torvalds
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>
2011-08-31Do something half-way sane (no SIGSEGV) when there are no divesGravatar Linus Torvalds
It just leaves ugly blank areas, but whatever. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31Add some more dive info - and actually update itGravatar Linus Torvalds
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>
2011-08-31Add fake 'info' frame contentsGravatar Linus Torvalds
It should have depth, time, place etc information, but right now it only has a fake depth that doesn't even get updated. Just to show the idea of the table usage. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>