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 ... [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, + ... [truncated message content] |
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, ... [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,... [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. |