Re: [Viking-devel] [PATCH] Replace Append entry with a toggle in Open dialog

2011-10-01 Thread Robert Norris


> if ( ! vw->open_dia )
> {
> + /* A toggle to decide if we have to open a new window or not */
> + GtkWidget *toggle = gtk_check_button_new_with_label (_("Open file in a new 
> window"));
> + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE);
> + gtk_widget_show (toggle);
> +

It would be better if this could be defaulted to FALSE when one hasn't opened 
anything yet.

eg: 
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), vw->filename != NULL);

Otherwise one starts viking (get a window), then go to open file - select a 
file -> get *another* window, unless you remember to uncheck the toggle.

Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.

  
--
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/


[Viking-devel] [PATCH] Replace Append entry with a toggle in Open dialog

2011-10-01 Thread Guilhem Bonnefille
Instead of a not so standard "Append" menu entry, prefer to use an
explicit "Open in new window" toggle in "Open" dialog box.

Signed-off-by: Guilhem Bonnefille 

---
 src/menu.xml.h  |1 -
 src/vikwindow.c |   22 ++
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/src/menu.xml.h b/src/menu.xml.h
index ef1fef2..353a795 100644
--- a/src/menu.xml.h
+++ b/src/menu.xml.h
@@ -8,7 +8,6 @@ static const char *menu_xml =
"  "
"  "
"  "
-   "  "
"  "
"  "
"  "
diff --git a/src/vikwindow.c b/src/vikwindow.c
index 7ac2d1d..a975885 100644
--- a/src/vikwindow.c
+++ b/src/vikwindow.c
@@ -1784,26 +1784,23 @@ static void load_file ( GtkAction *a, VikWindow *vw )
 {
   GSList *files = NULL;
   GSList *cur_file = NULL;
-  gboolean newwindow;
-  if (!strcmp(gtk_action_get_name(a), "Open")) {
-newwindow = TRUE;
-  } 
-  else if (!strcmp(gtk_action_get_name(a), "Append")) {
-newwindow = FALSE;
-  } 
-  else {
-g_critical("Houston, we've had a problem.");
-return;
-  }
 
   if ( ! vw->open_dia )
   {
+/* A toggle to decide if we have to open a new window or not */
+GtkWidget *toggle = gtk_check_button_new_with_label (_("Open file in a new 
window"));
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE);
+gtk_widget_show (toggle);
+
 vw->open_dia = gtk_file_chooser_dialog_new (_("Please select a GPS data 
file to open. "),
  GTK_WINDOW(vw),
  GTK_FILE_CHOOSER_ACTION_OPEN,
  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
  GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
  NULL);
+
+gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (vw->open_dia), 
toggle);
+
 GtkFileFilter *filter;
 // NB file filters are listed this way for alphabetical ordering
 #ifdef VIK_CONFIG_GEOCACHES
@@ -1847,6 +1844,8 @@ static void load_file ( GtkAction *a, VikWindow *vw )
   if ( gtk_dialog_run ( GTK_DIALOG(vw->open_dia) ) == GTK_RESPONSE_ACCEPT )
   {
 gtk_widget_hide ( vw->open_dia );
+GtkWidget *toggle = gtk_file_chooser_get_extra_widget (GTK_FILE_CHOOSER 
(vw->open_dia));
+gboolean newwindow = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON 
(toggle));
 #ifdef VIKING_PROMPT_IF_MODIFIED
 if ( vw->modified && newwindow )
 #else
@@ -2520,7 +2519,6 @@ static GtkActionEntry entries[] = {
   { "New",   GTK_STOCK_NEW,  N_("_New"),  
"N", N_("New file"), 
(GCallback)newwindow_cb  },
   { "Open",  GTK_STOCK_OPEN, N_("_Open..."),   
  "O", N_("Open a file"),  
(GCallback)load_file },
   { "OpenRecentFile", NULL,  N_("Open _Recent File"), 
NULL, NULL,   
(GCallback)NULL },
-  { "Append",GTK_STOCK_ADD,  N_("Append _File..."),   
NULL, N_("Append data from a different file"),
(GCallback)load_file },
   { "Acquire", NULL, N_("A_cquire"), 0, 0, 0 },
   { "AcquireGPS",   NULL,N_("From _GPS..."),   
  NULL, N_("Transfer data from a GPS device"),  
(GCallback)acquire_from_gps  },
   { "AcquireGPSBabel",   NULL,N_("Import File With 
GPS_Babel..."),   NULL, N_("Import file via GPSBabel 
converter"),  (GCallback)acquire_from_file  },
-- 
tg: (9fde573..) t/fix/remove-append (depends on: t/fix/append)

--
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/


[Viking-devel] [PATCH] Simplify append behaviour

2011-10-01 Thread Guilhem Bonnefille
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 

---
 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/


Re: [Viking-devel] Help for translation of Windows installer

2011-10-01 Thread Guilhem Bonnefille
Hi,

2011/9/30 Mathieu :
> Here is a spanish translation from one of my friend. Gracias Roberto.

Nice!
Can we have more details about "Roberto"? Using Git, I can give him
full attribution. I just need an email address. Furthermoe, this could
be certainly fair to add his email in the "spanish.nsh" file.

> Is it possible to add the strings to be translated manually to Viking
> launchpad to attract more translators?

I don't think so. I know how to send .po file to Launchpad, and I
don't think it supports anything else.

-- 
Guilhem BONNEFILLE
-=- JID: gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com
-=- mailto:guilhem.bonnefi...@gmail.com
-=- http://nathguil.free.fr/

--
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/


Re: [Viking-devel] Google Maps

2011-10-01 Thread Guilhem Bonnefille
Hi,

2011/10/1 Jordi Hortigüela :
> I use viking to build tracks for walking, biking whatever unfortunatelly all
> maps collection that comes with default with no cover my local area near
> Barcelona.

Did you give an eye to Bing maps? It is supported by viking and seems
to cover Barcelona.
Other supported maps:
http://sourceforge.net/apps/mediawiki/viking/index.php?title=Maps


> After reading several on viking and Google seems that is possible to
> configure Google maps TMS to work with viking anybody help me to setup this
> feature.

Google was supported. But this support was removed, as requested by
Google. Hack is probably still possible, but, please, talk about this
outside this ailing list.

> All other suggestions or workarounds are wellcome

Feel free to check an other map source.

-- 
Guilhem BONNEFILLE
-=- JID: gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com
-=- mailto:guilhem.bonnefi...@gmail.com
-=- http://nathguil.free.fr/

--
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/


[Viking-devel] Google Maps

2011-10-01 Thread Jordi Hortigüela
Anybody,

I use viking to build tracks for walking, biking whatever unfortunatelly all
maps collection that comes with default with no cover my local area near
Barcelona.

After reading several on viking and Google seems that is possible to
configure Google maps TMS to work with viking anybody help me to setup this
feature.

All other suggestions or workarounds are wellcome

Thanks
Jordi
--
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/