Why Open and Append actions' behviours are not only based on
their names? Why Open sometimes open a new window and some times
does not?

As an example:
1) start viking,
2) open a file -> the file is opened in current window
3) open the same file -> the file is opened in another window
This seems quite correct as, still the "document" is empty, we expect
to fill it instead of opening a new one. The matter occurs when we do
change on the "document" (new map, acquiring data...) before opening.

Such inconsistency seems to be introduced with commit a5fd219.

It is quite complex to have append/open feature conditioned by
the state of current document. We remove this condition to have
a simpler behaviour.

Signed-off-by: Guilhem Bonnefille <guilhem.bonnefi...@gmail.com>

---
 src/vikwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vikwindow.c b/src/vikwindow.c
index e42e274..7ac2d1d 100644
--- a/src/vikwindow.c
+++ b/src/vikwindow.c
@@ -1848,9 +1848,9 @@ static void load_file ( GtkAction *a, VikWindow *vw )
   {
     gtk_widget_hide ( vw->open_dia );
 #ifdef VIKING_PROMPT_IF_MODIFIED
-    if ( (vw->modified || vw->filename) && newwindow )
+    if ( vw->modified && newwindow )
 #else
-    if ( vw->filename && newwindow )
+    if ( newwindow )
 #endif
       g_signal_emit ( G_OBJECT(vw), window_signals[VW_OPENWINDOW_SIGNAL], 0, 
gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER(vw->open_dia) ) );
     else {
-- 
tg: (3134900..) t/fix/append (depends on: master)

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to