Thread: [Gpredict-svn] SF.net SVN: gpredict:[156] trunk/src/gtk-sat-module-popup.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <cs...@us...> - 2008-10-25 17:55:43
|
Revision: 156
http://gpredict.svn.sourceforge.net/gpredict/?rev=156&view=rev
Author: csete
Date: 2008-10-25 17:55:36 +0000 (Sat, 25 Oct 2008)
Log Message:
-----------
Use real time or simulated time for sky at glance start depending on user settings.
Modified Paths:
--------------
trunk/src/gtk-sat-module-popup.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2008-10-25 17:55:05 UTC (rev 155)
+++ trunk/src/gtk-sat-module-popup.c 2008-10-25 17:55:36 UTC (rev 156)
@@ -841,7 +841,14 @@
/* create sky at a glance widget */
module->busy = TRUE;
- skg = gtk_sky_glance_new (module->satellites, module->qth);
+
+ if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) {
+ skg = gtk_sky_glance_new (module->satellites, module->qth, 0.0);
+ }
+ else {
+ skg = gtk_sky_glance_new (module->satellites, module->qth, module->tmgCdnum);
+ }
+
module->busy = FALSE;
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2009-08-06 13:55:29
|
Revision: 372
http://gpredict.svn.sourceforge.net/gpredict/?rev=372&view=rev
Author: csete
Date: 2009-08-06 13:38:16 +0000 (Thu, 06 Aug 2009)
Log Message:
-----------
Migrated to new user configuration.
Modified Paths:
--------------
trunk/src/gtk-sat-module-popup.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2009-08-06 13:29:37 UTC (rev 371)
+++ trunk/src/gtk-sat-module-popup.c 2009-08-06 13:38:16 UTC (rev 372)
@@ -360,15 +360,12 @@
gtk_entry_get_text (GTK_ENTRY (entry)));
/* build full file names */
- source = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
- ".gpredict2", G_DIR_SEPARATOR_S,
- "modules", G_DIR_SEPARATOR_S,
- module->name, ".mod", NULL);
- target = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
- ".gpredict2", G_DIR_SEPARATOR_S,
- "modules", G_DIR_SEPARATOR_S,
- gtk_entry_get_text (GTK_ENTRY (entry)),
- ".mod", NULL);
+ 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);
/* copy file */
if (gpredict_file_copy (source, target)) {
@@ -377,9 +374,9 @@
__FILE__, __LINE__, module->name);
}
else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s:%d: Successfully cloned %s."),
- __FILE__, __LINE__, module->name);
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s:%d: Successfully cloned %s."),
+ __FILE__, __LINE__, module->name);
/* open module if requested */
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) {
@@ -1046,14 +1043,13 @@
{
gchar *file;
GtkWidget *dialog;
- //GtkWidget *parent = gtk_widget_get_toplevel (GTK_WIDGET (data));
+ gchar *moddir;
+ moddir = get_modules_dir ();
+ file = g_strconcat (moddir, G_DIR_SEPARATOR_S,
+ GTK_SAT_MODULE (data)->name, ".mod", NULL);
+ g_free (moddir);
- file = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
- ".gpredict2", G_DIR_SEPARATOR_S,
- "modules", G_DIR_SEPARATOR_S,
- GTK_SAT_MODULE (data)->name, ".mod", NULL);
-
gtk_sat_module_close_cb (menuitem, data);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-01-11 22:37:26
|
Revision: 587
http://gpredict.svn.sourceforge.net/gpredict/?rev=587&view=rev
Author: csete
Date: 2010-01-11 22:37:19 +0000 (Mon, 11 Jan 2010)
Log Message:
-----------
Change menu item to 'Exit full screen' and someminor cleaning.
Modified Paths:
--------------
trunk/src/gtk-sat-module-popup.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2010-01-11 22:35:18 UTC (rev 586)
+++ trunk/src/gtk-sat-module-popup.c 2010-01-11 22:37:19 UTC (rev 587)
@@ -75,8 +75,7 @@
* parent.
*
*/
-void
- gtk_sat_module_popup (GtkSatModule *module)
+void gtk_sat_module_popup (GtkSatModule *module)
{
GtkWidget *menu;
GtkWidget *menuitem;
@@ -121,7 +120,7 @@
if (module->state == GTK_SAT_MOD_STATE_FULLSCREEN) {
- menuitem = gtk_image_menu_item_new_with_label (_("Leave fullscreen"));
+ menuitem = gtk_image_menu_item_new_with_label (_("Exit full screen"));
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);
@@ -130,7 +129,7 @@
G_CALLBACK (screen_state_cb), module);
}
else {
- menuitem = gtk_image_menu_item_new_with_label (_("Fullscreen"));
+ menuitem = gtk_image_menu_item_new_with_label (_("Full screen"));
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);
@@ -243,8 +242,7 @@
* wrapper for gtk_sat_module_config_cb
*
*/
-static void
- config_cb (GtkWidget *menuitem, gpointer data)
+static void config_cb (GtkWidget *menuitem, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
@@ -279,8 +277,7 @@
* possibility to override this in the dialog window.
*
*/
-static void
- clone_cb (GtkWidget *menuitem, gpointer data)
+static void clone_cb (GtkWidget *menuitem, gpointer data)
{
GtkWidget *dialog;
GtkWidget *entry;
@@ -466,8 +463,7 @@
* The text of the menu item will be changed corresponding to the
* action that has been performed.
*/
-static void
- docking_state_cb (GtkWidget *menuitem, gpointer data)
+static void docking_state_cb (GtkWidget *menuitem, gpointer data)
{
GtkWidget *module = GTK_WIDGET (data);
gint w,h;
@@ -637,8 +633,7 @@
* This function is intended to toggle between FULLSCREEN
* and WINDOW state.
*/
-static void
- screen_state_cb (GtkWidget *menuitem, gpointer data)
+static void screen_state_cb (GtkWidget *menuitem, gpointer data)
{
GtkWidget *module = GTK_WIDGET (data);
gint w,h;
@@ -758,8 +753,7 @@
* in that it will make the predictions with the satellites
* tracked in the current module.
*/
-static void
- sky_at_glance_cb (GtkWidget *menuitem, gpointer data)
+static void sky_at_glance_cb (GtkWidget *menuitem, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
GtkWidget *skg;
@@ -801,8 +795,7 @@
}
/** \brief Open time manager. */
-static void
- tmgr_cb (GtkWidget *menuitem, gpointer data)
+static void tmgr_cb (GtkWidget *menuitem, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
@@ -813,8 +806,7 @@
* \param menuitem The menuitem that was selected.
* \param data Pointer the GtkSatModule.
*/
-static void
- rigctrl_cb (GtkWidget *menuitem, gpointer data)
+static void rigctrl_cb (GtkWidget *menuitem, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
gchar *buff;
@@ -872,8 +864,7 @@
*
* This function is called automatically when the window is destroyed.
*/
-static void
- destroy_rigctrl (GtkWidget *window, gpointer data)
+static void destroy_rigctrl (GtkWidget *window, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
@@ -886,8 +877,7 @@
* \param menuitem The menuitem that was selected.
* \param data Pointer the GtkSatModule.
*/
-static void
- rotctrl_cb (GtkWidget *menuitem, gpointer data)
+static void rotctrl_cb (GtkWidget *menuitem, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
gchar *buff;
@@ -944,8 +934,7 @@
*
* This function is called automatically when the window is destroyed.
*/
-static void
- destroy_rotctrl (GtkWidget *window, gpointer data)
+static void destroy_rotctrl (GtkWidget *window, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
@@ -954,8 +943,7 @@
}
/* ensure that deleted top-level windows are destroyed */
-static gint
- window_delete (GtkWidget *widget,
+static gint window_delete (GtkWidget *widget,
GdkEvent *event,
gpointer data)
{
@@ -970,8 +958,7 @@
* item in the GtkSatModule popup menu. It is simply a wrapper
* for gtk_sat_module_close_cb, which will close the current module.
*/
-static void
- close_cb (GtkWidget *menuitem, gpointer data)
+static void close_cb (GtkWidget *menuitem, gpointer data)
{
gtk_sat_module_close_cb (menuitem, data);
}
@@ -983,8 +970,7 @@
* with gtk_sat_module_close_cb, which will close the current module,
* whereafter the module file will be deleted from the disk.
*/
-static void
- delete_cb (GtkWidget *menuitem, gpointer data)
+static void delete_cb (GtkWidget *menuitem, gpointer data)
{
gchar *file;
GtkWidget *dialog;
@@ -1040,8 +1026,7 @@
* The primary purpose of this function is to check whether the char length
* of the name is greater than zero, if yes enable the OK button of the dialog.
*/
-static void
- name_changed (GtkWidget *widget, gpointer data)
+static void name_changed (GtkWidget *widget, gpointer data)
{
const gchar *text;
gchar *entry, *end, *j;
@@ -1111,8 +1096,7 @@
* \note The logic in the code has been borrowed from gaim/pidgin http://pidgin.im/
*
*/
-gboolean
- module_window_config_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
+gboolean module_window_config_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
{
gint x, y;
GtkSatModule *module = GTK_SAT_MODULE (data);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-10-16 13:27:08
|
Revision: 685
http://gpredict.svn.sourceforge.net/gpredict/?rev=685&view=rev
Author: csete
Date: 2010-10-16 13:27:01 +0000 (Sat, 16 Oct 2010)
Log Message:
-----------
Allow only one GtkSkyGlance widget per module (consistent with GtkRigCtrl and GtkRotCtrl).
Modified Paths:
--------------
trunk/src/gtk-sat-module-popup.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2010-10-16 10:43:22 UTC (rev 684)
+++ trunk/src/gtk-sat-module-popup.c 2010-10-16 13:27:01 UTC (rev 685)
@@ -796,8 +796,10 @@
else {
module->skg = gtk_sky_glance_new (module->satellites, module->qth, module->tmgCdnum);
}
-
+ /* store time at which GtkSkyGlance has been created */
+ module->lastSkgUpd = module->tmgCdnum;
+
gtk_container_set_border_width (GTK_CONTAINER (module->skgwin), 10);
gtk_container_add (GTK_CONTAINER (module->skgwin), module->skg);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 21:50:58
|
Revision: 865
http://gpredict.svn.sourceforge.net/gpredict/?rev=865&view=rev
Author: aa1vs
Date: 2011-07-15 21:50:52 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-sat-module-popup.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2011-07-15 21:43:18 UTC (rev 864)
+++ trunk/src/gtk-sat-module-popup.c 2011-07-15 21:50:52 UTC (rev 865)
@@ -320,6 +320,7 @@
gchar *icon; /* icon file name */
gchar *title; /* window title */
+ (void) menuitem; /* avoid unused parameter compiler warning */
dialog = gtk_dialog_new_with_buttons (_("Clone Module"),
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (module))),
@@ -499,8 +500,8 @@
gchar *icon; /* icon file name */
gchar *title; /* window title */
+ (void) menuitem; /* avoid unused parameter compiler warning */
-
switch (GTK_SAT_MODULE (module)->state) {
case GTK_SAT_MOD_STATE_DOCKED:
@@ -669,6 +670,7 @@
gchar *icon; /* icon file name */
gchar *title; /* window title */
+ (void) menuitem; /* avoid unused parameter compiler warning */
switch (GTK_SAT_MODULE (module)->state) {
@@ -806,6 +808,7 @@
//GtkWidget *window;
gchar *buff;
+ (void) menuitem; /* avoid unused parameter compiler warning */
/* if module is busy wait until done then go on */
g_mutex_lock(module->busy);
@@ -858,7 +861,9 @@
static void tmgr_cb (GtkWidget *menuitem, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
-
+
+ (void) menuitem; /* avoid unused parameter compiler warning */
+
tmg_create (module);
}
@@ -871,6 +876,8 @@
GtkSatModule *module = GTK_SAT_MODULE (data);
gchar *buff;
+ (void) menuitem; /* avoid unused parameter compiler warning */
+
if (module->rigctrlwin != NULL) {
/* there is already a roto controller for this module */
gtk_window_present (GTK_WINDOW (module->rigctrlwin));
@@ -928,6 +935,8 @@
{
GtkSatModule *module = GTK_SAT_MODULE (data);
+ (void) window; /* avoid unused parameter compiler warning */
+
module->rigctrlwin = NULL;
module->rigctrl = NULL;
}
@@ -942,6 +951,8 @@
GtkSatModule *module = GTK_SAT_MODULE (data);
gchar *buff;
+ (void) menuitem; /* avoid unused parameter compiler warning */
+
if (module->rotctrlwin != NULL) {
/* there is already a roto controller for this module */
gtk_window_present (GTK_WINDOW (module->rotctrlwin));
@@ -998,6 +1009,8 @@
{
GtkSatModule *module = GTK_SAT_MODULE (data);
+ (void) window; /* avoid unused parameter compiler warning */
+
module->rotctrlwin = NULL;
module->rotctrl = NULL;
}
@@ -1012,7 +1025,9 @@
static void destroy_skg (GtkWidget *window, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
-
+
+ (void) window; /* avoid unused parameter compiler warning */
+
module->skgwin = NULL;
module->skg = NULL;
}
@@ -1023,6 +1038,10 @@
GdkEvent *event,
gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) event; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
return FALSE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|