diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-19 13:46:37 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-19 14:00:21 -0800 |
commit | 0fd6907965b94c03e476b3f6333423cfdac00996 (patch) | |
tree | 6be3fe4596eff60cccbfd4ac2900142beb0b80e1 /gtk-gui.c | |
parent | f175c1a9d7627e3a0658e8a7d29ea03df6a905c9 (diff) | |
download | subsurface-0fd6907965b94c03e476b3f6333423cfdac00996.tar.gz |
Obviate the need for explicit 'remember_tree_state/restore_tree_state' calls
Instead, just keep track of the expanded state of trips as we get the
gtk callbacks for the state changes (which we need to track anyway for
the selection logic), and automatically restore the state whenever we
re-create the divelist.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -980,9 +980,7 @@ static void autogroup_cb(GtkWidget *w, gpointer data) autogroup = !autogroup; if (! autogroup) remove_autogen_trips(); - remember_tree_state(); dive_list_update_dives(); - restore_tree_state(); } void set_autogroup(gboolean value) @@ -1898,7 +1896,6 @@ static void import_files(GtkWidget *w, gpointer data) struct stat sb; GSList *filenames = NULL; - remember_tree_state(); fs_dialog = gtk_file_chooser_dialog_new(_("Choose XML Files To Import Into Current Data File"), GTK_WINDOW(main_window), GTK_FILE_CHOOSER_ACTION_OPEN, @@ -1936,7 +1933,6 @@ static void import_files(GtkWidget *w, gpointer data) free(current_def_dir); gtk_widget_destroy(fs_dialog); - restore_tree_state(); } void set_filename(const char *filename, gboolean force) |