Thread: [Gpredict-svn] SF.net SVN: gpredict:[441] trunk (Page 2)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <cs...@us...> - 2009-09-27 13:45:44
|
Revision: 441 http://gpredict.svn.sourceforge.net/gpredict/?rev=441&view=rev Author: csete Date: 2009-09-27 13:45:38 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Synchronise satellite categories during TLE update. Modified Paths: -------------- trunk/ChangeLog trunk/src/tle-update.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-27 01:10:59 UTC (rev 440) +++ trunk/ChangeLog 2009-09-27 13:45:38 UTC (rev 441) @@ -1,3 +1,9 @@ +2009-09-27 Alexandru Csete <oz9aec at gmail.com> + + * src/tle-update.c: + Synchronise satellite categories during TLE update. + + 2009-09-25 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module-tmg.c: Modified: trunk/src/tle-update.c =================================================================== --- trunk/src/tle-update.c 2009-09-27 01:10:59 UTC (rev 440) +++ trunk/src/tle-update.c 2009-09-27 13:45:38 UTC (rev 441) @@ -709,13 +709,39 @@ guint catnr,i; guint *key = NULL; + /* category sync related */ + gchar *catname, *catpath, *buff, **buffv; + FILE *catfile; + gchar category[80]; + + path = g_strconcat (dir, G_DIR_SEPARATOR_S, fnam, NULL); fp = g_fopen (path, "r"); if (fp != NULL) { + /* Prepare .cat file for sync while we read data */ + buffv = g_strsplit (fnam, ".", 0); + catname = g_strconcat (buffv[0], ".cat", NULL); + g_strfreev (buffv); + catpath = sat_file_name (catname); + g_free (catname); + + /* read category name for catfile */ + catfile = g_fopen (catpath, "r"); + b = fgets (category, 80, catfile); + fclose (catfile); + + /* reopen a new catfile and write category name */ + catfile = g_fopen (catpath, "w"); + g_free (catpath); + fputs (category, catfile); + + /* .cat file now contains the category name; + satellite catnums will be added during update in the while loop */ + /* read 3 lines at a time */ while (fgets (tle_str[0], 80, fp)) { /* read second and third lines */ @@ -746,6 +772,11 @@ /* __FUNCTION__, */ /* catnr); */ + /* store catalog number in catfile */ + buff = g_strdup_printf ("%d\n", catnr); + fputs (buff, catfile); + g_free (buff); + /* add data to hash table */ key = g_try_new0 (guint, 1); *key = catnr; @@ -774,6 +805,9 @@ } + /* close category file */ + fclose (catfile); + /* close input TLE file */ fclose (fp); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-27 15:37:01
|
Revision: 443 http://gpredict.svn.sourceforge.net/gpredict/?rev=443&view=rev Author: csete Date: 2009-09-27 15:36:54 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Fixed bug 2691499: Sky at glance crashes with empty module. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-sky-glance.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-27 14:15:02 UTC (rev 442) +++ trunk/ChangeLog 2009-09-27 15:36:54 UTC (rev 443) @@ -3,7 +3,10 @@ * src/tle-update.c: Synchronise satellite categories during TLE update. + * src/gtk-sky-at-glance.c: + Fixed bug 2691499: Sky at glance crashes with empty module. + 2009-09-25 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module-tmg.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-09-27 14:15:02 UTC (rev 442) +++ trunk/NEWS 2009-09-27 15:36:54 UTC (rev 443) @@ -11,6 +11,7 @@ - Added a slider control to the Time Controller. - Fixed bug 2116693: List view does not sort properly for all time formats. - Fixed bug 2836265: Time controls should wrap around their limits. +- Fixed bug 2691499: Sky at glance crashes with empty module. * Binary packages for Windows, Mac OS X, Ubuntu and generic Linux. Modified: trunk/src/gtk-sky-glance.c =================================================================== --- trunk/src/gtk-sky-glance.c 2009-09-27 14:15:02 UTC (rev 442) +++ trunk/src/gtk-sky-glance.c 2009-09-27 15:36:54 UTC (rev 443) @@ -228,7 +228,18 @@ GtkWidget *skg; GooCanvasItemModel *root; GdkColor bg_color = {0, 0xFFFF, 0xFFFF, 0xFFFF}; + guint number; + + /* check that we have at least one satellite */ + number = g_hash_table_size (sats); + if (number == 0) { + /* no satellites */ + skg = gtk_label_new (_("This module has no satellites!")); + + return skg; + } + skg = g_object_new (GTK_TYPE_SKY_GLANCE, NULL); /* FIXME? */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-27 16:27:00
|
Revision: 449 http://gpredict.svn.sourceforge.net/gpredict/?rev=449&view=rev Author: csete Date: 2009-09-27 16:26:52 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-27 16:25:47 UTC (rev 448) +++ trunk/ChangeLog 2009-09-27 16:26:52 UTC (rev 449) @@ -6,7 +6,18 @@ * src/gtk-sky-at-glance.c: Fixed bug 2691499: Sky at glance crashes with empty module. + * src/sat-cfg.[ch]: + * src/config-keys.h: + Addd configuration flag for automatically showing the sky tracks in + the Polar views. + * src/gtk-polar-view.[ch]: + Added support for automatically showing the sky tracks. + + * src/gtk-sat-module-tmg.c: + Disabled tooltip since it was too annoying when using the scroll wheel. + + 2009-09-25 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module-tmg.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-09-27 16:25:47 UTC (rev 448) +++ trunk/NEWS 2009-09-27 16:26:52 UTC (rev 449) @@ -9,6 +9,7 @@ * Added new Satellite Editor that allows adding/editing/deleting satellite data in a convenient UI, including... - Added a slider control to the Time Controller. +- Added config option to automatically show the sky tracks on the polar view. - Fixed bug 2116693: List view does not sort properly for all time formats. - Fixed bug 2836265: Time controls should wrap around their limits. - Fixed bug 2691499: Sky at glance crashes with empty module. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-10-04 10:42:58
|
Revision: 472 http://gpredict.svn.sourceforge.net/gpredict/?rev=472&view=rev Author: csete Date: 2009-10-04 10:42:46 +0000 (Sun, 04 Oct 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/po/POTFILES.in trunk/src/menubar.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-03 14:38:31 UTC (rev 471) +++ trunk/ChangeLog 2009-10-04 10:42:46 UTC (rev 472) @@ -1,3 +1,9 @@ +2009-10-03 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-selector-c: + Added proper cell rendering of Epoch field. + + 2009-09-27 Alexandru Csete <oz9aec at gmail.com> * src/tle-update.c: Modified: trunk/po/POTFILES.in =================================================================== --- trunk/po/POTFILES.in 2009-10-03 14:38:31 UTC (rev 471) +++ trunk/po/POTFILES.in 2009-10-04 10:42:46 UTC (rev 472) @@ -77,7 +77,6 @@ src/sat-pref-sky-at-glance.c src/sat-pref-tle.c src/sat-vis.c -src/satellite-editor.c src/save-pass.c src/sgpsdp/sgp4sdp4.c src/sgpsdp/sgp_in.c Modified: trunk/src/menubar.c =================================================================== --- trunk/src/menubar.c 2009-10-03 14:38:31 UTC (rev 471) +++ trunk/src/menubar.c 2009-10-04 10:42:46 UTC (rev 472) @@ -52,6 +52,7 @@ #include "compat.h" #include "menubar.h" #include "config-keys.h" +//#include "satellite-editor.h" #ifdef HAVE_CONFIG_H # include <build-config.h> #endif @@ -120,6 +121,9 @@ N_("Edit user preferences"), G_CALLBACK (menubar_pref_cb)}, /* Tools menu */ + { "SatLab", NULL, N_("Satellite Editor"), NULL, + N_("Open the satellite editor where you can manually edit orbital elements and other data"), + G_CALLBACK (menubar_tle_manual_cb)}, { "Window", NULL, N_("Comm Window"), NULL, N_("Predict windows between two observers"), G_CALLBACK (menubar_window_cb)}, @@ -159,18 +163,18 @@ " <menu action='TleMenu'>" " <menuitem action='Net'/>" " <menuitem action='Local'/>" -" <menuitem action='Man'/>" +/*" <menuitem action='Man'/>"*/ " </menu>" /* " <menuitem action='Freq'/>" */ " <separator/>" " <menuitem action='Pref'/>" " </menu>" -" <menu action='ToolsMenu'>" +/*" <menu action='ToolsMenu'>" +" <menuitem action='SatLab'/>" +" <separator/>" " <menuitem action='Window'/>" " <menuitem action='Predict'/>" -/* " <separator/>" */ -/* " <menuitem action='Lab'/>" */ -" </menu>" +" </menu>"*/ " <menu action='HelpMenu'>" /* " <menuitem action='GettingStarted'/>" */ /* " <menuitem action='Manual'/>" */ @@ -234,12 +238,12 @@ } /* load custom icons */ -/* icon = icon_file_name ("gpredict-shuttle-small.png"); + icon = icon_file_name ("gpredict-shuttle-small.png"); image = gtk_image_new_from_file (icon); g_free (icon); - menuitem = gtk_ui_manager_get_widget (uimgr, "/GpredictMenu/ToolsMenu/Rdv"); + menuitem = gtk_ui_manager_get_widget (uimgr, "/GpredictMenu/ToolsMenu/SatLab"); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); -*/ + /* now, finally, get the menubar */ menubar = gtk_ui_manager_get_widget (uimgr, "/GpredictMenu"); @@ -704,21 +708,7 @@ static void menubar_tle_manual_cb (GtkWidget *widget, gpointer data) { - GtkWidget *dialog; - - - dialog = gtk_message_dialog_new (GTK_WINDOW (app), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_OK, - _("This function is still under development.")); - - /* Destroy the dialog when the user responds to it (e.g. clicks a button) */ - g_signal_connect_swapped (dialog, "response", - G_CALLBACK (gtk_widget_destroy), - dialog); - - gtk_widget_show_all (dialog); + //satellite_editor_run (); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-10-05 14:18:24
|
Revision: 480 http://gpredict.svn.sourceforge.net/gpredict/?rev=480&view=rev Author: csete Date: 2009-10-05 14:18:16 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Added link to online documentation. Modified Paths: -------------- trunk/ChangeLog trunk/src/menubar.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-05 09:07:47 UTC (rev 479) +++ trunk/ChangeLog 2009-10-05 14:18:16 UTC (rev 480) @@ -4,7 +4,10 @@ Implemented double click in multi-pass table will show the details of the clicked pass. + * src/menubar.c: + Added link to online documentation. + 2009-10-03 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-selector-c: Modified: trunk/src/menubar.c =================================================================== --- trunk/src/menubar.c 2009-10-05 09:07:47 UTC (rev 479) +++ trunk/src/menubar.c 2009-10-05 14:18:16 UTC (rev 480) @@ -134,7 +134,7 @@ { "GettingStarted", GTK_STOCK_EXECUTE, N_("Getting Started"), NULL, N_("Show online user manual, Getting Started Section"), G_CALLBACK (menubar_getting_started_cb)}, - { "Manual", GTK_STOCK_HELP, N_("User Manual"), "F1", + { "Help", GTK_STOCK_HELP, N_("Online help"), "F1", N_("Show online user manual"), G_CALLBACK (menubar_help_cb)}, { "License", NULL, N_("_License"), NULL, N_("Show the Gpredict license"), G_CALLBACK (menubar_license_cb) }, @@ -177,7 +177,7 @@ " </menu>"*/ " <menu action='HelpMenu'>" /* " <menuitem action='GettingStarted'/>" */ -/* " <menuitem action='Manual'/>" */ +" <menuitem action='Help'/>" " <separator/>" " <menuitem action='License'/>" " <menuitem action='News'/>" @@ -766,7 +766,25 @@ static void menubar_help_cb (GtkWidget *widget, gpointer data) { - gpredict_help_launch (GPREDICT_HELP_USER_MANUAL); + GtkWidget *dialog; + GtkWidget *button; + + dialog = gtk_message_dialog_new (GTK_WINDOW (app), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, + _("A comprehensive PDF user manual and \n"\ + "video tutorials are available from the \n"\ + "Gpredict website:")); + + button = gtk_link_button_new ("http://gpredict.oz9aec.net/documents.php"); + gtk_widget_show (button); + + gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->vbox), button, FALSE, FALSE, 0); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-10-12 22:20:13
|
Revision: 492 http://gpredict.svn.sourceforge.net/gpredict/?rev=492&view=rev Author: csete Date: 2009-10-12 22:20:05 +0000 (Mon, 12 Oct 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-12 22:17:42 UTC (rev 491) +++ trunk/ChangeLog 2009-10-12 22:20:05 UTC (rev 492) @@ -1,3 +1,16 @@ +2009-10-12 Alexandru Csete <oz9aec at gmail.com> + + * data/trsp: + Added transponder data for new cubesats. + + * data/satdata: + Updated satellite data. Replaced 2009+051B/C/D/E names for new cubesats + with real names based on latest guess by DK3WN. + + * src/gtk-rot-ctrl.c: + Fixed memory leak (thanks to Charles Suprin AA1VS for patch). + + 2009-09-05 Alexandru Csete <oz9aec at gmail.com> * src/sat-pass-dialogs.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-10-12 22:17:42 UTC (rev 491) +++ trunk/NEWS 2009-10-12 22:20:05 UTC (rev 492) @@ -1,3 +1,9 @@ +Changes in version 1.2 (TBD) + +- Fixed a memory leak in the rotator controller. Thanks to Charles Suprin + AA1VS for patch. + + Changes in version 1.1 (5 Oct 2009) - New satellite selector in the module configuration dialog that makes @@ -13,8 +19,9 @@ - Fixed bug 2116693: List view does not sort properly for all time formats. - Fixed bug 2836265: Time controls should wrap around their limits. - Fixed bug 2691499: Sky at glance crashes with empty module. +- Fixed bug 2836263: Setup translations in Launchpad. - Include more maps from NASA Visible Earth: Blue Marble Next Generation. -- Binary packages for Windows, Mac OS X. +- Binary packages for Ubuntu via PPA. Changes in version 1.0 beta 5 (24 May 2005) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-10-13 20:42:33
|
Revision: 497 http://gpredict.svn.sourceforge.net/gpredict/?rev=497&view=rev Author: csete Date: 2009-10-13 20:42:25 +0000 (Tue, 13 Oct 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-13 20:27:36 UTC (rev 496) +++ trunk/ChangeLog 2009-10-13 20:42:25 UTC (rev 497) @@ -1,3 +1,18 @@ +2009-10-13 Alexandru Csete <oz9aec at gmail.com> + + * src/tle-update.c: + Applied patch 2877878 and 2877918 from Charles Suprin AA1VS. + + * src/gtk-rig-ctrl.c: + Fixed bug 2877974: Incorrect uplink Doppler. + + * src/sat-cfg.c: + Changed some defaults for the map view. + + * data/Amateur.mod: + Added SO-50 to list of satellites in the default module. + + 2009-10-12 Alexandru Csete <oz9aec at gmail.com> * data/trsp: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-10-13 20:27:36 UTC (rev 496) +++ trunk/NEWS 2009-10-13 20:42:25 UTC (rev 497) @@ -1,7 +1,16 @@ Changes in version 1.2 (TBD) -- Fixed a memory leak in the rotator controller. Thanks to Charles Suprin - AA1VS for patch. +* New satellite editor to manually add/edit/delete satellite data. +* New transponder editor to edit transponder data. +* Feature request 2866570: Set operating mode via CAT. +* Feature request 2873824: Flip Passes. +* Feature request 2778735: Visual indicator for RX/TX/TRX. +* Feature request 2689352: Mutual Contact Window AOS/LOS. +- Fixed bug 2877974: Incorrect uplink Doppler. +- Applied patch 2876485: Fix a memory leak in the rotator controller (Thanks to + Charles Suprin AA1VS). +- Applied patch 2877878: Change Flag to Lock in tle-update (thanks Charles Suprin AA1VS). +- Applied patch 2877918: Fixes segfault in TLE updater (thanks Charles Suprin AA1VS). Changes in version 1.1 (5 Oct 2009) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-10-25 21:23:48
|
Revision: 501 http://gpredict.svn.sourceforge.net/gpredict/?rev=501&view=rev Author: csete Date: 2009-10-25 21:23:39 +0000 (Sun, 25 Oct 2009) Log Message: ----------- Applied patch 2881367 from Charles Suprin AA1VS. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h trunk/src/gtk-rot-ctrl.c trunk/src/gtk-rot-ctrl.h trunk/src/gtk-sat-module-popup.c trunk/src/gtk-sat-module.c trunk/src/gtk-sat-module.h trunk/src/main.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/ChangeLog 2009-10-25 21:23:39 UTC (rev 501) @@ -1,3 +1,16 @@ +2009-10-25 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-module-popup.c: + * src/gtk-rig-ctrl.c: + * src/gtk-rig-ctrl.h: + * src/main.c: + * src/gtk-sat-module.c: + * src/gtk-sat-module.h: + * src/gtk-rot-ctrl.c: + * src/gtk-rot-ctrl.h: + Applied patch 2881367 from Charles Suprin AA1VS. + + 2009-10-13 Alexandru Csete <oz9aec at gmail.com> * src/tle-update.c: Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-rig-ctrl.c 2009-10-25 21:23:39 UTC (rev 501) @@ -41,6 +41,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> #include <math.h> +#include <glib.h> #include "compat.h" #include "sat-log.h" #include "predict-tools.h" @@ -186,7 +187,7 @@ ctrl->trsplist = NULL; ctrl->trsplock = FALSE; ctrl->tracking = FALSE; - ctrl->busy = FALSE; + g_static_mutex_init(&(ctrl->busy)); ctrl->engaged = FALSE; ctrl->delay = 1000; ctrl->timerid = 0; @@ -199,7 +200,7 @@ gtk_rig_ctrl_destroy (GtkObject *object) { GtkRigCtrl *ctrl = GTK_RIG_CTRL (object); - + /* stop timer */ if (ctrl->timerid > 0) g_source_remove (ctrl->timerid); @@ -1260,14 +1261,12 @@ GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); - if (ctrl->busy) { + if (g_static_mutex_trylock(&(ctrl->busy))==FALSE) { sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); return TRUE; } - ctrl->busy = TRUE; - - if (ctrl->conf2 != NULL) { + if (ctrl->conf2 != NULL) { exec_dual_rig_cycle (ctrl); } else { @@ -1315,7 +1314,7 @@ //g_print (" WROPS = %d\n", ctrl->wrops); - ctrl->busy = FALSE; + g_static_mutex_unlock(&(ctrl->busy)); return TRUE; } Modified: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-rig-ctrl.h 2009-10-25 21:23:39 UTC (rev 501) @@ -98,7 +98,7 @@ guint timerid; /*!< Timer ID */ gboolean tracking; /*!< Flag set when we are tracking a target. */ - gboolean busy; /*!< Flag set when control algorithm is busy. */ + GStaticMutex busy;/*!< Flag set when control algorithm is busy. */ gboolean engaged; /*!< Flag indicating that rig device is engaged. */ gint errcnt; /*!< Error counter. */ Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-rot-ctrl.c 2009-10-25 21:23:39 UTC (rev 501) @@ -155,7 +155,7 @@ ctrl->plot = NULL; ctrl->tracking = FALSE; - ctrl->busy = FALSE; + g_static_mutex_init(&(ctrl->busy)); ctrl->engaged = FALSE; ctrl->delay = 1000; ctrl->timerid = 0; @@ -180,7 +180,7 @@ g_free (ctrl->conf); ctrl->conf = NULL; } - + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -800,13 +800,11 @@ gboolean error = FALSE; - if (ctrl->busy) { + if (g_static_mutex_trylock(&(ctrl->busy))==FALSE) { sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); return TRUE; } - ctrl->busy = TRUE; - /* If we are tracking and the target satellite is within range, set the rotor position controller knob values to the target values. If the target satellite is out of range @@ -924,7 +922,7 @@ gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet))); } - ctrl->busy = FALSE; + g_static_mutex_unlock(&(ctrl->busy)); return TRUE; } Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-rot-ctrl.h 2009-10-25 21:23:39 UTC (rev 501) @@ -89,7 +89,7 @@ gdouble tolerance; /*!< Error tolerance */ gboolean tracking; /*!< Flag set when we are tracking a target. */ - gboolean busy; /*!< Flag set when control algorithm is busy. */ + GStaticMutex busy; /*!< Flag set when control algorithm is busy. */ gboolean engaged; /*!< Flag indicating that rotor device is engaged. */ gint errcnt; /*!< Error counter. */ Modified: trunk/src/gtk-sat-module-popup.c =================================================================== --- trunk/src/gtk-sat-module-popup.c 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-sat-module-popup.c 2009-10-25 21:23:39 UTC (rev 501) @@ -833,11 +833,9 @@ g_free (buff); /* if module is busy wait until done then go on */ - while (module->busy) - g_usleep (1000); + g_mutex_lock(module->busy); /* create sky at a glance widget */ - module->busy = TRUE; if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { skg = gtk_sky_glance_new (module->satellites, module->qth, 0.0); @@ -846,7 +844,7 @@ skg = gtk_sky_glance_new (module->satellites, module->qth, module->tmgCdnum); } - module->busy = FALSE; + g_mutex_unlock(module->busy); gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_container_add (GTK_CONTAINER (window), skg); Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-sat-module.c 2009-10-25 21:23:39 UTC (rev 501) @@ -174,7 +174,7 @@ module->rigctrlwin = NULL; module->state = GTK_SAT_MOD_STATE_DOCKED; - module->busy = FALSE; + module->busy = g_mutex_new(); module->layout = GTK_SAT_MOD_LAYOUT_1; module->view_1 = GTK_SAT_MOD_VIEW_MAP; @@ -766,18 +766,7 @@ gdouble delta; - if (mod->busy) { - - sat_log_log (SAT_LOG_LEVEL_WARN, - _("%s: Previous cycle missed it's deadline."), - __FUNCTION__); - - return TRUE; - - } - - - /* in docked state, update only if tab is visible */ + /* in docked state, update only if tab is visible */ switch (mod->state) { case GTK_SAT_MOD_STATE_DOCKED: @@ -801,9 +790,16 @@ if (needupdate) { - mod->busy = TRUE; + if (g_mutex_trylock(mod->busy)==FALSE) { + + sat_log_log (SAT_LOG_LEVEL_WARN, + _("%s: Previous cycle missed it's deadline."), + __FUNCTION__); + + return TRUE; + + } - mod->rtNow = get_current_daynum (); /* Update time if throttle != 0 */ @@ -879,11 +875,9 @@ } + g_mutex_unlock(mod->busy); - mod->busy = FALSE; - } - return TRUE; } @@ -1488,8 +1482,8 @@ g_return_if_fail (IS_GTK_SAT_MODULE (module)); /* lock module */ - module->busy = TRUE; - + g_mutex_lock(module->busy); + sat_log_log (SAT_LOG_LEVEL_MSG, _("%s: Reloading satellites for module %s"), __FUNCTION__, module->name); @@ -1516,8 +1510,7 @@ /* FIXME: radio and rotator controller */ /* unlock module */ - module->busy = FALSE; - + g_mutex_unlock(module->busy); } Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/gtk-sat-module.h 2009-10-25 21:23:39 UTC (rev 501) @@ -132,7 +132,7 @@ gtk_sat_mod_view_t view_3; guint timerid; /*!< The timeout ID (FIXME: REMOVE) */ - gboolean busy; /*!< Flag indicating whether timeout has + GMutex *busy; /*!< Flag indicating whether timeout has finished or not. Also used for blocking the module during TLE update. */ Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-10-24 11:12:33 UTC (rev 500) +++ trunk/src/main.c 2009-10-25 21:23:39 UTC (rev 501) @@ -102,6 +102,9 @@ /* start logger first, so that we can catch error messages if any */ sat_log_init (); + + if (!g_thread_supported ()) + g_thread_init (NULL); /* check that user settings are ok */ error = first_time_check_run (); @@ -421,8 +424,6 @@ _("%s: Starting new update thread."), __FUNCTION__); - if (!g_thread_supported ()) - g_thread_init (NULL); g_thread_create (update_tle_thread, NULL, FALSE, &err); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-06 23:04:29
|
Revision: 507 http://gpredict.svn.sourceforge.net/gpredict/?rev=507&view=rev Author: csete Date: 2009-11-06 23:04:11 +0000 (Fri, 06 Nov 2009) Log Message: ----------- Applied patch 2893617 from Valentin Yakovenkov fixing various windows issues. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rot-ctrl.c trunk/src/main.c trunk/win32/Makefile trunk/win32/config.mk trunk/win32/gpredict.rc Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/ChangeLog 2009-11-06 23:04:11 UTC (rev 507) @@ -1,3 +1,17 @@ +2009-11-06 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-rig-ctrl.c: + * src/gtk-rot-ctrl.c: + * src/main.c: + * win32/Makefile: + * win32/build-config.h: + * win32/config.mk: + * win32/gpredict.exe.manifest: + * win32/gpredict.rc: + Applied patch 2893617 from Valentin Yakovenkov fixing various windows issues. + + + 2009-10-27 Alexandru Csete <oz9aec at gmail.com> * src/tle-update.c: Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/src/gtk-rig-ctrl.c 2009-11-06 23:04:11 UTC (rev 507) @@ -56,10 +56,14 @@ /* NETWORK */ //#include <sys/types.h> +#ifndef WIN32 #include <sys/socket.h> /* socket(), connect(), send() */ #include <netinet/in.h> /* struct sockaddr_in */ #include <arpa/inet.h> /* htons() */ #include <netdb.h> /* gethostbyname() */ +#else +#include <winsock2.h> +#endif /* END */ #include "gtk-rig-ctrl.h" @@ -1880,8 +1884,14 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to allocate 128 bytes (yes, this means trouble)"), __FILE__, __FUNCTION__); - shutdown (sock, SHUT_RDWR); - close (sock); + +#ifndef WIN32 + shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + + close (sock); return FALSE; } @@ -1903,8 +1913,13 @@ g_free (buff); g_strfreev (vbuff); } + +#ifndef WIN32 + shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif - shutdown (sock, SHUT_RDWR); close (sock); @@ -1977,7 +1992,13 @@ __FUNCTION__, written, size); } g_free (buff); + +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); ctrl->wrops++; @@ -2062,7 +2083,13 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to allocate 128 bytes (yes, this means trouble)"), __FILE__, __FUNCTION__); + +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); return FALSE; } @@ -2086,7 +2113,12 @@ g_strfreev (vbuff); } +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); @@ -2182,7 +2214,13 @@ __FUNCTION__, written, size); } g_free (buff); + +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); ctrl->wrops++; Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/src/gtk-rot-ctrl.c 2009-11-06 23:04:11 UTC (rev 507) @@ -50,10 +50,14 @@ /* NETWORK */ //#include <sys/types.h> +#ifndef WIN32 #include <sys/socket.h> /* socket(), connect(), send() */ #include <netinet/in.h> /* struct sockaddr_in */ #include <arpa/inet.h> /* htons() */ #include <netdb.h> /* gethostbyname() */ +#else +#include <winsock2.h> +#endif /* END */ #define FMTSTR "%7.2f\302\260" @@ -1005,7 +1009,13 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Failed to allocate 128 bytes (yes, this means trouble)"), __FILE__, __FUNCTION__); + +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); return FALSE; } @@ -1031,7 +1041,12 @@ g_free (buff); +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); ctrl->wrops++; @@ -1113,7 +1128,12 @@ g_free (buff); +#ifndef WIN32 shutdown (sock, SHUT_RDWR); +#else + shutdown (sock, SD_BOTH); +#endif + close (sock); ctrl->wrops++; Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/src/main.c 2009-11-06 23:04:11 UTC (rev 507) @@ -53,6 +53,10 @@ #include "sat-cfg.h" #include "sat-debugger.h" +#ifdef WIN32 +#include <winsock2.h> +#endif + /** \brief Main application widget. */ GtkWidget *app; @@ -81,8 +85,9 @@ static gpointer update_tle_thread (gpointer data); static void test_ui (void); +static void InitWinSock2(void); +static void CloseWinSock2(void); - int main (int argc, char *argv[]) { guint error = 0; @@ -135,12 +140,59 @@ tle_mon_id = g_timeout_add (600000, tle_mon_task, NULL); //test_ui (); + +#ifdef WIN32 + // Initializing Windozze Sockets + InitWinSock2(); +#endif gtk_main (); +#ifdef WIN32 + // Cleanup Windozze Sockets + CloseWinSock2(); +#endif return 0; } +#ifdef WIN32 +/* This code was given from MSDN */ +static void InitWinSock2(void) +{ + WORD wVersionRequested; + WSADATA wsaData; + int err; + + wVersionRequested = MAKEWORD( 2, 2 ); + + err = WSAStartup( wVersionRequested, &wsaData ); + if ( err != 0 ) { + /* Tell the user that we could not find a usable */ + /* WinSock DLL. */ + return; + } + + /* Confirm that the WinSock DLL supports 2.2.*/ + /* Note that if the DLL supports versions later */ + /* than 2.2 in addition to 2.2, it will still return */ + /* 2.2 in wVersion since that is the version we */ + /* requested. */ + + if ( LOBYTE( wsaData.wVersion ) != 2 || + HIBYTE( wsaData.wVersion ) != 2 ) { + /* Tell the user that we could not find a usable */ + /* WinSock DLL. */ + WSACleanup( ); + return; + } +} + +static void CloseWinSock2(void) +{ + WSACleanup(); +} +#endif + static void test_ui (void) { gchar *fnam; Modified: trunk/win32/Makefile =================================================================== --- trunk/win32/Makefile 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/win32/Makefile 2009-11-06 23:04:11 UTC (rev 507) @@ -5,7 +5,7 @@ # directories topsrc = .. -gcincdir = $(topsrc)/goocanv8 +gcincdir = c:/mingw/include/goocanvas-0.10/goocanvas/ gcsrcdir = $(topsrc)/goocanv8/src gpreddir = $(topsrc)/src sgpsdpdir = $(gpreddir)/sgpsdp @@ -22,7 +22,7 @@ # libraries GTKLIBS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs gtk+-win32-2.0) GLIBLIB := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs glib-2.0 gthread-2.0) -GUI_LIBS = $(GTKLIBS) $(GLIBLIB) libgoocanvas.lib libsgpsdp.lib -lcurl -lwinmm -lws2_32 +GUI_LIBS = $(GTKLIBS) $(GLIBLIB) -lgoocanvas libsgpsdp.lib -lcurldll -lwinmm -lws2_32 LIBS = -lm @@ -90,10 +90,12 @@ gtk-polar-plot.c \ gtk-polar-view.c \ gtk-polar-view-popup.c \ + gtk-rig-ctrl.c \ gtk-rot-ctrl.c \ gtk-rot-knob.c \ gtk-sat-data.c \ gtk-sat-list.c \ + gtk-sat-list-popup.c \ gtk-sat-list-col-sel.c \ gtk-sat-map.c \ gtk-sat-map-ground-track.c \ @@ -101,7 +103,7 @@ gtk-sat-module.c \ gtk-sat-module-popup.c \ gtk-sat-module-tmg.c \ - gtk-sat-tree.c \ + gtk-sat-selector.c \ gtk-single-sat.c \ gtk-sky-glance.c \ gui.c \ @@ -117,18 +119,17 @@ pass-popup-menu.c \ pass-to-txt.c \ predict-tools.c \ + qth-data.c \ qth-editor.c \ radio-conf.c \ - rig-io.c \ rotor-conf.c \ - rdv.c \ sat-cfg.c \ sat-debugger.c \ + sat-info.c \ sat-log.c \ sat-log-browser.c \ sat-monitor.c \ sat-pass-dialogs.c \ - sat-popup-menu.c \ sat-pref.c \ sat-pref-conditions.c \ sat-pref-debug.c \ @@ -157,13 +158,13 @@ sat-vis.c \ save-pass.c \ time-tools.c \ - tle-lookup.c \ tle-tools.c \ tle-update.c \ + trsp-conf.c \ GPREDICTOBJ = $(GPREDICTSRC:.c=.o) -OBJS = $(GOOCANVOBJ) $(SGPSDPOBJ) $(GPREDICTOBJ) +OBJS = $(SGPSDPOBJ) $(GPREDICTOBJ) %.o: %.c $(CC) -c $(CFLAGS) $(GTK_CFLAGS) $< @@ -172,13 +173,13 @@ # targets begin -all: libgoocanvas.dll libsgpsdp.dll gpredict.exe +all: libsgpsdp.dll gpredict.exe # Use -mconsole to always open a console window when gpredicxt is started # Use -mwindows for no copnsole gpredict.exe: $(OBJS) gpredict_res.o - $(CC) -mconsole -o $@ $^ $(CFLAGS) $(GTK_CFLAGS) $(LIBS) $(GUI_LIBS) -lmingwex -s + $(CC) -mconsole -mthread -o $@ $^ $(CFLAGS) $(GTK_CFLAGS) $(LIBS) $(GUI_LIBS) -lmingwex -s gpredict_res.o: gpredict.rc $(RC) $(RCFLAGS) $< $@ Modified: trunk/win32/config.mk =================================================================== --- trunk/win32/config.mk 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/win32/config.mk 2009-11-06 23:04:11 UTC (rev 507) @@ -1,10 +1,10 @@ # Configuration variables governing the build of grig for win32 # directory containing the cross tools -CROSSDIR = /grga/mingw32/buildenv +#CROSSDIR = /grga/mingw32/buildenv # prefix for mingw tools (e.g. i586-mingw32msvc-gcc) -MGW_PREFIX = i586-mingw32msvc- +#MGW_PREFIX = i586-mingw32msvc- # mingw include dir MGW_INC = $(CROSSDIR)/include Modified: trunk/win32/gpredict.rc =================================================================== --- trunk/win32/gpredict.rc 2009-10-30 16:43:19 UTC (rev 506) +++ trunk/win32/gpredict.rc 2009-11-06 23:04:11 UTC (rev 507) @@ -1,5 +1,7 @@ #include <windows.h> +#include <winuser.h> /* icon for the program itself */ icon_0 ICON "icons/gpredict-icon.ico" +2 RT_MANIFEST gpredict.exe.manifest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-18 16:14:03
|
Revision: 516 http://gpredict.svn.sourceforge.net/gpredict/?rev=516&view=rev Author: csete Date: 2009-11-18 16:13:55 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Added config key for new GRID layout. Modified Paths: -------------- trunk/ChangeLog trunk/src/config-keys.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-10 14:23:54 UTC (rev 515) +++ trunk/ChangeLog 2009-11-18 16:13:55 UTC (rev 516) @@ -1,3 +1,9 @@ +2009-11-18 Alexandru Csete <oz9aec at gmail.com> + + * src/config-keys.h: + Added config key for new GRID layout. + + 2009-11-06 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: Modified: trunk/src/config-keys.h =================================================================== --- trunk/src/config-keys.h 2009-11-10 14:23:54 UTC (rev 515) +++ trunk/src/config-keys.h 2009-11-18 16:13:55 UTC (rev 516) @@ -66,10 +66,11 @@ #define MOD_CFG_SATS_KEY "SATELLITES" #define MOD_CFG_TIMEOUT_KEY "TIMEOUT" #define MOD_CFG_WARP_KEY "WARP" -#define MOD_CFG_LAYOUT "LAYOUT" -#define MOD_CFG_VIEW_1 "VIEW_1" -#define MOD_CFG_VIEW_2 "VIEW_2" -#define MOD_CFG_VIEW_3 "VIEW_3" +#define MOD_CFG_LAYOUT "LAYOUT" /* Old layout before v1.2 */ +#define MOD_CFG_VIEW_1 "VIEW_1" /* Old layout before v1.2 */ +#define MOD_CFG_VIEW_2 "VIEW_2" /* Old layout before v1.2 */ +#define MOD_CFG_VIEW_3 "VIEW_3" /* Old layout before v1.2 */ +#define MOD_CFG_GRID "GRID" /* New grid layout since v1.2 */ #define MOD_CFG_STATE "STATE" #define MOD_CFG_WIN_POS_X "WIN_POS_X" #define MOD_CFG_WIN_POS_Y "WIN_POS_Y" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-18 17:07:07
|
Revision: 518 http://gpredict.svn.sourceforge.net/gpredict/?rev=518&view=rev Author: csete Date: 2009-11-18 17:06:56 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Changed satellite selector to list satellites in the main pop-up menu instead of a submbenu (fewer mouse clicks). Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-single-sat.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-18 16:41:02 UTC (rev 517) +++ trunk/ChangeLog 2009-11-18 17:06:56 UTC (rev 518) @@ -7,7 +7,11 @@ Pack transponder list into a scrolled window to prevent long transponder lists from resizing the satellite info dialog. + * src/gtk-single-sat.c: + Changed satellite selector to list satellites in the main pop-up menu instead of a + submbenu (fewer mouse clicks). + 2009-11-06 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-11-18 16:41:02 UTC (rev 517) +++ trunk/NEWS 2009-11-18 17:06:56 UTC (rev 518) @@ -13,6 +13,7 @@ - Applied patch 2877918: Fixes segfault in TLE updater (thanks Charles Suprin AA1VS). - Applied patch 2881367: Updated Flags to Locks (thanks Charles Suprin AA1VS). - Applied patch 2893617: Patches for fixing Windows build (thanks Valentin Yakovenkov). +- Slightly improved UI for the single-satellite view. Changes in version 1.1 (5 Oct 2009) Modified: trunk/src/gtk-single-sat.c =================================================================== --- trunk/src/gtk-single-sat.c 2009-11-18 16:41:02 UTC (rev 517) +++ trunk/src/gtk-single-sat.c 2009-11-18 17:06:56 UTC (rev 518) @@ -791,7 +791,6 @@ { GtkSingleSat *single_sat = GTK_SINGLE_SAT (data); GtkWidget *menu; - GtkWidget *select_menu; GtkWidget *menuitem; GtkWidget *image; GtkWidget *label; @@ -833,7 +832,7 @@ menuitem = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* next pass and predict passes */ + /* Show next pass */ menuitem = gtk_image_menu_item_new_with_label (_("Show next pass")); image = gtk_image_new_from_stock (GTK_STOCK_JUSTIFY_FILL, GTK_ICON_SIZE_MENU); @@ -848,6 +847,7 @@ gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + /* Show future passes */ menuitem = gtk_image_menu_item_new_with_label (_("Future passes")); image = gtk_image_new_from_stock (GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); @@ -879,8 +879,7 @@ menuitem = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - select_menu = gtk_menu_new (); - + /* select sat */ for (i = 0; i < n; i++) { sati = SAT (g_slist_nth_data (single_sat->sats, i)); @@ -899,16 +898,12 @@ g_signal_connect_after (menuitem, "activate", G_CALLBACK (select_satellite), single_sat); - gtk_menu_shell_append (GTK_MENU_SHELL (select_menu), menuitem); + //gtk_menu_shell_append (GTK_MENU_SHELL (select_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); //gtk_widget_show (menuitem); } - /* select sat */ - menuitem = gtk_menu_item_new_with_label (_("Select satellite")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), select_menu); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - gtk_widget_show_all (menu); /* Note: event can be NULL here when called from view_onPopupMenu; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-19 15:03:10
|
Revision: 521 http://gpredict.svn.sourceforge.net/gpredict/?rev=521&view=rev Author: csete Date: 2009-11-19 15:03:02 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Implemented new grid-based layout engine for GtkSatModule (engine only, config is still TBD). Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-module-popup.c trunk/src/gtk-sat-module.c trunk/src/gtk-sat-module.h trunk/src/menubar.c trunk/src/mod-mgr.c trunk/src/sat-cfg.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-19 08:33:05 UTC (rev 520) +++ trunk/ChangeLog 2009-11-19 15:03:02 UTC (rev 521) @@ -1,3 +1,13 @@ +2009-11-19 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-module.[ch]: + * src/gtk-sat-module-popup.c: + * src/menuibar.c: + * src/mod-mgr.c: + Implemented new grid-based layout engine for GtkSatModule + (engine only, config is still TBD). + + 2009-11-18 Alexandru Csete <oz9aec at gmail.com> * src/config-keys.h: @@ -5,12 +15,12 @@ Added config key for new GRID layout. * src/sat-info.c: - Pack transponder list into a scrolled window to prevent long transponder lists from - resizing the satellite info dialog. + Pack transponder list into a scrolled window to prevent long transponder + lists from resizing the satellite info dialog. * src/gtk-single-sat.c: - Changed satellite selector to list satellites in the main pop-up menu instead of a - submbenu (fewer mouse clicks). + Changed satellite selector to list satellites in the main pop-up menu + instead of a submbenu (fewer mouse clicks). 2009-11-06 Alexandru Csete <oz9aec at gmail.com> @@ -26,7 +36,6 @@ Applied patch 2893617 from Valentin Yakovenkov fixing various windows issues. - 2009-10-27 Alexandru Csete <oz9aec at gmail.com> * src/tle-update.c: Modified: trunk/src/gtk-sat-module-popup.c =================================================================== --- trunk/src/gtk-sat-module-popup.c 2009-11-19 08:33:05 UTC (rev 520) +++ trunk/src/gtk-sat-module-popup.c 2009-11-19 15:03:02 UTC (rev 521) @@ -11,17 +11,17 @@ More details can be found at the project home page: http://gpredict.oz9aec.net/ - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, visit http://www.fsf.org/ */ @@ -76,91 +76,91 @@ * */ void -gtk_sat_module_popup (GtkSatModule *module) + gtk_sat_module_popup (GtkSatModule *module) { - GtkWidget *menu; - GtkWidget *menuitem; - GtkWidget *image; - gchar *buff; + GtkWidget *menu; + GtkWidget *menuitem; + GtkWidget *image; + gchar *buff; - if ((module == NULL) || !IS_GTK_SAT_MODULE (module)) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: %s called with NULL parameter!"), - __FILE__, __LINE__, __FUNCTION__); + if ((module == NULL) || !IS_GTK_SAT_MODULE (module)) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: %s called with NULL parameter!"), + __FILE__, __LINE__, __FUNCTION__); - return; - } + return; + } - menu = gtk_menu_new (); + menu = gtk_menu_new (); - if (module->state == GTK_SAT_MOD_STATE_DOCKED) { + if (module->state == GTK_SAT_MOD_STATE_DOCKED) { - menuitem = gtk_image_menu_item_new_with_label (_("Detach module")); - buff = icon_file_name ("gpredict-notebook.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (docking_state_cb), module); - } - else { + menuitem = gtk_image_menu_item_new_with_label (_("Detach module")); + buff = icon_file_name ("gpredict-notebook.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (docking_state_cb), module); + } + else { - menuitem = gtk_image_menu_item_new_with_label (_("Attach module")); - buff = icon_file_name ("gpredict-notebook.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (docking_state_cb), module); + menuitem = gtk_image_menu_item_new_with_label (_("Attach module")); + buff = icon_file_name ("gpredict-notebook.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (docking_state_cb), module); - } + } - if (module->state == GTK_SAT_MOD_STATE_FULLSCREEN) { + if (module->state == GTK_SAT_MOD_STATE_FULLSCREEN) { - menuitem = gtk_image_menu_item_new_with_label (_("Leave fullscreen")); - image = gtk_image_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (screen_state_cb), module); - } - else { - menuitem = gtk_image_menu_item_new_with_label (_("Fullscreen")); - image = gtk_image_new_from_stock (GTK_STOCK_FULLSCREEN, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (screen_state_cb), module); - } + menuitem = gtk_image_menu_item_new_with_label (_("Leave fullscreen")); + image = gtk_image_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (screen_state_cb), module); + } + else { + menuitem = gtk_image_menu_item_new_with_label (_("Fullscreen")); + image = gtk_image_new_from_stock (GTK_STOCK_FULLSCREEN, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (screen_state_cb), module); + } - /* separator */ - menuitem = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* sky at a glance */ - menuitem = gtk_image_menu_item_new_with_label (_("Sky at a glance")); - buff = icon_file_name ("gpredict-planner-small.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (sky_at_glance_cb), module); + /* sky at a glance */ + menuitem = gtk_image_menu_item_new_with_label (_("Sky at a glance")); + buff = icon_file_name ("gpredict-planner-small.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (sky_at_glance_cb), module); - /* time manager */ - menuitem = gtk_image_menu_item_new_with_label (_("Time Controller")); - buff = icon_file_name ("gpredict-clock-small.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", G_CALLBACK (tmgr_cb), module); + /* time manager */ + menuitem = gtk_image_menu_item_new_with_label (_("Time Controller")); + buff = icon_file_name ("gpredict-clock-small.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", G_CALLBACK (tmgr_cb), module); /* separator */ menuitem = gtk_separator_menu_item_new (); @@ -183,55 +183,55 @@ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); g_signal_connect (menuitem, "activate", G_CALLBACK (rotctrl_cb), module); - - /* separator */ - menuitem = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* configure */ - menuitem = gtk_image_menu_item_new_with_label (_("Configure")); - image = gtk_image_new_from_stock (GTK_STOCK_PROPERTIES, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (config_cb), module); + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* clone */ - menuitem = gtk_image_menu_item_new_with_label (_("Clone...")); - image = gtk_image_new_from_stock (GTK_STOCK_COPY, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (clone_cb), module); + /* configure */ + menuitem = gtk_image_menu_item_new_with_label (_("Configure")); + image = gtk_image_new_from_stock (GTK_STOCK_PROPERTIES, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (config_cb), module); - /* separator */ - menuitem = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + /* clone */ + menuitem = gtk_image_menu_item_new_with_label (_("Clone...")); + image = gtk_image_new_from_stock (GTK_STOCK_COPY, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (clone_cb), module); - /* delete module */ - menuitem = gtk_image_menu_item_new_with_label (_("Delete")); - image = gtk_image_new_from_stock (GTK_STOCK_DELETE, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (delete_cb), module); + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* close */ - menuitem = gtk_image_menu_item_new_with_label (_("Close")); - image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (close_cb), module); + /* delete module */ + menuitem = gtk_image_menu_item_new_with_label (_("Delete")); + image = gtk_image_new_from_stock (GTK_STOCK_DELETE, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (delete_cb), module); - gtk_widget_show_all (menu); + /* close */ + menuitem = gtk_image_menu_item_new_with_label (_("Close")); + image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (close_cb), module); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, - 0, gdk_event_get_time (NULL)); + gtk_widget_show_all (menu); + + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + 0, gdk_event_get_time (NULL)); } @@ -244,7 +244,7 @@ * */ static void -config_cb (GtkWidget *menuitem, gpointer data) + config_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); @@ -262,7 +262,7 @@ gtk_widget_destroy (dialog); } else { - gtk_sat_module_config_cb (menuitem, data); + gtk_sat_module_config_cb (menuitem, data); } } @@ -280,198 +280,177 @@ * */ static void -clone_cb (GtkWidget *menuitem, gpointer data) + clone_cb (GtkWidget *menuitem, gpointer data) { - GtkWidget *dialog; - GtkWidget *entry; - GtkWidget *label; - GtkWidget *toggle; - GtkTooltips *tooltips; - guint response; - GtkSatModule *module = GTK_SAT_MODULE (data); - GtkSatModule *newmod; - gchar *source,*target; - gchar *icon; /* icon file name */ - gchar *title; /* window title */ + GtkWidget *dialog; + GtkWidget *entry; + GtkWidget *label; + GtkWidget *toggle; + GtkTooltips *tooltips; + guint response; + GtkSatModule *module = GTK_SAT_MODULE (data); + GtkSatModule *newmod; + gchar *source,*target; + gchar *icon; /* icon file name */ + gchar *title; /* window title */ - dialog = gtk_dialog_new_with_buttons (_("Clone Module"), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (module))), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, - GTK_RESPONSE_OK, - NULL); - gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); + dialog = gtk_dialog_new_with_buttons (_("Clone Module"), + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (module))), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, + GTK_RESPONSE_OK, + NULL); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - /* label */ - label = gtk_label_new (_("Name of new module:")); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 0); + /* label */ + label = gtk_label_new (_("Name of new module:")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 0); - /* name entry */ - entry = gtk_entry_new (); - gtk_entry_set_max_length (GTK_ENTRY (entry), 25); - gtk_entry_set_text (GTK_ENTRY (entry), module->name); - tooltips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips, entry, - _("Enter a short name for this module.\n"\ - "Allowed characters: 0..9, a..z, A..Z, - and _"), - _("The name will be used to identify the module "\ - "and it is also used a file name for saving the data."\ - "Max length is 25 characters.")); + /* name entry */ + entry = gtk_entry_new (); + gtk_entry_set_max_length (GTK_ENTRY (entry), 25); + gtk_entry_set_text (GTK_ENTRY (entry), module->name); + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, entry, + _("Enter a short name for this module.\n"\ + "Allowed characters: 0..9, a..z, A..Z, - and _"), + _("The name will be used to identify the module "\ + "and it is also used a file name for saving the data."\ + "Max length is 25 characters.")); - /* attach changed signal so that we can enable OK button when + /* attach changed signal so that we can enable OK button when a proper name has been entered oh, btw. disable OK button to begin with.... */ - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - FALSE); - g_signal_connect (entry, "changed", G_CALLBACK (name_changed), dialog); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - entry, FALSE, FALSE, 0); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + FALSE); + g_signal_connect (entry, "changed", G_CALLBACK (name_changed), dialog); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + entry, FALSE, FALSE, 0); - /* check button */ - toggle = gtk_check_button_new_with_label (_("Open module when created")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE); - tooltips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips, toggle, - _("If checked, the new module will be opened "\ - "after it has been created"), - NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - toggle, FALSE, FALSE, 20); - + /* check button */ + toggle = gtk_check_button_new_with_label (_("Open module when created")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE); + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, toggle, + _("If checked, the new module will be opened "\ + "after it has been created"), + NULL); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + toggle, FALSE, FALSE, 20); - gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); - /* run dialog */ - response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); - switch (response) { + /* run dialog */ + response = gtk_dialog_run (GTK_DIALOG (dialog)); - case GTK_RESPONSE_OK: - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Cloning %s => %s"), - __FILE__, __LINE__, module->name, - gtk_entry_get_text (GTK_ENTRY (entry))); + switch (response) { - /* build full file names */ - gchar *moddir = get_modules_dir (); - source = g_strconcat (moddir, G_DIR_SEPARATOR_S, - module->name, ".mod", NULL); - target = g_strconcat (moddir, G_DIR_SEPARATOR_S, - gtk_entry_get_text (GTK_ENTRY (entry)), ".mod", NULL); - g_free (moddir); + case GTK_RESPONSE_OK: + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Cloning %s => %s"), + __FILE__, __LINE__, module->name, + gtk_entry_get_text (GTK_ENTRY (entry))); - /* copy file */ - if (gpredict_file_copy (source, target)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: Failed to clone %s."), - __FILE__, __LINE__, module->name); - } - else { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Successfully cloned %s."), - __FILE__, __LINE__, module->name); + /* build full file names */ + gchar *moddir = get_modules_dir (); + source = g_strconcat (moddir, G_DIR_SEPARATOR_S, + module->name, ".mod", NULL); + target = g_strconcat (moddir, G_DIR_SEPARATOR_S, + gtk_entry_get_text (GTK_ENTRY (entry)), ".mod", NULL); + g_free (moddir); - /* open module if requested */ - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) { - - newmod = GTK_SAT_MODULE (gtk_sat_module_new (target)); - newmod->state = module->state; + /* copy file */ + if (gpredict_file_copy (source, target)) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to clone %s."), + __FILE__, __LINE__, module->name); + } + else { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Successfully cloned %s."), + __FILE__, __LINE__, module->name); - if (newmod->state == GTK_SAT_MOD_STATE_DOCKED) { + /* open module if requested */ + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) { - /* add to module manager */ - mod_mgr_add_module (GTK_WIDGET (newmod), TRUE); + newmod = GTK_SAT_MODULE (gtk_sat_module_new (target)); + newmod->state = module->state; - /* try to reproduce divisions betwenn views */ - switch (module->layout) { + if (newmod->state == GTK_SAT_MOD_STATE_DOCKED) { - case GTK_SAT_MOD_LAYOUT_2: - gtk_paned_set_position (GTK_PANED (newmod->vpaned), - gtk_paned_get_position (GTK_PANED (module->vpaned))); - break; + /* add to module manager */ + mod_mgr_add_module (GTK_WIDGET (newmod), TRUE); - case GTK_SAT_MOD_LAYOUT_3: - case GTK_SAT_MOD_LAYOUT_4: - gtk_paned_set_position (GTK_PANED (newmod->vpaned), - gtk_paned_get_position (GTK_PANED (module->vpaned))); - gtk_paned_set_position (GTK_PANED (newmod->hpaned), - gtk_paned_get_position (GTK_PANED (module->hpaned))); - break; + } + else { + /* add to module manager */ + mod_mgr_add_module (GTK_WIDGET (newmod), FALSE); - default: - break; + /* create window */ + newmod->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (newmod->win), + newmod->name); + title = g_strconcat ("GPREDICT: ", + newmod->name, + " (", newmod->qth->name, ")", + NULL); + gtk_window_set_title (GTK_WINDOW (newmod->win), title); + g_free (title); - } + /* use size of source module */ + gtk_window_set_default_size (GTK_WINDOW (newmod->win), + GTK_WIDGET (module)->allocation.width, + GTK_WIDGET (module)->allocation.height); - } - else { - /* add to module manager */ - mod_mgr_add_module (GTK_WIDGET (newmod), FALSE); + g_signal_connect (G_OBJECT (newmod->win), "configure_event", + G_CALLBACK (module_window_config_cb), newmod); - /* create window */ - newmod->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (newmod->win), - newmod->name); - title = g_strconcat ("GPREDICT: ", - newmod->name, - " (", newmod->qth->name, ")", - NULL); - gtk_window_set_title (GTK_WINDOW (newmod->win), title); - g_free (title); + /* add module to window */ + gtk_container_add (GTK_CONTAINER (newmod->win), + GTK_WIDGET (newmod)); - /* use size of source module */ - gtk_window_set_default_size (GTK_WINDOW (newmod->win), - GTK_WIDGET (module)->allocation.width, - GTK_WIDGET (module)->allocation.height); + /* window icon */ + icon = icon_file_name ("gpredict-icon.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (newmod->win), icon, NULL); + } + g_free (icon); - g_signal_connect (G_OBJECT (newmod->win), "configure_event", - G_CALLBACK (module_window_config_cb), newmod); + /* show window */ + gtk_widget_show_all (newmod->win); - /* add module to window */ - gtk_container_add (GTK_CONTAINER (newmod->win), - GTK_WIDGET (newmod)); + } + } + } - /* window icon */ - icon = icon_file_name ("gpredict-icon.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (newmod->win), icon, NULL); - } - g_free (icon); + /* clean up */ + g_free (source); + g_free (target); - /* show window */ - gtk_widget_show_all (newmod->win); + break; - } - } - } - - /* clean up */ - g_free (source); - g_free (target); - - break; - case GTK_RESPONSE_CANCEL: - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Cloning cancelled by user."), - __FILE__, __LINE__); - break; + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Cloning cancelled by user."), + __FILE__, __LINE__); + break; default: - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Cloning interrupted."), - __FILE__, __LINE__); - break; - } + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Cloning interrupted."), + __FILE__, __LINE__); + break; + } - gtk_widget_destroy (dialog); + gtk_widget_destroy (dialog); } @@ -488,176 +467,165 @@ * action that has been performed. */ static void -docking_state_cb (GtkWidget *menuitem, gpointer data) + docking_state_cb (GtkWidget *menuitem, gpointer data) { - GtkWidget *module = GTK_WIDGET (data); - gint w,h; - gchar *icon; /* icon file name */ - gchar *title; /* window title */ + GtkWidget *module = GTK_WIDGET (data); + gint w,h; + gchar *icon; /* icon file name */ + gchar *title; /* window title */ - switch (GTK_SAT_MODULE (module)->state) { + switch (GTK_SAT_MODULE (module)->state) { - case GTK_SAT_MOD_STATE_DOCKED: + case GTK_SAT_MOD_STATE_DOCKED: /* get stored size; use size from main window if size not explicitly stoed */ if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_WIDTH, - NULL)) { + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_WIDTH, + NULL)) { w = g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_WIDTH, - NULL); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_WIDTH, + NULL); } else { w = module->allocation.width; } if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_HEIGHT, - NULL)) { + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_HEIGHT, + NULL)) { h = g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_HEIGHT, - NULL); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_HEIGHT, + NULL); } else { h = module->allocation.height; } - /* increase reference count of module */ - g_object_ref (module); + /* increase reference count of module */ + g_object_ref (module); - /* we don't need the positions */ - GTK_SAT_MODULE (module)->vpanedpos = -1; - GTK_SAT_MODULE (module)->hpanedpos = -1; + /* we don't need the positions */ + //GTK_SAT_MODULE (module)->vpanedpos = -1; + //GTK_SAT_MODULE (module)->hpanedpos = -1; - /* undock from mod-mgr */ - mod_mgr_undock_module (module); + /* undock from mod-mgr */ + mod_mgr_undock_module (module); - /* create window */ - GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - title = g_strconcat ("GPREDICT: ", - GTK_SAT_MODULE (module)->name, - " (", GTK_SAT_MODULE (module)->qth->name, ")", - NULL); - gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); - g_free (title); - gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), w, h); + /* create window */ + GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + title = g_strconcat ("GPREDICT: ", + GTK_SAT_MODULE (module)->name, + " (", GTK_SAT_MODULE (module)->qth->name, ")", + NULL); + gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); + g_free (title); + gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), w, h); g_signal_connect (G_OBJECT (GTK_SAT_MODULE (module)->win), "configure_event", G_CALLBACK (module_window_config_cb), module); - /* window icon */ - icon = icon_file_name ("gpredict-icon.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); - } - g_free (icon); + /* window icon */ + icon = icon_file_name ("gpredict-icon.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); + } + g_free (icon); /* move window to stored position if requested by configuration */ if (sat_cfg_get_bool (SAT_CFG_BOOL_MOD_WIN_POS) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_X, - NULL) && + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_X, + NULL) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_Y, - NULL)) { - + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_Y, + NULL)) { + gtk_window_move (GTK_WINDOW (GTK_SAT_MODULE (module)->win), g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_X, NULL), + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_X, NULL), g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_Y, - NULL)); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_Y, + NULL)); } - /* add module to window */ - gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); + /* add module to window */ + gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; /* store new state in configuration */ g_key_file_set_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_STATE, - GTK_SAT_MOD_STATE_WINDOW); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_STATE, + GTK_SAT_MOD_STATE_WINDOW); - /* decrease reference count of module */ - g_object_unref (module); + /* decrease reference count of module */ + g_object_unref (module); - /* show window */ - gtk_widget_show_all (GTK_SAT_MODULE (module)->win); + /* show window */ + gtk_widget_show_all (GTK_SAT_MODULE (module)->win); - /* reparent time manager window if visible */ - if (GTK_SAT_MODULE (module)->tmgActive) { - gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), - GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - } + /* reparent time manager window if visible */ + if (GTK_SAT_MODULE (module)->tmgActive) { + gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), + GTK_WINDOW (GTK_SAT_MODULE (module)->win)); + } - break; + break; case GTK_SAT_MOD_STATE_WINDOW: case GTK_SAT_MOD_STATE_FULLSCREEN: - /* increase referene count */ - g_object_ref (module); + /* increase referene count */ + g_object_ref (module); - /* store paned positions */ - if (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_2) { - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - } - else if ((GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_3) || - (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_4)) { + /* reparent time manager window if visible */ + if (GTK_SAT_MODULE (module)->tmgActive) { + gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), + GTK_WINDOW (app)); + } - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - GTK_SAT_MODULE (module)->hpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->hpaned)); - } - - /* reparent time manager window if visible */ - if (GTK_SAT_MODULE (module)->tmgActive) { - gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), - GTK_WINDOW (app)); - } + /* remove module from window, destroy window */ + gtk_container_remove (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); + gtk_widget_destroy (GTK_SAT_MODULE (module)->win); + GTK_SAT_MODULE (module)->win = NULL; - /* remove module from window, destroy window */ - gtk_container_remove (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); - gtk_widget_destroy (GTK_SAT_MODULE (module)->win); - GTK_SAT_MODULE (module)->win = NULL; + /* dock into mod-mgr */ + mod_mgr_dock_module (module); - /* dock into mod-mgr */ - mod_mgr_dock_module (module); - - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_DOCKED; + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_DOCKED; /* store new state in configuration */ g_key_file_set_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_STATE, - GTK_SAT_MOD_STATE_DOCKED); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_STATE, + GTK_SAT_MOD_STATE_DOCKED); - /* decrease reference count of module */ - g_object_unref (module); + /* decrease reference count of module */ + g_object_unref (module); - break; + break; default: - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: Unknown module state: %d"), - __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); - break; + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Unknown module state: %d"), + __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); + break; - } + } } @@ -670,96 +638,75 @@ * and WINDOW state. */ static void -screen_state_cb (GtkWidget *menuitem, gpointer data) + screen_state_cb (GtkWidget *menuitem, gpointer data) { - GtkWidget *module = GTK_WIDGET (data); + GtkWidget *module = GTK_WIDGET (data); gint w,h; - gchar *icon; /* icon file name */ - gchar *title; /* window title */ + gchar *icon; /* icon file name */ + gchar *title; /* window title */ - switch (GTK_SAT_MODULE (module)->state) { + switch (GTK_SAT_MODULE (module)->state) { - case GTK_SAT_MOD_STATE_DOCKED: + case GTK_SAT_MOD_STATE_DOCKED: - /* increase reference count of module */ - g_object_ref (module); + /* increase reference count of module */ + g_object_ref (module); - /* we don't need the positions */ - GTK_SAT_MODULE (module)->vpanedpos = -1; - GTK_SAT_MODULE (module)->hpanedpos = -1; + /* undock from mod-mgr */ + mod_mgr_undock_module (module); - /* undock from mod-mgr */ - mod_mgr_undock_module (module); + /* create window */ + GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + title = g_strconcat ("GPREDICT: ", + GTK_SAT_MODULE (module)->name, + " (", GTK_SAT_MODULE (module)->qth->name, ")", + NULL); + gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); + g_free (title); - /* create window */ - GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - title = g_strconcat ("GPREDICT: ", - GTK_SAT_MODULE (module)->name, - " (", GTK_SAT_MODULE (module)->qth->name, ")", - NULL); - gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); - g_free (title); + /* window icon */ + icon = icon_file_name ("gpredict-icon.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); + } + g_free (icon); - /* window icon */ - icon = icon_file_name ("gpredict-icon.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); - } - g_free (icon); + /* add module to window */ + gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); - /* add module to window */ - gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; + /* decrease reference count of module */ + g_object_unref (module); - /* decrease reference count of module */ - g_object_unref (module); + gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - - /* show window */ - gtk_widget_show_all (GTK_SAT_MODULE (module)->win); + /* show window */ + gtk_widget_show_all (GTK_SAT_MODULE (module)->win); - /* reparent time manager window if visible */ - if (GTK_SAT_MODULE (module)->tmgActive) { - gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), - GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - } + /* reparent time manager window if visible */ + if (GTK_SAT_MODULE (module)->tmgActive) { + gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), + GTK_WINDOW (GTK_SAT_MODULE (module)->win)); + } - break; + break; case GTK_SAT_MOD_STATE_WINDOW: + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; + gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); + gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), 800, 600); - /* we don't need the positions */ - GTK_SAT_MODULE (module)->vpanedpos = -1; - GTK_SAT_MODULE (module)->hpanedpos = -1; + break; - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; - gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), 800, 600); - break; - - case GTK_SAT_MOD_STATE_FULLSCREEN: - - /* store paned positions */ - if (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_2) { - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - } - else if ((GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_3) || - (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_4)) { - - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - GTK_SAT_MODULE (module)->hpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->hpaned)); - } - - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; gtk_window_unfullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); /* get stored size; use some standard size if not explicitly specified */ @@ -781,26 +728,26 @@ if (sat_cfg_get_bool (SAT_CFG_BOOL_MOD_WIN_POS) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_X, NULL) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_Y, NULL)) { - + gtk_window_move (GTK_WINDOW (GTK_SAT_MODULE (module)->win), g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_X, NULL), - g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_Y, NULL)); + g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_Y, NULL)); - } + } /* store new state in configuration */ g_key_file_set_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_STATE, GTK_SAT_MOD_STATE_WINDOW); - break; + break; default: - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: Unknown module state: %d"), - __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); - break; + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Unknown module state: %d"), + __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); + break; - } + } } @@ -812,30 +759,30 @@ * tracked in the current module. */ static void -sky_at_glance_cb (GtkWidget *menuitem, gpointer data) + sky_at_glance_cb (GtkWidget *menuitem, gpointer data) { - GtkSatModule *module = GTK_SAT_MODULE (data); - GtkWidget *skg; - GtkWidget *window; - gchar *buff; + GtkSatModule *module = GTK_SAT_MODULE (data); + GtkWidget *skg; + GtkWidget *window; + gchar *buff; - /* create window */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - buff = g_strdup_printf (_("The sky at a glance (%s)"), module->name); - gtk_window_set_title (GTK_WINDOW (window), buff); - g_free (buff); - g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (window_delete), NULL); + /* create window */ + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + buff = g_strdup_printf (_("The sky at a glance (%s)"), module->name); + gtk_window_set_title (GTK_WINDOW (window), buff); + g_free (buff); + g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (window_delete), NULL); - /* window icon */ - buff = icon_file_name ("gpredict-planner.png"); - gtk_window_set_icon_from_file (GTK_WINDOW (window), buff, NULL); - g_free (buff); + /* window icon */ + buff = icon_file_name ("gpredict-planner.png"); + gtk_window_set_icon_from_file (GTK_WINDOW (window), buff, NULL); + g_free (buff); - /* if module is busy wait until done then go on */ - g_mutex_lock(module->busy); + /* if module is busy wait until done then go on */ + g_mutex_lock(module->busy); - /* create sky at a glance widget */ + /* create sky at a glance widget */ if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { skg = gtk_sky_glance_new (module->satellites, module->qth, 0.0); @@ -844,22 +791,22 @@ skg = gtk_sky_glance_new (module->satellites, module->qth, module->tmgCdnum); } - g_mutex_unlock(module->busy); + g_mutex_unlock(module->busy); - gtk_container_set_border_width (GTK_CONTAINER (window), 10); - gtk_container_add (GTK_CONTAINER (window), skg); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); + gtk_container_add (GTK_CONTAINER (window), skg); - gtk_widget_show_all (window); + gtk_widget_show_all (window); } /** \brief Open time manager. */ static void -tmgr_cb (GtkWidget *menuitem, gpointer data) + tmgr_cb (GtkWidget *menuitem, gpointer data) { - GtkSatModule *module = GTK_SAT_MODULE (data); + GtkSatModule *module = GTK_SAT_MODULE (data); - tmg_create (module); + tmg_create (module); } /** \brief Open Radio control window. @@ -867,7 +814,7 @@ * \param data Pointer the GtkSatModule. */ static void -rigctrl_cb (GtkWidget *menuitem, gpointer data) + rigctrl_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); gchar *buff; @@ -888,7 +835,7 @@ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("You have no radio configuration!\n"\ "Please configure a radio first.") - ); + ); g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_window_set_title (GTK_WINDOW (dialog), _("ERROR")); @@ -926,7 +873,7 @@ * This function is called automatically when the window is destroyed. */ static void -destroy_rigctrl (GtkWidget *window, gpointer data) + destroy_rigctrl (GtkWidget *window, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); @@ -940,7 +887,7 @@ * \param data Pointer the GtkSatModule. */ static void -rotctrl_cb (GtkWidget *menuitem, gpointer data) + rotctrl_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); gchar *buff; @@ -961,7 +908,7 @@ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("You have no rotator configuration!\n"\ "Please configure an antenna rotator first.") - ); + ); g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_window_set_title (GTK_WINDOW (dialog), _("ERROR")); @@ -998,7 +945,7 @@ * This function is called automatically when the window is destroyed. */ static void -destroy_rotctrl (GtkWidget *window, gpointer data) + destroy_rotctrl (GtkWidget *window, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); @@ -1008,9 +955,9 @@ /* ensure that deleted top-level windows are destroyed */ static gint -window_delete (GtkWidget *widget, - GdkEvent *event, - gpointer data) + window_delete (GtkWidget *widget, + GdkEvent *event, + gpointer data) { return FALSE; } @@ -1024,9 +971,9 @@ * for gtk_sat_module_close_cb, which will close the current module. */ static void -close_cb (GtkWidget *menuitem, gpointer data) + close_cb (GtkWidget *menuitem, gpointer data) { - gtk_sat_module_close_cb (menuitem, data); + gtk_sat_module_close_cb (menuitem, data); } /** \brief Close and permanently delete module. @@ -1037,53 +984,53 @@ * whereafter the module file will be deleted from the disk. */ static void -delete_cb (GtkWidget *menuitem, gpointer data) + delete_cb (GtkWidget *menuitem, gpointer data) { - gchar *file; - GtkWidget *dialog; - gchar *moddir; + gchar *file; + GtkWidget *dialog; + gchar *moddir; - moddir = get_modules_dir (); - file = g_strconcat (moddir, G_DIR_SEPARATOR_S, - GTK_SAT_MODULE (data)->name, ".mod", NULL); - g_free (moddir); + moddir = get_modules_dir (); + file = g_strconcat (moddir, G_DIR_SEPARATOR_S, + GTK_SAT_MODULE (data)->name, ".mod", NULL); + g_free (moddir); - gtk_sat_module_close_cb (menuitem, data); + gtk_sat_module_close_cb (menuitem, data); - /* ask user to confirm removal */ - dialog = gtk_message_dialog_new_with_markup - (NULL, //GTK_WINDOW (parent), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - _("This operation will permanently delete\n<b>%s</b>\n"\ - "from the disk.\nDo you you want to proceed?"), - file); + /* ask user to confirm removal */ + dialog = gtk_message_dialog_new_with_markup + (NULL, //GTK_WINDOW (parent), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + _("This operation will permanently delete\n<b>%s</b>\n"\ + "from the disk.\nDo you you want to proceed?"), + file); - switch (gtk_dialog_run (GTK_DIALOG (dialog))) { + switch (gtk_dialog_run (GTK_DIALOG (dialog))) { - case GTK_RESPONSE_YES: + case GTK_RESPONSE_YES: - if (g_remove (file)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: Failed to delete %s."), - __FILE__, __LINE__, file); - } - else { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: %s deleted permanently."), - __FILE__, __LINE__, file); - } - break; + if (g_remove (file)) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to delete %s."), + __FILE__, __LINE__, file); + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: %s deleted permanently."), + __FILE__, __LINE__, file); + } + break; default: - break; - } + break; + } - gtk_widget_destroy (dialog); + gtk_widget_destroy (dialog); - g_free (file); + g_free (file); } @@ -1094,55 +1041,55 @@ * of the name is greater than zero, if yes enable the OK button of the dialog. */ static void -name_changed (GtkWidget *widget, gpointer data) + name_changed (GtkWidget *widget, gpointer data) { - const gchar *text; - gchar *entry, *end, *j; - gint len, pos; - GtkWidget *dialog = GTK_WIDGET (data); + const gchar *text; + gchar *entry, *end, *j; + gint len, pos; + GtkWidget *dialog = GTK_WIDGET (data); - /* step 1: ensure that only valid characters are entered + /* step 1: ensure that only valid characters are entered (stolen from xlog, tnx pg4i) */ - entry = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); - if ((len = g_utf8_strlen (entry, -1)) > 0) - { - end = entry + g_utf8_strlen (entry, -1); - for (j = entry; j < end; ++j) - { - switch (*j) - { - case '0' ... '9': - case 'a' ... 'z': - case 'A' ... 'Z': - case '-': - case '_': - break; - default: - gdk_beep (); - pos = gtk_editable_get_position (GTK_EDITABLE (widget)); - gtk_editable_delete_text (GTK_EDITABLE (widget), - pos, pos+1); - break; - } - } - } + entry = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); + if ((len = g_utf8_strlen (entry, -1)) > 0) + { + end = entry + g_utf8_strlen (entry, -1); + for (j = entry; j < end; ++j) + { + switch (*j) + { + case '0' ... '9': + case 'a' ... 'z': + case 'A' ... 'Z': + case '-': + case '_': + break; + default: + gdk_beep (); + pos = gtk_editable_get_position (GTK_EDITABLE (widget)); + gtk_editable_delete_text (GTK_EDITABLE (widget), + pos, pos+1); + break; + } + } + } - /* step 2: if name seems all right, enable OK button */ - text = gtk_entry_get_text (GTK_ENTRY (widget)); + /* step 2: if name seems all right, enable OK button */ + text = gtk_entry_get_text (GTK_ENTRY (widget)); - if (g_utf8_strlen (text, -1) > 0) { - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - TRUE); - } - else { - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - FALSE); - } + if (g_utf8_strlen (text, -1) > 0) { + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + TRUE); + } + else { + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + FALSE); + } } @@ -1165,7 +1112,7 @@ * */ gboolean -module_window_config_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data) + module_window_config_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data) { gint x, y; GtkSatModule *module = GTK_SAT_MODULE (data); @@ -1176,7 +1123,7 @@ gtk_window_get_position (GTK_WINDOW (widget), &x, &y); else return FALSE; /* carry on normally */ - + #ifdef G_OS_WIN32 /* Workaround for GTK+ bug # 169811 - "configure_event" is fired when the window is being maximized */ Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2009-11-19 08:33:05 UTC (rev 520) +++ trunk/src/gtk-sat-module.c 2009-11-19 15:03:02 UTC (rev 521) @@ -79,8 +79,6 @@ const gchar *cfgfile); static void gtk_sat_module_load_sats (GtkSatModule *module); -/* static gboolean gtk_sat_module_sats_are_equal (gconstpointer a, */ -/* gconstpointer b); */ static gboolean gtk_sat_module_timeout_cb (gpointer module); static void gtk_sat_module_update_sat (gpointer key, gpointer val, @@ -91,10 +89,9 @@ static void update_header (GtkSatModule *module); static void update_child (GtkWidget *child, gdouble tstamp); static void create_module_layout (GtkSatModule *module); - +static void get_grid_size (GtkSatModule *module, guint *rows, guint *cols); static GtkWidget *create_view (GtkSatModule *module, guint num); -static void fix_child_allocations (GtkWidget *widget, gpointer data); static void reload_sats_in_child (GtkWidget *widget, GtkSatModule *module); @@ -178,14 +175,8 @@ module->grid = NULL; module->views = NULL; - module->layout = GTK_SAT_MOD_LAYOUT_1; - module->view_1 = GTK_SAT_MOD_VIEW_MAP; - module->view_2 = GTK_SAT_MOD_VIEW_POLAR; - module->view_3 = GTK_SAT_MOD_VIEW_SINGLE; + module->nviews = 0; - module->vpanedpos = -1; - module->hpanedpos = -1; - module->timerid = 0; module->throttle = 1; @@ -271,8 +262,8 @@ /* create module widget */ widget = g_object_new (GTK_TYPE_SAT_MODULE, NULL); - g_signal_connect (widget, "realize", - G_CALLBACK (fix_child_allocations), NULL); +// g_signal_connect (widget, "realize", +// G_CALLBACK (fix_child_allocations), NULL); /* load configuration; note that this will also set the module name */ gtk_sat_module_read_cfg_data (GTK_SAT_MODULE (widget), cfgfile); @@ -365,121 +356,58 @@ /** \brief Create module layout and add views. * - * It is assumed that module->layout and module->view_x have - * sensible values. + * It is assumed that module->grid and module->nviews have + * coherent values. */ static void create_module_layout (GtkSatModule *module) { + GtkWidget *table; + GtkWidget *view; + guint rows,cols; + guint i; - switch (module->layout) { - - /* one child, no setup needed here */ - case GTK_SAT_MOD_LAYOUT_1: - module->child_1 = create_view (module, 1); - module->child_2 = NULL; - module->child_3 = NULL; - gtk_container_add (GTK_CONTAINER (module), module->child_1); - break; - /* two children, we need a vpaned - child_1 on top */ - case GTK_SAT_MOD_LAYOUT_2: - module->vpaned = gtk_vpaned_new (); - gtk_container_add (GTK_CONTAINER (module), module->vpaned); + /* calculate the number of rows and columns necessary */ + get_grid_size (module, &rows, &cols); + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Layout has %d columns and %d rows."), + __FUNCTION__, cols, rows); - module->child_1 = create_view (module, 1); - module->child_2 = create_view (module, 2); - module->child_3 = NULL; + table = gtk_table_new (rows, cols, TRUE); - gtk_paned_pack1 (GTK_PANED (module->vpaned), - module->child_1, TRUE, TRUE); - gtk_paned_pack2 (GTK_PANED (module->vpaned), - module->child_2, TRUE, TRUE); + for (i = 0; i < module->nviews; i++) { + /* create the view */ + ... [truncated message content] |
From: <cs...@us...> - 2009-11-29 16:07:52
|
Revision: 529 http://gpredict.svn.sourceforge.net/gpredict/?rev=529&view=rev Author: csete Date: 2009-11-29 16:07:38 +0000 (Sun, 29 Nov 2009) Log Message: ----------- Added new files with GtkEventList view (not finished). Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-module.h Added Paths: ----------- trunk/src/gtk-event-list.c trunk/src/gtk-event-list.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-29 12:36:54 UTC (rev 528) +++ trunk/ChangeLog 2009-11-29 16:07:38 UTC (rev 529) @@ -1,3 +1,12 @@ +2009-11-29 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-event-list.[ch]: + Added files containing new view listing upcoming events. + + * src/gtk-sat-module.[ch]: + Use new GtkEventList view. + + 2009-11-22 Alexandru Csete <oz9aec at gmail.com> * src/sat-cfg.c: Added: trunk/src/gtk-event-list.c =================================================================== --- trunk/src/gtk-event-list.c (rev 0) +++ trunk/src/gtk-event-list.c 2009-11-29 16:07:38 UTC (rev 529) @@ -0,0 +1,1063 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +/** \brief Satellite List Widget. + * + * More info... + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#include "sgpsdp/sgp4sdp4.h" +#include "gtk-event-list.h" +#include "sat-log.h" +#include "config-keys.h" +#include "sat-cfg.h" +#include "mod-cfg-get-param.h" +#include "gtk-sat-data.h" +#include "gpredict-utils.h" +#include "locator.h" +#include "sat-vis.h" +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif + + + +/** \brief Column titles indexed with column symb. refs. */ +const gchar *EVENT_LIST_COL_TITLE[EVENT_LIST_COL_NUMBER] = { + N_("Sat"), + N_("Catnum"), + N_("A/L"), + N_("Time") +}; + + +/** \brief Column title hints indexed with column symb. refs. */ +const gchar *EVENT_LIST_COL_HINT[EVENT_LIST_COL_NUMBER] = { + N_("Satellite Name"), + N_("Catalogue Number"), + N_("Next event type (A: AOS, L: LOS)"), + N_("Countdown until next event") +}; + +const gfloat EVENT_LIST_COL_XALIGN[EVENT_LIST_COL_NUMBER] = { + 0.0, // name + 0.5, // catnum + 0.5, // event type + 0.5, // time +}; + +static void gtk_event_list_class_init (GtkEventListClass *class); +static void gtk_event_list_init (GtkEventList *list); +static void gtk_event_list_destroy (GtkObject *object); +static GtkTreeModel *create_and_fill_model (GHashTable *sats); +static void event_list_add_satellites (gpointer key, + gpointer value, + gpointer user_data); +static gboolean event_list_update_sats (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, + gpointer data); + +/* cell rendering related functions */ +static void check_and_set_cell_renderer (GtkTreeViewColumn *column, + GtkCellRenderer *renderer, + gint i); + +static void evtype_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column); + +static void time_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column); + +static gint event_cell_compare_function (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data); + + +static gboolean popup_menu_cb (GtkWidget *treeview, + gpointer list); + +static gboolean button_press_cb (GtkWidget *treeview, + GdkEventButton *event, + gpointer list); + +static void view_popup_menu (GtkWidget *treeview, + GdkEventButton *event, + gpointer list); + + +static GtkVBoxClass *parent_class = NULL; + + +GType gtk_event_list_get_type () +{ + static GType gtk_event_list_type = 0; + + if (!gtk_event_list_type) + { + static const GTypeInfo gtk_event_list_info = + { + sizeof (GtkEventListClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_event_list_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkEventList), + 5, /* n_preallocs */ + (GInstanceInitFunc) gtk_event_list_init, + }; + + gtk_event_list_type = g_type_register_static (GTK_TYPE_VBOX, + "GtkEventList", + >k_event_list_info, + 0); + } + + return gtk_event_list_type; +} + + +static void gtk_event_list_class_init (GtkEventListClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkContainerClass *container_class; + + gobject_class = G_OBJECT_CLASS (class); + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + container_class = (GtkContainerClass*) class; + + parent_class = g_type_class_peek_parent (class); + + object_class->destroy = gtk_event_list_destroy; + +} + + +static void gtk_event_list_init (GtkEventList *list) +{ + +} + + +static void gtk_event_list_destroy (GtkObject *object) +{ + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + + +/** \brief Create a new GtkEventList widget. + * \param cfgdata Pointer to the module configuration data. + * \param sats Hash table containing the satellites tracked by the parent module. + * \param qth Pointer to the QTH used by this module. + * \param columns Visible columns (currently not in use). + * + */ +GtkWidget *gtk_event_list_new (GKeyFile *cfgdata, GHashTable *sats, qth_t *qth, guint32 columns) +{ + GtkWidget *widget; + GtkEventList *evlist; + GtkTreeModel *model; + guint i; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + + widget = g_object_new (GTK_TYPE_EVENT_LIST, NULL); + evlist = GTK_EVENT_LIST (widget); + + evlist->update = gtk_event_list_update; + + /* Read configuration data. */ + /* ... */ + + evlist->satellites = sats; + evlist->qth = qth; + + + /* initialise column flags */ + evlist->flags = 0; +/* if (columns > 0) + evlist->flags = columns; + else + evlist->flags = mod_cfg_get_int (cfgdata, + MOD_CFG_EVLIST_SECTION, + MOD_CFG_EVLIST_COLUMNS, + SAT_CFG_INT_EVLIST_COLUMNS); + */ + + /* get refresh rate and cycle counter */ +/* evlist->refresh = mod_cfg_get_int (cfgdata, + MOD_CFG_EVLIST_SECTION, + MOD_CFG_EVLIST_REFRESH, + SAT_CFG_INT_EVLIST_REFRESH); + */ + evlist->refresh = 1000; + + evlist->counter = 1; + + /* create the tree view and add columns */ + evlist->treeview = gtk_tree_view_new (); + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (evlist->treeview), FALSE); + + /* create treeview columns */ + for (i = 0; i < EVENT_LIST_COL_NUMBER; i++) { + + renderer = gtk_cell_renderer_text_new (); + g_object_set (G_OBJECT (renderer), "xalign", EVENT_LIST_COL_XALIGN[i], NULL); + + column = gtk_tree_view_column_new_with_attributes (_(EVENT_LIST_COL_TITLE[i]), + renderer, + "text", i, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (evlist->treeview), + column, -1); + + /* only aligns the headers */ + gtk_tree_view_column_set_alignment (column, 0.5); + + /* set sort id */ + gtk_tree_view_column_set_sort_column_id (column, i); + + /* set cell data function; allows to format data before rendering */ + check_and_set_cell_renderer (column, renderer, i); + + /* hide columns that have not been specified */ + /*if (!(evlist->flags & (1 << i))) { + gtk_tree_view_column_set_visible (column, FALSE); + }*/ + + } + + /* create model and finalise treeview */ + model = create_and_fill_model (evlist->satellites); + gtk_tree_view_set_model (GTK_TREE_VIEW (evlist->treeview), model); + + /* The time sort function needs to be special */ + gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), + EVENT_LIST_COL_TIME, + event_cell_compare_function, + NULL, NULL); + + /* initial sorting criteria */ + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), + EVENT_LIST_COL_TIME, + GTK_SORT_ASCENDING), + + g_object_unref (model); + +/* g_signal_connect (evlist->treeview, "button-press-event", + G_CALLBACK (button_press_cb), widget); + g_signal_connect (evlist->treeview, "popup-menu", + G_CALLBACK (popup_menu_cb), widget);*/ + + evlist->swin = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (evlist->swin), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + gtk_container_add (GTK_CONTAINER (evlist->swin), evlist->treeview); + + gtk_container_add (GTK_CONTAINER (widget), evlist->swin); + gtk_widget_show_all (widget); + + return widget; +} + + +/** \brief Create and file the tree model for the even list. */ +static GtkTreeModel *create_and_fill_model (GHashTable *sats) +{ + GtkListStore *liststore; + + + liststore = gtk_list_store_new (SAT_LIST_COL_NUMBER, + G_TYPE_STRING, // name + G_TYPE_INT, // catnum + G_TYPE_BOOLEAN, // TRUE if AOS, FALSE if LOS + G_TYPE_DOUBLE); // time + + /* add each satellite from hash table */ + g_hash_table_foreach (sats, event_list_add_satellites, liststore); + + + return GTK_TREE_MODEL (liststore); +} + + +/** \brief Add satellites. This function is a g_hash_table_foreach() callback. + * \param key The key of the satellite in the hash table. + * \param value Pointer to the satellite (sat_t structure) that should be added. + * \param user_data Pointer to the GtkListStore where the satellite should be added + * + * This function is called by by the create_and_fill_models() function for adding + * the satellites to the internal liststore. + */ +static void event_list_add_satellites (gpointer key, gpointer value, gpointer user_data) +{ + GtkListStore *store = GTK_LIST_STORE (user_data); + GtkTreeIter item; + sat_t *sat = SAT (value); + + + gtk_list_store_append (store, &item); + gtk_list_store_set (store, &item, + EVENT_LIST_COL_NAME, sat->nickname, + EVENT_LIST_COL_CATNUM, sat->tle.catnr, + EVENT_LIST_COL_EVT, (sat->el >= 0) ? TRUE : FALSE, + EVENT_LIST_COL_TIME, 0.0, + -1); +} + + + +/** \brief Update satellites */ +void gtk_event_list_update (GtkWidget *widget) +{ + GtkTreeModel *model; + GtkEventList *evlist = GTK_EVENT_LIST (widget); + + + /* first, do some sanity checks */ + if ((evlist == NULL) || !IS_GTK_EVENT_LIST (satlist)) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: Invalid GtkEventList!"), + __FUNCTION__); + } + + + /* check refresh rate */ + if (evlist->counter < evlist->refresh) { + evlist->counter++; + } + else { + evlist->counter = 1; + + /* get and tranverse the model */ + model = gtk_tree_view_get_model (GTK_TREE_VIEW (evlist->treeview)); + + /* update */ + gtk_tree_model_foreach (model, event_list_update_sats, satlist); + } +} + + +/** \brief Update data in each column in a given row */ +static gboolean event_list_update_sats (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, + gpointer data) +{ + GtkEventList *satlist = GTK_EVENT_LIST (data); + guint *catnum; + sat_t *sat; + gchar *buff; + gint retcode; + + + /* get the catalogue number for this row + then look it up in the hash table + */ + catnum = g_new0 (guint, 1); + gtk_tree_model_get (model, iter, EVENT_LIST_COL_CATNUM, catnum, -1); + sat = SAT (g_hash_table_lookup (satlist->satellites, catnum)); + + if (sat == NULL) { + /* satellite not tracked anymore => remove */ + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Failed to get data for #%d."), + __FUNCTION__, *catnum); + + gtk_list_store_remove (GTK_LIST_STORE (model), iter); + + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: Satellite #%d removed from list."), + __FUNCTION__, *catnum); + } + else { + + /**** UPDATED UNTIL HERE *****/ + /* store new data */ + gtk_list_store_set (GTK_LIST_STORE (model), iter, + SAT_LIST_COL_AZ, sat->az, + SAT_LIST_COL_EL, sat->el, + SAT_LIST_COL_RANGE, sat->range, + SAT_LIST_COL_RANGE_RATE, sat->range_rate, + SAT_LIST_COL_LAT, sat->ssplat, + SAT_LIST_COL_LON, sat->ssplon, + SAT_LIST_COL_FOOTPRINT, sat->footprint, + SAT_LIST_COL_ALT, sat->alt, + SAT_LIST_COL_VEL, sat->velo, + SAT_LIST_COL_MA, sat->ma, + SAT_LIST_COL_PHASE, sat->phase, + SAT_LIST_COL_ORBIT, sat->orbit, + -1); + + if (satlist->flags & SAT_LIST_FLAG_NEXT_EVENT) { + gdouble number; + gchar buff[TIME_FORMAT_MAX_LENGTH]; + gchar *tfstr; + gchar *fmtstr; + gchar *alstr; + time_t t; + guint size; + + + if (sat->aos > sat->los) { + /* next event is LOS */ + number = sat->los; + alstr = g_strdup ("LOS: "); + } + else { + /* next event is AOS */ + number = sat->aos; + alstr = g_strdup ("AOS: "); + } + + if (number == 0.0) { + gtk_list_store_set (GTK_LIST_STORE (model), iter, + SAT_LIST_COL_NEXT_EVENT, "--- N/A ---", + -1); + } + else { + + /* convert julian date to struct tm */ + t = (number - 2440587.5)*86400.; + + /* format the number */ + tfstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT); + fmtstr = g_strconcat (alstr, tfstr, NULL); + g_free (tfstr); + + /* format either local time or UTC depending on check box */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, + fmtstr, localtime (&t)); + else + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, + fmtstr, gmtime (&t)); + + if (size == 0) + /* size > MAX_LENGTH */ + buff[TIME_FORMAT_MAX_LENGTH-1] = '\0'; + + gtk_list_store_set (GTK_LIST_STORE (model), iter, + SAT_LIST_COL_NEXT_EVENT, buff, + -1); + + + g_free (fmtstr); + } + + g_free (alstr); + + } + + } + + g_free (catnum); + + /* Return value not documented what to return, but it seems that + FALSE continues to next row while TRUE breaks + */ + return FALSE; +} + + + +/** \brief Set cell renderer function. */ +static void check_and_set_cell_renderer (GtkTreeViewColumn *column, + GtkCellRenderer *renderer, + gint i) +{ + + switch (i) { + + /* general float with 2 dec. precision + no extra format besides a degree char + */ + case SAT_LIST_COL_AZ: + case SAT_LIST_COL_EL: + case SAT_LIST_COL_RA: + case SAT_LIST_COL_DEC: + case SAT_LIST_COL_MA: + case SAT_LIST_COL_PHASE: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + degree_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + /* LAT/LON format */ + case SAT_LIST_COL_LAT: + case SAT_LIST_COL_LON: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + latlon_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + /* distances and velocities */ + case SAT_LIST_COL_RANGE: + case SAT_LIST_COL_ALT: + case SAT_LIST_COL_FOOTPRINT: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + distance_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_VEL: + case SAT_LIST_COL_RANGE_RATE: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + range_rate_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_DOPPLER: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + float_to_int_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_DELAY: + case SAT_LIST_COL_LOSS: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + two_dec_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_AOS: + case SAT_LIST_COL_LOS: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + event_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + default: + break; + + } + +} + + +/* render column containg lat/lon + by using this instead of the default data function, we can + control the number of decimals and display the coordinates in a + fancy way, including degree sign and NWSE suffixes. + + Please note that this function only affects how the numbers are + displayed (rendered), the tree_store will still contain the + original flaoting point numbers. Very cool! +*/ +static void +latlon_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number = 0.0; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + gchar hmf = ' '; + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* check whether configuration requests the use + of N, S, E and W instead of signs + */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_NSEW)) { + + if (coli == SAT_LIST_COL_LAT) { + if (number < 0.00) { + number = -number; + hmf = 'S'; + } + else { + hmf = 'N'; + } + } + else if (coli == SAT_LIST_COL_LON) { + if (number < 0.00) { + number = -number; + hmf = 'W'; + } + else { + hmf = 'E'; + } + } + else { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Invalid column: %d"), + __FILE__, __LINE__, + coli); + hmf = '?'; + } + } + + /* format the number */ + buff = g_strdup_printf ("%.2f\302\260%c", number, hmf); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + + +/* general floats with 2 digits + degree char */ +static void +degree_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.2f\302\260", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + + +/* distance and velocity, 0 decimal digits */ +static void +distance_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* convert distance to miles? */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { + number = KM_TO_MI(number); + } + + /* format the number */ + buff = g_strdup_printf ("%.0f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + +/* range rate is special, because we may need to convert to miles + and want 2-3 decimal digits. +*/ +static void +range_rate_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* convert distance to miles? */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { + number = KM_TO_MI(number); + } + + /* format the number */ + buff = g_strdup_printf ("%.3f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + +/* 0 decimal digits */ +static void +float_to_int_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.0f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + +/* 2 decimal digits */ +static void +two_dec_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.2f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + + +/* AOS/LOS; convert julian date to string */ +static void +event_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar buff[TIME_FORMAT_MAX_LENGTH]; + gchar *fmtstr; + guint coli = GPOINTER_TO_UINT (column); + time_t t; + guint size; + + + gtk_tree_model_get (model, iter, coli, &number, -1); + + if (number == 0.0) { + g_object_set (renderer, + "text", "--- N/A ---", + NULL); + } + else { + + /* convert julian date to struct tm */ + t = (number - 2440587.5)*86400.; + + /* format the number */ + fmtstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT); + + /* format either local time or UTC depending on check box */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, fmtstr, localtime (&t)); + else + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, fmtstr, gmtime (&t)); + + if (size == 0) + /* size > TIME_FORMAT_MAX_LENGTH */ + buff[TIME_FORMAT_MAX_LENGTH-1] = '\0'; + + g_object_set (renderer, + "text", buff, + NULL); + + g_free (fmtstr); + } + +} + + +/** \brief Function to compare to Event cells. + * \param model Pointer to the GtkTreeModel. + * \param a Pointer to the first element. + * \param b Pointer to the second element. + * \param user_data Always NULL (TBC). + * \return See detailed description. + * + * This function is used by the SatList sort function to determine whether + * AOS/LOS cell a is greater than b or not. The cells a and b contain the + * time of the event in Julian days, thus the result can be computed by a + * simple comparison between the two numbers contained in the cells. + * + * The function returns -1 if a < b; +1 if a > b; 0 otherwise. + */ +static gint event_cell_compare_function (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data) +{ + gint result; + gdouble ta,tb; + gint sort_col; + GtkSortType sort_type; + + + /* Since this function is used for both AOS and LOS columns, + we need to get the sort column */ + gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (model), + &sort_col, + &sort_type); + + /* get a and b */ + gtk_tree_model_get (model, a, sort_col, &ta, -1); + gtk_tree_model_get (model, b, sort_col, &tb, -1); + + if (ta < tb) { + result = -1; + } + else if (ta > tb) { + result = 1; + } + else { + result = 0; + } + + return result; +} + + +/** \brief Reload configuration */ +void +gtk_sat_list_reconf (GtkWidget *widget, GKeyFile *cfgdat) +{ + sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: FIXME I am not implemented")); +} + + + +/** \brief Manage "popup-menu" events. + * \param treeview The tree view in the GtkSatList widget + * \param list Pointer to the GtkSatList widget. + * + * This function is called when the "popup-menu" signal is emitted. This + * usually happens if the user presses SHJIFT-F10? It is used as a wrapper + * for the function that actually creates the popup menu. + */ +static gboolean +popup_menu_cb (GtkWidget *treeview, gpointer list) +{ + + /* if there is no selection, select the first row */ + + + view_popup_menu (treeview, NULL, list); + + return TRUE; /* we handled this */ +} + + +/** \brief Manage button press events. + * \param treeview The tree view in the GtkSatList widget. + * \param event The event received. + * \param list Pointer to the GtkSatList widget. + * + */ +static gboolean +button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer list) +{ + + /* single click with the right mouse button? */ + if (event->type == GDK_BUTTON_PRESS && event->button == 3) { + + /* optional: select row if no row is selected or only + * one other row is selected (will only do something + * if you set a tree selection mode as described later + * in the tutorial) */ + if (1) { + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); + + /* Note: gtk_tree_selection_count_selected_rows() does not + * exist in gtk+-2.0, only in gtk+ >= v2.2 ! */ + if (gtk_tree_selection_count_selected_rows (selection) <= 1) { + GtkTreePath *path; + + /* Get tree path for row that was clicked */ + if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (treeview), + (gint) event->x, + (gint) event->y, + &path, NULL, NULL, NULL)) { + gtk_tree_selection_unselect_all (selection); + gtk_tree_selection_select_path (selection, path); + gtk_tree_path_free (path); + } + } + } /* end of optional bit */ + + view_popup_menu (treeview, event, list); + + return TRUE; /* we handled this */ + } + + return FALSE; /* we did not handle this */ +} + + +static void +view_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer list) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + guint *catnum; + sat_t *sat; + + catnum = g_new0 (guint, 1); + + /* get selected satellite */ + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); + if (gtk_tree_selection_get_selected (selection, &model, &iter)) { + + + gtk_tree_model_get (model, &iter, + SAT_LIST_COL_CATNUM, catnum, + -1); + + sat = SAT (g_hash_table_lookup (GTK_SAT_LIST (list)->satellites, catnum)); + + if (sat == NULL) { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d Failed to get data for %d."), + __FILE__, __LINE__, catnum); + + } + else { + gtk_sat_list_popup_exec (sat, GTK_SAT_LIST (list)->qth, event, + GTK_SAT_LIST (list)); + } + + + } + else { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: There is no selection; skip popup."), + __FILE__, __LINE__); + } + + g_free (catnum); +} + + +/*** FIXME: formalise with other copies, only need az,el and jul_utc */ +static void +Calculate_RADec (sat_t *sat, qth_t *qth, obs_astro_t *obs_set) +{ + /* Reference: Methods of Orbit Determination by */ + /* Pedro Ramon Escobal, pp. 401-402 */ + + double phi,theta,sin_theta,cos_theta,sin_phi,cos_phi, + az,el,Lxh,Lyh,Lzh,Sx,Ex,Zx,Sy,Ey,Zy,Sz,Ez,Zz, + Lx,Ly,Lz,cos_delta,sin_alpha,cos_alpha; + geodetic_t geodetic; + + + geodetic.lon = qth->lon * de2ra; + geodetic.lat = qth->lat * de2ra; + geodetic.alt = qth->alt / 1000.0; + geodetic.theta = 0; + + + + az = sat->az * de2ra; + el = sat->el * de2ra; + phi = geodetic.lat; + theta = FMod2p(ThetaG_JD(sat->jul_utc) + geodetic.lon); + sin_theta = sin(theta); + cos_theta = cos(theta); + sin_phi = sin(phi); + cos_phi = cos(phi); + Lxh = -cos(az) * cos(el); + Lyh = sin(az) * cos(el); + Lzh = sin(el); + Sx = sin_phi * cos_theta; + Ex = -sin_theta; + Zx = cos_theta * cos_phi; + Sy = sin_phi * sin_theta; + Ey = cos_theta; + Zy = sin_theta*cos_phi; + Sz = -cos_phi; + Ez = 0; + Zz = sin_phi; + Lx = Sx*Lxh + Ex * Lyh + Zx*Lzh; + Ly = Sy*Lxh + Ey * Lyh + Zy*Lzh; + Lz = Sz*Lxh + Ez * Lyh + Zz*Lzh; + obs_set->dec = ArcSin(Lz); /* Declination (radians)*/ + cos_delta = sqrt(1 - Sqr(Lz)); + sin_alpha = Ly / cos_delta; + cos_alpha = Lx / cos_delta; + obs_set->ra = AcTan(sin_alpha,cos_alpha); /* Right Ascension (radians)*/ + obs_set->ra = FMod2p(obs_set->ra); + +} + + + + +/** \brief Reload reference to satellites (e.g. after TLE update). */ +void +gtk_sat_list_reload_sats (GtkWidget *satlist, GHashTable *sats) +{ + GTK_SAT_LIST (satlist)->satellites = sats; +} Added: trunk/src/gtk-event-list.h =================================================================== --- trunk/src/gtk-event-list.h (rev 0) +++ trunk/src/gtk-event-list.h 2009-11-29 16:07:38 UTC (rev 529) @@ -0,0 +1,119 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef __GTK_EVENT_LIST_H__ +#define __GTK_EVENT_LIST_H__ 1 + +#include <glib.h> +#include <glib/gi18n.h> +#include <gdk/gdk.h> +#include <gtk/gtkvbox.h> +#include "gtk-sat-data.h" + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define GTK_TYPE_EVENT_LIST (gtk_EVENT_list_get_type ()) +#define GTK_EVENT_LIST(obj) GTK_CHECK_CAST (obj,\ + gtk_event_list_get_type (),\ + GtkEventList) + +#define GTK_EVENT_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\ + gtk_event_list_get_type (),\ + GtkEventListClass) + +#define IS_GTK_EVENT_LIST(obj) GTK_CHECK_TYPE (obj, gtk_event_list_get_type ()) + + +typedef struct _gtk_event_list GtkEventList; +typedef struct _GtkEventListClass GtkEventListClass; + + +struct _gtk_event_list +{ + GtkVBox vbox; + + GtkWidget *treeview; /*!< the tree view itself */ + GtkWidget *swin; /*!< scrolled window */ + + GHashTable *satellites; /*!< Satellites. */ + qth_t *qth; /*!< Pointer to current location. */ + + guint32 flags; /*!< Flags indicating which columns are visible */ + guint refresh; /*!< Refresh rate, ie. how many cycles should pass between updates */ + guint counter; /*!< cycle counter */ + + gdouble tstamp; /*!< time stamp of calculations; set by GtkSatModule */ + + void (* update) (GtkWidget *widget); /*!< update function */ +}; + +struct _GtkEventListClass +{ + GtkVBoxClass parent_class; +}; + + +/** \brief Symbolic references to columns */ +typedef enum { + EVENT_LIST_COL_NAME = 0, /*!< Satellite name. */ + EVENT_LIST_COL_CATNUM, /*!< Catalogue number. */ + EVENT_LIST_COL_EVT, /*!< Next event (AOS or LOS). */ + EVENT_LIST_COL_TIME, /*!< Time countdown. */ + EVENT_LIST_COL_NUMBER +} event_list_col_t; + + + +/** \brief Column Flags */ +typedef enum { + EVENT_LIST_FLAG_NAME = 1 << EVENT_LIST_COL_NAME, /*!< Satellite name. */ + EVENT_LIST_FLAG_CATNUM = 1 << EVENT_LIST_COL_CATNUM, + EVENT_LIST_FLAG_EVT = 1 << EVENT_LIST_COL_EVT, /*!< Next event (AOS or LOS) */ + EVENT_LIST_FLAG_TIME = 1 << EVENT_LIST_COL_TIME, /*!< Time countdown */ +} event_list_flag_t; + + +GtkType gtk_event_list_get_type (void); +GtkWidget* gtk_event_list_new (GKeyFile *cfgdata, + GHashTable *sats, + qth_t *qth, + guint32 columns); +void gtk_event_list_update (GtkWidget *widget); +void gtk_event_list_reconf (GtkWidget *widget, GKeyFile *cfgdat); + +void gtk_event_list_reload_sats (GtkWidget *satlist, GHashTable *sats); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GTK_SAT_MODULE_H__ */ Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2009-11-29 12:36:54 UTC (rev 528) +++ trunk/src/gtk-sat-module.h 2009-11-29 16:07:38 UTC (rev 529) @@ -49,20 +49,22 @@ /** \brief Module layout */ -typedef enum { - GTK_SAT_MOD_LAYOUT_1 = 0, /*!< one view */ - GTK_SAT_MOD_LAYOUT_2, /*!< Two views, one above the other */ - GTK_SAT_MOD_LAYOUT_3, /*!< Three views, big one on top, two small one at bottom */ - GTK_SAT_MOD_LAYOUT_4 /*!< Three views, big one on bottom, small ones on top */ -} gtk_sat_mod_layout_t; +//typedef enum { +// GTK_SAT_MOD_LAYOUT_1 = 0, /*!< one view */ +// GTK_SAT_MOD_LAYOUT_2, /*!< Two views, one above the other */ +// GTK_SAT_MOD_LAYOUT_3, /*!< Three views, big one on top, two small one at bottom */ +// GTK_SAT_MOD_LAYOUT_4 /*!< Three views, big one on bottom, small ones on top */ +//} gtk_sat_mod_layout_t; + /** \brief View types */ typedef enum { GTK_SAT_MOD_VIEW_LIST = 0, /*!< GtkSatList */ GTK_SAT_MOD_VIEW_MAP, /*!< GtkSatMap */ GTK_SAT_MOD_VIEW_POLAR, /*!< GtkPolarView */ GTK_SAT_MOD_VIEW_SINGLE, /*!< GtkSingleSat */ + GTK_SAT_MOD_VIEW_EVENT, /*!< GtkEventList */ GTK_SAT_MOD_VIEW_NUM, /*!< Number of modules */ } gtk_sat_mod_view_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-30 14:23:34
|
Revision: 530 http://gpredict.svn.sourceforge.net/gpredict/?rev=530&view=rev Author: csete Date: 2009-11-30 14:23:25 +0000 (Mon, 30 Nov 2009) Log Message: ----------- Include new files in build list. Modified Paths: -------------- trunk/src/Makefile.am trunk/win32/Makefile Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-11-29 16:07:38 UTC (rev 529) +++ trunk/src/Makefile.am 2009-11-30 14:23:25 UTC (rev 530) @@ -20,97 +20,98 @@ bin_PROGRAMS = gpredict gpredict_SOURCES = \ - sgpsdp/sgp4sdp4.c \ - sgpsdp/sgp4sdp4.h \ - sgpsdp/sgp_in.c \ - sgpsdp/sgp_math.c \ - sgpsdp/sgp_obs.c \ - sgpsdp/sgp_time.c \ - sgpsdp/solar.c \ - about.c about.h \ - compat.c compat.h config-keys.h \ - defaults.h \ - first-time.c first-time.h \ - gpredict-help.c gpredict-help.h \ - gpredict-url-hook.c gpredict-url-hook.h \ - gpredict-utils.c gpredict-utils.h \ - gtk-azel-plot.c gtk-azel-plot.h \ - gtk-freq-knob.c gtk-freq-knob.h \ - gtk-polar-plot.c gtk-polar-plot.h \ - gtk-polar-view.c gtk-polar-view.h \ - gtk-polar-view-popup.c gtk-polar-view-popup.h \ - gtk-rig-ctrl.c gtk-rig-ctrl.h \ - gtk-rot-ctrl.c gtk-rot-ctrl.h \ - gtk-rot-knob.c gtk-rot-knob.h \ - gtk-sat-data.c gtk-sat-data.h \ - gtk-sat-list.c gtk-sat-list.h \ - gtk-sat-list-col-sel.c gtk-sat-list-col-sel.h \ - gtk-sat-list-popup.c gtk-sat-list-popup.h \ - gtk-sat-map.c gtk-sat-map.h \ - gtk-sat-map-popup.c gtk-sat-map-popup.h \ - gtk-sat-map-ground-track.c gtk-sat-map-ground-track.h \ - gtk-sat-module.c gtk-sat-module.h \ - gtk-sat-module-popup.c gtk-sat-module-popup.h \ - gtk-sat-module-tmg.c gtk-sat-module-tmg.h \ + sgpsdp/sgp4sdp4.c \ + sgpsdp/sgp4sdp4.h \ + sgpsdp/sgp_in.c \ + sgpsdp/sgp_math.c \ + sgpsdp/sgp_obs.c \ + sgpsdp/sgp_time.c \ + sgpsdp/solar.c \ + about.c about.h \ + compat.c compat.h config-keys.h \ + defaults.h \ + first-time.c first-time.h \ + gpredict-help.c gpredict-help.h \ + gpredict-url-hook.c gpredict-url-hook.h \ + gpredict-utils.c gpredict-utils.h \ + gtk-azel-plot.c gtk-azel-plot.h \ + gtk-event-list.c gtk-event-list.h \ + gtk-freq-knob.c gtk-freq-knob.h \ + gtk-polar-plot.c gtk-polar-plot.h \ + gtk-polar-view.c gtk-polar-view.h \ + gtk-polar-view-popup.c gtk-polar-view-popup.h \ + gtk-rig-ctrl.c gtk-rig-ctrl.h \ + gtk-rot-ctrl.c gtk-rot-ctrl.h \ + gtk-rot-knob.c gtk-rot-knob.h \ + gtk-sat-data.c gtk-sat-data.h \ + gtk-sat-list.c gtk-sat-list.h \ + gtk-sat-list-col-sel.c gtk-sat-list-col-sel.h \ + gtk-sat-list-popup.c gtk-sat-list-popup.h \ + gtk-sat-map.c gtk-sat-map.h \ + gtk-sat-map-popup.c gtk-sat-map-popup.h \ + gtk-sat-map-ground-track.c gtk-sat-map-ground-track.h \ + gtk-sat-module.c gtk-sat-module.h \ + gtk-sat-module-popup.c gtk-sat-module-popup.h \ + gtk-sat-module-tmg.c gtk-sat-module-tmg.h \ gtk-sat-selector.c gtk-sat-selector.h \ - gtk-single-sat.c gtk-single-sat.h \ - gtk-sky-glance.c gtk-sky-glance.h \ - gui.c gui.h \ - loc-tree.c loc-tree.h \ - locator.c locator.h \ - main.c \ - map-selector.c map-selector.h \ - menubar.c menubar.h \ - mod-cfg.c mod-cfg.h \ - mod-cfg-get-param.c mod-cfg-get-param.h \ - mod-mgr.c mod-mgr.h \ - orbit-tools.c orbit-tools.h \ - pass-popup-menu.c pass-popup-menu.h \ - pass-to-txt.c pass-to-txt.h \ - predict-tools.c predict-tools.h \ + gtk-single-sat.c gtk-single-sat.h \ + gtk-sky-glance.c gtk-sky-glance.h \ + gui.c gui.h \ + loc-tree.c loc-tree.h \ + locator.c locator.h \ + main.c \ + map-selector.c map-selector.h \ + menubar.c menubar.h \ + mod-cfg.c mod-cfg.h \ + mod-cfg-get-param.c mod-cfg-get-param.h \ + mod-mgr.c mod-mgr.h \ + orbit-tools.c orbit-tools.h \ + pass-popup-menu.c pass-popup-menu.h \ + pass-to-txt.c pass-to-txt.h \ + predict-tools.c predict-tools.h \ qth-data.c qth-data.h \ - qth-editor.c qth-editor.h \ - radio-conf.c radio-conf.h \ - rotor-conf.c rotor-conf.h \ + qth-editor.c qth-editor.h \ + radio-conf.c radio-conf.h \ + rotor-conf.c rotor-conf.h \ trsp-conf.c trsp-conf.h \ - sat-cfg.c sat-cfg.h \ - sat-info.c sat-info.h \ - sat-log.c sat-log.h \ - sat-log-browser.c sat-log-browser.h \ - sat-monitor.c sat-monitor.h \ - sat-pass-dialogs.c sat-pass-dialogs.h \ - sat-pref.c sat-pref.h \ - sat-pref-general.c sat-pref-general.h \ - sat-pref-formats.c sat-pref-formats.h \ - sat-pref-qth.c sat-pref-qth.h sat-pref-qth-data.h \ - sat-pref-qth-editor.c sat-pref-qth-editor.h \ - sat-pref-tle.c sat-pref-tle.h \ - sat-pref-debug.c sat-pref-debug.h \ - sat-pref-help.c sat-pref-help.h \ - sat-pref-modules.c sat-pref-modules.h \ - sat-pref-layout.c sat-pref-layout.h \ + sat-cfg.c sat-cfg.h \ + sat-info.c sat-info.h \ + sat-log.c sat-log.h \ + sat-log-browser.c sat-log-browser.h \ + sat-monitor.c sat-monitor.h \ + sat-pass-dialogs.c sat-pass-dialogs.h \ + sat-pref.c sat-pref.h \ + sat-pref-general.c sat-pref-general.h \ + sat-pref-formats.c sat-pref-formats.h \ + sat-pref-qth.c sat-pref-qth.h sat-pref-qth-data.h \ + sat-pref-qth-editor.c sat-pref-qth-editor.h \ + sat-pref-tle.c sat-pref-tle.h \ + sat-pref-debug.c sat-pref-debug.h \ + sat-pref-help.c sat-pref-help.h \ + sat-pref-modules.c sat-pref-modules.h \ + sat-pref-layout.c sat-pref-layout.h \ sat-pref-layout-utils.c sat-pref-layout-utils.h \ - sat-pref-refresh.c sat-pref-refresh.h \ - sat-pref-map-view.c sat-pref-map-view.h \ - sat-pref-list-view.c sat-pref-list-view.h \ - sat-pref-polar-view.c sat-pref-polar-view.h \ - sat-pref-single-sat.c sat-pref-single-sat.h \ - sat-pref-interfaces.c sat-pref-interfaces.h \ - sat-pref-rig.c sat-pref-rig.h sat-pref-rig-data.h \ - sat-pref-rig-editor.c sat-pref-rig-editor.h \ - sat-pref-rot.c sat-pref-rot.h sat-pref-rot-data.h \ - sat-pref-rot-editor.c sat-pref-rot-editor.h \ - sat-pref-predict.c sat-pref-predict.h \ - sat-pref-conditions.c sat-pref-conditions.h \ - sat-pref-multi-pass.c sat-pref-multi-pass.h \ - sat-pref-single-pass.c sat-pref-single-pass.h \ - sat-pref-sky-at-glance.c sat-pref-sky-at-glance.h \ - sat-vis.c sat-vis.h \ - save-pass.c save-pass.h \ - time-tools.c time-tools.h \ - tle-tools.c tle-tools.h \ - tle-update.c tle-update.h \ - sat-debugger.c sat-debugger.h + sat-pref-refresh.c sat-pref-refresh.h \ + sat-pref-map-view.c sat-pref-map-view.h \ + sat-pref-list-view.c sat-pref-list-view.h \ + sat-pref-polar-view.c sat-pref-polar-view.h \ + sat-pref-single-sat.c sat-pref-single-sat.h \ + sat-pref-interfaces.c sat-pref-interfaces.h \ + sat-pref-rig.c sat-pref-rig.h sat-pref-rig-data.h \ + sat-pref-rig-editor.c sat-pref-rig-editor.h \ + sat-pref-rot.c sat-pref-rot.h sat-pref-rot-data.h \ + sat-pref-rot-editor.c sat-pref-rot-editor.h \ + sat-pref-predict.c sat-pref-predict.h \ + sat-pref-conditions.c sat-pref-conditions.h \ + sat-pref-multi-pass.c sat-pref-multi-pass.h \ + sat-pref-single-pass.c sat-pref-single-pass.h \ + sat-pref-sky-at-glance.c sat-pref-sky-at-glance.h \ + sat-vis.c sat-vis.h \ + save-pass.c save-pass.h \ + time-tools.c time-tools.h \ + tle-tools.c tle-tools.h \ + tle-update.c tle-update.h \ + sat-debugger.c sat-debugger.h Modified: trunk/win32/Makefile =================================================================== --- trunk/win32/Makefile 2009-11-29 16:07:38 UTC (rev 529) +++ trunk/win32/Makefile 2009-11-30 14:23:25 UTC (rev 530) @@ -86,6 +86,7 @@ gpredict-url-hook.c \ gpredict-utils.c \ gtk-azel-plot.c \ + gtk-event-list.c \ gtk-freq-knob.c \ gtk-polar-plot.c \ gtk-polar-view.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-02 15:12:55
|
Revision: 538 http://gpredict.svn.sourceforge.net/gpredict/?rev=538&view=rev Author: csete Date: 2009-12-02 15:12:44 +0000 (Wed, 02 Dec 2009) Log Message: ----------- Added code implementing pop-up menu for GtkEventList. Modified Paths: -------------- trunk/src/Makefile.am trunk/win32/Makefile Added Paths: ----------- trunk/src/gtk-event-list-popup.c trunk/src/gtk-event-list-popup.h Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-12-01 10:46:35 UTC (rev 537) +++ trunk/src/Makefile.am 2009-12-02 15:12:44 UTC (rev 538) @@ -36,6 +36,7 @@ gpredict-utils.c gpredict-utils.h \ gtk-azel-plot.c gtk-azel-plot.h \ gtk-event-list.c gtk-event-list.h \ + gtk-event-list-popup.c gtk-event-list-popup.h \ gtk-freq-knob.c gtk-freq-knob.h \ gtk-polar-plot.c gtk-polar-plot.h \ gtk-polar-view.c gtk-polar-view.h \ Added: trunk/src/gtk-event-list-popup.c =================================================================== --- trunk/src/gtk-event-list-popup.c (rev 0) +++ trunk/src/gtk-event-list-popup.c 2009-12-02 15:12:44 UTC (rev 538) @@ -0,0 +1,272 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +/** \brief Pop-up menu used by GtkSatList. + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#include "sgpsdp/sgp4sdp4.h" +#include "sat-log.h" +#include "config-keys.h" +#include "sat-cfg.h" +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif +#include "orbit-tools.h" +#include "predict-tools.h" +#include "sat-pass-dialogs.h" +#include "gtk-event-list-popup.h" +#include "sat-info.h" + + + + +static void show_next_pass_cb (GtkWidget *menuitem, gpointer data); +static void show_future_passes_cb (GtkWidget *menuitem, gpointer data); + + +/** \brief Show satellite popup menu. + * \param sat Pointer to the satellite data. + * \param qth The current location. + * \param event The mouse-click related event info. + * \param toplevel The top level window. + */ +void gtk_event_list_popup_exec (sat_t *sat, qth_t *qth, GdkEventButton *event, GtkEventList *list) +{ + GtkWidget *menu; + GtkWidget *menuitem; + GtkWidget *label; + GtkWidget *image; + gchar *buff; + + + + menu = gtk_menu_new (); + + /* first menu item is the satellite name, centered */ + menuitem = gtk_image_menu_item_new (); + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); + buff = g_strdup_printf ("<b>%s</b>", sat->nickname); + gtk_label_set_markup (GTK_LABEL (label), buff); + g_free (buff); + gtk_container_add (GTK_CONTAINER (menuitem), label); + image = gtk_image_new_from_stock (GTK_STOCK_INFO, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + + /* attach data to menuitem and connect callback */ + g_object_set_data (G_OBJECT (menuitem), "sat", sat); + g_object_set_data (G_OBJECT (menuitem), "qth", qth); + g_signal_connect (menuitem, "activate", + G_CALLBACK (show_sat_info), + gtk_widget_get_toplevel (GTK_WIDGET (list))); + + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + /* next pass and predict passes */ + menuitem = gtk_image_menu_item_new_with_label (_("Show next pass")); + image = gtk_image_new_from_stock (GTK_STOCK_JUSTIFY_FILL, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + g_object_set_data (G_OBJECT (menuitem), "sat", sat); + g_object_set_data (G_OBJECT (menuitem), "qth", qth); + g_signal_connect (menuitem, "activate", + G_CALLBACK (show_next_pass_cb), + list); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + menuitem = gtk_image_menu_item_new_with_label (_("Future passes")); + image = gtk_image_new_from_stock (GTK_STOCK_INDEX, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + g_object_set_data (G_OBJECT (menuitem), "sat", sat); + g_object_set_data (G_OBJECT (menuitem), "qth", qth); + g_signal_connect (menuitem, "activate", + G_CALLBACK (show_future_passes_cb), + list); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + + gtk_widget_show_all (menu); + + /* Note: event can be NULL here when called from view_onPopupMenu; + * gdk_event_get_time() accepts a NULL argument */ + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + (event != NULL) ? event->button : 0, + gdk_event_get_time ((GdkEvent*) event)); + + +} + + + + + +/** \brief Show details of the next pass. + * + */ +static void show_next_pass_cb (GtkWidget *menuitem, gpointer data) +{ + sat_t *sat; + qth_t *qth; + pass_t *pass; + GtkWidget *dialog; + GtkWindow *toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (data))); + GtkEventList *list = GTK_EVENT_LIST (data); + + + /* get next pass */ + sat = SAT(g_object_get_data (G_OBJECT (menuitem), "sat")); + qth = (qth_t *) (g_object_get_data (G_OBJECT (menuitem), "qth")); + + /* check wheather sat actially has AOS */ + if ((sat->otype != ORBIT_TYPE_GEO) && (sat->otype != ORBIT_TYPE_DECAYED) && + has_aos (sat, qth)) { + + if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { + pass = get_next_pass (sat, qth, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + } + else { + pass = get_pass (sat, qth, list->tstamp, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + } + + if (pass != NULL) { + show_pass (sat->nickname, qth, pass, GTK_WIDGET (toplevel)); + } + else { + /* show dialog that there are no passes within time frame */ + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + _("Satellite %s has no passes\n"\ + "within the next %d days"), + sat->nickname, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } + } + else { + /* show dialog telling that this sat never reaches AOS*/ + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Satellite %s has no passes for\n"\ + "the current ground station!\n\n"\ + "This can be because the satellite\n"\ + "is geostationary, decayed or simply\n"\ + "never comes above the horizon"), + sat->nickname); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } + +} + + +static void show_future_passes_cb (GtkWidget *menuitem, gpointer data) +{ + GtkWidget *dialog; + GtkWindow *toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (data))); + GtkEventList *list = GTK_EVENT_LIST (data); + GSList *passes = NULL; + sat_t *sat; + qth_t *qth; + + + + sat = SAT(g_object_get_data (G_OBJECT (menuitem), "sat")); + qth = (qth_t *) (g_object_get_data (G_OBJECT (menuitem), "qth")); + + /* check wheather sat actially has AOS */ + if ((sat->otype != ORBIT_TYPE_GEO) && (sat->otype != ORBIT_TYPE_DECAYED) && + has_aos (sat, qth)) { + + if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { + passes = get_next_passes (sat, qth, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD), + sat_cfg_get_int (SAT_CFG_INT_PRED_NUM_PASS)); + } + else { + passes = get_passes (sat, qth, list->tstamp, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD), + sat_cfg_get_int (SAT_CFG_INT_PRED_NUM_PASS)); + } + + if (passes != NULL) { + show_passes (sat->nickname, qth, passes, GTK_WIDGET (toplevel)); + } + else { + /* show dialog that there are no passes within time frame */ + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + _("Satellite %s has no passes\n"\ + "within the next %d days"), + sat->nickname, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } + + } + else { + /* show dialog */ + GtkWidget *dialog; + + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Satellite %s has no passes for\n"\ + "the current ground station!"), + sat->nickname); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } +} + + + Added: trunk/src/gtk-event-list-popup.h =================================================================== --- trunk/src/gtk-event-list-popup.h (rev 0) +++ trunk/src/gtk-event-list-popup.h 2009-12-02 15:12:44 UTC (rev 538) @@ -0,0 +1,42 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef GTK_EVENT_LIST_POPUP_H +#define GTK_EVENT_LIST_POPUP_H 1 + +#include <gtk/gtk.h> +#include "sgpsdp/sgp4sdp4.h" +#include "gtk-sat-data.h" +#include "gtk-event-list.h" + + +void gtk_event_list_popup_exec (sat_t *sat, qth_t *qth, + GdkEventButton *event, + GtkEventList *list); + + +#endif Modified: trunk/win32/Makefile =================================================================== --- trunk/win32/Makefile 2009-12-01 10:46:35 UTC (rev 537) +++ trunk/win32/Makefile 2009-12-02 15:12:44 UTC (rev 538) @@ -87,6 +87,7 @@ gpredict-utils.c \ gtk-azel-plot.c \ gtk-event-list.c \ + gtk-event-list-popup.c \ gtk-freq-knob.c \ gtk-polar-plot.c \ gtk-polar-view.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-21 13:59:55
|
Revision: 544 http://gpredict.svn.sourceforge.net/gpredict/?rev=544&view=rev Author: csete Date: 2009-12-21 13:59:47 +0000 (Mon, 21 Dec 2009) Log Message: ----------- Fixed bug 2918672: Trailing whitespace and newline in satellite names. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/tle-update.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-21 00:52:22 UTC (rev 543) +++ trunk/ChangeLog 2009-12-21 13:59:47 UTC (rev 544) @@ -5,7 +5,11 @@ * doc/notes/time_keeping.txt: Applied patch 2916646 from Paul Schulz: Minor fixes to documentation. + * src/tle-update.c: + Fixed bug 2918672: Trailing whitespace and newline in satellite names. + Fixed indentation. + 2009-12-02 Alexandru Csete <oz9aec at gmail.com> * src/gtk-event-list-popup.[ch]: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-12-21 00:52:22 UTC (rev 543) +++ trunk/NEWS 2009-12-21 13:59:47 UTC (rev 544) @@ -9,12 +9,13 @@ * Feature request 2778735: Visual indicator for RX/TX/TRX. * Feature request 2689352: Mutual Contact Window AOS/LOS. - Fixed bug 2877974: Incorrect uplink Doppler. -- Applied patch 2876485: Fix a memory leak in the rotator controller (Thanks to - Charles Suprin AA1VS). -- Applied patch 2877878: Change Flag to Lock in tle-update (thanks Charles Suprin AA1VS). -- Applied patch 2877918: Fixes segfault in TLE updater (thanks Charles Suprin AA1VS). -- Applied patch 2881367: Updated Flags to Locks (thanks Charles Suprin AA1VS). -- Applied patch 2893617: Patches for fixing Windows build (thanks Valentin Yakovenkov). +- Fixed bug 2918672: Trailing whitespace and newline in satellite names. +- Applied patch 2876485: Fix a memory leak in the rotator controller (Thanks to Charles Suprin AA1VS). +- Applied patch 2877878: Change Flag to Lock in tle-update (thanks to Charles Suprin AA1VS). +- Applied patch 2877918: Fixes segfault in TLE updater (thanks to Charles Suprin AA1VS). +- Applied patch 2881367: Updated Flags to Locks (thanks to Charles Suprin AA1VS). +- Applied patch 2893617: Patches for fixing Windows build (thanks to Valentin Yakovenkov). +- Applied patch 2916646: Minor fixes to documentation (thanks to Paul Schulz). - Slightly improved UI for the single-satellite view. Modified: trunk/src/tle-update.c =================================================================== --- trunk/src/tle-update.c 2009-12-21 00:52:22 UTC (rev 543) +++ trunk/src/tle-update.c 2009-12-21 13:59:47 UTC (rev 544) @@ -126,7 +126,7 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: A TLE update process is already running. Aborting."), __FUNCTION__); - + return; } @@ -136,7 +136,7 @@ /* open directory and read files one by one */ cache_dir = g_dir_open (dir, 0, &err); - + if (err != NULL) { /* send an error message */ @@ -524,9 +524,9 @@ /*if (tle_in_progress)*/ if (g_static_mutex_trylock(&tle_in_progress)==FALSE) { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: A TLE update process is already running. Aborting."), - __FUNCTION__); - + _("%s: A TLE update process is already running. Aborting."), + __FUNCTION__); + return; } @@ -637,19 +637,19 @@ /* continue update if we have fetched at least one file */ if (success > 0) { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Fetched %d files from network; updating..."), - __FUNCTION__, success); + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Fetched %d files from network; updating..."), + __FUNCTION__, success); /* call update_from_files */ cache = sat_file_name ("cache"); tle_update_from_files (cache, NULL, silent, progress, label1, label2); g_free (cache); - + } else { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Could not fetch any new TLE files from network; aborting..."), - __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Could not fetch any new TLE files from network; aborting..."), + __FUNCTION__); } } @@ -689,7 +689,7 @@ g_free (cache); /* clear busy flag */ - /* tle_in_progress = FALSE; */ + /* tle_in_progress = FALSE; */ g_static_mutex_unlock(&tle_in_progress); } @@ -754,99 +754,99 @@ /* read category name for catfile */ catfile = g_fopen (catpath, "r"); - if (catfile!=NULL) { - b = fgets (category, 80, catfile); - fclose (catfile); - } - else { - /* FIXME not sure what goes here AA1VS */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%s: Failed to open %s"), - __FILE__, __FUNCTION__, catpath); - return (retcode); - } + if (catfile!=NULL) { + b = fgets (category, 80, catfile); + fclose (catfile); + } + else { + /* FIXME not sure what goes here AA1VS */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Failed to open %s"), + __FILE__, __FUNCTION__, catpath); + return (retcode); + } /* reopen a new catfile and write category name */ catfile = g_fopen (catpath, "w"); - if (catfile!=NULL) { + if (catfile!=NULL) { - fputs (category, catfile); - - /* .cat file now contains the category name; + fputs (category, catfile); + + /* .cat file now contains the category name; satellite catnums will be added during update in the while loop */ - /* read 3 lines at a time */ - while (fgets (tle_str[0], 80, fp)) { - /* read second and third lines */ - b = fgets (tle_str[1], 80, fp); - b = fgets (tle_str[2], 80, fp); - - tle_str[1][69] = '\0'; - tle_str[2][69] = '\0'; - - /* copy catnum and convert to integer */ - for (i = 2; i < 7; i++) { - catstr[i-2] = tle_str[1][i]; - } - catstr[5] = '\0'; - catnr = (guint) g_ascii_strtod (catstr, NULL); - - - if (Get_Next_Tle_Set (tle_str, &tle) != 1) { - /* TLE data not good */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%s: Invalid data for %d"), - __FILE__, __FUNCTION__, catnr); - } - else { - /* DATA OK, phew... */ - /* sat_log_log (SAT_LOG_LEVEL_DEBUG, */ - /* _("%s: Good data for %d"), */ - /* __FUNCTION__, */ - /* catnr); */ - - /* store catalog number in catfile */ - buff = g_strdup_printf ("%d\n", catnr); - fputs (buff, catfile); - g_free (buff); - - /* add data to hash table */ - key = g_try_new0 (guint, 1); - *key = catnr; - - /* check if satellite already in hash table */ - if (g_hash_table_lookup (data, key) == NULL) { - - /* create new_tle structure */ - ntle = g_try_new (new_tle_t, 1); - ntle->catnum = catnr; - ntle->epoch = tle.epoch; - ntle->satname = g_strdup (tle_str[0]); - ntle->line1 = g_strdup (tle_str[1]); - ntle->line2 = g_strdup (tle_str[2]); - ntle->srcfile = g_strdup (fnam); - ntle->isnew = TRUE; /* flag will be reset when using data */ - - - g_hash_table_insert (data, key, ntle); - retcode++; - } - else { - g_free (key); - } - } - - } - - /* close category file */ - fclose (catfile); - } - else { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%s: Failed to open %s"), - __FILE__, __FUNCTION__, catpath); - } + /* read 3 lines at a time */ + while (fgets (tle_str[0], 80, fp)) { + /* read second and third lines */ + b = fgets (tle_str[1], 80, fp); + b = fgets (tle_str[2], 80, fp); + tle_str[1][69] = '\0'; + tle_str[2][69] = '\0'; + + /* copy catnum and convert to integer */ + for (i = 2; i < 7; i++) { + catstr[i-2] = tle_str[1][i]; + } + catstr[5] = '\0'; + catnr = (guint) g_ascii_strtod (catstr, NULL); + + + if (Get_Next_Tle_Set (tle_str, &tle) != 1) { + /* TLE data not good */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Invalid data for %d"), + __FILE__, __FUNCTION__, catnr); + } + else { + /* DATA OK, phew... */ + /* sat_log_log (SAT_LOG_LEVEL_DEBUG, */ + /* _("%s: Good data for %d"), */ + /* __FUNCTION__, */ + /* catnr); */ + + /* store catalog number in catfile */ + buff = g_strdup_printf ("%d\n", catnr); + fputs (buff, catfile); + g_free (buff); + + /* add data to hash table */ + key = g_try_new0 (guint, 1); + *key = catnr; + + /* check if satellite already in hash table */ + if (g_hash_table_lookup (data, key) == NULL) { + + /* create new_tle structure */ + ntle = g_try_new (new_tle_t, 1); + ntle->catnum = catnr; + ntle->epoch = tle.epoch; + ntle->satname = g_strdup (g_strchomp(tle_str[0])); + ntle->line1 = g_strdup (tle_str[1]); + ntle->line2 = g_strdup (tle_str[2]); + ntle->srcfile = g_strdup (fnam); + ntle->isnew = TRUE; /* flag will be reset when using data */ + + + g_hash_table_insert (data, key, ntle); + retcode++; + } + else { + g_free (key); + } + } + + } + + /* close category file */ + fclose (catfile); + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Failed to open %s"), + __FILE__, __FUNCTION__, catpath); + } + g_free (catpath); /* close input TLE file */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-26 00:24:13
|
Revision: 555 http://gpredict.svn.sourceforge.net/gpredict/?rev=555&view=rev Author: csete Date: 2009-12-26 00:21:15 +0000 (Sat, 26 Dec 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/src/sat-pref-layout.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-25 15:16:44 UTC (rev 554) +++ trunk/ChangeLog 2009-12-26 00:21:15 UTC (rev 555) @@ -1,3 +1,9 @@ +2009-12-25 Alexandru Csete <oz9aec at gmail.com> + + * pixmaps/icons: + Added thumbnails for predefined layouts. + + 2009-12-24 Alexandru Csete <oz9aec at gmail.com> * data/satdata: @@ -2,3 +8,3 @@ * data/trsp: - Added TLE and transponder data for XW-1 / HO68. + Added TLE and transponder data for XW-1 / HO-68. Modified: trunk/src/sat-pref-layout.c =================================================================== --- trunk/src/sat-pref-layout.c 2009-12-25 15:16:44 UTC (rev 554) +++ trunk/src/sat-pref-layout.c 2009-12-26 00:21:15 UTC (rev 555) @@ -61,7 +61,22 @@ static void layout_code_changed (GtkWidget *widget, gpointer data); +#define PREDEF_NUM 10 +gchar *predef_layout[PREDEF_NUM][3] = { + { "1;0;2;0;1;2;0;1;1;2;3;1;2;1;2", N_("World map, polar and single sat (default)"), "gpredict-layout-00.png" }, + { "1;0;2;0;1", N_("World map"), "gpredict-layout-01.png" }, + { "1;0;2;0;1", N_("Table"), "gpredict-layout-02.png" }, + { "1;0;2;0;2;0;0;2;2;3", N_("World map and table"), "gpredict-layout-03.png" }, + { "2;0;1;0;1;3;1;2;0;1", N_("Polar and single sat"), "gpredict-layout-04.png" }, + { "2;0;1;0;1;4;1;2;0;1", N_("Polar and upcoming passes"), "gpredict-layout-05.png" }, + { "1;0;3;0;4;0;0;3;4;6;2;0;1;6;8;3;1;2;6;8;4;2;3;6;8", N_("All views (narrow)"), "gpredict-layout-06.png" }, + { "1;0;3;0;3;0;0;3;3;4;2;3;4;0;2;4;3;4;2;3;3;3;4;3;4", N_("All views (wide)"), "gpredict-layout-07.png"}, + { "1;0;3;0;3;0;0;3;3;4;2;3;4;0;2;3;3;4;2;4", N_("Map, table, polar and single sat (wide)"), "gpredict-layout-08.png"}, + { "", N_("Custom"), "gpredict-layout-99.png" } +}; + + /** \brief Create and initialise widgets for the layout view preferences tab. * * The widgets must be preloaded with values from config. If a config value This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-01-02 23:52:08
|
Revision: 572 http://gpredict.svn.sourceforge.net/gpredict/?rev=572&view=rev Author: csete Date: 2010-01-02 23:51:53 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/src/main.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-01-02 22:59:47 UTC (rev 571) +++ trunk/ChangeLog 2010-01-02 23:51:53 UTC (rev 572) @@ -1,3 +1,9 @@ +2010-01-02 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-selector.[ch]: + Added utility function to retrieve newest EPOCH of satellites in database. + + 2009-12-26 Alexandru Csete <oz9aec at gmail.com> * src/sat-pref-layout.c: Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2010-01-02 22:59:47 UTC (rev 571) +++ trunk/src/main.c 2010-01-02 23:51:53 UTC (rev 572) @@ -51,6 +51,7 @@ #include "mod-mgr.h" #include "tle-update.h" #include "sat-cfg.h" +#include "gtk-sat-selector.h" #include "sat-debugger.h" #ifdef WIN32 @@ -410,6 +411,7 @@ static gboolean tle_mon_task (gpointer data) { + GtkWidget *selector; glong last,now,thrld; GTimeVal tval; GtkWidget *dialog; @@ -422,7 +424,15 @@ /* get time of last update */ last = sat_cfg_get_int (SAT_CFG_INT_TLE_LAST_UPDATE); + /*if (last == 0) { + selector = gtk_sat_selector_new (0); + last = (glong) gtk_sat_selector_get_latest_epoch (GTK_SAT_SELECTOR (selector)); + gtk_widget_destroy (selector); + } + g_print ("LAST: %ld\n", last); */ + + /* get current time */ g_get_current_time (&tval); now = tval.tv_sec; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-01-05 16:34:47
|
Revision: 579 http://gpredict.svn.sourceforge.net/gpredict/?rev=579&view=rev Author: csete Date: 2010-01-05 16:34:32 +0000 (Tue, 05 Jan 2010) Log Message: ----------- Added shadow to satellite marker and label to enhance visual appearance over light background map regions. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/config-keys.h trunk/src/gtk-sat-map.c trunk/src/gtk-sat-map.h trunk/src/gtk-sat-selector.c trunk/src/sat-cfg.c trunk/src/sat-cfg.h trunk/src/sat-pref-map-view.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/ChangeLog 2010-01-05 16:34:32 UTC (rev 579) @@ -1,9 +1,16 @@ 2010-01-05 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-map-c: - Leave 3px room between satellite label and amrker. + Added shadow under satellite markers and labels to improve visual + appearance on light background (e.g. South Pole). Added missing 3px room + between satellite label and marker. + * src/config-keys.h: + * src/sat-cfg.[ch]: + * src/sat-pref-map-view.c: + Added config parameter for shadow transparency on the GtkSatMap. + 2010-01-04 Alexandru Csete <oz9aec at gmail.com> * src/main.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/NEWS 2010-01-05 16:34:32 UTC (rev 579) @@ -19,6 +19,8 @@ - Applied patch 2916646: Minor fixes to documentation (thanks to Paul Schulz). - Slightly improved UI for the single-satellite view. - Command line options for cleaning user's TLE and transponder data, see --help for list. +- Satellite Map: Added shadow to satellite marker and label to enhance visual appearance + over light background map regions. Changes in version 1.1 (5 Oct 2009) Modified: trunk/src/config-keys.h =================================================================== --- trunk/src/config-keys.h 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/config-keys.h 2010-01-05 16:34:32 UTC (rev 579) @@ -102,6 +102,7 @@ #define MOD_CFG_MAP_TRACK_COL "TRACK_COLOUR" #define MOD_CFG_MAP_TRACK_NUM "TRACK_NUMBER" #define MOD_CFG_MAP_KEEP_RATIO "KEEP_RATIO" +#define MOD_CFG_MAP_SHADOW_ALPHA "SHADOW_ALPHA" /* polar view specific */ #define MOD_CFG_POLAR_SECTION "POLAR" Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/gtk-sat-map.c 2010-01-05 16:34:32 UTC (rev 579) @@ -1633,7 +1633,7 @@ sat_t *sat = SAT(value); GooCanvasItemModel *root; gint *catnum; - guint32 col,covcol; + guint32 col,covcol,shadowcol; gfloat x,y; /* get satellite and SSP */ @@ -1664,16 +1664,27 @@ SAT_CFG_INT_MAP_SAT_COL); /* area coverage colour */ - /* if ((obj->showcov) && (sat->otype != ORBIT_TYPE_DECAYED)) { */ covcol = mod_cfg_get_int (satmap->cfgdata, MOD_CFG_MAP_SECTION, MOD_CFG_MAP_SAT_COV_COL, SAT_CFG_INT_MAP_SAT_COV_COL); - /* } */ - /* else { */ - /* covcol = 0x00000000; */ - /* } */ + /* shadow colour (only alpha channel) */ + shadowcol = mod_cfg_get_int (satmap->cfgdata, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SHADOW_ALPHA, + SAT_CFG_INT_MAP_SHADOW_ALPHA); + + + /* create satellite marker and label + shadows. We create shadows first */ + obj->shadowm = goo_canvas_rect_model_new (root, + x - MARKER_SIZE_HALF + 1, + y - MARKER_SIZE_HALF + 1, + 2 * MARKER_SIZE_HALF, + 2 * MARKER_SIZE_HALF, + "fill-color-rgba", 0x00, + "stroke-color-rgba", shadowcol, + NULL); obj->marker = goo_canvas_rect_model_new (root, x - MARKER_SIZE_HALF, y - MARKER_SIZE_HALF, @@ -1683,6 +1694,14 @@ "stroke-color-rgba", col, NULL); + obj->shadowl = goo_canvas_text_model_new (root, sat->nickname, + x+1, + y+3, + -1, + GTK_ANCHOR_NORTH, + "font", "Sans 8", + "fill-color-rgba", shadowcol, + NULL); obj->label = goo_canvas_text_model_new (root, sat->nickname, x, y+2, @@ -1692,6 +1711,7 @@ "fill-color-rgba", col, NULL); + g_object_set_data (G_OBJECT (obj->marker), "catnum", GINT_TO_POINTER (*catnum)); g_object_set_data (G_OBJECT (obj->label), "catnum", GINT_TO_POINTER (*catnum)); @@ -1803,6 +1823,10 @@ "x", (gdouble) (x - MARKER_SIZE_HALF), "y", (gdouble) (y - MARKER_SIZE_HALF), NULL); + g_object_set (obj->shadowm, + "x", (gdouble) (x - MARKER_SIZE_HALF + 1), + "y", (gdouble) (y - MARKER_SIZE_HALF + 1), + NULL); /* update sat label */ if (x < 50) { @@ -1811,24 +1835,44 @@ "y", (gdouble) (y), "anchor", GTK_ANCHOR_WEST, NULL); + g_object_set (obj->shadowl, + "x", (gdouble) (x+3+1), + "y", (gdouble) (y+1), + "anchor", GTK_ANCHOR_WEST, + NULL); } else if ((satmap->width - x ) < 50) { g_object_set (obj->label, "x", (gdouble) (x+3), "y", (gdouble) (y), "anchor", GTK_ANCHOR_EAST, NULL); + g_object_set (obj->shadowl, + "x", (gdouble) (x+3+1), + "y", (gdouble) (y+1), + "anchor", GTK_ANCHOR_EAST, + NULL); } else if ((satmap->height - y) < 25) { g_object_set (obj->label, "x", (gdouble) (x), "y", (gdouble) (y-2), "anchor", GTK_ANCHOR_SOUTH, NULL); + g_object_set (obj->shadowl, + "x", (gdouble) (x+1), + "y", (gdouble) (y-2+1), + "anchor", GTK_ANCHOR_SOUTH, + NULL); } else { g_object_set (obj->label, "x", (gdouble) (x), "y", (gdouble) (y+2), "anchor", GTK_ANCHOR_NORTH, NULL); + g_object_set (obj->shadowl, + "x", (gdouble) (x+1), + "y", (gdouble) (y+2+1), + "anchor", GTK_ANCHOR_NORTH, + NULL); } /* initialize points for footprint */ Modified: trunk/src/gtk-sat-map.h =================================================================== --- trunk/src/gtk-sat-map.h 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/gtk-sat-map.h 2010-01-05 16:34:32 UTC (rev 579) @@ -91,7 +91,9 @@ /* graphical elements */ GooCanvasItemModel *marker; /*!< A small rectangle showing sat pos. */ + GooCanvasItemModel *shadowm; /*!< Shadow under satellite marker. */ GooCanvasItemModel *label; /*!< Satellite name. */ + GooCanvasItemModel *shadowl; /*!< Shadow under satellite name */ GooCanvasItemModel *range1; /*!< First part of the range circle. */ GooCanvasItemModel *range2; /*!< Second part of the range circle. */ Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/gtk-sat-selector.c 2010-01-05 16:34:32 UTC (rev 579) @@ -294,7 +294,7 @@ gtk_tree_view_set_search_entry (GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree), GTK_ENTRY (GTK_SAT_SELECTOR (widget)->search)); gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 4, 0, 1, - GTK_FILL, GTK_SHRINK, 0, 0); + GTK_SHRINK, GTK_SHRINK, 0, 0); /* Group selector */ gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Group")), 0, 1, 1, 2, Modified: trunk/src/sat-cfg.c =================================================================== --- trunk/src/sat-cfg.c 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/sat-cfg.c 2010-01-05 16:34:32 UTC (rev 579) @@ -162,6 +162,7 @@ { "MODULES", "MAP_TICK_COLOUR", 0x7F7F7FC8}, { "MODULES", "MAP_TRACK_COLOUR", 0x00FFFFFF}, { "MODULES", "MAP_TRACK_NUM", 1}, + { "MODULES", "MAP_SHADOW_ALPHA", 0xDD}, { "MODULES", "POLAR_REFRESH", 3}, { "MODULES", "POLAR_CHART_ORIENT", POLAR_VIEW_NESW}, { "MODULES", "POLAR_BGD_COLOUR", 0xFFFFFFFF}, Modified: trunk/src/sat-cfg.h =================================================================== --- trunk/src/sat-cfg.h 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/sat-cfg.h 2010-01-05 16:34:32 UTC (rev 579) @@ -84,6 +84,7 @@ SAT_CFG_INT_MAP_TICK_COL, /*!< Tick labels colour. */ SAT_CFG_INT_MAP_TRACK_COL, /*!< Ground Track colour. */ SAT_CFG_INT_MAP_TRACK_NUM, /*!< Number of orbits to show ground track for */ + SAT_CFG_INT_MAP_SHADOW_ALPHA, /*!< Tranparency of shadow under satellite marker. */ SAT_CFG_INT_POLAR_REFRESH, /*!< Polar refresh rate (cycle). */ SAT_CFG_INT_POLAR_ORIENTATION, /*!< Orientation of the polar charts. */ SAT_CFG_INT_POLAR_BGD_COL, /*!< Polar view, background colour. */ Modified: trunk/src/sat-pref-map-view.c =================================================================== --- trunk/src/sat-pref-map-view.c 2010-01-05 14:04:39 UTC (rev 578) +++ trunk/src/sat-pref-map-view.c 2010-01-05 16:34:32 UTC (rev 579) @@ -11,7 +11,7 @@ More details can be found at the project home page: http://gpredict.oz9aec.net/ - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -51,6 +51,7 @@ static GtkWidget *qthc,*gridc,*tickc; static GtkWidget *satc,*ssatc,*trackc; static GtkWidget *covc,*infofg,*infobg; +static GtkWidget *shadow; /* ground track orbit number selector */ static GtkWidget *orbit; @@ -74,7 +75,10 @@ static void select_map_cb (GtkWidget *button, gpointer data); static void update_map_icon (void); +static gboolean shadow_changed (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data); + + /** \brief Create and initialise widgets for the map preferences tab. * * The widgets must be preloaded with values from config. If a config value @@ -83,109 +87,108 @@ */ GtkWidget *sat_pref_map_view_create (GKeyFile *cfg) { - GtkWidget *vbox; + GtkWidget *vbox; - /* create vertical box */ - vbox = gtk_vbox_new (FALSE, 2); // !!! - gtk_container_set_border_width (GTK_CONTAINER (vbox), 20); + /* create vertical box */ + vbox = gtk_vbox_new (FALSE, 2); // !!! + gtk_container_set_border_width (GTK_CONTAINER (vbox), 20); - /* create the components */ - create_map_selector (cfg, GTK_BOX (vbox)); - gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); - create_bool_selectors (cfg, GTK_BOX (vbox)); - gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); - create_colour_selectors (cfg, GTK_BOX (vbox)); - gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); - create_orbit_selector (cfg, GTK_BOX (vbox)); - gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); - create_reset_button (cfg, GTK_BOX (vbox)); + /* create the components */ + create_map_selector (cfg, GTK_BOX (vbox)); + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); + create_bool_selectors (cfg, GTK_BOX (vbox)); + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); + create_colour_selectors (cfg, GTK_BOX (vbox)); + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); + create_orbit_selector (cfg, GTK_BOX (vbox)); + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, TRUE, 10); + create_reset_button (cfg, GTK_BOX (vbox)); - reset = FALSE; - dirty = FALSE; + reset = FALSE; + dirty = FALSE; - return vbox; + return vbox; } /** \brief Create map selector widget. */ -static void -create_map_selector (GKeyFile *cfg, GtkBox *vbox) +static void create_map_selector (GKeyFile *cfg, GtkBox *vbox) { - GtkWidget *button; - GtkWidget *label; - GtkWidget *table; - gchar *mapfile; - GdkPixbuf *obuf,*sbuf; - GtkTooltips *tips; + GtkWidget *button; + GtkWidget *label; + GtkWidget *table; + gchar *mapfile; + GdkPixbuf *obuf,*sbuf; + GtkTooltips *tips; - /* create header */ - label = gtk_label_new (NULL); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_markup (GTK_LABEL (label), - _("<b>Background Map:</b>")); - gtk_box_pack_start (vbox, label, FALSE, TRUE, 0); + /* create header */ + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_label_set_markup (GTK_LABEL (label), + _("<b>Background Map:</b>")); + gtk_box_pack_start (vbox, label, FALSE, TRUE, 0); - /* create a table to pu the map preview and select button in. + /* create a table to pu the map preview and select button in. using a simple hbox won't do it because the button would have the same height as the map preview */ - table = gtk_table_new (3, 2, TRUE); - gtk_box_pack_start (vbox, table, FALSE, FALSE, 0); + table = gtk_table_new (3, 2, TRUE); + gtk_box_pack_start (vbox, table, FALSE, FALSE, 0); - /* load map file into a pixbuf */ - if (cfg != NULL) { - mapf = mod_cfg_get_str (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_FILE, - SAT_CFG_STR_MAP_FILE); - } - else { - mapf = sat_cfg_get_str (SAT_CFG_STR_MAP_FILE); - } - if (g_path_is_absolute (mapf)) { + /* load map file into a pixbuf */ + if (cfg != NULL) { + mapf = mod_cfg_get_str (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_FILE, + SAT_CFG_STR_MAP_FILE); + } + else { + mapf = sat_cfg_get_str (SAT_CFG_STR_MAP_FILE); + } + if (g_path_is_absolute (mapf)) { /* map is user specific, ie. in USER_CONF_DIR/maps/ */ - mapfile = g_strdup (mapf); - } - else { - /* build complete path */ - mapfile = map_file_name (mapf); - } - obuf = gdk_pixbuf_new_from_file (mapfile, NULL); - g_free (mapfile); + mapfile = g_strdup (mapf); + } + else { + /* build complete path */ + mapfile = map_file_name (mapf); + } + obuf = gdk_pixbuf_new_from_file (mapfile, NULL); + g_free (mapfile); - if (obuf != NULL) { + if (obuf != NULL) { - /* scale the pixbuf */ - sbuf = gdk_pixbuf_scale_simple (obuf, 100, 50, GDK_INTERP_HYPER); - g_object_unref (obuf); + /* scale the pixbuf */ + sbuf = gdk_pixbuf_scale_simple (obuf, 100, 50, GDK_INTERP_HYPER); + g_object_unref (obuf); - /* create a GtkImage from the pixbuf */ - thumb = gtk_image_new_from_pixbuf (sbuf); - g_object_unref (sbuf); - } - else { - thumb = gtk_image_new_from_stock (GTK_STOCK_MISSING_IMAGE, - GTK_ICON_SIZE_LARGE_TOOLBAR); - } + /* create a GtkImage from the pixbuf */ + thumb = gtk_image_new_from_pixbuf (sbuf); + g_object_unref (sbuf); + } + else { + thumb = gtk_image_new_from_stock (GTK_STOCK_MISSING_IMAGE, + GTK_ICON_SIZE_LARGE_TOOLBAR); + } - gtk_table_attach (GTK_TABLE (table), thumb, 0, 1, 0, 3, - GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (table), thumb, 0, 1, 0, 3, + GTK_FILL, GTK_FILL, 0, 0); - /* select button */ - button = gtk_button_new_with_label (_("Select map")); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, button, - _("Click to select a map"), NULL); - g_signal_connect (G_OBJECT (button), "clicked", - G_CALLBACK (select_map_cb), NULL); - gtk_table_attach (GTK_TABLE (table), button, 1, 2, 1, 2, - GTK_FILL, GTK_FILL, 10, 0); + /* select button */ + button = gtk_button_new_with_label (_("Select map")); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, button, + _("Click to select a map"), NULL); + g_signal_connect (G_OBJECT (button), "clicked", + G_CALLBACK (select_map_cb), NULL); + gtk_table_attach (GTK_TABLE (table), button, 1, 2, 1, 2, + GTK_FILL, GTK_FILL, 10, 0); - + } @@ -198,105 +201,104 @@ * the satellites, should be drawn on the polar view. Choices are QTH info, next * event, cursor coordinates, and extra tick marks. */ -static void -create_bool_selectors (GKeyFile *cfg, GtkBox *vbox) +static void create_bool_selectors (GKeyFile *cfg, GtkBox *vbox) { - GtkWidget *label; - GtkTooltips *tips; - GtkWidget *hbox; + GtkWidget *label; + GtkTooltips *tips; + GtkWidget *hbox; - /* create header */ - label = gtk_label_new (NULL); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_markup (GTK_LABEL (label), - _("<b>Extra Contents:</b>")); - gtk_box_pack_start (vbox, label, FALSE, TRUE, 0); + /* create header */ + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_label_set_markup (GTK_LABEL (label), + _("<b>Extra Contents:</b>")); + gtk_box_pack_start (vbox, label, FALSE, TRUE, 0); - /* horizontal box to contain the radio buttons */ - hbox = gtk_hbox_new (TRUE, 10); - gtk_box_pack_start (vbox, hbox, FALSE, TRUE, 0); + /* horizontal box to contain the radio buttons */ + hbox = gtk_hbox_new (TRUE, 10); + gtk_box_pack_start (vbox, hbox, FALSE, TRUE, 0); - /* QTH info */ - qth = gtk_check_button_new_with_label (_("QTH Info")); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, qth, - _("Show location information on the map"), - NULL); - if (cfg != NULL) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth), - mod_cfg_get_bool (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SHOW_QTH_INFO, - SAT_CFG_BOOL_MAP_SHOW_QTH_INFO)); - } - else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth), - sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_QTH_INFO)); - } - g_signal_connect (qth, "toggled", G_CALLBACK (content_changed), NULL); - gtk_box_pack_start (GTK_BOX (hbox), qth, FALSE, TRUE, 0); + /* QTH info */ + qth = gtk_check_button_new_with_label (_("QTH Info")); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, qth, + _("Show location information on the map"), + NULL); + if (cfg != NULL) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth), + mod_cfg_get_bool (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SHOW_QTH_INFO, + SAT_CFG_BOOL_MAP_SHOW_QTH_INFO)); + } + else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth), + sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_QTH_INFO)); + } + g_signal_connect (qth, "toggled", G_CALLBACK (content_changed), NULL); + gtk_box_pack_start (GTK_BOX (hbox), qth, FALSE, TRUE, 0); - /* Next Event */ - next = gtk_check_button_new_with_label (_("Next Event")); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, next, - _("Show which satellite comes up next and at what time"), - NULL); - if (cfg != NULL) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next), - mod_cfg_get_bool (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SHOW_NEXT_EVENT, - SAT_CFG_BOOL_MAP_SHOW_NEXT_EV)); - } - else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next), - sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_NEXT_EV)); - } - g_signal_connect (next, "toggled", G_CALLBACK (content_changed), NULL); - gtk_box_pack_start (GTK_BOX (hbox), next, FALSE, TRUE, 0); + /* Next Event */ + next = gtk_check_button_new_with_label (_("Next Event")); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, next, + _("Show which satellite comes up next and at what time"), + NULL); + if (cfg != NULL) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next), + mod_cfg_get_bool (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SHOW_NEXT_EVENT, + SAT_CFG_BOOL_MAP_SHOW_NEXT_EV)); + } + else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next), + sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_NEXT_EV)); + } + g_signal_connect (next, "toggled", G_CALLBACK (content_changed), NULL); + gtk_box_pack_start (GTK_BOX (hbox), next, FALSE, TRUE, 0); - /* Cursor position */ - curs = gtk_check_button_new_with_label (_("Cursor Position")); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, curs, - _("Show the latitude and longitude of the mouse pointer"), - NULL); - if (cfg != NULL) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs), - mod_cfg_get_bool (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SHOW_CURS_TRACK, - SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK)); - } - else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs), - sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK)); - } - g_signal_connect (curs, "toggled", G_CALLBACK (content_changed), NULL); - gtk_box_pack_start (GTK_BOX (hbox), curs, FALSE, TRUE, 0); + /* Cursor position */ + curs = gtk_check_button_new_with_label (_("Cursor Position")); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, curs, + _("Show the latitude and longitude of the mouse pointer"), + NULL); + if (cfg != NULL) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs), + mod_cfg_get_bool (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SHOW_CURS_TRACK, + SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK)); + } + else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs), + sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK)); + } + g_signal_connect (curs, "toggled", G_CALLBACK (content_changed), NULL); + gtk_box_pack_start (GTK_BOX (hbox), curs, FALSE, TRUE, 0); - /* Grid */ - grid = gtk_check_button_new_with_label (_("Grid Lines")); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, grid, - _("Show horizontal and vertical grid lines"), - NULL); - if (cfg != NULL) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid), - mod_cfg_get_bool (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SHOW_GRID, - SAT_CFG_BOOL_MAP_SHOW_GRID)); - } - else { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid), - sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_GRID)); - } - g_signal_connect (grid, "toggled", G_CALLBACK (content_changed), NULL); - gtk_box_pack_start (GTK_BOX (hbox), grid, FALSE, TRUE, 0); + /* Grid */ + grid = gtk_check_button_new_with_label (_("Grid Lines")); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, grid, + _("Show horizontal and vertical grid lines"), + NULL); + if (cfg != NULL) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid), + mod_cfg_get_bool (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SHOW_GRID, + SAT_CFG_BOOL_MAP_SHOW_GRID)); + } + else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid), + sat_cfg_get_bool (SAT_CFG_BOOL_MAP_SHOW_GRID)); + } + g_signal_connect (grid, "toggled", G_CALLBACK (content_changed), NULL); + gtk_box_pack_start (GTK_BOX (hbox), grid, FALSE, TRUE, 0); } @@ -308,276 +310,310 @@ * This function creates the widgets for selecting colours for the plot background, * axes, tick labels, satellites, track, and info text. */ -static void -create_colour_selectors (GKeyFile *cfg, GtkBox *vbox) +static void create_colour_selectors (GKeyFile *cfg, GtkBox *vbox) { - GtkWidget *label; - GtkTooltips *tips; - GtkWidget *table; - guint rgba; /* RRGGBBAA encoded colour */ - guint16 alpha; /* alpha channel 16 bits */ - GdkColor col; /* GdkColor colour representation */ + GtkWidget *label; + GtkTooltips *tips; + GtkWidget *table; + guint rgba; /* RRGGBBAA encoded colour */ + guint16 alpha; /* alpha channel 16 bits */ + GdkColor col; /* GdkColor colour representation */ - /* create header */ - label = gtk_label_new (NULL); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_markup (GTK_LABEL (label), - _("<b>Colours:</b>")); - gtk_box_pack_start (vbox, label, FALSE, TRUE, 0); + /* create header */ + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_label_set_markup (GTK_LABEL (label), _("<b>Colours:</b>")); + gtk_box_pack_start (vbox, label, FALSE, TRUE, 0); - /* horizontal box to contain the radio buttons */ - table = gtk_table_new (3, 6, TRUE); - gtk_table_set_col_spacings (GTK_TABLE (table), 10); - gtk_table_set_row_spacings (GTK_TABLE (table), 3); - gtk_box_pack_start (vbox, table, FALSE, TRUE, 0); + /* container */ + table = gtk_table_new (4, 6, TRUE); + gtk_table_set_col_spacings (GTK_TABLE (table), 10); + gtk_table_set_row_spacings (GTK_TABLE (table), 3); + gtk_box_pack_start (vbox, table, FALSE, TRUE, 0); - /* background */ - label = gtk_label_new (_("Ground Station:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, - GTK_FILL, GTK_FILL, 0, 0); - qthc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (qthc), TRUE); - gtk_table_attach (GTK_TABLE (table), qthc, 1, 2, 0, 1, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, qthc, - _("Click to select a colour"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_QTH_COL, - SAT_CFG_INT_MAP_QTH_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_QTH_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (qthc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (qthc), alpha); - g_signal_connect (qthc, "color-set", G_CALLBACK (colour_changed), NULL); + /* background */ + label = gtk_label_new (_("Ground Station:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, + GTK_FILL, GTK_FILL, 0, 0); + qthc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (qthc), TRUE); + gtk_table_attach (GTK_TABLE (table), qthc, 1, 2, 0, 1, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, qthc, + _("Click to select a colour"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_QTH_COL, + SAT_CFG_INT_MAP_QTH_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_QTH_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (qthc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (qthc), alpha); + g_signal_connect (qthc, "color-set", G_CALLBACK (colour_changed), NULL); - /* Grid in case it is enabled */ - label = gtk_label_new (_("Grid:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, - GTK_FILL, GTK_FILL, 0, 0); - gridc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (gridc), TRUE); - gtk_table_attach (GTK_TABLE (table), gridc, 3, 4, 0, 1, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, gridc, - _("Click to select the grid colour"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_GRID_COL, - SAT_CFG_INT_MAP_GRID_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_GRID_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (gridc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (gridc), alpha); - g_signal_connect (gridc, "color-set", G_CALLBACK (colour_changed), NULL); + /* Grid in case it is enabled */ + label = gtk_label_new (_("Grid:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, + GTK_FILL, GTK_FILL, 0, 0); + gridc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (gridc), TRUE); + gtk_table_attach (GTK_TABLE (table), gridc, 3, 4, 0, 1, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, gridc, + _("Click to select the grid colour"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_GRID_COL, + SAT_CFG_INT_MAP_GRID_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_GRID_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (gridc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (gridc), alpha); + g_signal_connect (gridc, "color-set", G_CALLBACK (colour_changed), NULL); - /* tick labels */ - label = gtk_label_new (_("Tick Labels:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 4, 5, 0, 1, - GTK_FILL, GTK_FILL, 0, 0); - tickc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (tickc), TRUE); - gtk_table_attach (GTK_TABLE (table), tickc, 5, 6, 0, 1, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, tickc, - _("Click to select the colour for tick labels"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_TICK_COL, - SAT_CFG_INT_MAP_TICK_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_TICK_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (tickc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (tickc), alpha); - g_signal_connect (tickc, "color-set", G_CALLBACK (colour_changed), NULL); + /* tick labels */ + label = gtk_label_new (_("Tick Labels:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 4, 5, 0, 1, + GTK_FILL, GTK_FILL, 0, 0); + tickc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (tickc), TRUE); + gtk_table_attach (GTK_TABLE (table), tickc, 5, 6, 0, 1, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, tickc, + _("Click to select the colour for tick labels"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_TICK_COL, + SAT_CFG_INT_MAP_TICK_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_TICK_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (tickc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (tickc), alpha); + g_signal_connect (tickc, "color-set", G_CALLBACK (colour_changed), NULL); - /* satellite */ - label = gtk_label_new (_("Satellite:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, - GTK_FILL, GTK_FILL, 0, 0); - satc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (satc), TRUE); - gtk_table_attach (GTK_TABLE (table), satc, 1, 2, 1, 2, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, satc, - _("Click to select satellite colour"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SAT_COL, - SAT_CFG_INT_MAP_SAT_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SAT_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (satc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (satc), alpha); - g_signal_connect (satc, "color-set", G_CALLBACK (colour_changed), NULL); + /* satellite */ + label = gtk_label_new (_("Satellite:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, + GTK_FILL, GTK_FILL, 0, 0); + satc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (satc), TRUE); + gtk_table_attach (GTK_TABLE (table), satc, 1, 2, 1, 2, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, satc, + _("Click to select satellite colour"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SAT_COL, + SAT_CFG_INT_MAP_SAT_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SAT_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (satc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (satc), alpha); + g_signal_connect (satc, "color-set", G_CALLBACK (colour_changed), NULL); - /* selected satellite */ - label = gtk_label_new (_("Selected Sat.:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, - GTK_FILL, GTK_FILL, 0, 0); - ssatc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (ssatc), TRUE); - gtk_table_attach (GTK_TABLE (table), ssatc, 3, 4, 1, 2, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, ssatc, - _("Click to select colour for selected satellites"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SAT_SEL_COL, - SAT_CFG_INT_MAP_SAT_SEL_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SAT_SEL_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (ssatc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (ssatc), alpha); - g_signal_connect (ssatc, "color-set", G_CALLBACK (colour_changed), NULL); + /* selected satellite */ + label = gtk_label_new (_("Selected Sat.:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 2, 3, 1, 2, + GTK_FILL, GTK_FILL, 0, 0); + ssatc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (ssatc), TRUE); + gtk_table_attach (GTK_TABLE (table), ssatc, 3, 4, 1, 2, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, ssatc, + _("Click to select colour for selected satellites"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SAT_SEL_COL, + SAT_CFG_INT_MAP_SAT_SEL_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SAT_SEL_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (ssatc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (ssatc), alpha); + g_signal_connect (ssatc, "color-set", G_CALLBACK (colour_changed), NULL); - /* tack */ - label = gtk_label_new (_("Ground Track:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 4, 5, 1, 2, - GTK_FILL, GTK_FILL, 0, 0); - trackc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (trackc), TRUE); - gtk_table_attach (GTK_TABLE (table), trackc, 5, 6, 1, 2, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, trackc, - _("Click to select ground track colour"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_TRACK_COL, - SAT_CFG_INT_MAP_TRACK_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_TRACK_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (trackc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (trackc), alpha); - g_signal_connect (trackc, "color-set", G_CALLBACK (colour_changed), NULL); + /* tack */ + label = gtk_label_new (_("Ground Track:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 4, 5, 1, 2, + GTK_FILL, GTK_FILL, 0, 0); + trackc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (trackc), TRUE); + gtk_table_attach (GTK_TABLE (table), trackc, 5, 6, 1, 2, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, trackc, + _("Click to select ground track colour"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_TRACK_COL, + SAT_CFG_INT_MAP_TRACK_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_TRACK_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (trackc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (trackc), alpha); + g_signal_connect (trackc, "color-set", G_CALLBACK (colour_changed), NULL); - /* coverage */ - label = gtk_label_new (_("Area Coverage:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, - GTK_FILL, GTK_FILL, 0, 0); - covc = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (covc), TRUE); - gtk_table_attach (GTK_TABLE (table), covc, 1, 2, 2, 3, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, covc, - _("Colour for coverage Area (make it transparent)"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_SAT_COV_COL, - SAT_CFG_INT_MAP_SAT_COV_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SAT_COV_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (covc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (covc), alpha); - g_signal_connect (covc, "color-set", G_CALLBACK (colour_changed), NULL); + /* coverage */ + label = gtk_label_new (_("Area Coverage:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, + GTK_FILL, GTK_FILL, 0, 0); + covc = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (covc), TRUE); + gtk_table_attach (GTK_TABLE (table), covc, 1, 2, 2, 3, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, covc, + _("Colour for coverage Area (make it transparent)"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SAT_COV_COL, + SAT_CFG_INT_MAP_SAT_COV_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SAT_COV_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (covc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (covc), alpha); + g_signal_connect (covc, "color-set", G_CALLBACK (colour_changed), NULL); - /* Info foreground */ - label = gtk_label_new (_("Info Text FG:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, - GTK_FILL, GTK_FILL, 0, 0); - infofg = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (infofg), TRUE); - gtk_table_attach (GTK_TABLE (table), infofg, 3, 4, 2, 3, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, infofg, - _("Click to select info text foreground colour"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_INFO_COL, - SAT_CFG_INT_MAP_INFO_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_INFO_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (infofg), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (infofg), alpha); - g_signal_connect (infofg, "color-set", G_CALLBACK (colour_changed), NULL); + /* Info foreground */ + label = gtk_label_new (_("Info Text FG:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 2, 3, 2, 3, + GTK_FILL, GTK_FILL, 0, 0); + infofg = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (infofg), TRUE); + gtk_table_attach (GTK_TABLE (table), infofg, 3, 4, 2, 3, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, infofg, + _("Click to select info text foreground colour"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_INFO_COL, + SAT_CFG_INT_MAP_INFO_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_INFO_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (infofg), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (infofg), alpha); + g_signal_connect (infofg, "color-set", G_CALLBACK (colour_changed), NULL); - /* Info background */ - label = gtk_label_new (_("Info Text BG:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (GTK_TABLE (table), label, 4, 5, 2, 3, - GTK_FILL, GTK_FILL, 0, 0); - infobg = gtk_color_button_new (); - gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (infobg), TRUE); - gtk_table_attach (GTK_TABLE (table), infobg, 5, 6, 2, 3, - GTK_FILL , GTK_FILL, 0, 0); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, infobg, - _("Click to select info text background colour"), - NULL); - if (cfg != NULL) { - rgba = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_INFO_BGD_COL, - SAT_CFG_INT_MAP_INFO_BGD_COL); - } - else { - rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_INFO_BGD_COL); - } - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (infobg), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (infobg), alpha); - g_signal_connect (infobg, "color-set", G_CALLBACK (colour_changed), NULL); + /* Info background */ + label = gtk_label_new (_("Info Text BG:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 4, 5, 2, 3, + GTK_FILL, GTK_FILL, 0, 0); + infobg = gtk_color_button_new (); + gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (infobg), TRUE); + gtk_table_attach (GTK_TABLE (table), infobg, 5, 6, 2, 3, + GTK_FILL , GTK_FILL, 0, 0); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, infobg, + _("Click to select info text background colour"), + NULL); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_INFO_BGD_COL, + SAT_CFG_INT_MAP_INFO_BGD_COL); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_INFO_BGD_COL); + } + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (infobg), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (infobg), alpha); + g_signal_connect (infobg, "color-set", G_CALLBACK (colour_changed), NULL); + /* Shadow */ + label = gtk_label_new (_("Shadow:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, + GTK_FILL, GTK_FILL, 0, 0); + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), _("<i>Transparent</i>")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 1, 2, 3, 4, + GTK_FILL, GTK_FILL, 0, 0); + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), _("<i>Strong</i>")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 5, 6, 3, 4, + GTK_FILL, GTK_FILL, 0, 0); + shadow = gtk_hscale_new_with_range (0, 255, 1); + gtk_scale_set_draw_value (GTK_SCALE (shadow), FALSE); + if (cfg != NULL) { + rgba = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_SHADOW_ALPHA, + SAT_CFG_INT_MAP_SHADOW_ALPHA); + } + else { + rgba = sat_cfg_get_int (SAT_CFG_INT_MAP_SHADOW_ALPHA); + } + gtk_range_set_value (GTK_RANGE (shadow), rgba); + gtk_widget_set_tooltip_text (shadow, + _("Specifies how strong the shadow under the satellite marker should be. "\ + "The shadow improves the visibility of the satellites where the colour of "\ + "the background is light, e.g. the South Pole.\n\n"\ + "Transparent corresponds to no shadow.")); + gtk_table_attach (GTK_TABLE (table), shadow, 2, 5, 3, 4, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + g_signal_connect (shadow, "value-changed", G_CALLBACK (shadow_changed), NULL); + } @@ -589,40 +625,39 @@ * the satellite ground track for. * */ -static void -create_orbit_selector (GKeyFile *cfg, GtkBox *vbox) +static void create_orbit_selector (GKeyFile *cfg, GtkBox *vbox) { - GtkWidget *label; - GtkWidget *hbox; - gint onum; + GtkWidget *label; + GtkWidget *hbox; + gint onum; - hbox = gtk_hbox_new (FALSE, 10); - gtk_box_pack_start (vbox, hbox, FALSE, TRUE, 0); + hbox = gtk_hbox_new (FALSE, 10); + gtk_box_pack_start (vbox, hbox, FALSE, TRUE, 0); - label = gtk_label_new (_("Display ground track for")); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + label = gtk_label_new (_("Display ground track for")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - orbit = gtk_spin_button_new_with_range (1, 10, 1); - gtk_spin_button_set_digits (GTK_SPIN_BUTTON (orbit), 0); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (orbit), TRUE); + orbit = gtk_spin_button_new_with_range (1, 10, 1); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON (orbit), 0); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (orbit), TRUE); - if (cfg != NULL) { - onum = mod_cfg_get_int (cfg, - MOD_CFG_MAP_SECTION, - MOD_CFG_MAP_TRACK_NUM, - SAT_CFG_INT_MAP_TRACK_NUM); - } - else { - onum = sat_cfg_get_int (SAT_CFG_INT_MAP_TRACK_NUM); - } - gtk_spin_button_set_value (GTK_SPIN_BUTTON (orbit), onum); - g_signal_connect (G_OBJECT (orbit), "value-changed", - G_CALLBACK (orbit_changed), NULL); + if (cfg != NULL) { + onum = mod_cfg_get_int (cfg, + MOD_CFG_MAP_SECTION, + MOD_CFG_MAP_TRACK_NUM, + SAT_CFG_INT_MAP_TRACK_NUM); + } + else { + onum = sat_cfg_get_int (SAT_CFG_INT_MAP_TRACK_NUM); + } + gtk_spin_button_set_value (GTK_SPIN_BUTTON (orbit), onum); + g_signal_connect (G_OBJECT (orbit), "value-changed", + G_CALLBACK (orbit_changed), NULL); - gtk_box_pack_start (GTK_BOX (hbox), orbit, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), orbit, FALSE, FALSE, 0); - label = gtk_label_new (_("orbit(s)")); - gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + label = gtk_label_new (_("orbit(s)")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); } @@ -633,35 +668,34 @@ * * This function creates and sets up the RESET button. */ -static void -create_reset_button (GKeyFile *cfg, GtkBox *vbox) +static void create_reset_button (GKeyFile *cfg, GtkBox *vbox) { - GtkWidget *button; - GtkWidget *butbox; - GtkTooltips *tips; + GtkWidget *button; + GtkWidget *butbox; + GtkTooltips *tips; - button = gtk_button_new_with_label (_("Reset")); - g_signal_connect (G_OBJECT (button), "clicked", - G_CALLBACK (reset_cb), cfg); + button = gtk_button_new_with_label (_("Reset")); + g_signal_connect (G_OBJECT (button), "clicked", + G_CALLBACK (reset_cb), cfg); - tips = gtk_tooltips_new (); - if (cfg == NULL) { - gtk_tooltips_set_tip (tips, button, - _("Reset settings to the default values."), - NULL); - } - else { - gtk_tooltips_set_tip (tips, button, - _("Reset module settings to the global values."), - NULL); - } + tips = gtk_tooltips_new (); + if (cfg == NULL) { + gtk_tooltips_set_tip (tips, button, + _("Reset settings to the default values."), + NULL); + } + else { + gtk_tooltips_set_tip (tips, button, + _("Reset module settings to the global values."), + NULL); + } - butbox = gtk_hbutton_box_new (); - gtk_button_box_set_layout (GTK_BUTTON_BOX (butbox), GTK_BUTTONBOX_END); - gtk_box_pack_end (GTK_BOX (butbox), button, FALSE, TRUE, 10); + butbox = gtk_hbutton_box_new (); + gtk_button_box_set_layout (GTK_BUTTON_BOX (butbox), GTK_BUTTONBOX_END); + gtk_box_pack_end (GTK_BOX (butbox), button, FALSE, TRUE, 10); - gtk_box_pack_end (vbox, butbox, FALSE, TRUE, 0); + gtk_box_pack_end (vbox, butbox, FALSE, TRUE, 0); } @@ -674,10 +708,9 @@ * We don't need to do anything but set the dirty flag since the values can * always be obtained from the global widgets. */ -static void -content_changed (GtkToggleButton *but, gpointer data) +static void content_changed (GtkToggleButton *but, gpointer data) { - dirty = TRUE; + dirty = TRUE; } @@ -688,20 +721,28 @@ * We don't need to do anything but set the dirty flag since the values can * always be obtained from the global widgets. */ -static void -colour_changed (GtkWidget *but, gpointer data) +static void colour_changed (GtkWidget *but, gpointer data) { - dirty = TRUE; + dirty = TRUE; } -static void -orbit_changed (GtkWidget *spin, gpointer data) +static void orbit_changed (GtkWidget *spin, gpointer data) { - dirty = TRUE; + dirty = TRUE; } +static gboolean shadow_changed (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data) +{ + dirty = TRUE; + /* prevent other signal handlers from being executed */ + return TRUE; +} + + + + /** \brief Managge RESET button signals. * \param button The RESET button. * \param cfg Pointer to the module configuration or NULL in global mode. @@ -711,427 +752,443 @@ * in "local" mode (when cfg != NULL) the function will reset the module settings to * the global settings. This is done by removing the corresponding key from the GKeyFile. */ -static void -reset_cb (GtkWidget *button, gpointer cfg) +static void reset_cb (GtkWidget *button, gpointer cfg) { - GdkColor col; - guint16 alpha; - guint rgba; + GdkColor col; + guint16 alpha; + guint rgba; - if (cfg == NULL) { - /* global mode, get defaults */ + if (cfg == NULL) { + /* global mode, get defaults */ - /* background map */ - g_free (mapf); - mapf = sat_cfg_get_str_def (SAT_CFG_STR_MAP_FILE); - update_map_icon (); + /* background map */ + g_free (mapf); + mapf = sat_cfg_get_str_def (SAT_CFG_STR_MAP_FILE); + update_map_icon (); - /* extra contents */ - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth), - sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_QTH_INFO)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next), - sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_NEXT_EV)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs), - sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid), - sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_GRID)); + /* extra contents */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth), + sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_QTH_INFO)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next), + sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_NEXT_EV)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs), + sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_CURS_TRACK)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid), + sat_cfg_get_bool_def (SAT_CFG_BOOL_MAP_SHOW_GRID)); - /* colours */ - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_QTH_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (qthc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (qthc), alpha); + /* colours */ + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_QTH_COL); + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (qthc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (qthc), alpha); - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_GRID_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (gridc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (gridc), alpha); + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_GRID_COL); + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (gridc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (gridc), alpha); - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_TICK_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (tickc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (tickc), alpha); - - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_SAT_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (satc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (satc), alpha); + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_TICK_COL); + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (tickc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (tickc), alpha); - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_SAT_SEL_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (ssatc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (ssatc), alpha); + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_SAT_COL); + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (satc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (satc), alpha); - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_TRACK_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (trackc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (trackc), alpha); + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_SAT_SEL_COL); + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (ssatc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (ssatc), alpha); - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_SAT_COV_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (covc), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (covc), alpha); + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_TRACK_COL); + rgba2gdk (rgba, &col, &alpha); + gtk_color_button_set_color (GTK_COLOR_BUTTON (trackc), &col); + gtk_color_button_set_alpha (GTK_COLOR_BUTTON (trackc), alpha); - rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_INFO_COL); - rgba2gdk (rgba, &col, &alpha); - gtk_color_button_set_color (GTK_COLOR_BUTTON (infofg), &col); - gtk_color_button_set_alpha (GTK_COLOR_BUTTON (infofg), alpha); + rgba = sat_cfg_get_int_def (SAT_CFG_INT_MAP_SA... [truncated message content] |
From: <cs...@us...> - 2010-01-12 18:32:26
|
Revision: 588 http://gpredict.svn.sourceforge.net/gpredict/?rev=588&view=rev Author: csete Date: 2010-01-12 18:32:19 +0000 (Tue, 12 Jan 2010) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-01-11 22:37:19 UTC (rev 587) +++ trunk/ChangeLog 2010-01-12 18:32:19 UTC (rev 588) @@ -1,3 +1,13 @@ +2010-01-11 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-rot-knob.c: + Applied patch 2929816: Fixes Bound Checking in gtk-rot-knob.c + Thanks Charles Suprin AA1VS. + + * src/gtk-sat-module-popup.c: + Change menu item to "Exit full screen" and someminor cleaning. + + 2010-01-05 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-map-c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-01-11 22:37:19 UTC (rev 587) +++ trunk/NEWS 2010-01-12 18:32:19 UTC (rev 588) @@ -17,6 +17,7 @@ - Applied patch 2881367: Updated Flags to Locks (thanks to Charles Suprin AA1VS). - Applied patch 2893617: Patches for fixing Windows build (thanks to Valentin Yakovenkov). - Applied patch 2916646: Minor fixes to documentation (thanks to Paul Schulz). +- Applied patch 2929816: Fixes Bound Checking in gtk-rot-knob.c (Thanks to Charles Suprin AA1VS). - Slightly improved UI for the single-satellite view. - Command line options for cleaning user's TLE and transponder data, see --help for list. - Satellite Map: Added shadow to satellite marker and label to enhance visual appearance This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-01-21 20:55:43
|
Revision: 595 http://gpredict.svn.sourceforge.net/gpredict/?rev=595&view=rev Author: csete Date: 2010-01-21 20:55:36 +0000 (Thu, 21 Jan 2010) Log Message: ----------- Applied new version of patch 2933879 from Charles Suprin AA1VS. Modified Paths: -------------- trunk/ChangeLog trunk/src/predict-tools.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-01-17 22:06:27 UTC (rev 594) +++ trunk/ChangeLog 2010-01-21 20:55:36 UTC (rev 595) @@ -1,3 +1,9 @@ +2010-01-20 Alexandru Csete <oz9aec at gmail.com> + + * src/predict-tools.c: + Applied new version of patch 2933879 from Charles Suprin AA1VS. + + 2010-01-17 Alexandru Csete <oz9aec at gmail.com> * src/gtk-polar-view.c: Modified: trunk/src/predict-tools.c =================================================================== --- trunk/src/predict-tools.c 2010-01-17 22:06:27 UTC (rev 594) +++ trunk/src/predict-tools.c 2010-01-21 20:55:36 UTC (rev 595) @@ -745,6 +745,7 @@ void free_pass (pass_t *pass) { + if (pass!=NULL){ free_pass_details (pass->details); if (pass->satname != NULL) { @@ -754,6 +755,9 @@ g_free (pass); pass = NULL; + } else { + /*FIXME: log an error?*/ + } } @@ -1024,7 +1028,9 @@ predict_calc (sat, qth, t); /* check whether satellite has aos */ - if (has_aos (sat, qth)) { + if ((sat->otype == ORBIT_TYPE_GEO) || + (sat->otype == ORBIT_TYPE_DECAYED) || + !has_aos (sat, qth)) { return NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-02-05 14:56:58
|
Revision: 605 http://gpredict.svn.sourceforge.net/gpredict/?rev=605&view=rev Author: csete Date: 2010-02-05 14:56:49 +0000 (Fri, 05 Feb 2010) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-02-05 14:56:23 UTC (rev 604) +++ trunk/ChangeLog 2010-02-05 14:56:49 UTC (rev 605) @@ -1,3 +1,19 @@ +2010-02-05 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-map.c: + Applied patch 2943024: Eliminate Segfault in gtk-sat-map.c (Thanks to + Charles Suprin AA1VS). + + * src/gtk-rig-ctrl.c: + * src/gtk-rot-ctrl.c: + Applied patch 2943448: Remove Segfault from corrupted module (Thanks to + Charles Suprin AA1VS). + + * src/menubar.c: + Applied patch 2945525: Sort list of modules in open module dialog (Thanks to + Charles Suprin AA1VS). + + 2010-02-01 Alexandur Csete <oz9aec at gmail.com> * src/qth-data.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-02-05 14:56:23 UTC (rev 604) +++ trunk/NEWS 2010-02-05 14:56:49 UTC (rev 605) @@ -24,6 +24,9 @@ - Applied patch 2933879: Check for AOS before burning computational resources (Thanks to Charles Suprin AA1VS). - Applied patch 2943018: Potential Double Free in qth-data.c (Thanks to Charles Suprin AA1VS). - Applied patch 2942658: Ground Tracks with Narrow Windows (Thanks to Charles Suprin AA1VS). +- Applied patch 2943024: Eliminate Segfault in gtk-sat-map.c (Thanks to Charles Suprin AA1VS). +- Applied patch 2943448: Remove Segfault from corrupted module (Thanks to Charles Suprin AA1VS). +- Applied patch 2945525: Sort list of modules in open module dialog (Thanks to Charles Suprin AA1VS). - Slightly improved UI for the single-satellite view. - Command line options for cleaning user's TLE and transponder data, see --help for list. - Satellite Map: Added shadow to satellite marker and label to enhance visual appearance This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-02-07 21:50:19
|
Revision: 607 http://gpredict.svn.sourceforge.net/gpredict/?rev=607&view=rev Author: csete Date: 2010-02-07 21:50:12 +0000 (Sun, 07 Feb 2010) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-02-07 21:47:15 UTC (rev 606) +++ trunk/ChangeLog 2010-02-07 21:50:12 UTC (rev 607) @@ -1,3 +1,10 @@ +2010-02-07 Alexandru Csete <oz9aec at gmail.com> + + * src/menubar.c: + Applied patch 2947459: Make Module List Scrollable (Thanks to + Charles Suprin AA1VS). + + 2010-02-05 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-map.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-02-07 21:47:15 UTC (rev 606) +++ trunk/NEWS 2010-02-07 21:50:12 UTC (rev 607) @@ -27,6 +27,7 @@ - Applied patch 2943024: Eliminate Segfault in gtk-sat-map.c (Thanks to Charles Suprin AA1VS). - Applied patch 2943448: Remove Segfault from corrupted module (Thanks to Charles Suprin AA1VS). - Applied patch 2945525: Sort list of modules in open module dialog (Thanks to Charles Suprin AA1VS). +- Applied patch 2947459: Make Module List Scrollable (Thanks to Charles Suprin AA1VS). - Slightly improved UI for the single-satellite view. - Command line options for cleaning user's TLE and transponder data, see --help for list. - Satellite Map: Added shadow to satellite marker and label to enhance visual appearance This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fi...@us...> - 2010-03-12 15:22:03
|
Revision: 613 http://gpredict.svn.sourceforge.net/gpredict/?rev=613&view=rev Author: fillods Date: 2010-03-12 15:21:56 +0000 (Fri, 12 Mar 2010) Log Message: ----------- * Enter directly popup upon double-click. * Misc i18n update and merge with launchpad translations. Modified Paths: -------------- trunk/ChangeLog trunk/po/fr.po trunk/po/gpredict.pot trunk/src/gtk-event-list-popup.c trunk/src/gtk-event-list.c trunk/src/gtk-polar-view-popup.c trunk/src/gtk-polar-view.c trunk/src/gtk-sat-list-popup.c trunk/src/gtk-sat-list.c trunk/src/gtk-sat-map-popup.c trunk/src/gtk-sat-map.c trunk/src/gtk-single-sat.c trunk/src/sat-info.c trunk/src/sat-info.h trunk/src/sat-pref-qth.c trunk/src/sat-pref-rig.c trunk/src/sat-pref-rot.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-02-20 22:45:12 UTC (rev 612) +++ trunk/ChangeLog 2010-03-12 15:21:56 UTC (rev 613) @@ -1,3 +1,26 @@ +2010-03-12 Stephane Fillod <fillods at users.sf.net> + + * src/gtk-event-list-popup.c: + * src/gtk-sat-map-popup.c: + * src/gtk-sat-list-popup.c: + * src/gtk-single-sat.c: + * src/gtk-polar-view-popup.c: + * src/sat-info.[ch]: + Rename show_sat_info as show_sat_info_menu_cb, + show_sat_info can now be called from outside a menu. + + * src/sat-pref-qth.c: + * src/sat-pref-rot.c: + * src/gtk-sat-list.c: + * src/gtk-event-list.c: + * src/gtk-sat-map.c: + * src/gtk-polar-view.c: + Enter directly popup upon double-click. + + * po/gpredict.pot: + * po/fr.po: + Misc update and merge with launchpad translations. + 2010-02-20 Alexandru Csete <oz9aec at gmail.com> * src/sat-pref-rig.c: Modified: trunk/po/fr.po =================================================================== --- trunk/po/fr.po 2010-02-20 22:45:12 UTC (rev 612) +++ trunk/po/fr.po 2010-03-12 15:21:56 UTC (rev 613) @@ -1,13 +1,13 @@ # translation of fr.po to French # Copyright (C) 2001-2008 Alexandru Csete OZ9AEC # This file is distributed under the same license as the Gpredict package. -# Stéphane Fillod <fi...@us...>, 2009. +# Stéphane Fillod <fi...@us...>, 2009-2010. msgid "" msgstr "" "Project-Id-Version: gpredict\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-05 12:24+0100\n" -"PO-Revision-Date: 2009-03-19 23:06+0200\n" +"POT-Creation-Date: 2010-03-11 09:06+0100\n" +"PO-Revision-Date: 2010-03-11 09:06+0200\n" "Last-Translator: Stéphane Fillod <fi...@us...>\n" "Language-Team: French <deb...@li...>\n" "MIME-Version: 1.0\n" @@ -18,7 +18,7 @@ #: ../src/about.c:65 msgid "" -"Copyright (C) 2001-2009 Alexandru Csete OZ9AEC\n" +"Copyright (C) 2001-2009 Alexandru Csete OZ9AEC and contributors.\n" "Contact: oz9aec at googlemail.com\n" "\n" "Gpredict is free software; you can redistribute it and mofdify it under the " @@ -52,7 +52,6 @@ msgstr "GPREDICT" #: ../src/about.c:100 -#, fuzzy msgid "" "Copyright (C) 2001-2009 Alexandru Csete OZ9AEC\n" "\n" @@ -255,13 +254,13 @@ #. Az legend #: ../src/gtk-azel-plot.c:404 ../src/gtk-sat-list.c:55 -#: ../src/sat-pass-dialogs.c:101 +#: ../src/sat-pass-dialogs.c:102 msgid "Az" msgstr "Az" #. El legend #: ../src/gtk-azel-plot.c:414 ../src/gtk-sat-list.c:56 -#: ../src/sat-pass-dialogs.c:102 +#: ../src/sat-pass-dialogs.c:103 msgid "El" msgstr "El" @@ -338,19 +337,24 @@ "Always in range" msgstr "" -#: ../src/gtk-polar-view.c:1137 ../src/gtk-polar-view-popup.c:197 +#: ../src/gtk-polar-view.c:1014 ../src/gtk-polar-view.c:1150 +#, c-format +msgid "%s:%d: Failed to get satellite pass." +msgstr "" + +#: ../src/gtk-polar-view.c:1143 ../src/gtk-polar-view-popup.c:197 #: ../src/gtk-polar-view-popup.c:304 ../src/gtk-sat-map-popup.c:195 #: ../src/gtk-sat-map-popup.c:248 ../src/gtk-sat-map-popup.c:425 #, c-format msgid "%s:%d: Failed to get satellite object." msgstr "" -#: ../src/gtk-polar-view.c:1394 +#: ../src/gtk-polar-view.c:1407 #, c-format msgid "%s:%d: Could not find satellite (%d) in hash table" msgstr "" -#: ../src/gtk-polar-view.c:1442 ../src/gtk-sat-map.c:903 +#: ../src/gtk-polar-view.c:1455 ../src/gtk-sat-map.c:903 #, c-format msgid "%s:%d: Can not find clicked object (%d) in hash table" msgstr "" @@ -403,67 +407,67 @@ "the current ground station!" msgstr "" -#: ../src/gtk-rig-ctrl.c:391 +#: ../src/gtk-rig-ctrl.c:398 msgid "<b> Downlink </b>" msgstr "" #. Downlink doppler #. Uplink doppler -#: ../src/gtk-rig-ctrl.c:406 ../src/gtk-rig-ctrl.c:471 +#: ../src/gtk-rig-ctrl.c:413 ../src/gtk-rig-ctrl.c:478 msgid "Doppler:" msgstr "" -#: ../src/gtk-rig-ctrl.c:408 ../src/gtk-rig-ctrl.c:473 +#: ../src/gtk-rig-ctrl.c:415 ../src/gtk-rig-ctrl.c:480 msgid "" "The Doppler shift according to the range rate and the currently selected " "downlink frequency" msgstr "" -#: ../src/gtk-rig-ctrl.c:420 ../src/gtk-rig-ctrl.c:485 +#: ../src/gtk-rig-ctrl.c:427 ../src/gtk-rig-ctrl.c:492 msgid "LO:" msgstr "" -#: ../src/gtk-rig-ctrl.c:456 +#: ../src/gtk-rig-ctrl.c:463 msgid "<b> Uplink </b>" msgstr "" -#: ../src/gtk-rig-ctrl.c:536 ../src/gtk-rot-ctrl.c:424 +#: ../src/gtk-rig-ctrl.c:543 ../src/gtk-rot-ctrl.c:425 msgid "Select target object" msgstr "" #. tracking button -#: ../src/gtk-rig-ctrl.c:541 ../src/gtk-rot-ctrl.c:429 +#: ../src/gtk-rig-ctrl.c:548 ../src/gtk-rot-ctrl.c:430 msgid "Track" -msgstr "" +msgstr "Suivi" -#: ../src/gtk-rig-ctrl.c:542 +#: ../src/gtk-rig-ctrl.c:549 msgid "" "Track the satellite transponder.\n" "Enabling this button will apply Dopper correction to the frequency of the " "radio." msgstr "" -#: ../src/gtk-rig-ctrl.c:550 +#: ../src/gtk-rig-ctrl.c:557 msgid "Select a transponder" msgstr "Sélectionne un transpondeurs" #. buttons -#: ../src/gtk-rig-ctrl.c:557 +#: ../src/gtk-rig-ctrl.c:564 msgid "T" -msgstr "" +msgstr "T" -#: ../src/gtk-rig-ctrl.c:559 +#: ../src/gtk-rig-ctrl.c:566 msgid "" "Tune the radio to this transponder. The uplink and downlink will be set to " "the center of the transponder passband. In case of beacons, only the " "downlink will be tuned to the beacon frequency." msgstr "" -#: ../src/gtk-rig-ctrl.c:565 +#: ../src/gtk-rig-ctrl.c:572 msgid "L" -msgstr "" +msgstr "L" -#: ../src/gtk-rig-ctrl.c:567 +#: ../src/gtk-rig-ctrl.c:574 msgid "" "Lock the uplink and the downlink to each other. Whenever you change the " "downlink (in the controller or on the dial, the uplink will track it " @@ -476,52 +480,52 @@ msgstr "" #. Azimuth -#: ../src/gtk-rig-ctrl.c:586 ../src/gtk-rot-ctrl.c:435 +#: ../src/gtk-rig-ctrl.c:593 ../src/gtk-rot-ctrl.c:436 msgid "Az:" msgstr "Az:" #. Elevation -#: ../src/gtk-rig-ctrl.c:594 ../src/gtk-rot-ctrl.c:445 +#: ../src/gtk-rig-ctrl.c:601 ../src/gtk-rot-ctrl.c:446 msgid "El:" msgstr "El:" #. Range -#: ../src/gtk-rig-ctrl.c:602 +#: ../src/gtk-rig-ctrl.c:609 msgid " Range:" msgstr " Portée:" -#: ../src/gtk-rig-ctrl.c:610 ../src/gtk-rig-ctrl.c:613 +#: ../src/gtk-rig-ctrl.c:617 ../src/gtk-rig-ctrl.c:620 msgid "This is the current distance between the satellite and the observer." msgstr "" #. Range rate -#: ../src/gtk-rig-ctrl.c:617 +#: ../src/gtk-rig-ctrl.c:624 msgid " Rate:" msgstr "" -#: ../src/gtk-rig-ctrl.c:625 ../src/gtk-rig-ctrl.c:628 +#: ../src/gtk-rig-ctrl.c:632 ../src/gtk-rig-ctrl.c:635 msgid "" "The rate of change for the distance between the satellite and the observer." msgstr "" -#: ../src/gtk-rig-ctrl.c:631 ../src/gtk-rot-ctrl.c:461 +#: ../src/gtk-rig-ctrl.c:638 ../src/gtk-rot-ctrl.c:462 msgid "Target" msgstr "Cible" #. Primary device -#: ../src/gtk-rig-ctrl.c:659 +#: ../src/gtk-rig-ctrl.c:666 msgid "1. Device:" msgstr "1. Appareil:" -#: ../src/gtk-rig-ctrl.c:664 +#: ../src/gtk-rig-ctrl.c:671 msgid "" "Select primary radio device.This device will be used for downlink and uplink " "unless you select a secondary device for uplink" msgstr "" -#: ../src/gtk-rig-ctrl.c:686 ../src/gtk-rig-ctrl.c:729 -#: ../src/gtk-rig-ctrl.c:2397 ../src/gtk-rot-ctrl.c:513 -#: ../src/gtk-rot-ctrl.c:1240 ../src/sat-pref-rig.c:300 +#: ../src/gtk-rig-ctrl.c:693 ../src/gtk-rig-ctrl.c:736 +#: ../src/gtk-rig-ctrl.c:2895 ../src/gtk-rot-ctrl.c:514 +#: ../src/gtk-rot-ctrl.c:1241 ../src/sat-pref-rig.c:300 #: ../src/sat-pref-rot.c:266 #, c-format msgid "%s:%d: Failed to open hwconf dir (%s)" @@ -529,286 +533,304 @@ #. config will be force-loaded after LO spin is created #. Secondary device -#: ../src/gtk-rig-ctrl.c:699 +#: ../src/gtk-rig-ctrl.c:706 msgid "2. Device:" msgstr "2. Appareil:" -#: ../src/gtk-rig-ctrl.c:704 +#: ../src/gtk-rig-ctrl.c:711 msgid "" "Select secondary radio device\n" "This device will be used for uplink" msgstr "" #. load config -#: ../src/gtk-rig-ctrl.c:708 ../src/sat-pref-rig.c:747 -#: ../src/sat-pref-rig.c:756 ../src/sat-pref-rig-editor.c:237 +#: ../src/gtk-rig-ctrl.c:715 ../src/sat-pref-rig.c:751 +#: ../src/sat-pref-rig.c:760 ../src/sat-pref-rig-editor.c:242 msgid "None" msgstr "Aucun" #. Engage button -#: ../src/gtk-rig-ctrl.c:744 ../src/gtk-rot-ctrl.c:526 +#: ../src/gtk-rig-ctrl.c:751 ../src/gtk-rot-ctrl.c:527 msgid "Engage" msgstr "Engage" -#: ../src/gtk-rig-ctrl.c:745 +#: ../src/gtk-rig-ctrl.c:752 msgid "Engage the selected radio device" msgstr "" #. Timeout -#: ../src/gtk-rig-ctrl.c:753 ../src/gtk-rot-ctrl.c:532 +#: ../src/gtk-rig-ctrl.c:760 ../src/gtk-rot-ctrl.c:533 msgid "Cycle:" msgstr "Cycle:" -#: ../src/gtk-rig-ctrl.c:760 +#: ../src/gtk-rig-ctrl.c:767 msgid "This parameter controls the delay between commands sent to the rig." msgstr "" -#: ../src/gtk-rig-ctrl.c:767 ../src/gtk-rot-ctrl.c:546 +#: ../src/gtk-rig-ctrl.c:774 ../src/gtk-rot-ctrl.c:547 msgid "msec" msgstr "msec" -#: ../src/gtk-rig-ctrl.c:771 ../src/gtk-rot-ctrl.c:575 +#: ../src/gtk-rig-ctrl.c:778 ../src/gtk-rot-ctrl.c:576 msgid "Settings" msgstr "Réglages" -#: ../src/gtk-rig-ctrl.c:788 +#: ../src/gtk-rig-ctrl.c:795 msgid "<span size='large'><b>ΔT: 00:00:00</b></span>" msgstr "" -#: ../src/gtk-rig-ctrl.c:790 +#: ../src/gtk-rig-ctrl.c:797 msgid "" "The time remaining until the next AOS or LOS event, depending on which one " "comes first." msgstr "" -#: ../src/gtk-rig-ctrl.c:839 ../src/gtk-rot-ctrl.c:638 +#: ../src/gtk-rig-ctrl.c:846 ../src/gtk-rot-ctrl.c:639 #, c-format msgid "%s:%s: Invalid satellite selection: %d" msgstr "" -#: ../src/gtk-rig-ctrl.c:876 +#: ../src/gtk-rig-ctrl.c:883 #, c-format msgid "%s: Inconsistency detected in internal transponder data (%d,%d)" msgstr "" -#: ../src/gtk-rig-ctrl.c:1008 +#: ../src/gtk-rig-ctrl.c:1015 #, c-format msgid "%s:%s: Primary device selected: %d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1022 ../src/gtk-rig-ctrl.c:2485 +#: ../src/gtk-rig-ctrl.c:1029 ../src/gtk-rig-ctrl.c:2983 #, c-format msgid "%s:%d: Failed to allocate memory for radio config" msgstr "" -#: ../src/gtk-rig-ctrl.c:1031 ../src/gtk-rig-ctrl.c:1132 +#: ../src/gtk-rig-ctrl.c:1038 ../src/gtk-rig-ctrl.c:1139 #, c-format msgid "%s:%s: Loaded new radio configuration %s" msgstr "" #. update LO widgets -#: ../src/gtk-rig-ctrl.c:1034 ../src/gtk-rig-ctrl.c:1039 -#: ../src/gtk-rig-ctrl.c:1091 ../src/gtk-rig-ctrl.c:1107 -#: ../src/gtk-rig-ctrl.c:1135 +#: ../src/gtk-rig-ctrl.c:1041 ../src/gtk-rig-ctrl.c:1046 +#: ../src/gtk-rig-ctrl.c:1098 ../src/gtk-rig-ctrl.c:1114 +#: ../src/gtk-rig-ctrl.c:1142 #, c-format msgid "%.0f MHz" msgstr "%.0f MHz" -#: ../src/gtk-rig-ctrl.c:1046 ../src/gtk-rig-ctrl.c:1141 +#: ../src/gtk-rig-ctrl.c:1053 ../src/gtk-rig-ctrl.c:1148 #, c-format msgid "%s:%s: Failed to load radio configuration %s" msgstr "" -#: ../src/gtk-rig-ctrl.c:1075 +#: ../src/gtk-rig-ctrl.c:1082 #, c-format msgid "%s:%s: Secondary device selected: %d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1123 +#: ../src/gtk-rig-ctrl.c:1130 #, c-format msgid "%s:%s: Failed to allocate memory for radio config" msgstr "" -#: ../src/gtk-rig-ctrl.c:1179 ../src/gtk-rot-ctrl.c:780 +#: ../src/gtk-rig-ctrl.c:1193 ../src/gtk-rot-ctrl.c:781 #, c-format msgid "%s: Controller does not have a valid configuration" msgstr "" -#: ../src/gtk-rig-ctrl.c:1269 ../src/gtk-rot-ctrl.c:808 +#: ../src/gtk-rig-ctrl.c:1287 ../src/gtk-rot-ctrl.c:809 #, c-format msgid "%s missed the deadline" msgstr "" -#: ../src/gtk-rig-ctrl.c:1299 +#: ../src/gtk-rig-ctrl.c:1321 #, c-format msgid "%s: Invalid radio type %d. Setting type to RIG_TYPE_RX" msgstr "" -#: ../src/gtk-rig-ctrl.c:1313 ../src/gtk-rot-ctrl.c:895 +#: ../src/gtk-rig-ctrl.c:1335 ../src/gtk-rot-ctrl.c:896 #, c-format msgid "%s: MAX_ERROR_COUNT (%d) reached. Disengaging device!" msgstr "" -#: ../src/gtk-rig-ctrl.c:1831 ../src/gtk-rig-ctrl.c:2037 -#: ../src/gtk-rot-ctrl.c:963 ../src/gtk-rot-ctrl.c:1084 +#: ../src/gtk-rig-ctrl.c:1977 ../src/gtk-rig-ctrl.c:2416 +#: ../src/gtk-rig-ctrl.c:2535 ../src/gtk-rot-ctrl.c:964 +#: ../src/gtk-rot-ctrl.c:1085 #, c-format msgid "%s:%d: Failed to create socket" msgstr "" -#: ../src/gtk-rig-ctrl.c:1837 ../src/gtk-rig-ctrl.c:2043 -#: ../src/gtk-rot-ctrl.c:969 ../src/gtk-rot-ctrl.c:1090 +#: ../src/gtk-rig-ctrl.c:1983 ../src/gtk-rig-ctrl.c:2422 +#: ../src/gtk-rig-ctrl.c:2541 ../src/gtk-rot-ctrl.c:970 +#: ../src/gtk-rot-ctrl.c:1091 #, c-format msgid "%s:%d Network socket created successfully" msgstr "" -#: ../src/gtk-rig-ctrl.c:1851 ../src/gtk-rig-ctrl.c:2057 -#: ../src/gtk-rot-ctrl.c:983 ../src/gtk-rot-ctrl.c:1104 +#: ../src/gtk-rig-ctrl.c:1997 ../src/gtk-rig-ctrl.c:2436 +#: ../src/gtk-rig-ctrl.c:2555 ../src/gtk-rot-ctrl.c:984 +#: ../src/gtk-rot-ctrl.c:1105 #, c-format msgid "%s:%d: Failed to connect to %s:%d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1857 ../src/gtk-rig-ctrl.c:2063 -#: ../src/gtk-rot-ctrl.c:989 ../src/gtk-rot-ctrl.c:1110 +#: ../src/gtk-rig-ctrl.c:2003 ../src/gtk-rig-ctrl.c:2442 +#: ../src/gtk-rig-ctrl.c:2561 ../src/gtk-rot-ctrl.c:990 +#: ../src/gtk-rot-ctrl.c:1111 #, c-format msgid "%s:%d: Connection opened to %s:%d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1875 ../src/gtk-rig-ctrl.c:2074 -#: ../src/gtk-rot-ctrl.c:1000 ../src/gtk-rot-ctrl.c:1123 +#: ../src/gtk-rig-ctrl.c:2021 ../src/gtk-rig-ctrl.c:2453 +#: ../src/gtk-rig-ctrl.c:2572 ../src/gtk-rot-ctrl.c:1001 +#: ../src/gtk-rot-ctrl.c:1124 #, c-format msgid "%s:%d: SIZE ERROR %d / %d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1885 ../src/gtk-rig-ctrl.c:2084 -#: ../src/gtk-rot-ctrl.c:1010 +#: ../src/gtk-rig-ctrl.c:2031 ../src/gtk-rig-ctrl.c:2463 +#: ../src/gtk-rig-ctrl.c:2582 ../src/gtk-rot-ctrl.c:1011 #, c-format msgid "%s:%s: Failed to allocate 128 bytes (yes, this means trouble)" msgstr "" -#: ../src/gtk-rig-ctrl.c:1901 ../src/gtk-rig-ctrl.c:2100 +#: ../src/gtk-rig-ctrl.c:2047 ../src/gtk-rig-ctrl.c:2479 +#: ../src/gtk-rig-ctrl.c:2598 #, c-format msgid "%s:%s: Got 0 bytes from rigctld" msgstr "" -#: ../src/gtk-rig-ctrl.c:1906 ../src/gtk-rig-ctrl.c:2105 +#: ../src/gtk-rig-ctrl.c:2052 ../src/gtk-rig-ctrl.c:2484 +#: ../src/gtk-rig-ctrl.c:2603 #, c-format msgid "%s:%s: Read %d bytes from rigctld" msgstr "" -#: ../src/gtk-rig-ctrl.c:1954 ../src/gtk-rig-ctrl.c:2148 +#: ../src/gtk-rig-ctrl.c:2100 ../src/gtk-rig-ctrl.c:2180 +#: ../src/gtk-rig-ctrl.c:2255 ../src/gtk-rig-ctrl.c:2330 +#: ../src/gtk-rig-ctrl.c:2646 ../src/gtk-rig-ctrl.c:3024 #, c-format msgid "%s: Failed to create socket" msgstr "" -#: ../src/gtk-rig-ctrl.c:1960 ../src/gtk-rig-ctrl.c:2154 +#: ../src/gtk-rig-ctrl.c:2106 ../src/gtk-rig-ctrl.c:2186 +#: ../src/gtk-rig-ctrl.c:2261 ../src/gtk-rig-ctrl.c:2336 +#: ../src/gtk-rig-ctrl.c:2652 ../src/gtk-rig-ctrl.c:3030 #, c-format msgid "%s: Network socket created successfully" msgstr "" -#: ../src/gtk-rig-ctrl.c:1974 ../src/gtk-rig-ctrl.c:2168 +#: ../src/gtk-rig-ctrl.c:2120 ../src/gtk-rig-ctrl.c:2200 +#: ../src/gtk-rig-ctrl.c:2275 ../src/gtk-rig-ctrl.c:2350 +#: ../src/gtk-rig-ctrl.c:2666 ../src/gtk-rig-ctrl.c:3044 #, c-format msgid "%s: Failed to connect to %s:%d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1980 ../src/gtk-rig-ctrl.c:2174 +#: ../src/gtk-rig-ctrl.c:2126 ../src/gtk-rig-ctrl.c:2206 +#: ../src/gtk-rig-ctrl.c:2281 ../src/gtk-rig-ctrl.c:2356 +#: ../src/gtk-rig-ctrl.c:2672 ../src/gtk-rig-ctrl.c:3050 #, c-format msgid "%s: Connection opened to %s:%d" msgstr "" -#: ../src/gtk-rig-ctrl.c:1991 ../src/gtk-rig-ctrl.c:2213 +#: ../src/gtk-rig-ctrl.c:2137 ../src/gtk-rig-ctrl.c:2217 +#: ../src/gtk-rig-ctrl.c:2292 ../src/gtk-rig-ctrl.c:2367 +#: ../src/gtk-rig-ctrl.c:2711 ../src/gtk-rig-ctrl.c:3058 #, c-format msgid "%s: SIZE ERROR %d / %d" msgstr "" -#: ../src/gtk-rig-ctrl.c:2028 ../src/gtk-rot-ctrl.c:954 +#: ../src/gtk-rig-ctrl.c:2407 ../src/gtk-rig-ctrl.c:2526 +#: ../src/gtk-rot-ctrl.c:955 #, c-format msgid "%s:%d: NULL storage." msgstr "" -#: ../src/gtk-rig-ctrl.c:2202 +#: ../src/gtk-rig-ctrl.c:2700 #, c-format msgid "%s: Invalid VFO argument. Using VFOA." msgstr "" -#: ../src/gtk-rig-ctrl.c:2252 +#: ../src/gtk-rig-ctrl.c:2750 #, c-format msgid "AOS in" msgstr "AOS dans" -#: ../src/gtk-rig-ctrl.c:2256 +#: ../src/gtk-rig-ctrl.c:2754 #, c-format msgid "LOS in" msgstr "LOS dans" -#: ../src/gtk-rig-ctrl.c:2339 +#: ../src/gtk-rig-ctrl.c:2837 #, c-format msgid "%s:%s: GtkSatModule has no target satellite." msgstr "" -#: ../src/gtk-rig-ctrl.c:2351 +#: ../src/gtk-rig-ctrl.c:2849 #, c-format msgid "%s:%s: Satellite %d has %d transponder modes." msgstr "" -#: ../src/gtk-rig-ctrl.c:2362 +#: ../src/gtk-rig-ctrl.c:2860 #, c-format msgid "%s:&s: Read transponder '%s' for satellite %d" msgstr "" -#: ../src/gtk-rig-ctrl.c:2497 +#: ../src/gtk-rig-ctrl.c:2995 #, c-format msgid "%s:%d: Error reading radio configuration %s" msgstr "" -#: ../src/gtk-rot-ctrl.c:332 ../src/gtk-sat-list.c:85 -#: ../src/gtk-single-sat.c:56 ../src/sat-pass-dialogs.c:125 +#: ../src/gtk-rot-ctrl.c:333 ../src/gtk-sat-list.c:85 +#: ../src/gtk-single-sat.c:56 ../src/sat-pass-dialogs.c:126 msgid "Azimuth" msgstr "Azimuth" -#: ../src/gtk-rot-ctrl.c:344 +#: ../src/gtk-rot-ctrl.c:345 msgid "Read:" msgstr "Lecture:" -#: ../src/gtk-rot-ctrl.c:371 ../src/gtk-sat-list.c:86 -#: ../src/gtk-single-sat.c:57 ../src/sat-pass-dialogs.c:126 +#: ../src/gtk-rot-ctrl.c:372 ../src/gtk-sat-list.c:86 +#: ../src/gtk-single-sat.c:57 ../src/sat-pass-dialogs.c:127 msgid "Elevation" msgstr "Elévation" -#: ../src/gtk-rot-ctrl.c:383 +#: ../src/gtk-rot-ctrl.c:384 msgid "Read: " msgstr "Lecture: " -#: ../src/gtk-rot-ctrl.c:430 +#: ../src/gtk-rot-ctrl.c:431 msgid "Track the satellite when it is within range" msgstr "" #. count down -#: ../src/gtk-rot-ctrl.c:454 +#: ../src/gtk-rot-ctrl.c:455 msgid "ΔT:" msgstr "ΔT:" -#: ../src/gtk-rot-ctrl.c:488 +#: ../src/gtk-rot-ctrl.c:489 msgid "Device:" msgstr "Appareil:" -#: ../src/gtk-rot-ctrl.c:493 +#: ../src/gtk-rot-ctrl.c:494 msgid "Select antenna rotator device" msgstr "" -#: ../src/gtk-rot-ctrl.c:527 +#: ../src/gtk-rot-ctrl.c:528 msgid "Engage the selected rotor device" msgstr "" -#: ../src/gtk-rot-ctrl.c:539 +#: ../src/gtk-rot-ctrl.c:540 msgid "This parameter controls the delay between commands sent to the rotator." msgstr "" #. Tolerance -#: ../src/gtk-rot-ctrl.c:551 +#: ../src/gtk-rot-ctrl.c:552 msgid "Tolerance:" msgstr "Tolérance:" -#: ../src/gtk-rot-ctrl.c:558 +#: ../src/gtk-rot-ctrl.c:559 msgid "" "This parameter controls the tolerance between the target and rotator values " "for the rotator.\n" @@ -816,37 +838,37 @@ "tolerance, no new commands are sent" msgstr "" -#: ../src/gtk-rot-ctrl.c:568 +#: ../src/gtk-rot-ctrl.c:569 msgid "deg" msgstr "deg" -#: ../src/gtk-rot-ctrl.c:729 +#: ../src/gtk-rot-ctrl.c:730 #, c-format msgid "%s:%d: Failed to allocate memory for rotator config" msgstr "" -#: ../src/gtk-rot-ctrl.c:738 +#: ../src/gtk-rot-ctrl.c:739 #, c-format msgid "Loaded new rotator configuration %s" msgstr "" -#: ../src/gtk-rot-ctrl.c:747 +#: ../src/gtk-rot-ctrl.c:748 #, c-format msgid "%s:%d: Failed to load rotator configuration %s" msgstr "" -#: ../src/gtk-rot-ctrl.c:866 ../src/gtk-rot-ctrl.c:867 -#: ../src/gtk-sat-module-popup.c:841 ../src/gtk-sat-module-popup.c:914 -#: ../src/qth-data.c:94 ../src/sat-log-browser.c:72 ../src/sat-pref-rig.c:718 +#: ../src/gtk-rot-ctrl.c:867 ../src/gtk-rot-ctrl.c:868 +#: ../src/gtk-sat-module-popup.c:833 ../src/gtk-sat-module-popup.c:904 +#: ../src/qth-data.c:95 ../src/sat-log-browser.c:72 ../src/sat-pref-rig.c:722 msgid "ERROR" msgstr "ERREUR" -#: ../src/gtk-rot-ctrl.c:1026 +#: ../src/gtk-rot-ctrl.c:1027 #, c-format msgid "%s:%s: Got 0 bytes from rotctld" msgstr "" -#: ../src/gtk-rot-ctrl.c:1031 +#: ../src/gtk-rot-ctrl.c:1032 #, c-format msgid "%s:%s: Read %d bytes from rotctld" msgstr "" @@ -879,26 +901,26 @@ msgid "Dir" msgstr "Dir" -#: ../src/gtk-sat-list.c:58 ../src/sat-pass-dialogs.c:103 +#: ../src/gtk-sat-list.c:58 ../src/sat-pass-dialogs.c:104 msgid "Ra" msgstr "" -#: ../src/gtk-sat-list.c:59 ../src/sat-pass-dialogs.c:104 +#: ../src/gtk-sat-list.c:59 ../src/sat-pass-dialogs.c:105 msgid "Dec" -msgstr "" +msgstr "Déc" #: ../src/gtk-sat-list.c:60 ../src/pass-to-txt.c:52 -#: ../src/sat-pass-dialogs.c:105 +#: ../src/sat-pass-dialogs.c:106 msgid "Range" msgstr "Portée" -#: ../src/gtk-sat-list.c:61 ../src/sat-pass-dialogs.c:106 +#: ../src/gtk-sat-list.c:61 ../src/sat-pass-dialogs.c:107 msgid "Rate" -msgstr "" +msgstr "Taux" #. Next Event #: ../src/gtk-sat-list.c:62 ../src/gtk-sat-list.c:92 -#: ../src/gtk-single-sat.c:63 ../src/sat-pref-map-view.c:241 +#: ../src/gtk-single-sat.c:63 ../src/sat-pref-map-view.c:243 #: ../src/sat-pref-polar-view.c:276 msgid "Next Event" msgstr "Prochain événement" @@ -914,60 +936,60 @@ msgstr "Prochain LOS" #: ../src/gtk-sat-list.c:65 ../src/loc-tree.c:146 -#: ../src/sat-pass-dialogs.c:107 ../src/sat-pref-qth.c:196 +#: ../src/sat-pass-dialogs.c:108 ../src/sat-pref-qth.c:196 msgid "Lat" msgstr "Lat" #: ../src/gtk-sat-list.c:66 ../src/loc-tree.c:166 -#: ../src/sat-pass-dialogs.c:108 ../src/sat-pref-qth.c:209 +#: ../src/sat-pass-dialogs.c:109 ../src/sat-pref-qth.c:209 msgid "Lon" msgstr "Lon" -#: ../src/gtk-sat-list.c:67 ../src/sat-pass-dialogs.c:109 +#: ../src/gtk-sat-list.c:67 ../src/sat-pass-dialogs.c:110 msgid "SSP" msgstr "" #: ../src/gtk-sat-list.c:68 ../src/pass-to-txt.c:57 -#: ../src/sat-pass-dialogs.c:110 +#: ../src/sat-pass-dialogs.c:111 msgid "Footp" msgstr "" #: ../src/gtk-sat-list.c:69 ../src/loc-tree.c:186 -#: ../src/sat-pass-dialogs.c:111 +#: ../src/sat-pass-dialogs.c:112 msgid "Alt" msgstr "Alt" -#: ../src/gtk-sat-list.c:70 ../src/sat-pass-dialogs.c:112 +#: ../src/gtk-sat-list.c:70 ../src/sat-pass-dialogs.c:113 msgid "Vel" msgstr "Vel" -#: ../src/gtk-sat-list.c:71 ../src/sat-pass-dialogs.c:113 +#: ../src/gtk-sat-list.c:71 ../src/sat-pass-dialogs.c:114 msgid "Dop" msgstr "Dop" -#: ../src/gtk-sat-list.c:72 ../src/sat-pass-dialogs.c:114 +#: ../src/gtk-sat-list.c:72 ../src/sat-pass-dialogs.c:115 msgid "Loss" msgstr "Perte" -#: ../src/gtk-sat-list.c:73 ../src/sat-pass-dialogs.c:115 +#: ../src/gtk-sat-list.c:73 ../src/sat-pass-dialogs.c:116 msgid "Del" -msgstr "" +msgstr "Suppr." -#: ../src/gtk-sat-list.c:74 ../src/sat-pass-dialogs.c:116 +#: ../src/gtk-sat-list.c:74 ../src/sat-pass-dialogs.c:117 msgid "MA" msgstr "" -#: ../src/gtk-sat-list.c:75 ../src/sat-pass-dialogs.c:117 +#: ../src/gtk-sat-list.c:75 ../src/sat-pass-dialogs.c:118 msgid "Phase" msgstr "Phase" #: ../src/gtk-sat-list.c:76 ../src/pass-to-txt.c:101 -#: ../src/sat-pass-dialogs.c:66 +#: ../src/sat-pass-dialogs.c:67 msgid "Orbit" msgstr "Orbite" #: ../src/gtk-sat-list.c:77 ../src/pass-to-txt.c:65 ../src/pass-to-txt.c:102 -#: ../src/sat-pass-dialogs.c:67 ../src/sat-pass-dialogs.c:118 +#: ../src/sat-pass-dialogs.c:68 ../src/sat-pass-dialogs.c:119 msgid "Vis" msgstr "" @@ -983,74 +1005,74 @@ msgid "Direction" msgstr "Direction" -#: ../src/gtk-sat-list.c:88 ../src/sat-pass-dialogs.c:127 +#: ../src/gtk-sat-list.c:88 ../src/sat-pass-dialogs.c:128 msgid "Right Ascension" -msgstr "" +msgstr "Ascension droite" #: ../src/gtk-sat-list.c:89 ../src/gtk-single-sat.c:60 -#: ../src/sat-pass-dialogs.c:128 +#: ../src/sat-pass-dialogs.c:129 msgid "Declination" -msgstr "" +msgstr "Déclinaison" #: ../src/gtk-sat-list.c:90 ../src/gtk-single-sat.c:61 -#: ../src/sat-pass-dialogs.c:129 +#: ../src/sat-pass-dialogs.c:130 msgid "Slant Range" msgstr "" #: ../src/gtk-sat-list.c:91 ../src/gtk-single-sat.c:62 -#: ../src/sat-pass-dialogs.c:130 +#: ../src/sat-pass-dialogs.c:131 msgid "Range Rate" msgstr "" -#: ../src/gtk-sat-list.c:95 ../src/sat-pass-dialogs.c:131 +#: ../src/gtk-sat-list.c:95 ../src/sat-pass-dialogs.c:132 msgid "Latitude" msgstr "Latitude" -#: ../src/gtk-sat-list.c:96 ../src/sat-pass-dialogs.c:132 +#: ../src/gtk-sat-list.c:96 ../src/sat-pass-dialogs.c:133 msgid "Longitude" msgstr "Longitude" -#: ../src/gtk-sat-list.c:97 ../src/sat-pass-dialogs.c:133 +#: ../src/gtk-sat-list.c:97 ../src/sat-pass-dialogs.c:134 msgid "Sub-Satellite Point" msgstr "" #: ../src/gtk-sat-list.c:98 ../src/gtk-single-sat.c:69 -#: ../src/sat-pass-dialogs.c:134 +#: ../src/sat-pass-dialogs.c:135 msgid "Footprint" msgstr "" #. altitude #: ../src/gtk-sat-list.c:99 ../src/gtk-single-sat.c:70 ../src/qth-editor.c:334 -#: ../src/sat-pass-dialogs.c:135 ../src/sat-pref-qth-editor.c:318 +#: ../src/sat-pass-dialogs.c:136 ../src/sat-pref-qth-editor.c:318 msgid "Altitude" msgstr "Altitude" #: ../src/gtk-sat-list.c:100 ../src/gtk-single-sat.c:71 -#: ../src/sat-pass-dialogs.c:136 +#: ../src/sat-pass-dialogs.c:137 msgid "Velocity" msgstr "Vélocité" #: ../src/gtk-sat-list.c:101 ../src/gtk-single-sat.c:100 -#: ../src/sat-pass-dialogs.c:137 +#: ../src/sat-pass-dialogs.c:138 msgid "Doppler Shift @ 100MHz" msgstr "" -#: ../src/gtk-sat-list.c:102 ../src/sat-pass-dialogs.c:138 +#: ../src/gtk-sat-list.c:102 ../src/sat-pass-dialogs.c:139 msgid "Signal Loss @ 100MHz" msgstr "" #: ../src/gtk-sat-list.c:103 ../src/gtk-single-sat.c:102 -#: ../src/sat-pass-dialogs.c:139 +#: ../src/sat-pass-dialogs.c:140 msgid "Signal Delay" msgstr "" #: ../src/gtk-sat-list.c:104 ../src/gtk-single-sat.c:103 -#: ../src/sat-pass-dialogs.c:140 +#: ../src/sat-pass-dialogs.c:141 msgid "Mean Anomaly" msgstr "" #: ../src/gtk-sat-list.c:105 ../src/gtk-single-sat.c:76 -#: ../src/gtk-single-sat.c:104 ../src/sat-pass-dialogs.c:141 +#: ../src/gtk-single-sat.c:104 ../src/sat-pass-dialogs.c:142 msgid "Orbit Phase" msgstr "Phase Orbite" @@ -1059,7 +1081,7 @@ msgstr "Num Orbite" #: ../src/gtk-sat-list.c:107 ../src/gtk-single-sat.c:78 -#: ../src/sat-pass-dialogs.c:142 +#: ../src/sat-pass-dialogs.c:143 msgid "Visibility" msgstr "Visibilité" @@ -1078,7 +1100,7 @@ msgid "%s: Satellite #%d removed from list." msgstr "" -#: ../src/gtk-sat-list.c:952 ../src/sat-pass-dialogs.c:698 +#: ../src/gtk-sat-list.c:952 ../src/sat-pass-dialogs.c:704 #: ../src/sat-pref-qth.c:769 #, c-format msgid "%s:%d: Invalid column: %d" @@ -1094,15 +1116,15 @@ msgid "%s:%d Failed to get data for %d." msgstr "" -#: ../src/gtk-sat-list.c:1307 ../src/sat-pass-dialogs.c:1399 -#: ../src/sat-pass-dialogs.c:1448 +#: ../src/gtk-sat-list.c:1307 ../src/sat-pass-dialogs.c:1405 +#: ../src/sat-pass-dialogs.c:1454 #, c-format msgid "%s:%d: There is no selection; skip popup." msgstr "" #: ../src/gtk-sat-list-col-sel.c:153 msgid "Column Name" -msgstr "" +msgstr "Nom de la colonne" #: ../src/gtk-sat-list-col-sel.c:162 ../src/sat-vis.c:41 msgid "Visible" @@ -1147,6 +1169,11 @@ msgid "%s:%d: Error loading map file (%s)" msgstr "" +#: ../src/gtk-sat-map.c:1802 +#, c-format +msgid "%s:%d: NULL object for %d (yes, this is a bug)" +msgstr "" + #: ../src/gtk-sat-map-ground-track.c:82 #, c-format msgid "%s: Creating ground track for %s" @@ -1243,7 +1270,7 @@ #. settings are really screwed up; we need some safe values here #: ../src/gtk-sat-module.c:544 ../src/gtk-sat-module.c:545 msgid "Error" -msgstr "" +msgstr "Erreur" #: ../src/gtk-sat-module.c:575 #, c-format @@ -1350,69 +1377,69 @@ msgid "%s: Reloading satellites for module %s" msgstr "" -#: ../src/gtk-sat-module-popup.c:90 +#: ../src/gtk-sat-module-popup.c:89 #, c-format msgid "%s:%d: %s called with NULL parameter!" msgstr "" -#: ../src/gtk-sat-module-popup.c:100 +#: ../src/gtk-sat-module-popup.c:99 msgid "Detach module" msgstr "Détache module" -#: ../src/gtk-sat-module-popup.c:111 +#: ../src/gtk-sat-module-popup.c:110 msgid "Attach module" msgstr "Attache module" -#: ../src/gtk-sat-module-popup.c:124 -msgid "Leave fullscreen" -msgstr "Quitte plein écran" +#: ../src/gtk-sat-module-popup.c:123 +msgid "Exit full screen" +msgstr "Quitte le plein écran" -#: ../src/gtk-sat-module-popup.c:133 -msgid "Fullscreen" +#: ../src/gtk-sat-module-popup.c:132 +msgid "Full screen" msgstr "Plein écran" #. sky at a glance -#: ../src/gtk-sat-module-popup.c:147 +#: ../src/gtk-sat-module-popup.c:146 msgid "Sky at a glance" msgstr "Ciel d'un coup d'œil" #. time manager -#: ../src/gtk-sat-module-popup.c:157 ../src/gtk-sat-module-tmg.c:289 +#: ../src/gtk-sat-module-popup.c:156 ../src/gtk-sat-module-tmg.c:289 msgid "Time Controller" msgstr "Contrôleur de Temps" #. Radio Control -#: ../src/gtk-sat-module-popup.c:170 +#: ../src/gtk-sat-module-popup.c:169 msgid "Radio Control" msgstr "Contrôle Radio" #. Antenna Control -#: ../src/gtk-sat-module-popup.c:179 +#: ../src/gtk-sat-module-popup.c:178 msgid "Antenna Control" msgstr "Contrôle Antenne" #. configure -#: ../src/gtk-sat-module-popup.c:192 +#: ../src/gtk-sat-module-popup.c:191 msgid "Configure" msgstr "Configuration" #. clone -#: ../src/gtk-sat-module-popup.c:201 +#: ../src/gtk-sat-module-popup.c:200 msgid "Clone..." msgstr "Clonage..." #. delete module -#: ../src/gtk-sat-module-popup.c:214 ../src/sat-pref-qth.c:490 +#: ../src/gtk-sat-module-popup.c:213 ../src/sat-pref-qth.c:490 #: ../src/sat-pref-rig.c:338 ../src/sat-pref-rot.c:303 msgid "Delete" msgstr "Suppression" #. close -#: ../src/gtk-sat-module-popup.c:223 +#: ../src/gtk-sat-module-popup.c:222 msgid "Close" msgstr "Fermeture" -#: ../src/gtk-sat-module-popup.c:257 +#: ../src/gtk-sat-module-popup.c:255 msgid "" "A module can not be configured while the radio or rotator controller is " "active.\n" @@ -1422,94 +1449,94 @@ #. icon file name #. window title -#: ../src/gtk-sat-module-popup.c:298 +#: ../src/gtk-sat-module-popup.c:295 msgid "Clone Module" msgstr "" #. label -#: ../src/gtk-sat-module-popup.c:310 +#: ../src/gtk-sat-module-popup.c:307 msgid "Name of new module:" msgstr "" -#: ../src/gtk-sat-module-popup.c:319 ../src/mod-cfg.c:501 +#: ../src/gtk-sat-module-popup.c:316 ../src/mod-cfg.c:501 msgid "" "Enter a short name for this module.\n" "Allowed characters: 0..9, a..z, A..Z, - and _" msgstr "" -#: ../src/gtk-sat-module-popup.c:321 ../src/mod-cfg.c:503 +#: ../src/gtk-sat-module-popup.c:318 ../src/mod-cfg.c:503 msgid "" "The name will be used to identify the module and it is also used a file name " "for saving the data.Max length is 25 characters." msgstr "" #. check button -#: ../src/gtk-sat-module-popup.c:338 +#: ../src/gtk-sat-module-popup.c:335 msgid "Open module when created" msgstr "" -#: ../src/gtk-sat-module-popup.c:342 +#: ../src/gtk-sat-module-popup.c:339 msgid "If checked, the new module will be opened after it has been created" msgstr "" -#: ../src/gtk-sat-module-popup.c:358 +#: ../src/gtk-sat-module-popup.c:355 #, c-format msgid "%s:%d: Cloning %s => %s" msgstr "" -#: ../src/gtk-sat-module-popup.c:373 +#: ../src/gtk-sat-module-popup.c:370 #, c-format msgid "%s:%d: Failed to clone %s." msgstr "" -#: ../src/gtk-sat-module-popup.c:378 +#: ../src/gtk-sat-module-popup.c:375 #, c-format msgid "%s:%d: Successfully cloned %s." msgstr "" -#: ../src/gtk-sat-module-popup.c:442 +#: ../src/gtk-sat-module-popup.c:439 #, c-format msgid "%s:%d: Cloning cancelled by user." msgstr "" -#: ../src/gtk-sat-module-popup.c:448 +#: ../src/gtk-sat-module-popup.c:445 #, c-format msgid "%s:%d: Cloning interrupted." msgstr "" -#: ../src/gtk-sat-module-popup.c:624 ../src/gtk-sat-module-popup.c:746 +#: ../src/gtk-sat-module-popup.c:620 ../src/gtk-sat-module-popup.c:741 #, c-format msgid "%s:%d: Unknown module state: %d" msgstr "" -#: ../src/gtk-sat-module-popup.c:772 +#: ../src/gtk-sat-module-popup.c:766 #, c-format msgid "The sky at a glance (%s)" msgstr "Le ciel d'un coup d'œil (%s)" -#: ../src/gtk-sat-module-popup.c:836 +#: ../src/gtk-sat-module-popup.c:828 msgid "" "You have no radio configuration!\n" "Please configure a radio first." msgstr "" -#: ../src/gtk-sat-module-popup.c:849 +#: ../src/gtk-sat-module-popup.c:841 #, c-format msgid "Gpredict Radio Control: %s" msgstr "" -#: ../src/gtk-sat-module-popup.c:909 +#: ../src/gtk-sat-module-popup.c:899 msgid "" "You have no rotator configuration!\n" "Please configure an antenna rotator first." msgstr "" -#: ../src/gtk-sat-module-popup.c:922 +#: ../src/gtk-sat-module-popup.c:912 #, c-format msgid "Gpredict Rotator Control: %s" msgstr "" -#: ../src/gtk-sat-module-popup.c:1007 +#: ../src/gtk-sat-module-popup.c:993 #, c-format msgid "" "This operation will permanently delete\n" @@ -1518,12 +1545,12 @@ "Do you you want to proceed?" msgstr "" -#: ../src/gtk-sat-module-popup.c:1017 +#: ../src/gtk-sat-module-popup.c:1003 #, c-format msgid "%s:%d: Failed to delete %s." msgstr "" -#: ../src/gtk-sat-module-popup.c:1022 +#: ../src/gtk-sat-module-popup.c:1008 #, c-format msgid "%s:%d: %s deleted permanently." msgstr "" @@ -1550,7 +1577,7 @@ #: ../src/gtk-sat-module-tmg.c:125 ../src/sat-pref-conditions.c:427 #: ../src/sat-pref-debug.c:141 ../src/sat-pref-formats.c:118 #: ../src/sat-pref-layout.c:427 ../src/sat-pref-list-view.c:253 -#: ../src/sat-pref-map-view.c:644 ../src/sat-pref-multi-pass.c:190 +#: ../src/sat-pref-map-view.c:678 ../src/sat-pref-multi-pass.c:190 #: ../src/sat-pref-polar-view.c:627 ../src/sat-pref-refresh.c:419 #: ../src/sat-pref-single-pass.c:184 ../src/sat-pref-single-sat.c:222 #: ../src/sat-pref-sky-at-glance.c:491 ../src/sat-pref-tle.c:348 @@ -1644,19 +1671,17 @@ msgstr "" #: ../src/gtk-sat-selector.c:238 -#, fuzzy msgid "Available Satellites" -msgstr "<b>Sélection Satellites:</b>" +msgstr "Satellites Disponibles" #: ../src/gtk-sat-selector.c:256 -#, fuzzy msgid "Updated" -msgstr "Mise-à-jour TLE" +msgstr "Mise-à-jour" #. Search #: ../src/gtk-sat-selector.c:286 msgid "Search" -msgstr "" +msgstr "Recherche" #: ../src/gtk-sat-selector.c:290 msgid "" @@ -1666,12 +1691,11 @@ #. Group selector #: ../src/gtk-sat-selector.c:300 msgid "Group" -msgstr "" +msgstr "Groupe" #: ../src/gtk-sat-selector.c:364 -#, fuzzy msgid "All satellites" -msgstr "Satellite" +msgstr "Tous les satellites" #: ../src/gtk-sat-selector.c:371 #, c-format @@ -1694,9 +1718,9 @@ msgstr "" #: ../src/gtk-sat-selector.c:515 -#, fuzzy, c-format +#, c-format msgid "%s:%s: Read %d satellites from %s" -msgstr "Lecture de données depuis %s" +msgstr "%s:%s: Lu %d satellites depuis %s" #: ../src/gtk-sat-selector.c:520 #, c-format @@ -1710,7 +1734,7 @@ #: ../src/gtk-sat-tree.c:232 ../src/mod-cfg.c:630 msgid "Epoch" -msgstr "" +msgstr "Epoque" #: ../src/gtk-sat-tree.c:245 msgid "Selected" @@ -1913,7 +1937,7 @@ #: ../src/gtk-single-sat.c:520 ../src/gtk-single-sat.c:551 #: ../src/gtk-single-sat.c:579 msgid "N/A" -msgstr "" +msgstr "N/A" #: ../src/gtk-single-sat.c:701 #, c-format @@ -1927,7 +1951,7 @@ #: ../src/gtk-sky-glance.c:343 msgid "TIME" -msgstr "" +msgstr "TEMPS" #: ../src/gtk-sky-glance.c:840 #, c-format @@ -1948,7 +1972,7 @@ #: ../src/loc-tree.c:133 ../src/qth-editor.c:236 ../src/sat-pref-qth.c:189 #: ../src/sat-pref-qth-editor.c:220 msgid "Location" -msgstr "" +msgstr "Position" #: ../src/loc-tree.c:205 msgid "WX" @@ -1956,12 +1980,12 @@ #: ../src/loc-tree.c:221 msgid "X" -msgstr "" +msgstr "X" #. dialog window #: ../src/loc-tree.c:258 msgid "Select Location" -msgstr "" +msgstr "Sélectionner la position" #: ../src/loc-tree.c:293 #, c-format @@ -2082,226 +2106,225 @@ #: ../src/map-selector.c:92 msgid "Image files" -msgstr "" +msgstr "Fichiers images" #: ../src/map-selector.c:187 ../src/map-selector.c:245 #, c-format msgid "%s:%d: Could not stat %s" msgstr "" -#: ../src/menubar.c:89 +#: ../src/menubar.c:92 msgid "_File" msgstr "_Fichier" -#: ../src/menubar.c:90 +#: ../src/menubar.c:93 msgid "_Edit" msgstr "_Edition" -#: ../src/menubar.c:91 +#: ../src/menubar.c:94 msgid "_Update TLE" msgstr "_Mise à jour TLE" -#: ../src/menubar.c:92 +#: ../src/menubar.c:95 msgid "_Tools" msgstr "_Outils" -#: ../src/menubar.c:93 +#: ../src/menubar.c:96 msgid "_Help" msgstr "_Aide" #. File menu -#: ../src/menubar.c:96 +#: ../src/menubar.c:99 msgid "_New module" msgstr "_Nouveau module" -#: ../src/menubar.c:97 +#: ../src/menubar.c:100 msgid "Create a new module" msgstr "Créer un nouveau module" -#: ../src/menubar.c:98 +#: ../src/menubar.c:101 msgid "_Open module" msgstr "_Ouvrir module" -#: ../src/menubar.c:99 +#: ../src/menubar.c:102 msgid "Open an existing module" msgstr "Ouvre un module existant" -#: ../src/menubar.c:101 +#: ../src/menubar.c:104 msgid "Open the message log browser" msgstr "" -#: ../src/menubar.c:102 +#: ../src/menubar.c:105 msgid "E_xit" msgstr "_Quitter" -#: ../src/menubar.c:103 +#: ../src/menubar.c:106 msgid "Exit the program" msgstr "Quitter le programme" #. Edit menu #. { "Tle", GTK_STOCK_REFRESH, N_("Update TLE"), NULL, #. N_("Update Keplerian elements"), NULL}, -#: ../src/menubar.c:108 +#: ../src/menubar.c:111 msgid "From _network" msgstr "Depuis le _réseau" -#: ../src/menubar.c:109 +#: ../src/menubar.c:112 msgid "Update Keplerian elements from a network server" msgstr "Mets à jour les éléments Képlériens depuis un serveur réseau" -#: ../src/menubar.c:111 +#: ../src/menubar.c:114 msgid "From l_ocal files" msgstr "Depuis des fichiers _locaux" -#: ../src/menubar.c:112 +#: ../src/menubar.c:115 msgid "Update Keplerian elements from local files" msgstr "Mets à jour les éléments Képlériens depuis des fichiers locaux" -#: ../src/menubar.c:114 +#: ../src/menubar.c:117 msgid "Using TLE _editor" msgstr "Utilisation de l'édit_eur TLE" -#: ../src/menubar.c:115 +#: ../src/menubar.c:118 msgid "Add or update Keplerian elements using the TLE editor" msgstr "" "Ajoute ou mets à jour les éléments Képlériens en utilisant l'éditeur TLE" -#: ../src/menubar.c:117 +#: ../src/menubar.c:120 msgid "_Transponders" msgstr "_Transpondeurs" -#: ../src/menubar.c:118 +#: ../src/menubar.c:121 msgid "Edit satellite transponder frequencies" msgstr "Edite les fréquences transpondeurs satellite" -#: ../src/menubar.c:120 +#: ../src/menubar.c:123 msgid "_Preferences" msgstr "_Préférences" -#: ../src/menubar.c:121 +#: ../src/menubar.c:124 msgid "Edit user preferences" msgstr "Edite les préférences utilisateur" #. Tools menu -#: ../src/menubar.c:124 -#, fuzzy +#: ../src/menubar.c:127 msgid "Satellite Editor" -msgstr "Info Satellite" +msgstr "Editeur de Satellite" -#: ../src/menubar.c:125 +#: ../src/menubar.c:128 msgid "" "Open the satellite editor where you can manually edit orbital elements and " "other data" msgstr "" -#: ../src/menubar.c:127 +#: ../src/menubar.c:130 msgid "Comm Window" msgstr "Fenêtre Comm" -#: ../src/menubar.c:128 +#: ../src/menubar.c:131 msgid "Predict windows between two observers" msgstr "" -#: ../src/menubar.c:130 +#: ../src/menubar.c:133 msgid "Advanced Predict" msgstr "" -#: ../src/menubar.c:131 +#: ../src/menubar.c:134 msgid "Open advanced pass predictor" msgstr "" #. Help menu -#: ../src/menubar.c:134 +#: ../src/menubar.c:137 msgid "Getting Started" -msgstr "" +msgstr "Pour commencer" -#: ../src/menubar.c:135 +#: ../src/menubar.c:138 msgid "Show online user manual, Getting Started Section" msgstr "" -#: ../src/menubar.c:137 +#: ../src/menubar.c:140 msgid "Online help" -msgstr "" +msgstr "Aide en ligne" -#: ../src/menubar.c:138 +#: ../src/menubar.c:141 msgid "Show online user manual" msgstr "Montre le manuel utilisateur en ligne" -#: ../src/menubar.c:139 +#: ../src/menubar.c:142 msgid "_License" msgstr "_Licence" -#: ../src/menubar.c:140 +#: ../src/menubar.c:143 msgid "Show the Gpredict license" msgstr "Monre la licence Gpredict" -#: ../src/menubar.c:141 +#: ../src/menubar.c:144 msgid "_News" msgstr "_Nouvelles" -#: ../src/menubar.c:142 +#: ../src/menubar.c:145 msgid "Show what's new in this release" msgstr "Montre ce qu'il y a de neuf dans cette version" -#: ../src/menubar.c:143 +#: ../src/menubar.c:146 msgid "_About Gpredict" msgstr "_A propos de Gpredict" -#: ../src/menubar.c:144 +#: ../src/menubar.c:147 msgid "Show about dialog" msgstr "Montre le dialogue à propos" -#: ../src/menubar.c:234 +#: ../src/menubar.c:237 #, c-format msgid "Failed to build menubar: %s" msgstr "" -#: ../src/menubar.c:270 +#: ../src/menubar.c:273 #, c-format msgid "%s: Starting new module configurator..." msgstr "" -#: ../src/menubar.c:277 +#: ../src/menubar.c:280 #, c-format msgid "%s: New module name is %s." msgstr "" -#: ../src/menubar.c:297 ../src/menubar.c:356 +#: ../src/menubar.c:300 ../src/menubar.c:359 #, c-format msgid "Could not open %s. Please examine the log messages for details." msgstr "" -#: ../src/menubar.c:313 +#: ../src/menubar.c:316 #, c-format msgid "%s: New module config cancelled." msgstr "" -#: ../src/menubar.c:329 +#: ../src/menubar.c:332 #, c-format msgid "%s: Open existing module..." msgstr "" -#: ../src/menubar.c:336 +#: ../src/menubar.c:339 #, c-format msgid "%s: Open module %s." msgstr "" -#: ../src/menubar.c:384 +#: ../src/menubar.c:387 #, c-format msgid "%s: Open module cancelled." msgstr "" #. create new dialog with progress indicator -#: ../src/menubar.c:439 ../src/menubar.c:609 ../src/sat-pref-general.c:61 +#: ../src/menubar.c:442 ../src/menubar.c:612 ../src/sat-pref-general.c:61 msgid "TLE Update" msgstr "Mise-à-jour TLE" -#: ../src/menubar.c:460 +#: ../src/menubar.c:463 msgid "<b>Updating TLE files from network</b>" msgstr "<b>Mise à jour des fichiers TLE depuis le réseau</b>" #. statistics -#: ../src/menubar.c:473 ../src/menubar.c:643 +#: ../src/menubar.c:476 ../src/menubar.c:646 msgid "" "Satellites updated:\t 0\n" "Satellites skipped:\t 0\n" @@ -2311,76 +2334,76 @@ "Satellites sautés: \t 0\n" "Satellites manquants: \t 0\n" -#: ../src/menubar.c:499 ../src/menubar.c:669 +#: ../src/menubar.c:502 ../src/menubar.c:672 msgid "Finished" msgstr "Terminé" #. create file chooser -#: ../src/menubar.c:552 +#: ../src/menubar.c:555 msgid "Select directory" msgstr "Sélectionne répertoire" #. create label -#: ../src/menubar.c:558 +#: ../src/menubar.c:561 msgid "Select TLE directory:" msgstr "Sélection répertoire TLE" #. create the dalog -#: ../src/menubar.c:567 +#: ../src/menubar.c:570 msgid "Update TLE from files" msgstr "Mise-à-jour tLE à partir de fichiers " -#: ../src/menubar.c:602 +#: ../src/menubar.c:605 #, c-format msgid "%s: Running TLE update from %s" msgstr "" -#: ../src/menubar.c:629 +#: ../src/menubar.c:632 msgid "<b>Updating TLE files from files</b>" msgstr "<b>Mise à jour de fichiers TLE depuis à partir de fichiers</b>" -#: ../src/menubar.c:707 ../src/menubar.c:728 +#: ../src/menubar.c:710 ../src/menubar.c:731 msgid "This function is still under development." msgstr "" -#: ../src/menubar.c:755 +#: ../src/menubar.c:758 msgid "" "A comprehensive PDF user manual and \n" "video tutorials are available from the \n" "Gpredict website:" msgstr "" -#: ../src/menubar.c:829 +#: ../src/menubar.c:834 #, c-format msgid "%s:%s: Scanning directory %s for modules." msgstr "" -#: ../src/menubar.c:852 +#: ../src/menubar.c:857 #, c-format msgid "%s:%d: Failed to open module dir %s (%s)" msgstr "" -#: ../src/menubar.c:867 +#: ../src/menubar.c:872 msgid "" "You do not have any modules set up yet. Please use File->New in order to " "create a module." msgstr "" -#: ../src/menubar.c:885 +#: ../src/menubar.c:906 msgid "Module" msgstr "Module" #. create dialog -#: ../src/menubar.c:893 +#: ../src/menubar.c:914 msgid "Select a module" msgstr "" -#: ../src/menubar.c:920 +#: ../src/menubar.c:942 #, c-format msgid "%s:%s: Selected module is: %s" msgstr "" -#: ../src/menubar.c:925 +#: ../src/menubar.c:947 #, c-format msgid "%s:%s: No selection is list of modules." msgstr "" @@ -2421,22 +2444,22 @@ msgid "%s: Attempt to save NULL data." msgstr "" -#: ../src/mod-cfg.c:343 ../src/sat-cfg.c:325 +#: ../src/mod-cfg.c:343 ../src/sat-cfg.c:326 #, c-format msgid "%s: Could not create config data (%s)." msgstr "" -#: ../src/mod-cfg.c:360 ../src/sat-cfg.c:342 +#: ../src/mod-cfg.c:360 ../src/sat-cfg.c:343 #, c-format msgid "%s: Could not create config file (%s)." msgstr "" -#: ../src/mod-cfg.c:379 ../src/sat-cfg.c:361 +#: ../src/mod-cfg.c:379 ../src/sat-cfg.c:362 #, c-format msgid "%s: Error writing config data (%s)." msgstr "" -#: ../src/mod-cfg.c:388 ../src/qth-data.c:341 ../src/sat-cfg.c:370 +#: ../src/mod-cfg.c:388 ../src/qth-data.c:342 ../src/sat-cfg.c:371 #, c-format msgid "%s: Wrote only %d out of %d chars." msgstr "" @@ -2472,9 +2495,8 @@ msgstr "" #: ../src/mod-cfg.c:546 -#, fuzzy msgid "<b>Satellites</b>" -msgstr "<b>Satellite</b>" +msgstr "<b>Satellites</b>" #: ../src/mod-cfg.c:564 msgid "Add satellite to list of selected satellites." @@ -2491,9 +2513,8 @@ msgstr "" #: ../src/mod-cfg.c:614 -#, fuzzy msgid "Selected Satellites" -msgstr "<b>Sélection Satellites:</b>" +msgstr "Satellites Sélectionnés" #: ../src/mod-cfg.c:731 ../src/mod-cfg.c:985 #, c-format @@ -2529,7 +2550,7 @@ #. window icon file name #: ../src/mod-cfg.c:1020 msgid "Module Properties" -msgstr "" +msgstr "Propriétés du module" #: ../src/mod-cfg-get-param.c:71 #, c-format @@ -2738,24 +2759,24 @@ msgid " LOS" msgstr "" -#: ../src/pass-to-txt.c:96 ../src/sat-pass-dialogs.c:61 +#: ../src/pass-to-txt.c:96 ../src/sat-pass-dialogs.c:62 msgid "Duration" msgstr "Durée" -#: ../src/pass-to-txt.c:97 ../src/sat-pass-dialogs.c:62 +#: ../src/pass-to-txt.c:97 ../src/sat-pass-dialogs.c:63 #: ../src/sat-pref-rot.c:169 msgid "Max El" msgstr "El Max" -#: ../src/pass-to-txt.c:98 ../src/sat-pass-dialogs.c:63 +#: ../src/pass-to-txt.c:98 ../src/sat-pass-dialogs.c:64 msgid "AOS Az" msgstr "" -#: ../src/pass-to-txt.c:99 ../src/sat-pass-dialogs.c:64 +#: ../src/pass-to-txt.c:99 ../src/sat-pass-dialogs.c:65 msgid "Max El Az" msgstr "EL Az Max" -#: ../src/pass-to-txt.c:100 ../src/sat-pass-dialogs.c:65 +#: ../src/pass-to-txt.c:100 ../src/sat-pass-dialogs.c:66 msgid "LOS Az" msgstr "" @@ -2789,74 +2810,79 @@ "Observateur: %s, %s\n" "LAT:%.2f LON:%.2f\n" -#: ../src/qth-data.c:66 +#: ../src/predict-tools.c:646 #, c-format +msgid "%s: Found %d passes for %s in time window [%f;%f]" +msgstr "" + +#: ../src/qth-data.c:67 +#, c-format msgid "%s: Could not load data from %s (%s)" msgstr "" -#: ../src/qth-data.c:74 +#: ../src/qth-data.c:75 #, c-format msgid "%s: QTH data: %s" msgstr "" -#: ../src/qth-data.c:91 +#: ../src/qth-data.c:92 #, c-format msgid "%s: Error reading QTH name (%s)." msgstr "" -#: ../src/qth-data.c:105 +#: ../src/qth-data.c:106 #, c-format msgid "%s: QTH has no location (%s)." msgstr "" -#: ../src/qth-data.c:119 +#: ../src/qth-data.c:120 #, c-format msgid "%s: QTH has no description." msgstr "" -#: ../src/qth-data.c:133 +#: ../src/qth-data.c:134 #, c-format msgid "%s: QTH has no weather station." msgstr "" -#: ../src/qth-data.c:147 +#: ../src/qth-data.c:148 #, c-format msgid "%s: Error reading QTH latitude (%s)." msgstr "" -#: ../src/qth-data.c:169 +#: ../src/qth-data.c:170 #, c-format msgid "%s: Error reading QTH longitude (%s)." msgstr "" -#: ../src/qth-data.c:191 +#: ../src/qth-data.c:192 #, c-format msgid "%s: Error reading QTH altitude (%s)." msgstr "" -#: ../src/qth-data.c:206 +#: ../src/qth-data.c:207 #, c-format msgid "%s: QTH data: %s, %.4f, %.4f, %d" msgstr "" -#: ../src/qth-data.c:300 +#: ../src/qth-data.c:301 #, c-format msgid "%s: Could not create QTH data (%s)." msgstr "" -#: ../src/qth-data.c:313 +#: ../src/qth-data.c:314 #, c-format msgid "" "%s: Could not create QTH file %s\n" "%s." msgstr "" -#: ../src/qth-data.c:332 +#: ../src/qth-data.c:333 #, c-format msgid "%s: Error writing QTH data (%s)." msgstr "" -#: ../src/qth-data.c:348 +#: ../src/qth-data.c:349 #, c-format msgid "%s: QTH data saved." msgstr "" @@ -2897,7 +2923,7 @@ #. QTH description #: ../src/qth-editor.c:221 ../src/sat-pref-qth-editor.c:205 msgid "Description" -msgstr "" +msgstr "Description" #: ../src/qth-editor.c:229 ../src/sat-pref-qth-editor.c:213 msgid "Enter an optional description for this ground station." @@ -2917,7 +2943,7 @@ #: ../src/qth-editor.c:248 ../src/qth-editor.c:369 #: ../src/sat-pref-qth-editor.c:232 ../src/sat-pref-qth-editor.c:353 msgid "Select" -msgstr "" +msgstr "Sélectionner" #: ../src/qth-editor.c:249 ../src/sat-pref-qth-editor.c:233 msgid "Select a predefined location from a list." @@ -3077,47 +3103,47 @@ msgid "%s: MaxEl not defined for %s. Assuming 90°." msgstr "" -#: ../src/sat-cfg.c:273 +#: ../src/sat-cfg.c:274 #, c-format msgid "%s: Error reading config file (%s)" msgstr "" -#: ../src/sat-cfg.c:277 +#: ../src/sat-cfg.c:278 #, c-format msgid "%s: Using built-in defaults" msgstr "" -#: ../src/sat-cfg.c:286 +#: ../src/sat-cfg.c:287 #, c-format msgid "%s: Everything OK." msgstr "" -#: ../src/sat-cfg.c:377 +#: ../src/sat-cfg.c:378 #, c-format msgid "%s: Configuration saved." msgstr "" -#: ../src/sat-cfg.c:419 ../src/sat-cfg.c:480 ../src/sat-cfg.c:506 -#: ../src/sat-cfg.c:538 ../src/sat-cfg.c:601 ../src/sat-cfg.c:636 -#: ../src/sat-cfg.c:663 ../src/sat-cfg.c:717 ../src/sat-cfg.c:742 +#: ../src/sat-cfg.c:420 ../src/sat-cfg.c:481 ../src/sat-cfg.c:507 +#: ../src/sat-cfg.c:539 ../src/sat-cfg.c:602 ../src/sat-cfg.c:637 +#: ../src/sat-cfg.c:664 ../src/sat-cfg.c:718 ../src/sat-cfg.c:743 #, c-format msgid "%s: Module not initialised\n" msgstr "" -#: ../src/sat-cfg.c:442 ../src/sat-cfg.c:459 ../src/sat-cfg.c:493 -#: ../src/sat-cfg.c:519 +#: ../src/sat-cfg.c:443 ../src/sat-cfg.c:460 ../src/sat-cfg.c:494 +#: ../src/sat-cfg.c:520 #, c-format msgid "%s: Unknown BOOL param index (%d)\n" msgstr "" -#: ../src/sat-cfg.c:561 ../src/sat-cfg.c:583 ../src/sat-cfg.c:623 -#: ../src/sat-cfg.c:649 +#: ../src/sat-cfg.c:562 ../src/sat-cfg.c:584 ../src/sat-cfg.c:624 +#: ../src/sat-cfg.c:650 #, c-format msgid "%s: Unknown STR param index (%d)\n" msgstr "" -#: ../src/sat-cfg.c:686 ../src/sat-cfg.c:703 ../src/sat-cfg.c:730 -#: ../src/sat-cfg.c:755 +#: ../src/sat-cfg.c:687 ../src/sat-cfg.c:704 ../src/sat-cfg.c:731 +#: ../src/sat-cfg.c:756 #, c-format msgid "%s: Unknown INT param index (%d)\n" msgstr "" @@ -3282,14 +3308,14 @@ msgid "Mode: %s" msgstr "Mode: %s" -#: ../src/sat-log-browser.c:57 ../src/sat-pass-dialogs.c:100 -#: ../src/sat-pass-dialogs.c:124 +#: ../src/sat-log-browser.c:57 ../src/sat-pass-dialogs.c:101 +#: ../src/sat-pass-dialogs.c:125 msgid "Time" msgstr "Date" #: ../src/sat-log-browser.c:58 msgid "Source" -msgstr "" +msgstr "Source" #: ../src/sat-log-browser.c:59 msgid "Level" @@ -3297,12 +3323,12 @@ #: ../src/sat-log-browser.c:60 msgid "Message" -msgstr "" +msgstr "Message" #. * WARNING: Used directly in sat-log-browser #: ../src/sat-log-browser.c:70 ../src/sat-log.c:58 msgid "NONE" -msgstr "" +msgstr "AUCUN" #: ../src/sat-log-browser.c:71 msgid "BUG" @@ -3310,7 +3336,7 @@ #: ../src/sat-log-browser.c:73 msgid "WARNING" -msgstr "" +msgstr "ATTENTION" #: ../src/sat-log-browser.c:74 msgid "DEBUG" @@ -3330,7 +3356,7 @@ #. create file chooser dialog #: ../src/sat-log-browser.c:375 msgid "Select Log File" -msgstr "" +msgstr "Sélectionner un fichier du Journal" #: ../src/sat-log-browser.c:452 msgid "SYS" @@ -3416,83 +3442,83 @@ msgid "%s: Session ended" msgstr "" -#: ../src/sat-pass-dialogs.c:58 +#: ../src/sat-pass-dialogs.c:59 msgid "AOS" msgstr "" -#: ../src/sat-pass-dialogs.c:59 +#: ../src/sat-pass-dialogs.c:60 msgid "TCA" msgstr "" -#: ../src/sat-pass-dialogs.c:60 +#: ../src/sat-pass-dialogs.c:61 msgid "LOS" msgstr "" -#: ../src/sat-pass-dialogs.c:72 +#: ../src/sat-pass-dialogs.c:73 msgid "Aquisition of signal (AOS)" msgstr "" -#: ../src/sat-pass-dialogs.c:73 +#: ../src/sat-pass-dialogs.c:74 msgid "Time of Closest Approach (TCA)" msgstr "" -#: ../src/sat-pass-dialogs.c:74 +#: ../src/sat-pass-dialogs.c:75 msgid "Loss of signal (LOS)" msgstr "" -#: ../src/sat-pass-dialogs.c:75 +#: ../src/sat-pass-dialogs.c:76 msgid "Duration of pass" msgstr "" -#: ../src/sat-pass-dialogs.c:76 +#: ../src/sat-pass-dialogs.c:77 msgid "Maximum elevation" msgstr "" -#: ../src/sat-pass-dialogs.c:77 +#: ../src/sat-pass-dialogs.c:78 msgid "Azimuth at AOS" msgstr "" -#: ../src/sat-pass-dialogs.c:78 +#: ../src/sat-pass-dialogs.c:79 msgid "Az at max. elevation" msgstr "" -#: ../src/sat-pass-dialogs.c:79 +#: ../src/sat-pass-dialogs.c:80 msgid "Azimuth at LOS" msgstr "" -#: ../src/sat-pass-dialogs.c:80 +#: ../src/sat-pass-dialogs.c:81 msgid "Orbit number" msgstr "Numéro Orbite" -#: ../src/sat-pass-dialogs.c:81 +#: ../src/sat-pass-dialogs.c:82 msgid "Visibility during pass" msgstr "" -#: ../src/sat-pass-dialogs.c:457 +#: ../src/sat-pass-dialogs.c:458 msgid "Data" msgstr "Données" -#: ../src/sat-pass-dialogs.c:468 +#: ../src/sat-pass-dialogs.c:469 msgid "Polar" msgstr "Polaire" -#: ../src/sat-pass-dialogs.c:479 +#: ../src/sat-pass-dialogs.c:480 msgid "Az/El" msgstr "Az/El" #. create dialog -#: ../src/sat-pass-dialogs.c:485 +#: ../src/sat-pass-dialogs.c:486 #, c-format msgid "Pass details for %s (orbit %d)" msgstr "Détails du passage pour %s (orbite %d)" -#: ../src/sat-pass-dialogs.c:547 ../src/sat-pass-dialogs.c:1146 +#: ../src/sat-pass-dialogs.c:548 ../src/sat-pass-dialogs.c:1152 #, c-format msgid "%s: PRINT not implemented" msgstr "" #. create dialog -#: ../src/sat-pass-dialogs.c:1086 +#: ../src/sat-pass-dialogs.c:1092 #, c-format msgid "Upcoming passes for %s" msgstr "Prochains passages pour %s" @@ -3642,7 +3668,7 @@ #: ../src/sat-pref-conditions.c:433 ../src/sat-pref-debug.c:144 #: ../src/sat-pref-layout.c:434 ../src/sat-pref-list-view.c:260 -#: ../src/sat-pref-map-view.c:651 ../src/sat-pref-multi-pass.c:196 +#: ../src/sat-pref-map-view.c:685 ../src/sat-pref-multi-pass.c:196 #: ../src/sat-pref-polar-view.c:633 ../src/sat-pref-refresh.c:426 #: ../src/sat-pref-single-pass.c:190 ../src/sat-pref-single-sat.c:229 #: ../src/sat-pref-sky-at-glance.c:497 ../src/sat-pref-tle.c:354 @@ -3761,7 +3787,7 @@ #: ../src/sat-pref-formats.c:121 msgid "Reset to default value" -msgstr "" +msgstr "Réinitialiser aux valeurs par défaut" #: ../src/sat-pref-formats.c:124 msgid "Time format:" @@ -3820,7 +3846,7 @@ #: ../src/sat-pref-layout.c:78 msgid "Table" -msgstr "" +msgstr "Table" #: ../src/sat-pref-layout.c:79 msgid "World map and table" @@ -3848,7 +3874,7 @@ #: ../src/sat-pref-layout.c:85 msgid "Custom" -msgstr "" +msgstr "Personnalisation" #. create header #: ../src/sat-pref-layout.c:222 @@ -3906,7 +3932,7 @@ msgstr "" #: ../src/sat-pref-layout.c:439 ../src/sat-pref-list-view.c:265 -#: ../src/sat-pref-map-view.c:656 ../src/sat-pref-polar-view.c:638 +#: ../src/sat-pref-map-view.c:690 ../src/sat-pref-polar-view.c:638 #: ../src/sat-pref-refresh.c:431 ../src/sat-pref-single-sat.c:234 msgid "Reset module settings to the global values." msgstr "" @@ -3917,7 +3943,7 @@ #: ../src/sat-pref-list-view.c:128 msgid "Visible Columns" -msgstr "" +msgstr "Colonnes visibles" #: ../src/sat-pref-list-view.c:150 msgid "Enable rules hint in the list views" @@ -3930,51 +3956,51 @@ "behaviour is up to the theme engine." msgstr "" -#: ../src/sat-pref-map-view.c:128 +#: ../src/sat-pref-map-view.c:131 msgid "<b>Background Map:</b>" msgstr "" #. select button -#: ../src/sat-pref-map-view.c:178 +#: ../src/sat-pref-map-view.c:181 msgid "Select map" -msgstr "" +msgstr "Sélectionner une carte" -#: ../src/sat-pref-map-view.c:181 +#: ../src/sat-pref-map-view.c:184 msgid "Click to select a map" msgstr "" -#: ../src/sat-pref-map-view.c:213 ../src/sat-pref-polar-view.c:248 +#: ../src/sat-pref-map-view.c:215 ../src/sat-pref-polar-view.c:248 msgid "<b>Extra Contents:</b>" msgstr "" #. QTH info -#: ../src/sat-pref-map-view.c:221 ../src/sat-pref-polar-view.c:256 +#: ../src/sat-pref-map-view.c:223 ../src/sat-pref-polar-view.c:256 msgid "QTH Info" msgstr "" -#: ../src/sat-pref-map-view.c:224 +#: ../src/sat-pref-map-view.c:226 msgid "Show location information on the map" msgstr "" -#: ../src/sat-pref-map-view.c:244 +#: ../src/sat-pref-map-view.c:246 msgid "Show which satellite comes up next and at what time" msgstr "" #. Cursor position -#: ../src/sat-pref-map-view.c:261 ../src/sat-pref-polar-view.c:296 +#: ../src/sat-pref-map-view.c:263 ../src/sat-pref-polar-view.c:296 msgid "Cursor Position" -msgstr "" +msgstr "Position du curseur" -#: ../src/sat-pref-map-view.c:264 +#: ../src/sat-pref-map-view.c:266 msgid "Show the latitude and longitude of the mouse pointer" msgstr "" #. Grid -#: ../src/sat-pref-map-view.c:282 +#: ../src/sat-pref-map-view.c:284 msgid "Grid Lines" msgstr "" -#: ../src/sat-pref-map-view.c:285 +#: ../src/sat-pref-map-view.c:287 msgid "Show horizontal and vertical grid lines" msgstr "" @@ -4000,7 +4026,7 @@ #. Grid in case it is enabled #: ../src/sat-pref-map-view.c:364 msgid "Grid:" -msgstr "" +msgstr "Grille :" #: ../src/sat-pref-map-view.c:374 msgid "Click to select the grid colour" @@ -4018,7 +4044,7 @@ #. satellite #: ../src/sat-pref-map-view.c:418 ../src/sat-pref-polar-view.c:452 msgid "Satellite:" -msgstr "" +msgstr "Satellite :" #: ../src/sat-pref-map-view.c:428 ../src/sat-pref-polar-view.c:462 msgid "Click to select satellite colour" @@ -4069,11 +4095,33 @@ msgid "Click to select info text background colour" msgstr "" -#: ../src/sat-pref-map-view.c:602 +#. Shadow +#: ../src/sat-pref-map-view.c:581 +msgid "Shadow:" +msgstr "" + +#: ../src/sat-pref-map-view.c:586 +msgid "<i>Transparent</i>" +msgstr "" + +#: ../src/sat-pref-map-view.c:591 +msgid "<i>Strong</i>" +msgstr "" + +#: ../src/sat-pref-map-view.c:608 +msgid "" +"Specifies how strong the shadow under the satellite marker should be. The " +"shadow improves the visibility of the satellites where the colour of the " +"background is light, e.g. the South Pole.\n" +"\n" +"Transparent corresponds to no shadow." +msgstr "" + +#: ../src/sat-pref-map-view.c:637 msgid "Display ground track for" msgstr "" -#: ../src/sat-pref-map-view.c:624 +#: ../src/sat-pref-map-view.c:659 msgid "orbit(s)" msgstr "orbite(s)" @@ -4138,7 +4186,7 @@ #. background #: ../src/sat-pref-polar-view.c:371 msgid "Background:" -msgstr "" +msgstr "Arrière plan :" #: ../src/sat-pref-polar-view.c:381 ../src/sat-pref-polar-view.c:543 msgid "Click to select background colour" @@ -4168,9 +4216,8 @@ msgstr "" #: ../src/sat-pref-polar-view.c:582 -#, fuzzy msgid "<b>Miscellaneous:</b>" -msgstr "<b>Vues:</b>" +msgstr "<b>Divers:</b>" #. show sky tracks #: ../src/sat-pref-polar-view.c:590 @@ -4218,7 +4265,7 @@ #: ../src/sat-pref-qth.c:257 msgid "Default" -msgstr "" +msgstr "Par défaut" #: ../src/sat-pref-qth.c:319 #, c-format @@ -4487,11 +4534,15 @@ msgid "Duplex" msgstr "Duplex" -#: ../src/sat-pref-rig.c:750 +#: ../src/sat-pref-rig.c:718 ../src/sat-pref-rig-editor.c:211 +msgid "FT817/857/897" +msgstr "" + +#: ../src/sat-pref-rig.c:754 msgid "PTT" msgstr "PTT" -#: ../src/sat-pref-rig.c:753 +#: ../src/sat-pref-rig.c:757 msgid "DCD" msgstr "DCD" @@ -4531,37 +4582,45 @@ msgid "Duplex TRX" msgstr "" -#: ../src/sat-pref-rig-editor.c:214 +#: ../src/sat-pref-rig-editor.c:215 msgid "" "<b>RX only:</b> The radio shall only be used as receiver. If <i>Monitor PTT " "status</i> is checked the doppler tuning will be suspended while PTT is ON " "(manual TX). If not, the controller will always perform doppler tuning and " "you cannot use the same RIG for uplink.\n" +"\n" "<b>TX only:</b> The radio shall only be used for uplink. If <i>Monitor PTT " "status</i> is checked the doppler tuning will be suspended while PTT is OFF " "(manual RX).\n" +"\n" "<b>Simplex TRX... [truncated message content] |
From: <cs...@us...> - 2010-05-20 19:22:13
|
Revision: 617 http://gpredict.svn.sourceforge.net/gpredict/?rev=617&view=rev Author: csete Date: 2010-05-20 19:22:07 +0000 (Thu, 20 May 2010) Log Message: ----------- Applied patch 3002344: Remove Uninitialized Jump (Thanks to Charles Suprin AA1VS). Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/sgpsdp/sgp4sdp4.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-05-04 13:17:46 UTC (rev 616) +++ trunk/ChangeLog 2010-05-20 19:22:07 UTC (rev 617) @@ -1,3 +1,9 @@ +2010-05-20 Alexandru Csete <oz9aec at gmail.com> + + * src/sgpsdp/sgp4sdp4.c: + Applied patch 3002344: Remove Uninitialized Jump. + + 2010-05-04 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sky-at-glance.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-05-04 13:17:46 UTC (rev 616) +++ trunk/NEWS 2010-05-20 19:22:07 UTC (rev 617) @@ -30,6 +30,7 @@ - Applied patch 2945525: Sort list of modules in open module dialog (Thanks to Charles Suprin AA1VS). - Applied patch 2947459: Make Module List Scrollable (Thanks to Charles Suprin AA1VS). - Applied patch 2951724: Allow TX Doppler correction for FT-817, 857 and 897 (Thanks to Charles Suprin AA1VS). +- Applied patch 3002344: Remove Uninitialized Jump (Thanks to Charles Suprin AA1VS). - Slightly improved UI for the single-satellite view. - Command line options for cleaning user's TLE and transponder data, see --help for list. - Satellite Map: Added shadow to satellite marker and label to enhance visual appearance Modified: trunk/src/sgpsdp/sgp4sdp4.c =================================================================== --- trunk/src/sgpsdp/sgp4sdp4.c 2010-05-04 13:17:46 UTC (rev 616) +++ trunk/src/sgpsdp/sgp4sdp4.c 2010-05-20 19:22:07 UTC (rev 617) @@ -554,6 +554,7 @@ sinq = sin (sat->tle.xnodeo); cosq = cos (sat->tle.xnodeo); sat->dps.omegaq = sat->tle.omegao; + sat->dps.preep = 0; /* Initialize lunar solar terms */ day = sat->deep_arg.ds50 + 18261.5; /*Days since 1900 Jan 0.5*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |