mirror of
https://github.com/csete/gpredict
synced 2026-08-13 17:39:46 -04:00
Add hashes to support storing polar view sky track on and off.
git-svn-id: https://gpredict.svn.sourceforge.net/svnroot/gpredict/trunk@892 ab6734ba-2843-0410-b83b-99c217ef6c0f
This commit is contained in:
parent
496ec934b9
commit
39e52873b4
3 changed files with 33 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,4 +1,12 @@
|
|||
2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
|
||||
2011-08-26 Charles Suprin <hamaa1vs at gmail.com>
|
||||
|
||||
* ChangeLog
|
||||
* src/gtk-polar-view.h
|
||||
* src/gtk-polar-view.c
|
||||
Add hashes to support storing polar view sky track on and off.
|
||||
|
||||
|
||||
2011-08-23 Charles Suprin <hamaa1vs at gmail.com>
|
||||
|
||||
* ChangeLog
|
||||
* src/gtk-sat-module.c
|
||||
|
|
|
|||
|
|
@ -201,6 +201,16 @@ gtk_polar_view_new (GKeyFile *cfgdata, GHashTable *sats, qth_t *qth)
|
|||
g_free,
|
||||
NULL);
|
||||
|
||||
GTK_POLAR_VIEW (polv)->showtracks_on = g_hash_table_new_full (g_int_hash,
|
||||
g_int_equal,
|
||||
g_free,
|
||||
NULL);
|
||||
|
||||
GTK_POLAR_VIEW (polv)->showtracks_off = g_hash_table_new_full (g_int_hash,
|
||||
g_int_equal,
|
||||
g_free,
|
||||
NULL);
|
||||
|
||||
/* get settings */
|
||||
GTK_POLAR_VIEW (polv)->refresh = mod_cfg_get_int (cfgdata,
|
||||
MOD_CFG_POLAR_SECTION,
|
||||
|
|
@ -832,7 +842,7 @@ update_sat (gpointer key, gpointer value, gpointer data)
|
|||
}
|
||||
|
||||
/* free pass info */
|
||||
free_pass (obj->pass);
|
||||
//free_pass (obj->pass);
|
||||
obj->pass=NULL;
|
||||
|
||||
/* if this was the selected satellite we need to
|
||||
|
|
@ -842,7 +852,7 @@ update_sat (gpointer key, gpointer value, gpointer data)
|
|||
g_object_set (polv->sel, "text", "", NULL);
|
||||
}
|
||||
|
||||
g_free (obj);
|
||||
// g_free (obj);
|
||||
|
||||
/* remove sat object from hash table */
|
||||
g_hash_table_remove (polv->obj, catnum);
|
||||
|
|
@ -946,7 +956,15 @@ update_sat (gpointer key, gpointer value, gpointer data)
|
|||
if ( obj != NULL) {
|
||||
/* space was allocated now use it */
|
||||
obj->selected = FALSE;
|
||||
obj->showtrack = polv->showtrack;
|
||||
|
||||
if (g_hash_table_lookup_extended(polv->showtracks_on,catnum,NULL,NULL)){
|
||||
obj->showtrack = TRUE;
|
||||
}
|
||||
else if (g_hash_table_lookup_extended(polv->showtracks_off,catnum,NULL,NULL)){
|
||||
obj->showtrack = FALSE;
|
||||
} else {
|
||||
obj->showtrack = polv->showtrack;
|
||||
}
|
||||
obj->istarget = FALSE;
|
||||
|
||||
root = goo_canvas_get_root_item_model (GOO_CANVAS (polv->canvas));
|
||||
|
|
|
|||
|
|
@ -104,6 +104,9 @@ struct _GtkPolarView
|
|||
GooCanvasItemModel *next; /*!< next event text */
|
||||
GooCanvasItemModel *sel; /*!< Text showing info about selected satellite. */
|
||||
|
||||
GHashTable *showtracks_on;
|
||||
GHashTable *showtracks_off;
|
||||
|
||||
gdouble naos; /*!< Next event time */
|
||||
gint ncat; /*!< Next event catnum */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue