gpredict-svn Mailing List for Gpredict (Page 4)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
You can subscribe to this list here.
| 2008 |
Jan
(24) |
Feb
|
Mar
(6) |
Apr
(14) |
May
(9) |
Jun
|
Jul
|
Aug
(25) |
Sep
(60) |
Oct
(26) |
Nov
|
Dec
(20) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
(2) |
Mar
(22) |
Apr
(61) |
May
(57) |
Jun
|
Jul
(3) |
Aug
(83) |
Sep
(35) |
Oct
(50) |
Nov
(28) |
Dec
(34) |
| 2010 |
Jan
(29) |
Feb
(15) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(2) |
Jul
(24) |
Aug
(2) |
Sep
(9) |
Oct
(43) |
Nov
(22) |
Dec
(6) |
| 2011 |
Jan
(24) |
Feb
(22) |
Mar
(31) |
Apr
(13) |
May
(10) |
Jun
(10) |
Jul
(43) |
Aug
(12) |
Sep
(18) |
Oct
(33) |
Nov
(18) |
Dec
(4) |
|
From: <aa...@us...> - 2011-08-21 14:00:25
|
Revision: 890
http://gpredict.svn.sourceforge.net/gpredict/?rev=890&view=rev
Author: aa1vs
Date: 2011-08-21 14:00:19 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Fix cut and paste error.
Modified Paths:
--------------
trunk/src/tle-update.c
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-21 13:43:29 UTC (rev 889)
+++ trunk/src/tle-update.c 2011-08-21 14:00:19 UTC (rev 890)
@@ -1063,6 +1063,9 @@
if (!g_regex_match_simple ("\\d{4,}-\\d{3,}",ntle->satname,0,0)) {
if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satname,0,0)) {
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Data for %d updated for name."),
+ __FUNCTION__, catnr);
g_key_file_set_string (satdata, "Satellite", "NAME", ntle->satname);
updateddata = TRUE;
}
@@ -1072,6 +1075,9 @@
/* clobber if nickname and name were same before */
/* clobber if international designator */
if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satnickname,0,0)) {
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Data for %d updated for nickname."),
+ __FUNCTION__, catnr);
g_key_file_set_string (satdata, "Satellite", "NICKNAME", ntle->satname);
updateddata = TRUE;
}
@@ -1084,9 +1090,12 @@
if (tle.epoch < ntle->epoch) {
/* new data is newer than what we already have */
/* store new data */
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Data for %d updated for tle."),
+ __FUNCTION__, catnr);
g_key_file_set_string (satdata, "Satellite", "TLE1", ntle->line1);
g_key_file_set_string (satdata, "Satellite", "TLE2", ntle->line2);
- updated = TRUE;
+ updateddata = TRUE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-21 13:43:35
|
Revision: 889
http://gpredict.svn.sourceforge.net/gpredict/?rev=889&view=rev
Author: aa1vs
Date: 2011-08-21 13:43:29 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Updates TODO.
Modified Paths:
--------------
trunk/ChangeLog
trunk/TODO
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-21 13:42:32 UTC (rev 888)
+++ trunk/ChangeLog 2011-08-21 13:43:29 UTC (rev 889)
@@ -8,6 +8,9 @@
* src/gtk-sat-tree.c
Eliminates use of deprecated tooltips code.
+ * ChangeLog
+ * TODO
+ Updates TODO.
2011-08-20 Charles Suprin <hamaa1vs at gmail.com>
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-08-21 13:42:32 UTC (rev 888)
+++ trunk/TODO 2011-08-21 13:43:29 UTC (rev 889)
@@ -23,8 +23,6 @@
* Predict satellite parameters over a given time period (Tools).
* Solar illumination prediction.
* Treat Sun and Moon as satellites.
-* Improve time controller to have tuning-like behaviour, i.e. when
- minutes flip from 59 to 0 the hour is incremented.
* Toggle the ground track on and off for all the satellites on the map.
* New layout engine allowing any number of views per module.
* SpaceView: New view show the satellites using a movable camera in space.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-21 13:42:38
|
Revision: 888
http://gpredict.svn.sourceforge.net/gpredict/?rev=888&view=rev
Author: aa1vs
Date: 2011-08-21 13:42:32 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Eliminates use of deprecated tooltips code.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-tree.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-21 13:40:23 UTC (rev 887)
+++ trunk/ChangeLog 2011-08-21 13:42:32 UTC (rev 888)
@@ -4,7 +4,11 @@
* src/tle-update.c
Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
+ * ChangeLog
+ * src/gtk-sat-tree.c
+ Eliminates use of deprecated tooltips code.
+
2011-08-20 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-tree.c
===================================================================
--- trunk/src/gtk-sat-tree.c 2011-08-21 13:40:23 UTC (rev 887)
+++ trunk/src/gtk-sat-tree.c 2011-08-21 13:42:32 UTC (rev 888)
@@ -265,17 +265,13 @@
/* expand and collabse buttons */
expbut = gtk_button_new_with_label (_("Expand"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, expbut,
- _("Expand all nodes in the tree to make it searchable"),
- NULL);
+ gtk_widget_set_tooltip_text (expbut,
+ _("Expand all nodes in the tree to make it searchable"));
g_signal_connect (expbut, "clicked", G_CALLBACK (expand_cb), sat_tree);
colbut = gtk_button_new_with_label (_("Collapse"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, colbut,
- _("Collapse all nodes in the tree"),
- NULL);
+ gtk_widget_set_tooltip_text (colbut,
+ _("Collapse all nodes in the tree"));
g_signal_connect (colbut, "clicked", G_CALLBACK (collapse_cb), sat_tree);
hbox = gtk_hbutton_box_new ();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-21 13:40:29
|
Revision: 887
http://gpredict.svn.sourceforge.net/gpredict/?rev=887&view=rev
Author: aa1vs
Date: 2011-08-21 13:40:23 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-20 21:24:50 UTC (rev 886)
+++ trunk/ChangeLog 2011-08-21 13:40:23 UTC (rev 887)
@@ -1,3 +1,10 @@
+2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
+
+
2011-08-20 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-20 21:24:50 UTC (rev 886)
+++ trunk/src/tle-update.c 2011-08-21 13:40:23 UTC (rev 887)
@@ -852,6 +852,11 @@
b = fgets (tle_str[1], 80, fp);
b = fgets (tle_str[2], 80, fp);
+ /* remove leading and trailing whitespace to be more forgiving */
+ g_strstrip(tle_str[0]);
+ g_strstrip(tle_str[1]);
+ g_strstrip(tle_str[2]);
+
tle_str[1][69] = '\0';
tle_str[2][69] = '\0';
@@ -1035,7 +1040,7 @@
tlestr1 = g_key_file_get_string (satdata, "Satellite", "TLE1", NULL);
tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL);
satname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
- satnickname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
+ satnickname = g_key_file_get_string (satdata, "Satellite", "NICKNAME", NULL);
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
if (!Good_Elements (rawtle)) {
@@ -1048,7 +1053,10 @@
g_free (tlestr1);
g_free (tlestr2);
g_free (rawtle);
+
+ /* Initialize flag for update */
updateddata = FALSE;
+
if (ntle->satname != NULL) {
/* when a satellite first appears in the elements it is sometimes refered to by the
international designator which is awkward after it is given a name */
@@ -1069,6 +1077,10 @@
}
}
}
+
+ g_free(satname);
+ g_free(satnickname);
+
if (tle.epoch < ntle->epoch) {
/* new data is newer than what we already have */
/* store new data */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-20 21:24:56
|
Revision: 886
http://gpredict.svn.sourceforge.net/gpredict/?rev=886&view=rev
Author: aa1vs
Date: 2011-08-20 21:24:50 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
Updates satellite name and nickname if of form YYYY-NNNAAA indicating first TLE downloaded before celestrak used given name and improves error reporting.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-09 23:35:43 UTC (rev 885)
+++ trunk/ChangeLog 2011-08-20 21:24:50 UTC (rev 886)
@@ -1,3 +1,10 @@
+2011-08-20 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Updates satellite name and nickname if of form YYYY-NNNAAA indicating first TLE downloaded before celestrak used given name and improves error reporting.
+
+
2011-08-09 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-09 23:35:43 UTC (rev 885)
+++ trunk/src/tle-update.c 2011-08-20 21:24:50 UTC (rev 886)
@@ -636,6 +636,10 @@
}
fclose (outfile);
+ } else {
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Failed to open %s preventing update"),
+ __FUNCTION__, locfile);
}
/* update progress indicator */
if (!silent && (progress != NULL)) {
@@ -981,10 +985,11 @@
new_tle_t *ntle;
GError *error = NULL;
GKeyFile *satdata;
- gchar *tlestr1, *tlestr2, *rawtle;
+ gchar *tlestr1, *tlestr2, *rawtle, *satname, *satnickname;
gchar *cfgstr;
GIOChannel *cfgfile;
gsize length, written;
+ gboolean updateddata;
/* open input file (file containing old tle) */
@@ -1029,6 +1034,8 @@
/* get TLE data */
tlestr1 = g_key_file_get_string (satdata, "Satellite", "TLE1", NULL);
tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL);
+ satname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
+ satnickname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
if (!Good_Elements (rawtle)) {
@@ -1041,13 +1048,37 @@
g_free (tlestr1);
g_free (tlestr2);
g_free (rawtle);
-
+ updateddata = FALSE;
+ if (ntle->satname != NULL) {
+ /* when a satellite first appears in the elements it is sometimes refered to by the
+ international designator which is awkward after it is given a name */
+ if (!g_regex_match_simple ("\\d{4,}-\\d{3,}",ntle->satname,0,0)) {
+
+ if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satname,0,0)) {
+ g_key_file_set_string (satdata, "Satellite", "NAME", ntle->satname);
+ updateddata = TRUE;
+ }
+
+ /* FIXME what to do about nickname Possibilities: */
+ /* clobber with name */
+ /* clobber if nickname and name were same before */
+ /* clobber if international designator */
+ if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satnickname,0,0)) {
+ g_key_file_set_string (satdata, "Satellite", "NICKNAME", ntle->satname);
+ updateddata = TRUE;
+ }
+ }
+ }
if (tle.epoch < ntle->epoch) {
/* new data is newer than what we already have */
/* store new data */
g_key_file_set_string (satdata, "Satellite", "TLE1", ntle->line1);
g_key_file_set_string (satdata, "Satellite", "TLE2", ntle->line2);
+ updated = TRUE;
+ }
+
+ if (updateddata ==TRUE) {
/* convert configuration data struct to charachter string */
cfgstr = g_key_file_to_data (satdata, &length, NULL); /* this function never reports error */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-09 23:35:50
|
Revision: 885
http://gpredict.svn.sourceforge.net/gpredict/?rev=885&view=rev
Author: aa1vs
Date: 2011-08-09 23:35:43 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
Refactors code that stores per satellite show track and highlight coverage.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-map.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-09 23:30:00 UTC (rev 884)
+++ trunk/ChangeLog 2011-08-09 23:35:43 UTC (rev 885)
@@ -13,7 +13,11 @@
* src/Makefile.am
Eliminates DATADIR from defines to avoid mingw32 problem with winsock.
+ * ChangeLog
+ * src/gtk-sat-map.c
+ Refactors code that stores per satellite show track and highlight coverage.
+
2011-08-04 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-08-09 23:30:00 UTC (rev 884)
+++ trunk/src/gtk-sat-map.c 2011-08-09 23:35:43 UTC (rev 885)
@@ -108,10 +108,13 @@
static void redraw_grid_lines (GtkSatMap *satmap);
static gchar *aoslos_time_to_str (GtkSatMap *satmap, sat_t *sat);
static void gtk_sat_map_load_showtracks (GtkSatMap *map);
+static void gtk_sat_map_store_showtracks (GtkSatMap *satmap);
static void gtk_sat_map_load_hide_coverages (GtkSatMap *map);
+static void gtk_sat_map_store_hidecovs (GtkSatMap *satmap);
static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest);
static void store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey);
+
static GtkVBoxClass *parent_class = NULL;
static GooCanvasPoints *points1;
static GooCanvasPoints *points2;
@@ -199,18 +202,10 @@
static void
gtk_sat_map_destroy (GtkObject *object)
{
- gint *showtrack;
- gint *something;
- gint i,length;
- store_binary_hash_cfgdata(GTK_SAT_MAP(object)->cfgdata,
- GTK_SAT_MAP(object)->showtracks,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_SHOWTRACKS);
- store_binary_hash_cfgdata(GTK_SAT_MAP(object)->cfgdata,
- GTK_SAT_MAP(object)->hidecovs,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_HIDECOVS);
-
+ gtk_sat_map_store_showtracks (GTK_SAT_MAP(object));
+
+ gtk_sat_map_store_hidecovs (GTK_SAT_MAP(object));
+
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -1829,13 +1824,13 @@
obj->selected = FALSE;
- if (g_hash_table_lookup(satmap->showtracks,catnum)==NULL) {
+ if (!g_hash_table_lookup_extended(satmap->showtracks,catnum,NULL,NULL)) {
obj->showtrack = FALSE;
} else {
obj->showtrack = TRUE;
}
- if (g_hash_table_lookup(satmap->hidecovs,catnum)==NULL) {
+ if (!g_hash_table_lookup_extended(satmap->hidecovs,catnum,NULL,NULL)) {
obj->showcov = TRUE;
} else {
obj->showcov = FALSE;
@@ -2604,8 +2599,24 @@
MOD_CFG_MAP_SECTION,
MOD_CFG_MAP_SHOWTRACKS,
satmap->showtracks);
+
}
+static void
+gtk_sat_map_store_showtracks (GtkSatMap *satmap) {
+ store_binary_hash_cfgdata(satmap->cfgdata,
+ satmap->showtracks,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_SHOWTRACKS);
+}
+static void
+gtk_sat_map_store_hidecovs (GtkSatMap *satmap) {
+ store_binary_hash_cfgdata(satmap->cfgdata,
+ satmap->hidecovs,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_HIDECOVS);
+}
+
/** \brief Load the satellites that we should not highlight coverage */
static void
gtk_sat_map_load_hide_coverages (GtkSatMap *satmap)
@@ -2617,7 +2628,8 @@
}
/** \brief Load an integer list into a hash table that uses the
- data in the hash as a boolean
+ existinence of datain the hash as a boolean.
+ It loads NULL's into the hash table.
*/
static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest) {
gint *sats = NULL;
@@ -2651,17 +2663,18 @@
tkey = g_new0 (guint, 1);
*tkey = sats[i];
//printf("loading sat %d\n",sats[i]);
- if (g_hash_table_lookup (dest, tkey) == NULL) {
+ if (!(g_hash_table_lookup_extended (dest, tkey, NULL, NULL))) {
/* just add a one to the value so there is presence indicator */
g_hash_table_insert (dest,
tkey,
- (gpointer)0x1);
+ NULL);
}
}
g_free(sats);
}
-/** \brief Convert the "boolean" hash back into an integer list and save it. */
+/** \brief Convert the "boolean" hash back into an integer list and
+ save it to the cfgdata. */
static void
store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey)
{
@@ -2691,4 +2704,6 @@
cfgkey,
NULL);
}
+
+ g_list_free (keys);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-09 23:30:07
|
Revision: 884
http://gpredict.svn.sourceforge.net/gpredict/?rev=884&view=rev
Author: aa1vs
Date: 2011-08-09 23:30:00 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
Eliminates DATADIR from defines to avoid mingw32 problem with winsock.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-09 23:23:53 UTC (rev 883)
+++ trunk/ChangeLog 2011-08-09 23:30:00 UTC (rev 884)
@@ -9,7 +9,11 @@
* src/gtk-rot-ctrl.c
Fixes bug 3271573: Track button in rotator controller has no effect.
+ * ChangeLog
+ * src/Makefile.am
+ Eliminates DATADIR from defines to avoid mingw32 problem with winsock.
+
2011-08-04 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2011-08-09 23:23:53 UTC (rev 883)
+++ trunk/src/Makefile.am 2011-08-09 23:30:00 UTC (rev 884)
@@ -4,7 +4,6 @@
INCLUDES = \
@PACKAGE_CFLAGS@ -I.. \
- -DDATADIR=\""$(datadir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)/gpredict"\" \
-DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/gpredict"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/share/locale"\"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-09 23:23:59
|
Revision: 883
http://gpredict.svn.sourceforge.net/gpredict/?rev=883&view=rev
Author: aa1vs
Date: 2011-08-09 23:23:53 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
Fixes bug 3271573: Track button in rotator controller has no effect.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-rot-ctrl.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-09 23:11:33 UTC (rev 882)
+++ trunk/ChangeLog 2011-08-09 23:23:53 UTC (rev 883)
@@ -4,7 +4,12 @@
* src/tle-update.c
Use newest tle available in file tle update.
+ * ChangeLog
+ * NEWS
+ * src/gtk-rot-ctrl.c
+ Fixes bug 3271573: Track button in rotator controller has no effect.
+
2011-08-04 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-08-09 23:11:33 UTC (rev 882)
+++ trunk/NEWS 2011-08-09 23:23:53 UTC (rev 883)
@@ -11,6 +11,7 @@
- Fixed bug 3309110: 100% on manual time adjustment.
- Fixed bug 3272993: Issue controlling Yaesu FT-847.
- Fixed bug 3334657: Old log files not being saved.
+- Fixed bug 3271573: Track button in rotator controller has no effect.
Changes in version 1.3 (1 Mar 2011)
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2011-08-09 23:11:33 UTC (rev 882)
+++ trunk/src/gtk-rot-ctrl.c 2011-08-09 23:23:53 UTC (rev 883)
@@ -930,12 +930,17 @@
if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) {
setaz = setaz- 360.0;
}
+ if (!(ctrl->engaged)) {
+ gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), setaz);
+ gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), setel);
+ }
} else {
setaz = gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet));
setel = gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet));
}
+
if ((ctrl->engaged) && (ctrl->conf != NULL)) {
/* read back current value from device */
@@ -1038,7 +1043,7 @@
setaz = sat->az;
}
}
-
+
/* send controller values to rotator device */
/* this is the newly computed value which should be ahead of the current position */
if (!set_pos (ctrl, setaz, setel)) {
@@ -1063,7 +1068,7 @@
_("%s: MAX_ERROR_COUNT (%d) reached. Disengaging device!"),
__FUNCTION__, MAX_ERROR_COUNT);
ctrl->errcnt = 0;
- g_print ("ERROR. WROPS: %d RDOPS: %d\n", ctrl->wrops, ctrl->rdops);
+ //g_print ("ERROR. WROPS: %d RDOPS: %d\n", ctrl->wrops, ctrl->rdops);
}
else {
/* increment error counter */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-09 23:11:39
|
Revision: 882
http://gpredict.svn.sourceforge.net/gpredict/?rev=882&view=rev
Author: aa1vs
Date: 2011-08-09 23:11:33 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
Use newest tle available in file tle update.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-05 00:46:59 UTC (rev 881)
+++ trunk/ChangeLog 2011-08-09 23:11:33 UTC (rev 882)
@@ -1,3 +1,10 @@
+2011-08-09 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Use newest tle available in file tle update.
+
+
2011-08-04 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-05 00:46:59 UTC (rev 881)
+++ trunk/src/tle-update.c 2011-08-09 23:11:33 UTC (rev 882)
@@ -891,11 +891,28 @@
ntle->srcfile = g_strdup (fnam);
ntle->isnew = TRUE; /* flag will be reset when using data */
-
g_hash_table_insert (data, key, ntle);
retcode++;
}
else {
+ /* if the satellite in the hash is older than
+ the one just loaded, copy the values over. */
+ ntle = g_hash_table_lookup (data, key);
+
+ if (ntle->epoch <tle.epoch) {
+ ntle->catnum = catnr;
+ ntle->epoch = tle.epoch;
+ g_free (ntle->satname);
+ ntle->satname = g_strdup (g_strchomp(tle_str[0]));
+ g_free (ntle->line1);
+ ntle->line1 = g_strdup (tle_str[1]);
+ g_free (ntle->line2);
+ ntle->line2 = g_strdup (tle_str[2]);
+ g_free (ntle->srcfile);
+ ntle->srcfile = g_strdup (fnam);
+ ntle->isnew = TRUE; /* flag will be reset when using data */
+ }
+ /* free the key since we do not commit it to the cache */
g_free (key);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-05 00:47:05
|
Revision: 881
http://gpredict.svn.sourceforge.net/gpredict/?rev=881&view=rev
Author: aa1vs
Date: 2011-08-05 00:46:59 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
Remember ground tracks and highlight coverages in map view.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/config-keys.h
trunk/src/gtk-sat-map-popup.c
trunk/src/gtk-sat-map.c
trunk/src/gtk-sat-map.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-07-31 12:26:07 UTC (rev 880)
+++ trunk/ChangeLog 2011-08-05 00:46:59 UTC (rev 881)
@@ -1,3 +1,13 @@
+2011-08-04 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/gtk-sat-map.c
+ * src/gtk-sat-map.h
+ * src/gtk-sat-map-popup.c
+ * src/config-keys.h
+ Remember ground tracks and highlight coverages in map view.
+ Feature Request: 3179738
+
2011-07-31 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-rot-knob.c
Modified: trunk/src/config-keys.h
===================================================================
--- trunk/src/config-keys.h 2011-07-31 12:26:07 UTC (rev 880)
+++ trunk/src/config-keys.h 2011-08-05 00:46:59 UTC (rev 881)
@@ -106,6 +106,8 @@
#define MOD_CFG_MAP_TRACK_NUM "TRACK_NUMBER"
#define MOD_CFG_MAP_KEEP_RATIO "KEEP_RATIO"
#define MOD_CFG_MAP_SHADOW_ALPHA "SHADOW_ALPHA"
+#define MOD_CFG_MAP_SHOWTRACKS "SHOWTRACKS"
+#define MOD_CFG_MAP_HIDECOVS "HIDECOVS"
/* polar view specific */
#define MOD_CFG_POLAR_SECTION "POLAR"
Modified: trunk/src/gtk-sat-map-popup.c
===================================================================
--- trunk/src/gtk-sat-map-popup.c 2011-07-31 12:26:07 UTC (rev 880)
+++ trunk/src/gtk-sat-map-popup.c 2011-08-05 00:46:59 UTC (rev 881)
@@ -183,12 +183,14 @@
coverage_toggled (GtkCheckMenuItem *item, gpointer data)
{
sat_map_obj_t *obj = NULL;
+ sat_t *sat;
GtkSatMap *satmap = GTK_SAT_MAP(data);
guint32 covcol;
-
+
/* get satellite object */
obj = SAT_MAP_OBJ(g_object_get_data (G_OBJECT (item), "obj"));
+ sat = SAT(g_object_get_data (G_OBJECT (item), "sat"));
if (obj == NULL) {
sat_log_log (SAT_LOG_LEVEL_BUG,
@@ -201,6 +203,17 @@
obj->showcov = !obj->showcov;
gtk_check_menu_item_set_active (item, obj->showcov);
+ if (obj->showcov) {
+ /* remove it from the storage structure */
+ g_hash_table_remove (satmap->hidecovs,
+ &(sat->tle.catnr));
+
+ } else {
+ g_hash_table_insert (satmap->hidecovs,
+ &(sat->tle.catnr),
+ (gpointer)0x1);
+ }
+
/* set or clear coverage colour */
if (obj->showcov) {
covcol = mod_cfg_get_int (satmap->cfgdata,
@@ -257,11 +270,20 @@
if (obj->showtrack) {
/* create ground track */
ground_track_create (satmap, sat, qth, obj);
+
+ /* add it to the storage structure */
+ g_hash_table_insert (satmap->showtracks,
+ &(sat->tle.catnr),
+ (gpointer)0x1);
}
else {
/* delete ground track with clear_ssp = TRUE */
ground_track_delete (satmap, sat, qth, obj, TRUE);
+
+ /* remove it from the storage structure */
+ g_hash_table_remove (satmap->showtracks,
+ &(sat->tle.catnr));
}
}
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-07-31 12:26:07 UTC (rev 880)
+++ trunk/src/gtk-sat-map.c 2011-08-05 00:46:59 UTC (rev 881)
@@ -107,6 +107,10 @@
static void draw_grid_lines (GtkSatMap *satmap, GooCanvasItemModel *root);
static void redraw_grid_lines (GtkSatMap *satmap);
static gchar *aoslos_time_to_str (GtkSatMap *satmap, sat_t *sat);
+static void gtk_sat_map_load_showtracks (GtkSatMap *map);
+static void gtk_sat_map_load_hide_coverages (GtkSatMap *map);
+static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest);
+static void store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey);
static GtkVBoxClass *parent_class = NULL;
static GooCanvasPoints *points1;
@@ -171,6 +175,8 @@
satmap->sats = NULL;
satmap->qth = NULL;
satmap->obj = NULL;
+ satmap->showtracks= g_hash_table_new_full(g_int_hash,g_int_equal,NULL,NULL);
+ satmap->hidecovs = g_hash_table_new_full(g_int_hash,g_int_equal,NULL,NULL);
satmap->naos = 0.0;
satmap->ncat = 0;
satmap->tstamp = 2458849.5;
@@ -193,6 +199,18 @@
static void
gtk_sat_map_destroy (GtkObject *object)
{
+ gint *showtrack;
+ gint *something;
+ gint i,length;
+ store_binary_hash_cfgdata(GTK_SAT_MAP(object)->cfgdata,
+ GTK_SAT_MAP(object)->showtracks,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_SHOWTRACKS);
+ store_binary_hash_cfgdata(GTK_SAT_MAP(object)->cfgdata,
+ GTK_SAT_MAP(object)->hidecovs,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_HIDECOVS);
+
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -293,6 +311,11 @@
g_object_unref (root);
+ /* load the satellites we want to show tracks for */
+ gtk_sat_map_load_showtracks (GTK_SAT_MAP(satmap));
+ /* load the satellites we want to show tracks for */
+ gtk_sat_map_load_hide_coverages (GTK_SAT_MAP(satmap));
+
/* plot each sat on the canvas */
g_hash_table_foreach (GTK_SAT_MAP (satmap)->sats, plot_sat, GTK_SAT_MAP (satmap));
@@ -1805,8 +1828,18 @@
}
obj->selected = FALSE;
- obj->showtrack = FALSE;
- obj->showcov = TRUE;
+
+ if (g_hash_table_lookup(satmap->showtracks,catnum)==NULL) {
+ obj->showtrack = FALSE;
+ } else {
+ obj->showtrack = TRUE;
+ }
+
+ if (g_hash_table_lookup(satmap->hidecovs,catnum)==NULL) {
+ obj->showcov = TRUE;
+ } else {
+ obj->showcov = FALSE;
+ }
obj->istarget = FALSE;
obj->oldrcnum = 0;
obj->newrcnum = 0;
@@ -1827,7 +1860,18 @@
MOD_CFG_MAP_SECTION,
MOD_CFG_MAP_SAT_COV_COL,
SAT_CFG_INT_MAP_SAT_COV_COL);
+ /* coverage color */
+ if (obj->showcov) {
+ 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,
@@ -2551,3 +2595,100 @@
return text;
}
+
+/** \brief Load the satellites that we should show tracks for */
+static void
+gtk_sat_map_load_showtracks (GtkSatMap *satmap)
+{
+ load_integer_list_boolean(satmap->cfgdata,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_SHOWTRACKS,
+ satmap->showtracks);
+}
+
+/** \brief Load the satellites that we should not highlight coverage */
+static void
+gtk_sat_map_load_hide_coverages (GtkSatMap *satmap)
+{
+ load_integer_list_boolean(satmap->cfgdata,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_HIDECOVS,
+ satmap->hidecovs);
+}
+
+/** \brief Load an integer list into a hash table that uses the
+ data in the hash as a boolean
+*/
+static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest) {
+ gint *sats = NULL;
+ gsize length;
+ GError *error = NULL;
+ guint i;
+ guint *tkey;
+
+ sats = g_key_file_get_integer_list (cfgdata,
+ section,
+ key,
+ &length,
+ &error);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Failed to get list of satellites (%s)"),
+ __FUNCTION__, error->message);
+
+ g_clear_error (&error);
+
+ /* GLib API says nothing about the contents in case of error */
+ if (sats) {
+ g_free (sats);
+ }
+
+ return;
+ }
+
+ /* read each satellite into hash table */
+ for (i = 0; i < length; i++) {
+ tkey = g_new0 (guint, 1);
+ *tkey = sats[i];
+ //printf("loading sat %d\n",sats[i]);
+ if (g_hash_table_lookup (dest, tkey) == NULL) {
+ /* just add a one to the value so there is presence indicator */
+ g_hash_table_insert (dest,
+ tkey,
+ (gpointer)0x1);
+ }
+ }
+ g_free(sats);
+}
+
+/** \brief Convert the "boolean" hash back into an integer list and save it. */
+static void
+store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey)
+{
+ gint *showtrack;
+ gint *something;
+ gint i,length;
+ GList *keys = g_hash_table_get_keys(hash);
+
+ length = g_list_length(keys);
+ if (g_list_length(keys)>0) {
+
+ showtrack = g_try_new0(gint,g_list_length(keys));
+ for (i=0;i<length;i++) {
+ something=g_list_nth_data(keys,i);
+ showtrack[i]=*something;
+ }
+ g_key_file_set_integer_list (cfgdata,
+ cfgsection,
+ cfgkey,
+ showtrack,
+ g_list_length(keys)
+ );
+
+ } else {
+ g_key_file_remove_key(cfgdata,
+ cfgsection,
+ cfgkey,
+ NULL);
+ }
+}
Modified: trunk/src/gtk-sat-map.h
===================================================================
--- trunk/src/gtk-sat-map.h 2011-07-31 12:26:07 UTC (rev 880)
+++ trunk/src/gtk-sat-map.h 2011-08-05 00:46:59 UTC (rev 881)
@@ -140,6 +140,8 @@
qth_t *qth; /*!< Pointer to current location. */
GHashTable *obj; /*!< Canvas items representing each satellite. */
+ GHashTable *showtracks; /*!< A hash of satellites to show tracks for. */
+ GHashTable *hidecovs; /*!< A hash of satellites to hide coverage for. */
guint x0; /*!< X0 of the canvas map. */
guint y0; /*!< Y0 of the canvas map. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-31 12:26:14
|
Revision: 880
http://gpredict.svn.sourceforge.net/gpredict/?rev=880&view=rev
Author: aa1vs
Date: 2011-07-31 12:26:07 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
Remove deprecated calls and functions to allow make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" to work per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-azel-plot.c
trunk/src/gtk-azel-plot.h
trunk/src/gtk-event-list.h
trunk/src/gtk-freq-knob.c
trunk/src/gtk-freq-knob.h
trunk/src/gtk-polar-plot.c
trunk/src/gtk-polar-plot.h
trunk/src/gtk-polar-view.c
trunk/src/gtk-polar-view.h
trunk/src/gtk-rig-ctrl.h
trunk/src/gtk-rot-ctrl.h
trunk/src/gtk-rot-knob.c
trunk/src/gtk-rot-knob.h
trunk/src/gtk-sat-list-col-sel.h
trunk/src/gtk-sat-list.h
trunk/src/gtk-sat-map.c
trunk/src/gtk-sat-map.h
trunk/src/gtk-sat-module.h
trunk/src/gtk-sat-selector.h
trunk/src/gtk-sat-tree.h
trunk/src/gtk-single-sat.h
trunk/src/gtk-sky-glance.c
trunk/src/gtk-sky-glance.h
trunk/src/mod-mgr.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/ChangeLog 2011-07-31 12:26:07 UTC (rev 880)
@@ -1,3 +1,32 @@
+2011-07-31 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-rot-knob.c
+ * src/gtk-rot-knob.h
+ * src/gtk-sky-glance.c
+ * src/gtk-sky-glance.h
+ * src/gtk-rig-ctrl.h
+ * src/gtk-sat-list.h
+ * src/gtk-sat-module.h
+ * src/gtk-sat-list-col-sel.h
+ * src/gtk-sat-selector.h
+ * src/gtk-single-sat.h
+ * src/gtk-polar-plot.c
+ * src/gtk-polar-plot.h
+ * src/gtk-event-list.h
+ * src/gtk-sat-map.c
+ * src/gtk-sat-map.h
+ * src/gtk-freq-knob.c
+ * src/gtk-freq-knob.h
+ * src/gtk-azel-plot.c
+ * src/gtk-rot-ctrl.h
+ * src/gtk-azel-plot.h
+ * src/mod-mgr.c
+ * src/gtk-polar-view.c
+ * src/gtk-sat-tree.h
+ * src/gtk-polar-view.h
+ Remove deprecated calls and functions to allow make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" to work per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+
+
2011-07-30 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-azel-plot.h
Modified: trunk/src/gtk-azel-plot.c
===================================================================
--- trunk/src/gtk-azel-plot.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-azel-plot.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -82,10 +82,10 @@
static GtkVBoxClass *parent_class = NULL;
-GtkType
+GType
gtk_azel_plot_get_type ()
{
- static GtkType gtk_azel_plot_type = 0;
+ static GType gtk_azel_plot_type = 0;
if (!gtk_azel_plot_type) {
static const GTypeInfo gtk_azel_plot_info = {
@@ -206,11 +206,11 @@
/* connect size-request signal */
g_signal_connect (GTK_AZEL_PLOT (polv)->canvas, "size-allocate",
- G_CALLBACK (size_allocate_cb), polv);
+ G_CALLBACK (size_allocate_cb), polv);
g_signal_connect (GTK_AZEL_PLOT (polv)->canvas, "item_created",
- (GtkSignalFunc) on_item_created, polv);
+ G_CALLBACK (on_item_created), polv);
g_signal_connect_after (GTK_AZEL_PLOT (polv)->canvas, "realize",
- (GtkSignalFunc) on_canvas_realized, polv);
+ G_CALLBACK (on_canvas_realized), polv);
gtk_widget_show (GTK_AZEL_PLOT (polv)->canvas);
@@ -745,7 +745,7 @@
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
g_signal_connect (item, "motion_notify_event",
- (GtkSignalFunc) on_motion_notify, data);
+ G_CALLBACK (on_motion_notify), data);
}
}
Modified: trunk/src/gtk-azel-plot.h
===================================================================
--- trunk/src/gtk-azel-plot.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-azel-plot.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -46,11 +46,11 @@
#define AZEL_PLOT_NUM_TICKS 5
-#define GTK_AZEL_PLOT(obj) GTK_CHECK_CAST (obj, gtk_azel_plot_get_type (), GtkAzelPlot)
-#define GTK_AZEL_PLOT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_azel_plot_get_type (), GtkAzelPlotClass)
-#define GTK_IS_AZEL_PLOT(obj) GTK_CHECK_TYPE (obj, gtk_azel_plot_get_type ())
+#define GTK_AZEL_PLOT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_azel_plot_get_type (), GtkAzelPlot)
+#define GTK_AZEL_PLOT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_azel_plot_get_type (), GtkAzelPlotClass)
+#define GTK_IS_AZEL_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_azel_plot_get_type ())
#define GTK_TYPE_AZEL_PLOT (gtk_azel_plot_get_type ())
-#define IS_GTK_AZEL_PLOT(obj) GTK_CHECK_TYPE (obj, gtk_azel_plot_get_type ())
+#define IS_GTK_AZEL_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_azel_plot_get_type ())
typedef struct _GtkAzelPlot GtkAzelPlot;
typedef struct _GtkAzelPlotClass GtkAzelPlotClass;
@@ -102,7 +102,7 @@
-GtkType gtk_azel_plot_get_type (void);
+GType gtk_azel_plot_get_type (void);
GtkWidget* gtk_azel_plot_new (qth_t *qth, pass_t *pass);
Modified: trunk/src/gtk-event-list.h
===================================================================
--- trunk/src/gtk-event-list.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-event-list.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -41,15 +41,15 @@
#define GTK_TYPE_EVENT_LIST (gtk_event_list_get_type ())
-#define GTK_EVENT_LIST(obj) GTK_CHECK_CAST (obj,\
+#define GTK_EVENT_LIST(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_event_list_get_type (),\
GtkEventList)
-#define GTK_EVENT_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_EVENT_LIST_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_event_list_get_type (),\
GtkEventListClass)
-#define IS_GTK_EVENT_LIST(obj) GTK_CHECK_TYPE (obj, gtk_event_list_get_type ())
+#define IS_GTK_EVENT_LIST(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_event_list_get_type ())
typedef struct _gtk_event_list GtkEventList;
@@ -103,7 +103,7 @@
} event_list_flag_t;
-GtkType gtk_event_list_get_type (void);
+GType gtk_event_list_get_type (void);
GtkWidget* gtk_event_list_new (GKeyFile *cfgdata,
GHashTable *sats,
qth_t *qth,
Modified: trunk/src/gtk-freq-knob.c
===================================================================
--- trunk/src/gtk-freq-knob.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-freq-knob.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -199,9 +199,9 @@
idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_FILL | GTK_EXPAND, 0, 0);
g_signal_connect (GTK_FREQ_KNOB(widget)->evtbox[i], "button_press_event",
- (GtkSignalFunc) on_button_press, widget);
+ (GCallback) on_button_press, widget);
g_signal_connect (GTK_FREQ_KNOB(widget)->evtbox[i], "scroll_event",
- (GtkSignalFunc) on_button_scroll, widget);
+ (GCallback) on_button_scroll, widget);
/* UP buttons */
Modified: trunk/src/gtk-freq-knob.h
===================================================================
--- trunk/src/gtk-freq-knob.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-freq-knob.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -41,15 +41,15 @@
#define GTK_TYPE_FREQ_KNOB (gtk_freq_knob_get_type ())
-#define GTK_FREQ_KNOB(obj) GTK_CHECK_CAST (obj,\
+#define GTK_FREQ_KNOB(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_freq_knob_get_type (),\
GtkFreqKnob)
-#define GTK_FREQ_KNOB_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_FREQ_KNOB_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_freq_knob_get_type (),\
GtkFreqKnobClass)
-#define IS_GTK_FREQ_KNOB(obj) GTK_CHECK_TYPE (obj, gtk_freq_knob_get_type ())
+#define IS_GTK_FREQ_KNOB(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_freq_knob_get_type ())
typedef struct _gtk_freq_knob GtkFreqKnob;
@@ -77,7 +77,7 @@
-GtkType gtk_freq_knob_get_type (void);
+GType gtk_freq_knob_get_type (void);
GtkWidget* gtk_freq_knob_new (gdouble val, gboolean buttons);
void gtk_freq_knob_set_value (GtkFreqKnob *knob, gdouble val);
gdouble gtk_freq_knob_get_value (GtkFreqKnob *knob);
Modified: trunk/src/gtk-polar-plot.c
===================================================================
--- trunk/src/gtk-polar-plot.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-polar-plot.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -93,7 +93,7 @@
static GtkVBoxClass *parent_class = NULL;
-GtkType
+GType
gtk_polar_plot_get_type ()
{
static GType gtk_polar_plot_type = 0;
@@ -211,9 +211,9 @@
g_signal_connect (GTK_POLAR_PLOT (polv)->canvas, "size-allocate",
G_CALLBACK (size_allocate_cb), polv);
g_signal_connect (GTK_POLAR_PLOT (polv)->canvas, "item_created",
- (GtkSignalFunc) on_item_created, polv);
+ (GCallback) on_item_created, polv);
g_signal_connect_after (GTK_POLAR_PLOT (polv)->canvas, "realize",
- (GtkSignalFunc) on_canvas_realized, polv);
+ (GCallback) on_canvas_realized, polv);
gtk_widget_show (GTK_POLAR_PLOT (polv)->canvas);
@@ -1216,7 +1216,7 @@
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
g_signal_connect (item, "motion_notify_event",
- (GtkSignalFunc) on_motion_notify, data);
+ (GCallback) on_motion_notify, data);
}
}
Modified: trunk/src/gtk-polar-plot.h
===================================================================
--- trunk/src/gtk-polar-plot.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-polar-plot.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -46,11 +46,11 @@
#define TRACK_TICK_NUM 5
-#define GTK_POLAR_PLOT(obj) GTK_CHECK_CAST (obj, gtk_polar_plot_get_type (), GtkPolarPlot)
-#define GTK_POLAR_PLOT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_polar_plot_get_type (), GtkPolarPlotClass)
-#define GTK_IS_POLAR_PLOT(obj) GTK_CHECK_TYPE (obj, gtk_polar_plot_get_type ())
+#define GTK_POLAR_PLOT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_polar_plot_get_type (), GtkPolarPlot)
+#define GTK_POLAR_PLOT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_polar_plot_get_type (), GtkPolarPlotClass)
+#define GTK_IS_POLAR_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_polar_plot_get_type ())
#define GTK_TYPE_POLAR_PLOT (gtk_polar_plot_get_type ())
-#define IS_GTK_POLAR_PLOT(obj) GTK_CHECK_TYPE (obj, gtk_polar_plot_get_type ())
+#define IS_GTK_POLAR_PLOT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_polar_plot_get_type ())
typedef struct _GtkPolarPlot GtkPolarPlot;
typedef struct _GtkPolarPlotClass GtkPolarPlotClass;
@@ -118,7 +118,7 @@
- GtkType gtk_polar_plot_get_type (void);
+ GType gtk_polar_plot_get_type (void);
GtkWidget* gtk_polar_plot_new (qth_t *qth, pass_t *pass);
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-polar-view.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -97,7 +97,7 @@
static GtkVBoxClass *parent_class = NULL;
-GtkType
+GType
gtk_polar_view_get_type ()
{
static GType gtk_polar_view_type = 0;
@@ -255,9 +255,9 @@
g_signal_connect (GTK_POLAR_VIEW (polv)->canvas, "size-allocate",
G_CALLBACK (size_allocate_cb), polv);
g_signal_connect (GTK_POLAR_VIEW (polv)->canvas, "item_created",
- (GtkSignalFunc) on_item_created, polv);
+ (GCallback) on_item_created, polv);
g_signal_connect_after (GTK_POLAR_VIEW (polv)->canvas, "realize",
- (GtkSignalFunc) on_canvas_realized, polv);
+ (GCallback) on_canvas_realized, polv);
gtk_widget_show (GTK_POLAR_VIEW (polv)->canvas);
@@ -1395,14 +1395,14 @@
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
g_signal_connect (item, "motion_notify_event",
- (GtkSignalFunc) on_motion_notify, data);
+ (GCallback) on_motion_notify, data);
}
else if (!g_object_get_data (G_OBJECT (item), "skip-signal-connection")) {
g_signal_connect (item, "button_press_event",
- (GtkSignalFunc) on_button_press, data);
+ (GCallback) on_button_press, data);
g_signal_connect (item, "button_release_event",
- (GtkSignalFunc) on_button_release, data);
+ (GCallback) on_button_release, data);
}
}
Modified: trunk/src/gtk-polar-view.h
===================================================================
--- trunk/src/gtk-polar-view.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-polar-view.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -46,11 +46,11 @@
#define TRACK_TICK_NUM 4
-#define GTK_POLAR_VIEW(obj) GTK_CHECK_CAST (obj, gtk_polar_view_get_type (), GtkPolarView)
-#define GTK_POLAR_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_polar_view_get_type (), GtkPolarViewClass)
-#define GTK_IS_POLAR_VIEW(obj) GTK_CHECK_TYPE (obj, gtk_polar_view_get_type ())
+#define GTK_POLAR_VIEW(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_polar_view_get_type (), GtkPolarView)
+#define GTK_POLAR_VIEW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_polar_view_get_type (), GtkPolarViewClass)
+#define GTK_IS_POLAR_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_polar_view_get_type ())
#define GTK_TYPE_POLAR_VIEW (gtk_polar_view_get_type ())
-#define IS_GTK_POLAR_VIEW(obj) GTK_CHECK_TYPE (obj, gtk_polar_view_get_type ())
+#define IS_GTK_POLAR_VIEW(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_polar_view_get_type ())
typedef struct _GtkPolarView GtkPolarView;
typedef struct _GtkPolarViewClass GtkPolarViewClass;
@@ -140,7 +140,7 @@
-GtkType gtk_polar_view_get_type (void);
+GType gtk_polar_view_get_type (void);
GtkWidget* gtk_polar_view_new (GKeyFile *cfgdata,
GHashTable *sats,
Modified: trunk/src/gtk-rig-ctrl.h
===================================================================
--- trunk/src/gtk-rig-ctrl.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-rig-ctrl.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -44,15 +44,15 @@
#define GTK_TYPE_RIG_CTRL (gtk_rig_ctrl_get_type ())
-#define GTK_RIG_CTRL(obj) GTK_CHECK_CAST (obj,\
+#define GTK_RIG_CTRL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_rig_ctrl_get_type (),\
GtkRigCtrl)
-#define GTK_RIG_CTRL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_RIG_CTRL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_rig_ctrl_get_type (),\
GtkRigCtrlClass)
-#define IS_GTK_RIG_CTRL(obj) GTK_CHECK_TYPE (obj, gtk_rig_ctrl_get_type ())
+#define IS_GTK_RIG_CTRL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_rig_ctrl_get_type ())
typedef struct _gtk_rig_ctrl GtkRigCtrl;
@@ -123,7 +123,7 @@
-GtkType gtk_rig_ctrl_get_type (void);
+GType gtk_rig_ctrl_get_type (void);
GtkWidget* gtk_rig_ctrl_new (GtkSatModule *module);
void gtk_rig_ctrl_update (GtkRigCtrl *ctrl, gdouble t);
Modified: trunk/src/gtk-rot-ctrl.h
===================================================================
--- trunk/src/gtk-rot-ctrl.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-rot-ctrl.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -43,15 +43,15 @@
#define GTK_TYPE_ROT_CTRL (gtk_rot_ctrl_get_type ())
-#define GTK_ROT_CTRL(obj) GTK_CHECK_CAST (obj,\
+#define GTK_ROT_CTRL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_rot_ctrl_get_type (),\
GtkRotCtrl)
-#define GTK_ROT_CTRL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_ROT_CTRL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_rot_ctrl_get_type (),\
GtkRotCtrlClass)
-#define IS_GTK_ROT_CTRL(obj) GTK_CHECK_TYPE (obj, gtk_rot_ctrl_get_type ())
+#define IS_GTK_ROT_CTRL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_rot_ctrl_get_type ())
typedef struct _gtk_rot_ctrl GtkRotCtrl;
@@ -108,7 +108,7 @@
-GtkType gtk_rot_ctrl_get_type (void);
+GType gtk_rot_ctrl_get_type (void);
GtkWidget* gtk_rot_ctrl_new (GtkSatModule *module);
void gtk_rot_ctrl_update (GtkRotCtrl *ctrl, gdouble t);
Modified: trunk/src/gtk-rot-knob.c
===================================================================
--- trunk/src/gtk-rot-knob.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-rot-knob.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -299,9 +299,9 @@
i, i+1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
g_signal_connect (GTK_ROT_KNOB(widget)->evtbox[i], "button_press_event",
- (GtkSignalFunc) on_button_press, widget);
+ (GCallback) on_button_press, widget);
g_signal_connect (GTK_ROT_KNOB(widget)->evtbox[i], "scroll_event",
- (GtkSignalFunc) on_button_scroll, widget);
+ (GCallback) on_button_scroll, widget);
}
Modified: trunk/src/gtk-rot-knob.h
===================================================================
--- trunk/src/gtk-rot-knob.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-rot-knob.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -41,15 +41,15 @@
#define GTK_TYPE_ROT_KNOB (gtk_rot_knob_get_type ())
-#define GTK_ROT_KNOB(obj) GTK_CHECK_CAST (obj,\
+#define GTK_ROT_KNOB(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_rot_knob_get_type (),\
GtkRotKnob)
-#define GTK_ROT_KNOB_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_ROT_KNOB_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_rot_knob_get_type (),\
GtkRotKnobClass)
-#define IS_GTK_ROT_KNOB(obj) GTK_CHECK_TYPE (obj, gtk_rot_knob_get_type ())
+#define IS_GTK_ROT_KNOB(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_rot_knob_get_type ())
typedef struct _gtk_rot_knob GtkRotKnob;
@@ -77,7 +77,7 @@
-GtkType gtk_rot_knob_get_type (void);
+GType gtk_rot_knob_get_type (void);
GtkWidget* gtk_rot_knob_new (gdouble min, gdouble max, gdouble val);
void gtk_rot_knob_set_value (GtkRotKnob *knob, gdouble val);
gdouble gtk_rot_knob_get_value (GtkRotKnob *knob);
Modified: trunk/src/gtk-sat-list-col-sel.h
===================================================================
--- trunk/src/gtk-sat-list-col-sel.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-list-col-sel.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -38,15 +38,15 @@
#define GTK_TYPE_SAT_LIST_COL_SEL (gtk_sat_list_col_sel_get_type ())
-#define GTK_SAT_LIST_COL_SEL(obj) GTK_CHECK_CAST (obj,\
+#define GTK_SAT_LIST_COL_SEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_sat_list_col_sel_get_type (),\
GtkSatListColSel)
-#define GTK_SAT_LIST_COL_SEL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_SAT_LIST_COL_SEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_sat_list_col_sel_get_type (),\
GtkSatListColSelClass)
-#define IS_GTK_SAT_LIST_COL_SEL(obj) GTK_CHECK_TYPE (obj, gtk_sat_list_col_sel_get_type ())
+#define IS_GTK_SAT_LIST_COL_SEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_list_col_sel_get_type ())
@@ -70,7 +70,7 @@
};
-GtkType gtk_sat_list_col_sel_get_type (void);
+GType gtk_sat_list_col_sel_get_type (void);
GtkWidget *gtk_sat_list_col_sel_new (guint32 flags);
guint32 gtk_sat_list_col_sel_get_flags (GtkSatListColSel *sel);
void gtk_sat_list_col_sel_set_flags (GtkSatListColSel *sel, guint32 flags);
Modified: trunk/src/gtk-sat-list.h
===================================================================
--- trunk/src/gtk-sat-list.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-list.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -41,15 +41,15 @@
#define GTK_TYPE_SAT_LIST (gtk_sat_list_get_type ())
-#define GTK_SAT_LIST(obj) GTK_CHECK_CAST (obj,\
+#define GTK_SAT_LIST(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_sat_list_get_type (),\
GtkSatList)
-#define GTK_SAT_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_SAT_LIST_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_sat_list_get_type (),\
GtkSatListClass)
-#define IS_GTK_SAT_LIST(obj) GTK_CHECK_TYPE (obj, gtk_sat_list_get_type ())
+#define IS_GTK_SAT_LIST(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_list_get_type ())
typedef struct _gtk_sat_list GtkSatList;
@@ -143,7 +143,7 @@
} sat_list_flag_t;
-GtkType gtk_sat_list_get_type (void);
+GType gtk_sat_list_get_type (void);
GtkWidget* gtk_sat_list_new (GKeyFile *cfgdata,
GHashTable *sats,
qth_t *qth,
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-map.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -114,7 +114,7 @@
/** \brief Register the satellite map widget. */
-GtkType
+GType
gtk_sat_map_get_type ()
{
static GType gtk_sat_map_type = 0;
@@ -281,9 +281,9 @@
g_signal_connect (GTK_SAT_MAP (satmap)->canvas, "size-allocate",
G_CALLBACK (size_allocate_cb), satmap);
g_signal_connect (GTK_SAT_MAP (satmap)->canvas, "item_created",
- (GtkSignalFunc) on_item_created, satmap);
+ (GCallback) on_item_created, satmap);
g_signal_connect_after (GTK_SAT_MAP (satmap)->canvas, "realize",
- (GtkSignalFunc) on_canvas_realized, satmap);
+ (GCallback) on_canvas_realized, satmap);
gtk_widget_show (GTK_SAT_MAP (satmap)->canvas);
@@ -875,14 +875,14 @@
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
g_signal_connect (item, "motion_notify_event",
- (GtkSignalFunc) on_motion_notify, data);
+ (GCallback) on_motion_notify, data);
}
else if (!g_object_get_data (G_OBJECT (item), "skip-signal-connection")) {
g_signal_connect (item, "button_press_event",
- (GtkSignalFunc) on_button_press, data);
+ (GCallback) on_button_press, data);
g_signal_connect (item, "button_release_event",
- (GtkSignalFunc) on_button_release, data);
+ (GCallback) on_button_release, data);
}
}
Modified: trunk/src/gtk-sat-map.h
===================================================================
--- trunk/src/gtk-sat-map.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-map.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -46,11 +46,11 @@
#define SAT_MAP_RANGE_CIRCLE_POINTS 180 /*!< Number of points used to plot a satellite range half circle. */
-#define GTK_SAT_MAP(obj) GTK_CHECK_CAST (obj, gtk_sat_map_get_type (), GtkSatMap)
-#define GTK_SAT_MAP_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_sat_map_get_type (), GtkSatMapClass)
-#define GTK_IS_SAT_MAP(obj) GTK_CHECK_TYPE (obj, gtk_sat_map_get_type ())
+#define GTK_SAT_MAP(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_sat_map_get_type (), GtkSatMap)
+#define GTK_SAT_MAP_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_sat_map_get_type (), GtkSatMapClass)
+#define GTK_IS_SAT_MAP(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_map_get_type ())
#define GTK_TYPE_SAT_MAP (gtk_sat_map_get_type ())
-#define IS_GTK_SAT_MAP(obj) GTK_CHECK_TYPE (obj, gtk_sat_map_get_type ())
+#define IS_GTK_SAT_MAP(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_map_get_type ())
//typedef struct _GtkSatMap GtkSatMap;
@@ -169,7 +169,7 @@
};
-GtkType gtk_sat_map_get_type (void);
+GType gtk_sat_map_get_type (void);
GtkWidget* gtk_sat_map_new (GKeyFile *cfgdata,
GHashTable *sats,
qth_t *qth);
Modified: trunk/src/gtk-sat-module.h
===================================================================
--- trunk/src/gtk-sat-module.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-module.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -72,15 +72,15 @@
#define GTK_TYPE_SAT_MODULE (gtk_sat_module_get_type ())
-#define GTK_SAT_MODULE(obj) GTK_CHECK_CAST (obj,\
+#define GTK_SAT_MODULE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_sat_module_get_type (), \
GtkSatModule)
-#define GTK_SAT_MODULE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_SAT_MODULE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_sat_module_get_type (),\
GtkSatModuleClass)
-#define IS_GTK_SAT_MODULE(obj) GTK_CHECK_TYPE (obj, gtk_sat_module_get_type ())
+#define IS_GTK_SAT_MODULE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_module_get_type ())
typedef struct _gtk_sat_module GtkSatModule;
@@ -165,7 +165,7 @@
};
-GtkType gtk_sat_module_get_type (void);
+GType gtk_sat_module_get_type (void);
GtkWidget* gtk_sat_module_new (const gchar *cfgfile);
Modified: trunk/src/gtk-sat-selector.h
===================================================================
--- trunk/src/gtk-sat-selector.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-selector.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -61,15 +61,15 @@
#define GTK_TYPE_SAT_SELECTOR (gtk_sat_selector_get_type ())
-#define GTK_SAT_SELECTOR(obj) GTK_CHECK_CAST (obj,\
+#define GTK_SAT_SELECTOR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_sat_selector_get_type (),\
GtkSatSelector)
-#define GTK_SAT_SELECTOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_SAT_SELECTOR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_sat_selector_get_type (),\
GtkSatSelectorClass)
-#define IS_GTK_SAT_SELECTOR(obj) GTK_CHECK_TYPE (obj, gtk_sat_selector_get_type ())
+#define IS_GTK_SAT_SELECTOR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_selector_get_type ())
/** \brief The GtkSatSelector structure */
@@ -99,7 +99,7 @@
};
-GtkType gtk_sat_selector_get_type (void);
+GType gtk_sat_selector_get_type (void);
GtkWidget *gtk_sat_selector_new (guint flags);
guint32 gtk_sat_selector_get_flags (GtkSatSelector *selector);
void gtk_sat_selector_get_selected (GtkSatSelector *selector, gint *catnum, gchar **satname, gdouble *epoch);
Modified: trunk/src/gtk-sat-tree.h
===================================================================
--- trunk/src/gtk-sat-tree.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sat-tree.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -62,15 +62,15 @@
#define GTK_TYPE_SAT_TREE (gtk_sat_tree_get_type ())
-#define GTK_SAT_TREE(obj) GTK_CHECK_CAST (obj,\
+#define GTK_SAT_TREE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_sat_tree_get_type (),\
GtkSatTree)
-#define GTK_SAT_TREE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_SAT_TREE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_sat_tree_get_type (),\
GtkSatTreeClass)
-#define IS_GTK_SAT_TREE(obj) GTK_CHECK_TYPE (obj, gtk_sat_tree_get_type ())
+#define IS_GTK_SAT_TREE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sat_tree_get_type ())
/** \brief The GtkSatTree structure */
@@ -96,7 +96,7 @@
};
-GtkType gtk_sat_tree_get_type (void);
+GType gtk_sat_tree_get_type (void);
GtkWidget *gtk_sat_tree_new (guint flags);
guint32 gtk_sat_tree_get_flags (GtkSatTree *tree);
void gtk_sat_tree_select (GtkSatTree *sat_tree, guint catnum);
Modified: trunk/src/gtk-single-sat.h
===================================================================
--- trunk/src/gtk-single-sat.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-single-sat.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -100,15 +100,15 @@
#define GTK_TYPE_SINGLE_SAT (gtk_single_sat_get_type ())
-#define GTK_SINGLE_SAT(obj) GTK_CHECK_CAST (obj,\
+#define GTK_SINGLE_SAT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj,\
gtk_single_sat_get_type (),\
GtkSingleSat)
-#define GTK_SINGLE_SAT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\
+#define GTK_SINGLE_SAT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass,\
gtk_single_sat_get_type (),\
GtkSingleSatClass)
-#define IS_GTK_SINGLE_SAT(obj) GTK_CHECK_TYPE (obj, gtk_single_sat_get_type ())
+#define IS_GTK_SINGLE_SAT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_single_sat_get_type ())
typedef struct _gtk_single_sat GtkSingleSat;
@@ -152,7 +152,7 @@
-GtkType gtk_single_sat_get_type (void);
+GType gtk_single_sat_get_type (void);
GtkWidget* gtk_single_sat_new (GKeyFile *cfgdata,
GHashTable *sats,
qth_t *qth,
Modified: trunk/src/gtk-sky-glance.c
===================================================================
--- trunk/src/gtk-sky-glance.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sky-glance.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -114,7 +114,7 @@
static GtkVBoxClass *parent_class = NULL;
-GtkType
+GType
gtk_sky_glance_get_type ()
{
static GType gtk_sky_glance_type = 0;
@@ -303,9 +303,9 @@
g_signal_connect (GTK_SKY_GLANCE (skg)->canvas, "size-allocate",
G_CALLBACK (size_allocate_cb), skg);
g_signal_connect (GTK_SKY_GLANCE (skg)->canvas, "item_created",
- (GtkSignalFunc) on_item_created, skg);
+ (GCallback) on_item_created, skg);
g_signal_connect_after (GTK_SKY_GLANCE (skg)->canvas, "realize",
- (GtkSignalFunc) on_canvas_realized, skg);
+ (GCallback) on_canvas_realized, skg);
gtk_widget_show (GTK_SKY_GLANCE (skg)->canvas);
@@ -691,14 +691,14 @@
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
- g_signal_connect (item, "motion_notify_event", (GtkSignalFunc) on_motion_notify, data);
+ g_signal_connect (item, "motion_notify_event", (GCallback) on_motion_notify, data);
}
else if (!g_object_get_data (G_OBJECT (item), "skip-signal-connection")) {
- //g_signal_connect (item, "button_press_event", (GtkSignalFunc) on_button_press, data);
- g_signal_connect (item, "button_release_event", (GtkSignalFunc) on_button_release, data);
- g_signal_connect (item, "enter_notify_event", (GtkSignalFunc) on_mouse_enter, data);
- g_signal_connect (item, "leave_notify_event", (GtkSignalFunc) on_mouse_leave, data);
+ //g_signal_connect (item, "button_press_event", (GCallback) on_button_press, data);
+ g_signal_connect (item, "button_release_event", (GCallback) on_button_release, data);
+ g_signal_connect (item, "enter_notify_event", (GCallback) on_mouse_enter, data);
+ g_signal_connect (item, "leave_notify_event", (GCallback) on_mouse_leave, data);
}
}
Modified: trunk/src/gtk-sky-glance.h
===================================================================
--- trunk/src/gtk-sky-glance.h 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/gtk-sky-glance.h 2011-07-31 12:26:07 UTC (rev 880)
@@ -43,11 +43,11 @@
-#define GTK_SKY_GLANCE(obj) GTK_CHECK_CAST (obj, gtk_sky_glance_get_type (), GtkSkyGlance)
-#define GTK_SKY_GLANCE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_sky_glance_get_type (), GtkSkyGlanceClass)
-#define GTK_IS_SKY_GLANCE(obj) GTK_CHECK_TYPE (obj, gtk_sky_glance_get_type ())
+#define GTK_SKY_GLANCE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_sky_glance_get_type (), GtkSkyGlance)
+#define GTK_SKY_GLANCE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gtk_sky_glance_get_type (), GtkSkyGlanceClass)
+#define GTK_IS_SKY_GLANCE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sky_glance_get_type ())
#define GTK_TYPE_SKY_GLANCE (gtk_sky_glance_get_type ())
-#define IS_GTK_SKY_GLANCE(obj) GTK_CHECK_TYPE (obj, gtk_sky_glance_get_type ())
+#define IS_GTK_SKY_GLANCE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_sky_glance_get_type ())
typedef struct _GtkSkyGlance GtkSkyGlance;
typedef struct _GtkSkyGlanceClass GtkSkyGlanceClass;
@@ -113,7 +113,7 @@
-GtkType gtk_sky_glance_get_type (void);
+GType gtk_sky_glance_get_type (void);
GtkWidget* gtk_sky_glance_new (GHashTable *sats, qth_t *qth, gdouble ts);
/*
Modified: trunk/src/mod-mgr.c
===================================================================
--- trunk/src/mod-mgr.c 2011-07-30 23:24:01 UTC (rev 879)
+++ trunk/src/mod-mgr.c 2011-07-31 12:26:07 UTC (rev 880)
@@ -76,7 +76,7 @@
static void update_window_title (void);
static void switch_page_cb (GtkNotebook *notebook,
- GtkNotebookPage *page,
+ gpointer *page,
guint page_num,
gpointer user_data);
@@ -571,7 +571,7 @@
}
static void switch_page_cb (GtkNotebook *notebook,
- GtkNotebookPage *page,
+ gpointer *page,
guint page_num,
gpointer user_data)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-30 23:24:09
|
Revision: 879
http://gpredict.svn.sourceforge.net/gpredict/?rev=879&view=rev
Author: aa1vs
Date: 2011-07-30 23:24:01 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
Eliminate use of deprecated GtkTooltips for GtkTooltip per <http://developer.gnome.org/gtk/2.22/gtk-migrating-tooltips.html>.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-module-popup.c
trunk/src/gtk-sat-module-tmg.c
trunk/src/gtk-sat-tree.c
trunk/src/mod-cfg.c
trunk/src/qth-editor.c
trunk/src/sat-pref-conditions.c
trunk/src/sat-pref-debug.c
trunk/src/sat-pref-formats.c
trunk/src/sat-pref-layout.c
trunk/src/sat-pref-list-view.c
trunk/src/sat-pref-map-view.c
trunk/src/sat-pref-multi-pass.c
trunk/src/sat-pref-polar-view.c
trunk/src/sat-pref-qth-editor.c
trunk/src/sat-pref-refresh.c
trunk/src/sat-pref-single-pass.c
trunk/src/sat-pref-single-sat.c
trunk/src/sat-pref-sky-at-glance.c
trunk/src/sat-pref-tle.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/ChangeLog 2011-07-30 23:24:01 UTC (rev 879)
@@ -36,7 +36,28 @@
* src/save-pass.c
Use access functions instead of private elements per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+ * src/gtk-sat-module-popup.c
+ * src/sat-pref-single-sat.c
+ * src/sat-pref-layout.c
+ * src/sat-pref-debug.c
+ * src/sat-pref-qth-editor.c
+ * src/sat-pref-polar-view.c
+ * src/sat-pref-map-view.c
+ * src/sat-pref-multi-pass.c
+ * src/mod-cfg.c
+ * src/gtk-sat-module-tmg.c
+ * src/sat-pref-conditions.c
+ * src/sat-pref-formats.c
+ * src/sat-pref-tle.c
+ * src/sat-pref-sky-at-glance.c
+ * src/qth-editor.c
+ * src/sat-pref-list-view.c
+ * src/sat-pref-single-pass.c
+ * src/gtk-sat-tree.c
+ * src/sat-pref-refresh.c
+ Eliminate use of deprecated GtkTooltips for GtkTooltip per <http://developer.gnome.org/gtk/2.22/gtk-migrating-tooltips.html>.
+
2011-07-23 Charles Suprin <hamaa1vs at gmail.com>
* src/sat-cfg.[ch]
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/gtk-sat-module-popup.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -312,7 +312,6 @@
GtkWidget *entry;
GtkWidget *label;
GtkWidget *toggle;
- GtkTooltips *tooltips;
GtkWidget *vbox;
GtkAllocation aloc;
guint response;
@@ -344,14 +343,15 @@
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,
+ gtk_widget_set_tooltip_text (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 "\
+ "Allowed characters: 0..9, a..z, A..Z, - and _"));
+
+ /*not sure what to do with the old private tip the new api does not like them
+ _("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
a proper name has been entered
oh, btw. disable OK button to begin with....
@@ -366,11 +366,9 @@
/* 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,
+ gtk_widget_set_tooltip_text ( toggle,
_("If checked, the new module will be opened "\
- "after it has been created"),
- NULL);
+ "after it has been created"));
gtk_box_pack_start (GTK_BOX (vbox),
toggle, FALSE, FALSE, 20);
Modified: trunk/src/gtk-sat-module-tmg.c
===================================================================
--- trunk/src/gtk-sat-module-tmg.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/gtk-sat-module-tmg.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -64,7 +64,6 @@
GtkWidget *vbox, *hbox, *table;
GtkWidget *image;
GtkWidget *label;
- GtkTooltips *tips;
gchar *title;
gchar *buff;
@@ -95,8 +94,7 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mod->tmgFwd), TRUE);
image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (mod->tmgFwd), image);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgFwd, _("Play forward"), NULL);
+ gtk_widget_set_tooltip_text (mod->tmgFwd, _("Play forward"));
g_signal_connect (mod->tmgFwd, "toggled", G_CALLBACK (tmg_fwd), mod);
gtk_box_pack_end (GTK_BOX (hbox), mod->tmgFwd, FALSE, FALSE, 0);
@@ -105,8 +103,7 @@
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (mod->tmgStop), FALSE);
image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PAUSE, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (mod->tmgStop), image);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgStop, _("Stop"), NULL);
+ gtk_widget_set_tooltip_text (mod->tmgStop, _("Stop"));
g_signal_connect (mod->tmgStop, "toggled", G_CALLBACK (tmg_stop), mod);
gtk_box_pack_end (GTK_BOX (hbox), mod->tmgStop, FALSE, FALSE, 0);
@@ -116,15 +113,13 @@
image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_BUTTON);
gtk_widget_set_direction (image, GTK_TEXT_DIR_RTL);
gtk_container_add (GTK_CONTAINER (mod->tmgBwd), image);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgBwd, _("Play backwards"), NULL);
+ gtk_widget_set_tooltip_text (mod->tmgBwd, _("Play backwards"));
g_signal_connect (mod->tmgBwd, "toggled", G_CALLBACK (tmg_bwd), mod);
gtk_box_pack_end (GTK_BOX (hbox), mod->tmgBwd, FALSE, FALSE, 0);
/* reset time */
mod->tmgReset = gtk_button_new_with_label (_("Reset"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgReset, _("Reset to current date and time"), NULL);
+ gtk_widget_set_tooltip_text (mod->tmgReset, _("Reset to current date and time"));
g_signal_connect (mod->tmgReset, "clicked", G_CALLBACK (tmg_reset), mod);
gtk_box_pack_end (GTK_BOX (hbox), mod->tmgReset, FALSE, FALSE, 10);
@@ -168,10 +163,8 @@
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (mod->tmgHour), 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (mod->tmgHour), TRUE);
//FIXME gtk_spin_button_set_value (GTK_SPIN_BUTTON (mod->tmgHour), 2);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgHour,
- _("Use this control to set the hour"),
- NULL);
+ gtk_widget_set_tooltip_text (mod->tmgHour,
+ _("Use this control to set the hour"));
g_signal_connect (mod->tmgHour, "value-changed",
G_CALLBACK (tmg_time_set), mod);
g_signal_connect (mod->tmgHour, "wrapped", G_CALLBACK (tmg_hour_wrap), mod);
@@ -190,10 +183,8 @@
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (mod->tmgMin), 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (mod->tmgMin), TRUE);
//FIXME gtk_spin_button_set_value (GTK_SPIN_BUTTON (mod->tmgMin), 2);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgMin,
- _("Use this control to set the minutes"),
- NULL);
+ gtk_widget_set_tooltip_text (mod->tmgMin,
+ _("Use this control to set the minutes"));
g_signal_connect (mod->tmgMin, "value-changed",
G_CALLBACK (tmg_time_set), mod);
g_signal_connect (mod->tmgMin, "wrapped", G_CALLBACK (tmg_min_wrap), mod);
@@ -212,10 +203,8 @@
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (mod->tmgSec), 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (mod->tmgSec), TRUE);
//FIXME gtk_spin_button_set_value (GTK_SPIN_BUTTON (mod->tmgSec), 2);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgSec,
- _("Use this control to set the seconds"),
- NULL);
+ gtk_widget_set_tooltip_text (mod->tmgSec,
+ _("Use this control to set the seconds"));
g_signal_connect (mod->tmgSec, "value-changed",
G_CALLBACK (tmg_time_set), mod);
g_signal_connect (mod->tmgSec, "wrapped", G_CALLBACK (tmg_sec_wrap), mod);
@@ -234,10 +223,8 @@
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (mod->tmgMsec), 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (mod->tmgMsec), TRUE);
//FIXME gtk_spin_button_set_value (GTK_SPIN_BUTTON (mod->tmgMsec), 2);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgMsec,
- _("Use this control to set the milliseconds"),
- NULL);
+ gtk_widget_set_tooltip_text (mod->tmgMsec,
+ _("Use this control to set the milliseconds"));
g_signal_connect (mod->tmgMsec, "value-changed",
G_CALLBACK (tmg_time_set), mod);
g_signal_connect (mod->tmgMsec, "wrapped", G_CALLBACK (tmg_msec_wrap), mod);
@@ -255,10 +242,8 @@
GTK_UPDATE_IF_VALID);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (mod->tmgFactor), 0);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (mod->tmgFactor), 1);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod->tmgFactor,
- _("Time throttle / compression factor"),
- NULL);
+ gtk_widget_set_tooltip_text (mod->tmgFactor,
+ _("Time throttle / compression factor"));
g_signal_connect (mod->tmgFactor, "value-changed",
G_CALLBACK (tmg_throttle), mod);
gtk_table_attach (GTK_TABLE (table), mod->tmgFactor,
Modified: trunk/src/gtk-sat-tree.c
===================================================================
--- trunk/src/gtk-sat-tree.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/gtk-sat-tree.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -178,7 +178,6 @@
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkWidget *hbox;
- GtkTooltips *tips;
GtkWidget *expbut;
GtkWidget *colbut;
Modified: trunk/src/mod-cfg.c
===================================================================
--- trunk/src/mod-cfg.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/mod-cfg.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -442,7 +442,6 @@
GtkWidget *swin;
GtkWidget *addbut, *delbut;
GtkWidget *vbox;
- GtkTooltips *tooltips;
gchar *icon; /* window icon file name */
GtkWidget *frame;
@@ -500,14 +499,14 @@
else {
/* connect changed signal to text-checker */
gtk_entry_set_max_length (GTK_ENTRY (namew), 25);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, namew,
+ gtk_widget_set_tooltip_text (namew,
_("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."));
-
+ "Allowed characters: 0..9, a..z, A..Z, - and _"));
+ /*new tooltip api does not allow for private
+ _("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
a proper name has been entered
oh, btw. disable OK button to begin with....
Modified: trunk/src/qth-editor.c
===================================================================
--- trunk/src/qth-editor.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/qth-editor.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -191,7 +191,6 @@
{
GtkWidget *table;
GtkWidget *label;
- GtkTooltips *tooltips;
GtkWidget *locbut;
GtkWidget *wxbut;
@@ -208,13 +207,14 @@
name = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (name), 25);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, name,
+ gtk_widget_set_tooltip_text (name,
_("Enter a short name for this ground station, e.g. callsign.\n"\
- "Allowed characters: 0..9, a..z, A..Z, - and _"),
+ "Allowed characters: 0..9, a..z, A..Z, - and _"));
+ /* new api does not allow for private tip
_("The name will be used to identify the ground station "\
"when it is presented to the user. Maximum allowed length "\
"is 25 characters."));
+ */
gtk_table_attach_defaults (GTK_TABLE (table), name, 1, 4, 0, 1);
/* attach changed signal so that we can enable OK button when
@@ -229,12 +229,13 @@
desc = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (desc), 256);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, desc,
- _("Enter an optional description for this ground station."),
+ gtk_widget_set_tooltip_text (desc,
+ _("Enter an optional description for this ground station."));
+ /*
_("The description for the ground station can be used as additional "\
"information. It may be included when generating reports. "\
"The maximum length for the description is 256 characters."));
+ */
gtk_table_attach_defaults (GTK_TABLE (table), desc, 1, 4, 1, 2);
/* location */
@@ -244,10 +245,8 @@
location = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (location), 50);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, location,
- _("Optional location of the ground station, fx. Copenhagen, Denmark."),
- NULL);
+ gtk_widget_set_tooltip_text (location,
+ _("Optional location of the ground station, fx. Copenhagen, Denmark."));
gtk_table_attach_defaults (GTK_TABLE (table), location, 1, 3, 2, 3);
locbut = gpredict_hstock_button (GTK_STOCK_INDEX, _("Select"),
@@ -267,10 +266,8 @@
gtk_spin_button_set_increments (GTK_SPIN_BUTTON (lat), 0.01, 1.0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lat), TRUE);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (lat), 4);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, lat,
- _("Select the latitude of the ground station in decimal degrees."),
- NULL);
+ gtk_widget_set_tooltip_text (lat,
+ _("Select the latitude of the ground station in decimal degrees."));
gtk_table_attach_defaults (GTK_TABLE (table), lat, 1, 2, 3, 4);
ns = gtk_combo_box_new_text ();
@@ -289,9 +286,8 @@
gtk_spin_button_set_increments (GTK_SPIN_BUTTON (lon), 0.01, 1.0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lon), TRUE);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (lon), 4);
- gtk_tooltips_set_tip (tooltips, lon,
- _("Select the longitude of the ground station in decimal degrees."),
- NULL);
+ gtk_widget_set_tooltip_text (lon,
+ _("Select the longitude of the ground station in decimal degrees."));
gtk_table_attach_defaults (GTK_TABLE (table), lon, 1, 2, 4, 5);
ew = gtk_combo_box_new_text ();
@@ -326,10 +322,8 @@
qra = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (qra), 6);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, qra,
- _("Maidenhead locator grid."),
- NULL);
+ gtk_widget_set_tooltip_text (qra,
+ _("Maidenhead locator grid."));
gtk_table_attach_defaults (GTK_TABLE (table), qra, 1, 2, 5, 6);
qrasigid = g_signal_connect (qra, "changed",
G_CALLBACK (qra_changed),
@@ -343,10 +337,9 @@
alt = gtk_spin_button_new_with_range (0, 5000, 1);
gtk_spin_button_set_increments (GTK_SPIN_BUTTON (alt), 1, 100);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (alt), TRUE);
- gtk_tooltips_set_tip (tooltips, alt,
+ gtk_widget_set_tooltip_text (alt,
_("Select the altitude of the ground station in meters or feet "\
- "depending on your settings"),
- NULL);
+ "depending on your settings"));
gtk_table_attach_defaults (GTK_TABLE (table), alt, 1, 2, 6, 7);
if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) {
@@ -365,10 +358,8 @@
wx = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (wx), 4);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, wx,
- _("Four letter code for weather station"),
- NULL);
+ gtk_widget_set_tooltip_text (wx,
+ _("Four letter code for weather station"));
gtk_table_attach_defaults (GTK_TABLE (table), wx, 1, 3, 7, 8);
wxbut = gpredict_hstock_button (GTK_STOCK_INDEX, _("Select"),
@@ -388,9 +379,8 @@
gtk_combo_box_append_text (GTK_COMBO_BOX (type), "Static");
gtk_combo_box_append_text (GTK_COMBO_BOX (type), "GPSD");
gtk_combo_box_set_active (GTK_COMBO_BOX (type), 0);
- gtk_tooltips_set_tip (tooltips, type,
- _("A qth can be static, ie. it does not change, or gpsd based for computers with gps attached."),
- NULL);
+ gtk_widget_set_tooltip_text (type,
+ _("A qth can be static, ie. it does not change, or gpsd based for computers with gps attached."));
gtk_table_attach_defaults (GTK_TABLE (table), type, 1, 2, 8, 9);
/* GPSD Server */
label = gtk_label_new (_("GPSD Server"));
@@ -399,10 +389,8 @@
server = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (server), 6000);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, server,
- _("GPSD Server."),
- NULL);
+ gtk_widget_set_tooltip_text (server,
+ _("GPSD Server."));
gtk_table_attach_defaults (GTK_TABLE (table), server, 1, 2, 9, 10);
/* GPSD Port*/
@@ -413,9 +401,8 @@
port = gtk_spin_button_new_with_range (0, 32768, 1);
gtk_spin_button_set_increments (GTK_SPIN_BUTTON (port), 1, 100);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (port), TRUE);
- gtk_tooltips_set_tip (tooltips, port,
- _("Set the port for GPSD to use. Default for gpsd is 2947."),
- NULL);
+ gtk_widget_set_tooltip_text (port,
+ _("Set the port for GPSD to use. Default for gpsd is 2947."));
gtk_table_attach_defaults (GTK_TABLE (table), port, 1, 2, 10, 11);
# endif
Modified: trunk/src/sat-pref-conditions.c
===================================================================
--- trunk/src/sat-pref-conditions.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-conditions.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -61,7 +61,6 @@
{
GtkWidget *table;
GtkWidget *label;
- GtkTooltips *tips;
GtkWidget *vbox;
@@ -81,12 +80,10 @@
GTK_SHRINK,
0, 0);
minel = gtk_spin_button_new_with_range (0, 90, 1);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, minel,
+ gtk_widget_set_tooltip_text (minel,
_("Elevation threshold for passes.\n"\
"Passes with maximum elevation below this limit "\
- "will be omitted"),
- NULL);
+ "will be omitted"));
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (minel), 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (minel), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (minel), FALSE);
@@ -133,10 +130,8 @@
GTK_SHRINK,
0, 0);
numpass = gtk_spin_button_new_with_range (5, 50, 1);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, numpass,
- _("The maximum number of passes to predict."),
- NULL);
+ gtk_widget_set_tooltip_text (numpass,
+ _("The maximum number of passes to predict."));
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (numpass), 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (numpass), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (numpass), FALSE);
@@ -159,11 +154,9 @@
GTK_SHRINK,
0, 0);
lookahead = gtk_spin_button_new_with_range (1, 14, 1);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, lookahead,
+ gtk_widget_set_tooltip_text (lookahead,
_("Only passes that occur within the specified "\
- "number of days will be shown."),
- NULL);
+ "number of days will be shown."));
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (lookahead), 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lookahead), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (lookahead), FALSE);
@@ -211,11 +204,9 @@
GTK_SHRINK,
0, 0);
res = gtk_spin_button_new_with_range (1, 600, 1);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, res,
+ gtk_widget_set_tooltip_text (res,
_("Gpredict will try to show the pass details "\
- "with the specified time resolution."),
- NULL);
+ "with the specified time resolution."));
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (res), 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (res), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (res), FALSE);
@@ -245,11 +236,9 @@
GTK_SHRINK,
0, 0);
nument = gtk_spin_button_new_with_range (10, 200, 1);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, nument,
- _("Gpredict will try to keep the number of rows "\
- "in the detailed prediction within this limit."),
- NULL);
+ gtk_widget_set_tooltip_text (nument,
+ _("Gpredict will try to keep the number of rows " \
+ "in the detailed prediction within this limit."));
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (nument), 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nument), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (nument), FALSE);
@@ -424,17 +413,14 @@
{
GtkWidget *button;
GtkWidget *butbox;
- GtkTooltips *tips;
button = gtk_button_new_with_label (_("Reset"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (reset_cb), NULL);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, button,
- _("Reset settings to the default values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset settings to the default values."));
butbox = gtk_hbutton_box_new ();
gtk_button_box_set_layout (GTK_BUTTON_BOX (butbox), GTK_BUTTONBOX_END);
Modified: trunk/src/sat-pref-debug.c
===================================================================
--- trunk/src/sat-pref-debug.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-debug.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -62,7 +62,6 @@
GtkWidget *vbox; /* vbox containing the list part and the details part */
GtkWidget *hbox;
GtkWidget *rbut;
- GtkTooltips *tips;
GtkWidget *label;
GtkWidget *butbox;
gchar *msg;
@@ -139,10 +138,8 @@
/* reset button */
rbut = gtk_button_new_with_label (_("Reset"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, rbut,
- _("Reset settings to the default values."),
- NULL);
+ gtk_widget_set_tooltip_text (rbut,
+ _("Reset settings to the default values."));
g_signal_connect (G_OBJECT (rbut), "clicked",
G_CALLBACK (reset_cb), NULL);
butbox = gtk_hbutton_box_new ();
Modified: trunk/src/sat-pref-formats.c
===================================================================
--- trunk/src/sat-pref-formats.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-formats.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -89,21 +89,18 @@
GtkWidget *sat_pref_formats_create ()
{
GtkWidget *vbox,*tfbox;
- GtkTooltips *tips;
gchar *text;
/* use local time */
tzcheck = gtk_check_button_new_with_label (_("Show local time instead of UTC."));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tzcheck),
sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, tzcheck, _(tztips), NULL);
+ gtk_widget_set_tooltip_text (tzcheck, _(tztips));
/* time format */
tfentry = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (tfentry), TIME_FORMAT_MAX_LENGTH);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, tfentry, _(tftips), NULL);
+ gtk_widget_set_tooltip_text (tfentry, _(tftips));
text = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT);
gtk_entry_set_text (GTK_ENTRY (tfentry), text);
@@ -117,8 +114,7 @@
/* reset button */
tfreset = gtk_button_new_with_label (_("Reset"));
g_signal_connect (tfreset, "clicked", G_CALLBACK (reset_cb), NULL);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, tfreset, _("Reset to default value"), NULL);
+ gtk_widget_set_tooltip_text (tfreset, _("Reset to default value"));
tfbox = gtk_hbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (tfbox), gtk_label_new (_("Time format:")),
@@ -131,15 +127,13 @@
nsewcheck = gtk_check_button_new_with_label (_("Use N/S/E/W for geographical coordinates."));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nsewcheck),
sat_cfg_get_bool (SAT_CFG_BOOL_USE_NSEW));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, nsewcheck, _(nsewtips), NULL);
+ gtk_widget_set_tooltip_text (nsewcheck, _(nsewtips));
/* unit */
useimporg = sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL);
impcheck = gtk_check_button_new_with_label (_("Use Imperial units instead of Metric."));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impcheck), useimporg);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, impcheck, _(imptips), NULL);
+ gtk_widget_set_tooltip_text (impcheck, _(imptips));
/* connect sat-pref-qth hook */
g_signal_connect (impcheck, "toggled", G_CALLBACK (systog_cb), NULL);
Modified: trunk/src/sat-pref-layout.c
===================================================================
--- trunk/src/sat-pref-layout.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-layout.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -358,7 +358,6 @@
static void create_window_placement (GtkBox *vbox)
{
GtkWidget *label;
- GtkTooltips *tips;
/* create header */
@@ -372,13 +371,11 @@
mwin = gtk_check_button_new_with_label (_("Restore position of main window"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mwin),
sat_cfg_get_bool (SAT_CFG_BOOL_MAIN_WIN_POS));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mwin,
- _("If you check this button, gpredict will try to "\
- "place the main window at the position it was "\
- "during the last session.\n"\
- "Note that window managers can ignore this request."),
- NULL);
+ gtk_widget_set_tooltip_text (mwin,
+ _("If you check this button, gpredict will try to " \
+ "place the main window at the position it was " \
+ "during the last session.\n" \
+ "Note that window managers can ignore this request."));
g_signal_connect (G_OBJECT (mwin), "toggled",
G_CALLBACK (window_pos_toggle_cb), NULL);
gtk_box_pack_start (vbox, mwin, FALSE, FALSE, 0);
@@ -387,13 +384,11 @@
mod = gtk_check_button_new_with_label (_("Restore position of module windows"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mod),
sat_cfg_get_bool (SAT_CFG_BOOL_MOD_WIN_POS));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, mod,
- _("If you check this button, gpredict will try to "\
- "place the module windows at the position they were "\
- "the last time.\n"\
- "Note that window managers can ignore this request."),
- NULL);
+ gtk_widget_set_tooltip_text (mod,
+ _("If you check this button, gpredict will try to " \
+ "place the module windows at the position they were " \
+ "the last time.\n" \
+ "Note that window managers can ignore this request."));
g_signal_connect (G_OBJECT (mod), "toggled",
G_CALLBACK (window_pos_toggle_cb), NULL);
gtk_box_pack_start (vbox, mod, FALSE, FALSE, 0);
@@ -402,11 +397,9 @@
state = gtk_check_button_new_with_label (_("Restore the state of modules when reopened (docked or window)"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state),
sat_cfg_get_bool (SAT_CFG_BOOL_MOD_STATE));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, state,
- _("If you check this button, gpredict will restore "\
- "the states of the modules from the last time they were used."),
- NULL);
+ gtk_widget_set_tooltip_text (state,
+ _("If you check this button, gpredict will restore " \
+ "the states of the modules from the last time they were used."));
g_signal_connect (G_OBJECT (state), "toggled",
G_CALLBACK (window_pos_toggle_cb), NULL);
gtk_box_pack_start (vbox, state, FALSE, FALSE, 0);
@@ -424,23 +417,19 @@
{
GtkWidget *button;
GtkWidget *butbox;
- GtkTooltips *tips;
button = gtk_button_new_with_label (_("Reset"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (reset_cb), cfg);
- tips = gtk_tooltips_new ();
if (cfg == NULL) {
- gtk_tooltips_set_tip (tips, button,
- _("Reset settings to the default values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset settings to the default values."));
}
else {
- gtk_tooltips_set_tip (tips, button,
- _("Reset module settings to the global values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset module settings to the global values."));
}
butbox = gtk_hbutton_box_new ();
Modified: trunk/src/sat-pref-list-view.c
===================================================================
--- trunk/src/sat-pref-list-view.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-list-view.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -71,7 +71,6 @@
GtkWidget *sat_pref_list_view_create (GKeyFile *cfg)
{
GtkWidget *vbox;
- GtkTooltips *tips;
gint i;
GtkWidget *table,*label;
@@ -158,13 +157,11 @@
g_signal_connect (G_OBJECT (ruleshint), "toggled",
G_CALLBACK (toggle_rh_cb), NULL);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, ruleshint,
+ gtk_widget_set_tooltip_text (ruleshint,
_("Enabling rules hint may make reading across many "\
"columns easier. By default the satlist will be rendered "\
"with alternating colours, but the exact behaviour is "\
- "up to the theme engine."),
- NULL);
+ "up to the theme engine."));
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
@@ -248,23 +245,19 @@
{
GtkWidget *button;
GtkWidget *butbox;
- GtkTooltips *tips;
button = gtk_button_new_with_label (_("Reset"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (reset_cb), cfg);
- tips = gtk_tooltips_new ();
if (cfg == NULL) {
- gtk_tooltips_set_tip (tips, button,
- _("Reset settings to the default values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset settings to the default values."));
}
else {
- gtk_tooltips_set_tip (tips, button,
- _("Reset module settings to the global values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset module settings to the global values."));
}
butbox = gtk_hbutton_box_new ();
Modified: trunk/src/sat-pref-map-view.c
===================================================================
--- trunk/src/sat-pref-map-view.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-map-view.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -121,7 +121,6 @@
GtkWidget *table;
gchar *mapfile;
GdkPixbuf *obuf,*sbuf;
- GtkTooltips *tips;
/* create header */
@@ -179,9 +178,8 @@
/* 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);
+ gtk_widget_set_tooltip_text (button,
+ _("Click to select a map"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (select_map_cb), NULL);
gtk_table_attach (GTK_TABLE (table), button, 1, 2, 1, 2,
@@ -204,7 +202,6 @@
static void create_bool_selectors (GKeyFile *cfg, GtkBox *vbox)
{
GtkWidget *label;
- GtkTooltips *tips;
GtkWidget *hbox;
@@ -221,10 +218,8 @@
/* 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);
+ gtk_widget_set_tooltip_text (qth,
+ _("Show location information on the map"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth),
mod_cfg_get_bool (cfg,
@@ -241,10 +236,8 @@
/* 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);
+ gtk_widget_set_tooltip_text (next,
+ _("Show which satellite comes up next and at what time"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next),
mod_cfg_get_bool (cfg,
@@ -261,10 +254,8 @@
/* 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);
+ gtk_widget_set_tooltip_text (curs,
+ _("Show the latitude and longitude of the mouse pointer"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs),
mod_cfg_get_bool (cfg,
@@ -282,10 +273,8 @@
/* 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);
+ gtk_widget_set_tooltip_text (grid,
+ _("Show horizontal and vertical grid lines"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (grid),
mod_cfg_get_bool (cfg,
@@ -313,7 +302,6 @@
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 */
@@ -342,10 +330,8 @@
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);
+ gtk_widget_set_tooltip_text (qthc,
+ _("Click to select a colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -369,10 +355,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (gridc), TRUE);
gtk_table_attach (GTK_TABLE (table), gridc, 3, 4, 0, 1,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, gridc,
- _("Click to select the grid colour"),
- NULL);
+ gtk_widget_set_tooltip_text (gridc,
+ _("Click to select the grid colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -396,10 +380,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (tickc), TRUE);
gtk_table_attach (GTK_TABLE (table), tickc, 5, 6, 0, 1,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, tickc,
- _("Click to select the colour for tick labels"),
- NULL);
+ gtk_widget_set_tooltip_text (tickc,
+ _("Click to select the colour for tick labels"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -423,10 +405,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (satc), TRUE);
gtk_table_attach (GTK_TABLE (table), satc, 1, 2, 1, 2,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, satc,
- _("Click to select satellite colour"),
- NULL);
+ gtk_widget_set_tooltip_text (satc,
+ _("Click to select satellite colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -450,10 +430,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (ssatc), TRUE);
gtk_table_attach (GTK_TABLE (table), ssatc, 3, 4, 1, 2,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, ssatc,
- _("Click to select colour for selected satellites"),
- NULL);
+ gtk_widget_set_tooltip_text (ssatc,
+ _("Click to select colour for selected satellites"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -477,10 +455,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (trackc), TRUE);
gtk_table_attach (GTK_TABLE (table), trackc, 5, 6, 1, 2,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, trackc,
- _("Click to select ground track colour"),
- NULL);
+ gtk_widget_set_tooltip_text (trackc,
+ _("Click to select ground track colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -504,10 +480,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (covc), TRUE);
gtk_table_attach (GTK_TABLE (table), covc, 1, 2, 2, 3,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, covc,
- _("Colour for coverage Area (make it transparent)"),
- NULL);
+ gtk_widget_set_tooltip_text (covc,
+ _("Colour for coverage Area (make it transparent)"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -531,10 +505,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (infofg), TRUE);
gtk_table_attach (GTK_TABLE (table), infofg, 3, 4, 2, 3,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, infofg,
- _("Click to select info text foreground colour"),
- NULL);
+ gtk_widget_set_tooltip_text (infofg,
+ _("Click to select info text foreground colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -559,10 +531,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (infobg), TRUE);
gtk_table_attach (GTK_TABLE (table), infobg, 5, 6, 2, 3,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, infobg,
- _("Click to select info text background colour"),
- NULL);
+ gtk_widget_set_tooltip_text (infobg,
+ _("Click to select info text background colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_MAP_SECTION,
@@ -672,23 +642,19 @@
{
GtkWidget *button;
GtkWidget *butbox;
- GtkTooltips *tips;
button = gtk_button_new_with_label (_("Reset"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (reset_cb), cfg);
- tips = gtk_tooltips_new ();
if (cfg == NULL) {
- gtk_tooltips_set_tip (tips, button,
- _("Reset settings to the default values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset settings to the default values."));
}
else {
- gtk_tooltips_set_tip (tips, button,
- _("Reset module settings to the global values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset module settings to the global values."));
}
butbox = gtk_hbutton_box_new ();
Modified: trunk/src/sat-pref-multi-pass.c
===================================================================
--- trunk/src/sat-pref-multi-pass.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-multi-pass.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -184,17 +184,14 @@
{
GtkWidget *button;
GtkWidget *butbox;
- GtkTooltips *tips;
button = gtk_button_new_with_label (_("Reset"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (reset_cb), NULL);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, button,
- _("Reset settings to the default values."),
- NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Reset settings to the default values."));
butbox = gtk_hbutton_box_new ();
gtk_button_box_set_layout (GTK_BUTTON_BOX (butbox), GTK_BUTTONBOX_END);
Modified: trunk/src/sat-pref-polar-view.c
===================================================================
--- trunk/src/sat-pref-polar-view.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-polar-view.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -116,10 +116,8 @@
{
GtkWidget *label;
GtkWidget *hbox;
- GtkTooltips *tips;
-
/* create header */
label = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -134,42 +132,33 @@
/* N/E/S/W */
nesw = gtk_radio_button_new_with_label (NULL, "N/E/S/W");
gtk_box_pack_start (GTK_BOX (hbox), nesw, FALSE, TRUE, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, nesw,
- "\tN\n"\
- "W\t\tE\n"\
- "\tS",
- NULL);
+ gtk_widget_set_tooltip_text (nesw,
+ "\tN\n" \
+ "W\t\tE\n" \
+ "\tS");
/* N/W/S/E */
nwse = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (nesw), "N/W/S/E");
gtk_box_pack_start (GTK_BOX (hbox), nwse, FALSE, TRUE, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, nwse,
- "\tN\n"\
- "E\t\tW\n"\
- "\tS",
- NULL);
-
+ gtk_widget_set_tooltip_text (nwse,
+ "\tN\n" \
+ "E\t\tW\n" \
+ "\tS");
/* S/E/N/W */
senw = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (nesw), "S/E/N/W");
gtk_box_pack_start (GTK_BOX (hbox), senw, FALSE, TRUE, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, senw,
- "\tS\n"\
- "W\t\tE\n"\
- "\tN",
- NULL);
+ gtk_widget_set_tooltip_text (senw,
+ "\tS\n" \
+ "W\t\tE\n" \
+ "\tN");
/* S/W/N/E */
swne = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (nesw), "S/W/N/E");
gtk_box_pack_start (GTK_BOX (hbox), swne, FALSE, TRUE, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, swne,
- "\tS\n"\
- "E\t\tW\n"\
- "\tW",
- NULL);
+ gtk_widget_set_tooltip_text (swne,
+ "\tS\n" \
+ "E\t\tW\n" \
+ "\tW");
/* read orientation */
if (cfg != NULL) {
@@ -237,7 +226,6 @@
static void create_bool_selectors (GKeyFile *cfg, GtkBox *vbox)
{
GtkWidget *label;
- GtkTooltips *tips;
GtkWidget *hbox;
@@ -254,10 +242,8 @@
/* 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 polar plot"),
- NULL);
+ gtk_widget_set_tooltip_text (qth,
+ _("Show location information on the polar plot"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (qth),
mod_cfg_get_bool (cfg,
@@ -274,10 +260,8 @@
/* Next Event */
next = gtk_check_button_new_with_label (_("Next Event"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, next,
- _("Show which satellites comes up next and at what time"),
- NULL);
+ gtk_widget_set_tooltip_text (next,
+ _("Show which satellites comes up next and at what time"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (next),
mod_cfg_get_bool (cfg,
@@ -294,10 +278,8 @@
/* Cursor position */
curs = gtk_check_button_new_with_label (_("Cursor Position"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, curs,
- _("Show the azimuth and elevation of the mouse pointer"),
- NULL);
+ gtk_widget_set_tooltip_text (curs,
+ _("Show the azimuth and elevation of the mouse pointer"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (curs),
mod_cfg_get_bool (cfg,
@@ -315,10 +297,8 @@
/* Extra tick marks */
xtick = gtk_check_button_new_with_label (_("Extra Az Ticks"));
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, xtick,
- _("Show extra tick marks for every 30\302\260"),
- NULL);
+ gtk_widget_set_tooltip_text (xtick,
+ _("Show extra tick marks for every 30\302\260"));
if (cfg != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (xtick),
mod_cfg_get_bool (cfg,
@@ -346,7 +326,6 @@
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 */
@@ -376,10 +355,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (bgd), TRUE);
gtk_table_attach (GTK_TABLE (table), bgd, 1, 2, 0, 1,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, bgd,
- _("Click to select background colour"),
- NULL);
+ gtk_widget_set_tooltip_text (bgd,
+ _("Click to select background colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
@@ -403,10 +380,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (axis), TRUE);
gtk_table_attach (GTK_TABLE (table), axis, 3, 4, 0, 1,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, axis,
- _("Click to select the axis colour"),
- NULL);
+ gtk_widget_set_tooltip_text (axis,
+ _("Click to select the axis colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
@@ -430,10 +405,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (tick), TRUE);
gtk_table_attach (GTK_TABLE (table), tick, 5, 6, 0, 1,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, tick,
- _("Click to select the colour for tick labels"),
- NULL);
+ gtk_widget_set_tooltip_text (tick,
+ _("Click to select the colour for tick labels"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
@@ -457,10 +430,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (sat), TRUE);
gtk_table_attach (GTK_TABLE (table), sat, 1, 2, 1, 2,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, sat,
- _("Click to select satellite colour"),
- NULL);
+ gtk_widget_set_tooltip_text (sat,
+ _("Click to select satellite colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
@@ -484,10 +455,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (ssat), TRUE);
gtk_table_attach (GTK_TABLE (table), ssat, 3, 4, 1, 2,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, ssat,
- _("Click to select colour for selected satellites"),
- NULL);
+ gtk_widget_set_tooltip_text (ssat,
+ _("Click to select colour for selected satellites"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
@@ -511,10 +480,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (track), TRUE);
gtk_table_attach (GTK_TABLE (table), track, 5, 6, 1, 2,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, track,
- _("Click to select track colour"),
- NULL);
+ gtk_widget_set_tooltip_text (track,
+ _("Click to select track colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
@@ -538,10 +505,8 @@
gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (info), TRUE);
gtk_table_attach (GTK_TABLE (table), info, 1, 2, 2, 3,
GTK_FILL , GTK_FILL, 0, 0);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, info,
- _("Click to select background colour"),
- NULL);
+ gtk_widget_set_tooltip_text (info,
+ _("Click to select background colour"));
if (cfg != NULL) {
rgba = mod_cfg_get_int (cfg,
MOD_CFG_POLAR_SECTION,
Modified: trunk/src/sat-pref-qth-editor.c
===================================================================
--- trunk/src/sat-pref-qth-editor.c 2011-07-30 21:05:28 UTC (rev 878)
+++ trunk/src/sat-pref-qth-editor.c 2011-07-30 23:24:01 UTC (rev 879)
@@ -176,7 +176,6 @@
{
GtkWidget *table;
GtkWidget *label;
- GtkTooltips *tooltips;
GtkWidget *locbut;
GtkWidget *wxbut;
@@ -193,13 +192,14 @@
name = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (name), 25);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, name,
- _("Enter a short name for this ground station, e.g. callsign.\n"\
- "Allowed characters: 0..9, a..z, A..Z, - and _"),
+ gtk_widget_set_tooltip_text (name,
+ _("Enter a short name for this ground station, e.g. callsign.\n" \
+ "Allowed characters: 0..9, a..z, A..Z, - and _"));
+ /* new api does not allow private tip
_("The name will be used to identify the ground station when "\
"it is presented to the user. Maximum allowed length "\
"is 25 characters."));
+ */
gtk_table_attach_defaults (GTK_TABLE (table), name, 1, 4, 0, 1);
/* attach changed signal so that we can enable OK button when
@@ -214,12 +214,13 @@
desc = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (desc), 256);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, desc,
- _("Enter an optional description for this ground station."),
+ gtk_widget_set_tooltip_text (desc,
+ _("Enter an optional description for this ground station."));
+ /* new api does not have private tip
_("The description can be used as additional "\
"information. It may be included when generating reports. "\
"The maximum length for the description is 256 characters."));
+ */
gtk_table_attach_defaults (GTK_TABLE (table), desc, 1, 4, 1, 2);
/* location */
@@ -229,10 +230,8 @@
location = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (location), 50);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, location,
- _("Optional location of the ground station, fx. Copenhagen, Denmark."),
- NULL);
+ gtk_widget_set_tooltip_text (location,
+ _("Optional location of the ground station, fx. Copenhagen, Denmark."));
gtk_table_attach_defaults (GTK_TABLE (table), location, 1, 3, 2, 3);
locbut = gpredict_hstock_button (GTK_STOCK_INDEX, _("Select"),
@@ -252,10 +251,8 @@
gtk_spin_button_set_increments (GTK_SPIN_BUTTON (lat), 0.0001, 1.0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lat), TRUE);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (lat), 4);
- tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tooltips, lat,
- _("Select the latitude of the ground station in decimal degrees."),
- NULL);
+ gtk_widget_set_tooltip_text (lat,
+ _("Select the latitude of the ground station in decimal degrees."));
gtk_table_attach_defaults (GTK_TABLE (table), lat, 1, 2, 3, 4);
ns = gtk_combo_box_new_text ();
@@ -274,9 +271,8 @@
gtk_spin_button_set_increments (GTK_SPIN_BUTTON (lon), 0.0001, 1.0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lon), TRUE);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (lon), 4);
- gtk_tooltips_set_tip (tooltips, lon,
- _("Select the longitude of the ground stat...
[truncated message content] |
|
From: <aa...@us...> - 2011-07-30 21:05:35
|
Revision: 878
http://gpredict.svn.sourceforge.net/gpredict/?rev=878&view=rev
Author: aa1vs
Date: 2011-07-30 21:05:28 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
Use access functions instead of private elements per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gpredict-help.c
trunk/src/gpredict-utils.c
trunk/src/gtk-azel-plot.c
trunk/src/gtk-polar-plot.c
trunk/src/gtk-polar-view.c
trunk/src/gtk-sat-map.c
trunk/src/gtk-sat-module-popup.c
trunk/src/gtk-sat-module.c
trunk/src/gtk-sky-glance.c
trunk/src/loc-tree.c
trunk/src/main.c
trunk/src/menubar.c
trunk/src/mod-cfg.c
trunk/src/mod-mgr.c
trunk/src/qth-editor.c
trunk/src/sat-info.c
trunk/src/sat-log-browser.c
trunk/src/sat-pass-dialogs.c
trunk/src/sat-pref-qth-editor.c
trunk/src/sat-pref-rig-editor.c
trunk/src/sat-pref-rot-editor.c
trunk/src/sat-pref.c
trunk/src/save-pass.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/ChangeLog 2011-07-30 21:05:28 UTC (rev 878)
@@ -11,7 +11,32 @@
* src/gtk-sky-glance.h
Change gtk headers to only include from short list at <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+ * src/gpredict-help.c
+ * src/gpredict-utils.c
+ * src/gtk-azel-plot.c
+ * src/gtk-polar-plot.c
+ * src/gtk-polar-view.c
+ * src/gtk-sat-map.c
+ * src/gtk-sat-module.c
+ * src/gtk-sat-module-popup.c
+ * src/gtk-sky-glance.c
+ * src/loc-tree.c
+ * src/main.c
+ * src/menubar.c
+ * src/mod-cfg.c
+ * src/mod-mgr.c
+ * src/qth-editor.c
+ * src/sat-info.c
+ * src/sat-log-browser.c
+ * src/sat-pass-dialogs.c
+ * src/sat-pref.c
+ * src/sat-pref-qth-editor.c
+ * src/sat-pref-rig-editor.c
+ * src/sat-pref-rot-editor.c
+ * src/save-pass.c
+ Use access functions instead of private elements per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+
2011-07-23 Charles Suprin <hamaa1vs at gmail.com>
* src/sat-cfg.[ch]
Modified: trunk/src/gpredict-help.c
===================================================================
--- trunk/src/gpredict-help.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gpredict-help.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -110,6 +110,7 @@
{
GtkWidget *dialog;
GtkWidget *label;
+ GtkBox *vbox;
gint resp;
@@ -124,11 +125,11 @@
NULL);
label = gtk_label_new (_("Please select a HTML browser to be used to view the help."));
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- sat_pref_help_create (), TRUE, FALSE, 0);
+ vbox = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG(dialog)));
+ gtk_box_pack_start (vbox, label, FALSE, TRUE, 0);
+ gtk_box_pack_start (vbox, sat_pref_help_create (), TRUE, FALSE, 0);
- gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
+ gtk_widget_show_all (GTK_WIDGET(vbox));
resp = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -247,7 +248,7 @@
g_signal_connect_swapped (dialog, "response",
G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), swin);
+ gtk_container_add (GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), swin);
gtk_widget_show_all (dialog);
}
Modified: trunk/src/gpredict-utils.c
===================================================================
--- trunk/src/gpredict-utils.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gpredict-utils.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -60,7 +60,6 @@
GtkWidget *image;
GtkWidget *box;
gchar *path;
- GtkTooltips *tips;
path = icon_file_name (file);
image = gtk_image_new_from_file (path);
@@ -71,12 +70,9 @@
gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0);
button = gtk_button_new ();
+ gtk_widget_set_tooltip_text (button, tooltip);
gtk_container_add (GTK_CONTAINER (button), box);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, button, tooltip, NULL);
-
-
return button;
}
@@ -95,7 +91,6 @@
GtkWidget *image;
GtkWidget *box;
gchar *path;
- GtkTooltips *tips;
path = icon_file_name (file);
image = gtk_image_new_from_file (path);
@@ -106,12 +101,9 @@
gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0);
button = gtk_button_new ();
+ gtk_widget_set_tooltip_text (button, tooltip);
gtk_container_add (GTK_CONTAINER (button), box);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, button, tooltip, NULL);
-
-
return button;
}
@@ -127,8 +119,6 @@
GtkWidget *button;
GtkWidget *image;
GtkWidget *box;
- GtkTooltips *tips;
-
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
box = gtk_hbox_new (FALSE, 0);
@@ -137,12 +127,9 @@
gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0);
button = gtk_button_new ();
+ gtk_widget_set_tooltip_text (button, tooltip);
gtk_container_add (GTK_CONTAINER (button), box);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, button, tooltip, NULL);
-
-
return button;
}
@@ -192,14 +179,7 @@
/* if current child is a button we have BINGO! */
if (GTK_IS_BUTTON (combo)) {
-
- GtkTooltips *tips;
-
- tips = gtk_tooltips_new ();
-
- gtk_tooltips_set_tip (tips, combo,
- (gchar *) text,
- NULL);
+ gtk_widget_set_tooltip_text (combo, text);
}
}
@@ -264,7 +244,6 @@
GtkWidget *button;
GtkWidget *image;
gchar *path;
- GtkTooltips *tips;
path = icon_file_name (pixmapfile);
image = gtk_image_new_from_file (path);
@@ -272,12 +251,9 @@
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
+ gtk_widget_set_tooltip_text (button, tooltip);
gtk_container_add (GTK_CONTAINER (button), image);
- tips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (tips, button, tooltip, NULL);
-
-
return button;
}
Modified: trunk/src/gtk-azel-plot.c
===================================================================
--- trunk/src/gtk-azel-plot.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-azel-plot.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -85,7 +85,7 @@
GtkType
gtk_azel_plot_get_type ()
{
- static GType gtk_azel_plot_type = 0;
+ static GtkType gtk_azel_plot_type = 0;
if (!gtk_azel_plot_type) {
static const GTypeInfo gtk_azel_plot_info = {
@@ -449,7 +449,7 @@
pass_detail_t *detail;
- if (GTK_WIDGET_REALIZED (widget)) {
+ if (gtk_widget_get_realized (widget)) {
/* get graph dimensions */
polv = GTK_AZEL_PLOT (data);
@@ -605,8 +605,7 @@
{
GtkAllocation aloc;
- aloc.width = canvas->allocation.width;
- aloc.height = canvas->allocation.height;
+ gtk_widget_get_allocation(canvas, &aloc);
size_allocate_cb (canvas, &aloc, data);
}
Modified: trunk/src/gtk-polar-plot.c
===================================================================
--- trunk/src/gtk-polar-plot.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-polar-plot.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -774,7 +774,7 @@
GtkAnchorType anch = GTK_ANCHOR_CENTER;
- if (GTK_WIDGET_REALIZED (widget)) {
+ if (gtk_widget_get_realized (widget)) {
/* get graph dimensions */
polv = GTK_POLAR_PLOT (data);
@@ -894,8 +894,7 @@
{
GtkAllocation aloc;
- aloc.width = canvas->allocation.width;
- aloc.height = canvas->allocation.height;
+ gtk_widget_get_allocation (canvas, &aloc);
size_allocate_cb (canvas, &aloc, data);
}
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-polar-view.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -529,18 +529,16 @@
static void
update_polv_size (GtkPolarView *polv)
{
- //GtkPolarView *polv;
GtkAllocation allocation;
GooCanvasPoints *prec;
gfloat x,y;
GtkAnchorType anch = GTK_ANCHOR_CENTER;
- if (GTK_WIDGET_REALIZED (polv)) {
+ if (gtk_widget_get_realized (GTK_WIDGET(polv))) {
/* get graph dimensions */
- allocation.width = GTK_WIDGET (polv)->allocation.width;
- allocation.height = GTK_WIDGET (polv)->allocation.height;
+ gtk_widget_get_allocation ( GTK_WIDGET(polv), &allocation);
polv->size = MIN(allocation.width, allocation.height);
polv->r = (polv->size / 2) - POLV_DEFAULT_MARGIN;
@@ -668,8 +666,7 @@
{
GtkAllocation aloc;
- aloc.width = canvas->allocation.width;
- aloc.height = canvas->allocation.height;
+ gtk_widget_get_allocation (canvas, &aloc);
size_allocate_cb (canvas, &aloc, data);
}
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-sat-map.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -484,10 +484,9 @@
gfloat ratio; /* ratio between map width and height */
gfloat size; /* size = min (alloc.w, ratio*alloc.h) */
- if (GTK_WIDGET_REALIZED (satmap)) {
+ if (gtk_widget_get_realized (GTK_WIDGET(satmap))) {
/* get graph dimensions */
- allocation.width = GTK_WIDGET (satmap)->allocation.width;
- allocation.height = GTK_WIDGET (satmap)->allocation.height;
+ gtk_widget_get_allocation( GTK_WIDGET(satmap), &allocation);
if (satmap->keepratio) {
/* Use allocation->width and allocation->height to calculate
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-sat-module-popup.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -313,6 +313,8 @@
GtkWidget *label;
GtkWidget *toggle;
GtkTooltips *tooltips;
+ GtkWidget *vbox;
+ GtkAllocation aloc;
guint response;
GtkSatModule *module = GTK_SAT_MODULE (data);
GtkSatModule *newmod;
@@ -335,7 +337,8 @@
/* label */
label = gtk_label_new (_("Name of new module:"));
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 0);
+ vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
+ gtk_box_pack_start (GTK_BOX(vbox), label, FALSE, FALSE, 0);
/* name entry */
entry = gtk_entry_new ();
@@ -357,8 +360,7 @@
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_box_pack_start (GTK_BOX( vbox ), entry, FALSE, FALSE, 0);
/* check button */
@@ -369,11 +371,11 @@
_("If checked, the new module will be opened "\
"after it has been created"),
NULL);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (vbox),
toggle, FALSE, FALSE, 20);
- gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
+ gtk_widget_show_all (vbox);
/* run dialog */
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -433,9 +435,10 @@
g_free (title);
/* use size of source module */
+ gtk_widget_get_allocation(GTK_WIDGET (module), &aloc);
gtk_window_set_default_size (GTK_WINDOW (newmod->win),
- GTK_WIDGET (module)->allocation.width,
- GTK_WIDGET (module)->allocation.height);
+ aloc.width,
+ aloc.height);
g_signal_connect (G_OBJECT (newmod->win), "configure_event",
G_CALLBACK (module_window_config_cb), newmod);
@@ -496,12 +499,15 @@
static void docking_state_cb (GtkWidget *menuitem, gpointer data)
{
GtkWidget *module = GTK_WIDGET (data);
+ GtkAllocation aloc;
gint w,h;
gchar *icon; /* icon file name */
gchar *title; /* window title */
(void) menuitem; /* avoid unused parameter compiler warning */
+ gtk_widget_get_allocation ( module, &aloc);
+
switch (GTK_SAT_MODULE (module)->state) {
case GTK_SAT_MOD_STATE_DOCKED:
@@ -517,7 +523,7 @@
NULL);
}
else {
- w = module->allocation.width;
+ w = aloc.width;
}
if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata,
MOD_CFG_GLOBAL_SECTION,
@@ -529,7 +535,7 @@
NULL);
}
else {
- h = module->allocation.height;
+ h = aloc.height;
}
/* increase reference count of module */
@@ -1198,7 +1204,7 @@
/* data is only useful when window is visible */
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
else
return FALSE; /* carry on normally */
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-sat-module.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -774,7 +774,7 @@
break;
default:
- state = gdk_window_get_state (GDK_WINDOW (GTK_WIDGET (module)->window));
+ state = gdk_window_get_state (GDK_WINDOW (gtk_widget_get_window (GTK_WIDGET (module))));
if (state & GDK_WINDOW_STATE_ICONIFIED) {
needupdate = FALSE;
@@ -1251,6 +1251,7 @@
gtk_sat_module_config_cb (GtkWidget *button, gpointer data)
{
GtkSatModule *module = GTK_SAT_MODULE (data);
+ GtkAllocation alloc;
GtkWidget *toplevel;
gchar *name;
gchar *cfgfile;
@@ -1307,8 +1308,9 @@
/* store state and size */
laststate = module->state;
- w = GTK_WIDGET (module)->allocation.width;
- h = GTK_WIDGET (module)->allocation.height;
+ gtk_widget_get_allocation( GTK_WIDGET(module),&alloc);
+ w = alloc.width;
+ h = alloc.height;
gtk_sat_module_close_cb (NULL, module);
Modified: trunk/src/gtk-sky-glance.c
===================================================================
--- trunk/src/gtk-sky-glance.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/gtk-sky-glance.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -454,7 +454,7 @@
gdouble x,y,w,h;
- if (GTK_WIDGET_REALIZED (widget)) {
+ if (gtk_widget_get_realized (widget)) {
/* get graph dimensions */
skg = GTK_SKY_GLANCE (data);
@@ -605,9 +605,8 @@
on_canvas_realized (GtkWidget *canvas, gpointer data)
{
GtkAllocation aloc;
-
- aloc.width = canvas->allocation.width;
- aloc.height = canvas->allocation.height;
+
+ gtk_widget_get_allocation (canvas, &aloc);
size_allocate_cb (canvas, &aloc, data);
}
Modified: trunk/src/loc-tree.c
===================================================================
--- trunk/src/loc-tree.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/loc-tree.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -270,7 +270,7 @@
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
GTK_RESPONSE_ACCEPT,
FALSE);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG(dialog)->vbox), swin);
+ gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), swin);
/* connect selection checker for the tree-view;
we have waited so far, because we want to pass the dialog as
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/main.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -409,7 +409,7 @@
(void) data; /* prevent unused parameter compiler warning */
/* data is only useful when window is visible */
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
else
return FALSE; /* carry on normally */
Modified: trunk/src/menubar.c
===================================================================
--- trunk/src/menubar.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/menubar.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -496,7 +496,7 @@
gtk_box_pack_start (GTK_BOX (box), label2, TRUE, TRUE, 0);
/* finalise dialog */
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), box);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), box);
g_signal_connect_swapped (dialog,
"response",
G_CALLBACK (gtk_widget_destroy),
@@ -595,7 +595,7 @@
GTK_STOCK_OK,
GTK_RESPONSE_ACCEPT,
NULL);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), box, TRUE, TRUE, 30);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), box, TRUE, TRUE, 30);
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -668,7 +668,7 @@
gtk_box_pack_start (GTK_BOX (box), label2, TRUE, TRUE, 0);
/* finalise dialog */
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), box);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), box);
g_signal_connect_swapped (dialog,
"response",
G_CALLBACK (gtk_widget_destroy),
@@ -793,7 +793,7 @@
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_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), button, FALSE, FALSE, 0);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -964,7 +964,7 @@
gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 200);
gtk_container_add (GTK_CONTAINER (swin), modlist);
gtk_widget_show (swin);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), swin);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), swin);
switch (gtk_dialog_run (GTK_DIALOG (dialog))) {
@@ -1017,8 +1017,9 @@
gint w,h;
gchar *icon; /* icon file name */
gchar *title; /* window title */
+ GtkAllocation aloc;
-
+ gtk_widget_get_allocation (module, &aloc);
/* 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,
@@ -1030,7 +1031,7 @@
NULL);
}
else {
- w = module->allocation.width;
+ w = aloc.width;
}
if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata,
MOD_CFG_GLOBAL_SECTION,
@@ -1042,7 +1043,7 @@
NULL);
}
else {
- h = module->allocation.height;
+ h = aloc.height;
}
/* increase reference count of module */
Modified: trunk/src/mod-cfg.c
===================================================================
--- trunk/src/mod-cfg.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/mod-cfg.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -441,6 +441,7 @@
GtkWidget *label;
GtkWidget *swin;
GtkWidget *addbut, *delbut;
+ GtkWidget *vbox;
GtkTooltips *tooltips;
gchar *icon; /* window icon file name */
GtkWidget *frame;
@@ -541,14 +542,14 @@
gtk_table_attach (GTK_TABLE (table), add, 3, 4, 1, 2,
GTK_SHRINK, GTK_SHRINK, 0, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- gtk_hseparator_new (), FALSE, FALSE, 5);
+ vbox = gtk_dialog_get_content_area (GTK_DIALOG( dialog ));
+ gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 5);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), _("<b>Satellites</b>"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 5);
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5);
/* satellite selector */
@@ -588,9 +589,9 @@
gtk_table_attach (GTK_TABLE (table), delbut, 4, 5, 5, 6, GTK_SHRINK, GTK_SHRINK, 2, 5);
gtk_table_attach_defaults (GTK_TABLE (table), label, 5, 9, 0, 2);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
- gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
+ gtk_widget_show_all (vbox);
return dialog;
}
@@ -1063,7 +1064,7 @@
contents = sat_pref_modules_create (cfgdata);
gtk_widget_show_all (contents);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->vbox), contents);
+ gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), contents);
/* execute dialog */
switch (gtk_dialog_run (GTK_DIALOG (dialog))) {
Modified: trunk/src/mod-mgr.c
===================================================================
--- trunk/src/mod-mgr.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/mod-mgr.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -640,8 +640,9 @@
gint w,h;
gchar *icon; /* icon file name */
gchar *title; /* window title */
+ GtkAllocation aloc;
-
+ gtk_widget_get_allocation ( module, &aloc);
/* 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,
@@ -653,7 +654,7 @@
NULL);
}
else {
- w = module->allocation.width;
+ w = aloc.width;
}
if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata,
MOD_CFG_GLOBAL_SECTION,
@@ -665,7 +666,7 @@
NULL);
}
else {
- h = module->allocation.height;
+ h = aloc.height;
}
/* increase reference count of module */
Modified: trunk/src/qth-editor.c
===================================================================
--- trunk/src/qth-editor.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/qth-editor.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -129,7 +129,7 @@
GTK_RESPONSE_OK,
FALSE);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))),
create_editor_widgets (qth));
/* this hacky-thing is to keep the dialog running in case the
Modified: trunk/src/sat-info.c
===================================================================
--- trunk/src/sat-info.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-info.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -340,7 +340,7 @@
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), notebook);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), notebook);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
Modified: trunk/src/sat-log-browser.c
===================================================================
--- trunk/src/sat-log-browser.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-log-browser.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -164,7 +164,7 @@
gtk_window_set_default_size (GTK_WINDOW (window), 850, 400);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG(window)->vbox), hbox);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG(window))), hbox);
/* connect response signal */
g_signal_connect (G_OBJECT (window), "response",
Modified: trunk/src/sat-pass-dialogs.c
===================================================================
--- trunk/src/sat-pass-dialogs.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-pass-dialogs.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -523,7 +523,7 @@
G_CALLBACK (single_pass_dialog_delete), NULL);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), notebook);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), notebook);
gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 300);
gtk_widget_show_all (dialog);
@@ -1129,7 +1129,7 @@
G_CALLBACK (multi_pass_dialog_delete), NULL);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), swin);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), swin);
gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 300);
gtk_widget_show_all (dialog);
Modified: trunk/src/sat-pref-qth-editor.c
===================================================================
--- trunk/src/sat-pref-qth-editor.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-pref-qth-editor.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -132,7 +132,7 @@
GTK_RESPONSE_OK,
FALSE);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))),
create_editor_widgets (treeview, new));
/* this hacky-thing is to keep the dialog running in case the
Modified: trunk/src/sat-pref-rig-editor.c
===================================================================
--- trunk/src/sat-pref-rig-editor.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-pref-rig-editor.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -101,7 +101,7 @@
GTK_RESPONSE_OK,
FALSE);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
create_editor_widgets (conf));
/* this hacky-thing is to keep the dialog running in case the
Modified: trunk/src/sat-pref-rot-editor.c
===================================================================
--- trunk/src/sat-pref-rot-editor.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-pref-rot-editor.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -99,7 +99,7 @@
GTK_RESPONSE_OK,
FALSE);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))),
create_editor_widgets (conf));
/* this hacky-thing is to keep the dialog running in case the
Modified: trunk/src/sat-pref.c
===================================================================
--- trunk/src/sat-pref.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/sat-pref.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -174,8 +174,8 @@
NULL);
g_free (iconfile);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG(window)->vbox), hbox);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG(window)->vbox), 10);
+ gtk_box_pack_start_defaults (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(window))), hbox);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(window))), 10);
gtk_button_clicked (GTK_BUTTON (genbut));
Modified: trunk/src/save-pass.c
===================================================================
--- trunk/src/save-pass.c 2011-07-30 20:39:28 UTC (rev 877)
+++ trunk/src/save-pass.c 2011-07-30 21:05:28 UTC (rev 878)
@@ -193,7 +193,7 @@
gtk_table_attach_defaults (GTK_TABLE (table), contents, 1, 2, 3, 4);
gtk_widget_show_all (table);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), table);
/* run the dialog */
@@ -354,7 +354,7 @@
gtk_table_attach_defaults (GTK_TABLE (table), contents, 1, 2, 3, 4);
gtk_widget_show_all (table);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG (dialog))), table);
/* run the dialog */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-30 20:39:35
|
Revision: 877
http://gpredict.svn.sourceforge.net/gpredict/?rev=877&view=rev
Author: aa1vs
Date: 2011-07-30 20:39:28 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
Change gtk headers to only include from short list at <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-azel-plot.h
trunk/src/gtk-event-list.h
trunk/src/gtk-polar-plot.h
trunk/src/gtk-polar-view.h
trunk/src/gtk-sat-list.h
trunk/src/gtk-sat-map.h
trunk/src/gtk-sat-module-tmg.h
trunk/src/gtk-sat-module.h
trunk/src/gtk-sky-glance.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/ChangeLog 2011-07-30 20:39:28 UTC (rev 877)
@@ -1,3 +1,17 @@
+2011-07-30 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-azel-plot.h
+ * src/gtk-event-list.h
+ * src/gtk-polar-plot.h
+ * src/gtk-polar-view.h
+ * src/gtk-sat-list.h
+ * src/gtk-sat-map.h
+ * src/gtk-sat-module.h
+ * src/gtk-sat-module-tmg.h
+ * src/gtk-sky-glance.h
+ Change gtk headers to only include from short list at <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+
+
2011-07-23 Charles Suprin <hamaa1vs at gmail.com>
* src/sat-cfg.[ch]
Modified: trunk/src/gtk-azel-plot.h
===================================================================
--- trunk/src/gtk-azel-plot.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-azel-plot.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,8 +31,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
#include "predict-tools.h"
#include <goocanvas.h>
Modified: trunk/src/gtk-event-list.h
===================================================================
--- trunk/src/gtk-event-list.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-event-list.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,7 +31,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
Modified: trunk/src/gtk-polar-plot.h
===================================================================
--- trunk/src/gtk-polar-plot.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-polar-plot.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,8 +31,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
#include "predict-tools.h"
#include <goocanvas.h>
Modified: trunk/src/gtk-polar-view.h
===================================================================
--- trunk/src/gtk-polar-view.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-polar-view.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,8 +31,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
#include "predict-tools.h"
#include <goocanvas.h>
Modified: trunk/src/gtk-sat-list.h
===================================================================
--- trunk/src/gtk-sat-list.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-sat-list.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,7 +31,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
Modified: trunk/src/gtk-sat-map.h
===================================================================
--- trunk/src/gtk-sat-map.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-sat-map.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -33,8 +33,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
#include <goocanvas.h>
Modified: trunk/src/gtk-sat-module-tmg.h
===================================================================
--- trunk/src/gtk-sat-module-tmg.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-sat-module-tmg.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -38,7 +38,7 @@
#include <glib.h>
#include <gdk/gdk.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
Modified: trunk/src/gtk-sat-module.h
===================================================================
--- trunk/src/gtk-sat-module.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-sat-module.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,7 +31,7 @@
#include <glib.h>
#include <gdk/gdk.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
#include "qth-data.h"
Modified: trunk/src/gtk-sky-glance.h
===================================================================
--- trunk/src/gtk-sky-glance.h 2011-07-24 01:17:14 UTC (rev 876)
+++ trunk/src/gtk-sky-glance.h 2011-07-30 20:39:28 UTC (rev 877)
@@ -31,8 +31,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gdk/gdk.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtkvbox.h>
+#include <gtk/gtk.h>
#include "gtk-sat-data.h"
#include "predict-tools.h"
#include <goocanvas.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-24 01:17:26
|
Revision: 876
http://gpredict.svn.sourceforge.net/gpredict/?rev=876&view=rev
Author: aa1vs
Date: 2011-07-24 01:17:14 +0000 (Sun, 24 Jul 2011)
Log Message:
-----------
Save and restore current module on closing.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/mod-mgr.c
trunk/src/sat-cfg.c
trunk/src/sat-cfg.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-07-16 01:02:39 UTC (rev 875)
+++ trunk/ChangeLog 2011-07-24 01:17:14 UTC (rev 876)
@@ -1,3 +1,10 @@
+2011-07-23 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/sat-cfg.[ch]
+ * src/mod-mgr.c
+ Save and restore the current module on closing.
+
+
2011-07-07 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-polar-view.c
Modified: trunk/src/mod-mgr.c
===================================================================
--- trunk/src/mod-mgr.c 2011-07-16 01:02:39 UTC (rev 875)
+++ trunk/src/mod-mgr.c 2011-07-24 01:17:14 UTC (rev 876)
@@ -101,6 +101,7 @@
GtkWidget *module;
gchar *modfile;
gchar *confdir;
+ gint page;
/* create notebook */
nbook = gtk_notebook_new ();
@@ -112,6 +113,7 @@
/* get list of modules which should be open */
openmods = sat_cfg_get_str (SAT_CFG_STR_OPEN_MODULES);
+ page = sat_cfg_get_int (SAT_CFG_INT_MODULE_CURRENT_PAGE);
if (openmods) {
mods = g_strsplit (openmods, ";", 0);
@@ -147,12 +149,19 @@
sat_log_log (SAT_LOG_LEVEL_ERROR,
_("%s: Failed to restore %s"),
__FUNCTION__, mods[i]);
+
+ /* try to smartly handle disappearing modules */
+ page--;
}
g_free (modfile);
}
+ /* set to the page open when gpredict was closed */
+ if (page >=0)
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (nbook), page);
+
g_strfreev (mods);
g_free (openmods);
@@ -320,6 +329,7 @@
GtkWidget *module;
gchar *mods = NULL;
gchar *buff;
+ gint page;
if (!nbook) {
@@ -362,11 +372,15 @@
__FUNCTION__, GTK_SAT_MODULE (module)->name);
}
+
+ /* store the currently open page number */
+ page = gtk_notebook_get_current_page (GTK_NOTEBOOK (nbook));
sat_log_log (SAT_LOG_LEVEL_MSG, _("%s: Saved states for %d modules."),
__FUNCTION__, num);
sat_cfg_set_str (SAT_CFG_STR_OPEN_MODULES, mods);
+ sat_cfg_set_int (SAT_CFG_INT_MODULE_CURRENT_PAGE, page);
g_free (mods);
}
Modified: trunk/src/sat-cfg.c
===================================================================
--- trunk/src/sat-cfg.c 2011-07-16 01:02:39 UTC (rev 875)
+++ trunk/src/sat-cfg.c 2011-07-24 01:17:14 UTC (rev 876)
@@ -148,6 +148,7 @@
{ "MODULES", "VIEW_1", GTK_SAT_MOD_VIEW_MAP}, /* FIXME */
{ "MODULES", "VIEW_2", GTK_SAT_MOD_VIEW_POLAR}, /* FIXME */
{ "MODULES", "VIEW_3", GTK_SAT_MOD_VIEW_SINGLE}, /* FIXME */
+ { "GLOBAL", "CURRENT_PAGE", -1}, /* FIXME */
{ "GLOBAL", "WARP", 1},
{ "MODULES", "LIST_REFRESH", 1},
{ "MODULES", "LIST_COLUMNS", LIST_COLUMNS_DEFAULTS},
Modified: trunk/src/sat-cfg.h
===================================================================
--- trunk/src/sat-cfg.h 2011-07-16 01:02:39 UTC (rev 875)
+++ trunk/src/sat-cfg.h 2011-07-24 01:17:14 UTC (rev 876)
@@ -70,6 +70,7 @@
SAT_CFG_INT_MODULE_VIEW_1, /*!< Type of view 1 */
SAT_CFG_INT_MODULE_VIEW_2, /*!< Type of view 2 */
SAT_CFG_INT_MODULE_VIEW_3, /*!< Type of view 3 */
+ SAT_CFG_INT_MODULE_CURRENT_PAGE, /*!< Number of integer parameters. */
SAT_CFG_INT_WARP_FACTOR, /*!< Time compression factor. */
SAT_CFG_INT_LIST_REFRESH, /*!< List refresh rate (cycle). */
SAT_CFG_INT_LIST_COLUMNS, /*!< List column visibility. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-16 01:02:46
|
Revision: 875
http://gpredict.svn.sourceforge.net/gpredict/?rev=875&view=rev
Author: aa1vs
Date: 2011-07-16 01:02:39 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/loc-tree.c
trunk/src/mod-cfg.c
trunk/src/pass-popup-menu.c
trunk/src/pass-to-txt.c
trunk/src/print-pass.c
trunk/src/qth-editor.c
trunk/src/sat-log-browser.c
trunk/src/sat-pass-dialogs.c
Modified: trunk/src/loc-tree.c
===================================================================
--- trunk/src/loc-tree.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/loc-tree.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -493,6 +493,8 @@
guint coli = GPOINTER_TO_UINT (column);
gchar hmf = ' ';
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
@@ -552,6 +554,8 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, GPOINTER_TO_UINT (column), &number, -1);
if (coli == TREE_COL_ALT) {
@@ -590,6 +594,9 @@
GtkTreeIter iter;
+ (void) selection; /* avoid unused parameter compiler warning */
+ (void) sel_path; /* avoid unused parameter compiler warning */
+
if (gtk_tree_model_get_iter(model, &iter, path)) {
guint value;
Modified: trunk/src/mod-cfg.c
===================================================================
--- trunk/src/mod-cfg.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/mod-cfg.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -420,6 +420,9 @@
*/
mod_cfg_status_t mod_cfg_delete (gchar *modname, gboolean needcfm)
{
+ (void) modname; /* avoid unused parameter compiler warning */
+ (void) needcfm; /* avoid unused parameter compiler warning */
+
return MOD_CFG_CANCEL;
}
@@ -1091,6 +1094,8 @@
GtkResponseType response;
qth_t qth;
+ (void) button; /* avoid unused parameter compiler warning */
+
qth.name = NULL;
qth.loc = NULL;
qth.desc = NULL;
@@ -1131,8 +1136,8 @@
static void sat_activated_cb (GtkSatSelector *selector, gint catnr, gpointer data)
{
GtkListStore *store;
+ (void) data; /* avoid unused parameter compiler warning */
-
/* Add satellite to selected list */
store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist)));
add_selected_sat (store, catnr);
@@ -1159,6 +1164,7 @@
gchar *sat1,*sat2;
gint ret = 0;
+ (void) userdata; /* avoid unused parameter compiler warning */
gtk_tree_model_get(model, a, GTK_SAT_SELECTOR_COL_NAME, &sat1, -1);
gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_NAME, &sat2, -1);
@@ -1190,7 +1196,10 @@
gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */
gint catnr;
GtkSatSelector *selector = GTK_SAT_SELECTOR(data);
-
+
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) column; /* avoid unused parameter compiler warning */
+
/* get the selected row in the treeview */
selection = gtk_tree_view_get_selection (view);
haveselection = gtk_tree_selection_get_selected (selection, &model, &iter);
@@ -1215,7 +1224,8 @@
gchar *name;
gdouble epoch;
-
+ (void) button; /* avoid unused parameter compiler warning */
+
/* get the selected row in the treeview */
gtk_sat_selector_get_selected (selector, &catnum, &name, &epoch);
@@ -1242,6 +1252,7 @@
gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */
gint catnr;
+ (void) button; /* avoid unused parameter compiler warning */
/* get the selected row in the treeview */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (satlist));
Modified: trunk/src/pass-popup-menu.c
===================================================================
--- trunk/src/pass-popup-menu.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/pass-popup-menu.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -151,6 +151,9 @@
static void
polar_plot_pass_details (GtkWidget *menuitem, gpointer data)
{
+ (void) menuitem; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
g_print ("FIXME: %s:%s not implemented!\n", __FILE__, __FUNCTION__);
}
@@ -159,6 +162,9 @@
static void
azel_plot_pass_details (GtkWidget *menuitem, gpointer data)
{
+ (void) menuitem; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
g_print ("FIXME: %s:%s not implemented!\n", __FILE__, __FUNCTION__);
}
Modified: trunk/src/pass-to-txt.c
===================================================================
--- trunk/src/pass-to-txt.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/pass-to-txt.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -132,8 +132,9 @@
gchar *fmtstr;
time_t aos,los;
guint size;
+
+ (void) fields; /* avoid unused parameter compiler warning */
-
fmtstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT);
loc = sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME);
aos = (pass->aos - 2440587.5)*86400.;
@@ -200,6 +201,7 @@
gchar *sep;
gchar *buff;
+ (void) qth; /* avoid unused parameter compiler warning */
/* first, get the length of the time field */
fmtstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT);
@@ -451,6 +453,8 @@
{
gchar *header;
pass_t *pass;
+
+ (void) fields; /* avoid unused parameter compiler warning */
pass = PASS (g_slist_nth_data (passes, 0));
@@ -477,6 +481,7 @@
gchar *buff;
pass_t *pass;
+ (void) qth; /* avoid unused parameter compiler warning */
/* first, get the length of the time field */
pass = PASS (g_slist_nth_data (passes, 0));
@@ -529,6 +534,7 @@
gchar *buff;
pass_t *pass;
+ (void) qth; /* avoid unused parameter compiler warning */
pass = PASS (g_slist_nth_data (passes, 0));
Modified: trunk/src/print-pass.c
===================================================================
--- trunk/src/print-pass.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/print-pass.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -175,6 +175,8 @@
*/
void print_passes (GSList *passes)
{
+ (void) passes; /* avoid unused parameter compiler warning */
+
sat_log_log (SAT_LOG_LEVEL_BUG, _("%s: Not implemented!"), __FUNCTION__);
}
@@ -230,8 +232,8 @@
PangoFontDescription *desc;
gchar *page_str;
+ (void) operation; /* avoid unused parameter compiler warning */
-
cr = gtk_print_context_get_cairo_context (context);
width = gtk_print_context_get_width (context);
@@ -303,7 +305,10 @@
gpointer user_data)
{
PrintData *data = (PrintData *)user_data;
-
+
+ (void) operation; /* avoid unused parameter compiler warning */
+ (void) context; /* avoid unused parameter compiler warning */
+
g_free (data->pgheader);
g_strfreev (data->lines);
g_free (data);
Modified: trunk/src/qth-editor.c
===================================================================
--- trunk/src/qth-editor.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/qth-editor.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -617,6 +617,7 @@
gchar *entry, *end, *j;
gint len, pos;
+ (void) data; /* avoid unused parameter compiler warning */
/* step 1: ensure that only valid characters are entered
(stolen from xlog, tnx pg4i)
@@ -680,6 +681,7 @@
guint qthalt;
gboolean selected = FALSE;
+ (void) widget; /* avoid unused parameter compiler warning */
switch (mode) {
@@ -761,7 +763,10 @@
gchar *locator;
gint retcode;
gdouble latf,lonf;
-
+
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
locator = g_try_malloc (7);
/* no need to check locator != NULL, since hamlib func will do it for us
@@ -823,6 +828,9 @@
gdouble latf,lonf;
gchar *msg;
+ (void) entry; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
retcode = locator2longlat (&lonf, &latf, gtk_entry_get_text (GTK_ENTRY (qra)));
if (retcode == RIG_OK) {
Modified: trunk/src/sat-log-browser.c
===================================================================
--- trunk/src/sat-log-browser.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/sat-log-browser.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -308,6 +308,10 @@
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 to indicate that message window
should be destroyed */
return FALSE;
@@ -319,6 +323,10 @@
message_window_destroy (GtkWidget *widget,
gpointer data)
{
+
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
/* clean up memory */
/* GSList, ... */
@@ -332,6 +340,8 @@
gint response,
gpointer data)
{
+ (void) data; /* avoid unused parameter compiler warning */
+
switch (response) {
/* close button */
Modified: trunk/src/sat-pass-dialogs.c
===================================================================
--- trunk/src/sat-pass-dialogs.c 2011-07-16 00:36:24 UTC (rev 874)
+++ trunk/src/sat-pass-dialogs.c 2011-07-16 01:02:39 UTC (rev 875)
@@ -541,6 +541,7 @@
*/
static void single_pass_response (GtkWidget *dialog, gint response, gpointer data)
{
+ (void) data; /* avoid unused parameter compiler warning */
switch (response) {
@@ -675,6 +676,8 @@
guint coli = GPOINTER_TO_UINT (column);
gchar hmf = ' ';
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
/* check whether configuration requests the use
@@ -729,6 +732,8 @@
gdouble number;
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+
+ (void) col; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter, coli, &number, -1);
@@ -752,6 +757,8 @@
gdouble number;
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+
+ (void) col; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter, coli, &number, -1);
@@ -780,6 +787,8 @@
gdouble number;
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+
+ (void) col; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter, coli, &number, -1);
@@ -807,6 +816,8 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
/* format the number */
@@ -828,6 +839,8 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
/* format the number */
@@ -851,6 +864,7 @@
gchar *fmtstr;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter, coli, &number, -1);
@@ -878,6 +892,10 @@
static gint single_pass_dialog_delete (GtkWidget *dialog, GdkEvent *event, gpointer pass)
{
+ (void) dialog; /* avoid unused parameter compiler warning */
+ (void) event; /* avoid unused parameter compiler warning */
+ (void) pass; /* avoid unused parameter compiler warning */
+
/* dialog will be destroyed */
return FALSE;
}
@@ -885,7 +903,10 @@
static void single_pass_dialog_destroy (GtkWidget *dialog, gpointer data)
{
pass_t *pass = PASS(g_object_get_data (G_OBJECT (dialog), "pass"));
+
+ (void) data; /* avoid unused parameter compiler warning */
+
free_pass (PASS(pass));
gtk_widget_destroy (dialog);
@@ -1127,6 +1148,8 @@
*/
static void multi_pass_response (GtkWidget *dialog, gint response, gpointer data)
{
+ (void) data; /* avoid unused parameter compiler warning */
+
switch (response) {
case RESPONSE_PRINT:
@@ -1150,6 +1173,10 @@
static gint multi_pass_dialog_delete (GtkWidget *dialog, GdkEvent *event, gpointer pass)
{
+ (void) dialog; /* avoid unused parameter compiler warning */
+ (void) event; /* avoid unused parameter compiler warning */
+ (void) pass; /* avoid unused parameter compiler warning */
+
/* dialog will be destroyed */
return FALSE;
}
@@ -1159,6 +1186,8 @@
{
GSList *passes = (GSList *) g_object_get_data (G_OBJECT (dialog), "passes");
+ (void) data; /* avoid unused parameter compiler warning */
+
free_passes (passes);
@@ -1227,8 +1256,8 @@
guint coli = GPOINTER_TO_UINT (column);
guint h,m,s;
+ (void) col; /* avoid unused parameter compiler warning */
-
gtk_tree_model_get (model, iter, coli, &number, -1);
if (number == 0.0) {
@@ -1338,6 +1367,7 @@
pass_t *pass = NULL;
qth_t *qth;
+ (void) data; /* avoid unused parameter compiler warning */
/* get selected satellite */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
@@ -1388,6 +1418,8 @@
pass_t *pass = NULL;
qth_t *qth;
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) column; /* avoid unused parameter compiler warning */
/* get selected satellite */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-16 00:36:31
|
Revision: 874
http://gpredict.svn.sourceforge.net/gpredict/?rev=874&view=rev
Author: aa1vs
Date: 2011-07-16 00:36:24 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-freq-knob.c
trunk/src/gtk-polar-view-popup.c
trunk/src/gtk-rot-ctrl.c
trunk/src/gtk-sat-list-col-sel.c
trunk/src/gtk-sat-map.c
trunk/src/gtk-sat-tree.c
Modified: trunk/src/gtk-freq-knob.c
===================================================================
--- trunk/src/gtk-freq-knob.c 2011-07-16 00:28:15 UTC (rev 873)
+++ trunk/src/gtk-freq-knob.c 2011-07-16 00:36:24 UTC (rev 874)
@@ -91,6 +91,7 @@
sizeof (GtkFreqKnob),
5, /* n_preallocs */
(GInstanceInitFunc) gtk_freq_knob_init,
+ NULL,
};
gtk_freq_knob_type = g_type_register_static (GTK_TYPE_VBOX,
Modified: trunk/src/gtk-polar-view-popup.c
===================================================================
--- trunk/src/gtk-polar-view-popup.c 2011-07-16 00:28:15 UTC (rev 873)
+++ trunk/src/gtk-polar-view-popup.c 2011-07-16 00:36:24 UTC (rev 874)
@@ -177,7 +177,8 @@
sat_obj_t *obj = NULL;
sat_t *sat;
qth_t *qth;
- gint idx,i;
+ gint idx;
+ guint i;
GooCanvasItemModel *root;
pass_detail_t *detail;
guint num;
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2011-07-16 00:28:15 UTC (rev 873)
+++ trunk/src/gtk-rot-ctrl.c 2011-07-16 00:36:24 UTC (rev 874)
@@ -127,6 +127,7 @@
sizeof (GtkRotCtrl),
5, /* n_preallocs */
(GInstanceInitFunc) gtk_rot_ctrl_init,
+ NULL
};
gtk_rot_ctrl_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -676,8 +677,9 @@
{
GtkRotCtrl *ctrl = GTK_ROT_CTRL( user_data);
sat_t *sat = SAT (value);
-
- //ctrl->sats = g_slist_append (ctrl->sats, sat);
+
+ (void) key; /* avoid unused variable warning */
+
ctrl->sats = g_slist_insert_sorted (ctrl->sats, sat, (GCompareFunc)sat_name_compare);
}
Modified: trunk/src/gtk-sat-list-col-sel.c
===================================================================
--- trunk/src/gtk-sat-list-col-sel.c 2011-07-16 00:28:15 UTC (rev 873)
+++ trunk/src/gtk-sat-list-col-sel.c 2011-07-16 00:36:24 UTC (rev 874)
@@ -77,6 +77,7 @@
sizeof (GtkSatListColSel),
5, /* n_preallocs */
(GInstanceInitFunc) gtk_sat_list_col_sel_init,
+ NULL
};
gtk_sat_list_col_sel_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -113,7 +114,7 @@
static void
gtk_sat_list_col_sel_init (GtkSatListColSel *list)
{
-
+ (void) list; /* avoid unusued parameter compiler warning */
}
static void
@@ -257,7 +258,7 @@
GtkSatListColSel *sel = GTK_SAT_LIST_COL_SEL (data);
guint i;
gboolean checked;
-
+ (void) path; /* avoid unusued parameter compiler warning */
/* get row number */
gtk_tree_model_get (model, iter, 2, &i, -1);
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-07-16 00:28:15 UTC (rev 873)
+++ trunk/src/gtk-sat-map.c 2011-07-16 00:36:24 UTC (rev 874)
@@ -130,6 +130,7 @@
sizeof (GtkSatMap),
5, /* n_preallocs */
(GInstanceInitFunc) gtk_sat_map_init,
+ NULL
};
gtk_sat_map_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -450,6 +451,8 @@
static void
size_allocate_cb (GtkWidget *widget, GtkAllocation *allocation, gpointer data)
{
+ (void) widget; /* avoid unusued parameter compiler warning */
+ (void) allocation; /* avoid unusued parameter compiler warning */
GTK_SAT_MAP (data)->resize = TRUE;
}
@@ -590,6 +593,8 @@
{
GtkSatMap *satmap = GTK_SAT_MAP(data);
+ (void) canvas; /* avoid unusued parameter compiler warning */
+
/* raise info items */
goo_canvas_item_model_raise (satmap->sel, NULL);
goo_canvas_item_model_raise (satmap->locnam, NULL);
@@ -822,6 +827,9 @@
GtkSatMap *satmap = GTK_SAT_MAP (data);
gfloat lat,lon;
gchar *text;
+
+ (void) target; /* avoid unusued parameter compiler warning */
+ (void) item; /* avoid unusued parameter compiler warning */
/* set text only if QTH info is enabled */
if (satmap->cursinfo) {
@@ -864,6 +872,7 @@
GooCanvasItemModel *model,
gpointer data)
{
+ (void) canvas; /* avoid unusued parameter compiler warning */
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
g_signal_connect (item, "motion_notify_event",
@@ -897,6 +906,8 @@
gint *catpoint = NULL;
sat_t *sat = NULL;
+ (void) target; /* avoid unusued parameter compiler warning */
+
switch (event->button) {
/* double-left-click */
@@ -966,6 +977,8 @@
sat_map_obj_t *obj = NULL;
guint32 col;
+ (void) target; /* avoid unusued parameter compiler warning */
+
catpoint = g_try_new0 (gint, 1);
*catpoint = catnum;
@@ -1127,6 +1140,8 @@
void
gtk_sat_map_reconf (GtkWidget *widget, GKeyFile *cfgdat)
{
+ (void) widget; /* avoid unusued parameter compiler warning */
+ (void) cfgdat; /* avoid unusued parameter compiler warning */
}
@@ -1353,7 +1368,7 @@
rangelon = ssplon;
else {
- if ((180 - azi) >= 0)
+ if ((180.0 - azi) >= 0)
rangelon = ssplon - arccos (num, dem);
else
rangelon = ssplon + arccos (num, dem);
@@ -1665,6 +1680,8 @@
{
gsize size;
+ (void) satmap; /* avoid unusued parameter compiler warning */
+ (void) sat; /* avoid unusued parameter compiler warning */
size = 2*sizeof(double);
/* call g_qsort_with_data, which warps the qsort function
@@ -1695,6 +1712,8 @@
{
double *ea = (double *)a;
double *eb = (double *)b;
+
+ (void) data; /* avoid unusued parameter compiler warning */
if (ea[0] < eb[0]) {
return -1;
@@ -1730,6 +1749,8 @@
double *ea = (double *)a;
double *eb = (double *)b;
+ (void) data; /* avoid unusued parameter compiler warning */
+
if (ea[1] < eb[1]) {
return -1;
}
@@ -1763,6 +1784,8 @@
gfloat x,y;
gchar *tooltip;
+ (void) key; /* avoid unusued parameter compiler warning */
+
if (decayed(sat)) {
return;
}
Modified: trunk/src/gtk-sat-tree.c
===================================================================
--- trunk/src/gtk-sat-tree.c 2011-07-16 00:28:15 UTC (rev 873)
+++ trunk/src/gtk-sat-tree.c 2011-07-16 00:36:24 UTC (rev 874)
@@ -100,6 +100,7 @@
sizeof (GtkSatTree),
1, /* n_preallocs */
(GInstanceInitFunc) gtk_sat_tree_init,
+ NULL
};
gtk_sat_tree_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -136,7 +137,7 @@
static void
gtk_sat_tree_init (GtkSatTree *sat_tree)
{
-
+ (void) sat_tree; /* avoid unused parameter compiler warning */
}
static void
@@ -311,6 +312,7 @@
const gchar *fname;
guint num = 0;
+ (void) flags; /* avoid unused parameter compiler warning */
/* create a new tree store */
store = gtk_tree_store_new (GTK_SAT_TREE_COL_NUM,
@@ -501,6 +503,7 @@
gboolean toggle_item;
guint catnum;
+ (void) cell; /* avoid unused parameter compiler warning */
/* get toggled iter */
gtk_tree_model_get_iter (model, &iter, path);
@@ -634,6 +637,7 @@
GtkSatTree *sat_tree = GTK_SAT_TREE (data);
guint cat1, cat2;
+ (void) path; /* avoid unused parameter compiler warning */
cat1 = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data), "tmp"));
@@ -692,6 +696,7 @@
{
guint cat1, cat2;
+ (void) path; /* avoid unused parameter compiler warning */
cat1 = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (data), "tmp"));
@@ -784,6 +789,7 @@
gchar *sat1,*sat2;
gint ret = 0;
+ (void) userdata; /* avoid unused parameter compiler warning */
gtk_tree_model_get(model, a, GTK_SAT_TREE_COL_NAME, &sat1, -1);
gtk_tree_model_get(model, b, GTK_SAT_TREE_COL_NAME, &sat2, -1);
@@ -808,6 +814,8 @@
static void
expand_cb (GtkWidget *button, gpointer tree)
{
+ (void) button; /* avoid unused parameter compiler warning */
+
gtk_tree_view_expand_all (GTK_TREE_VIEW (GTK_SAT_TREE (tree)->tree));
}
@@ -821,6 +829,8 @@
static void
collapse_cb (GtkWidget *button, gpointer tree)
{
+ (void) button; /* avoid unused parameter compiler warning */
+
gtk_tree_view_collapse_all (GTK_TREE_VIEW (GTK_SAT_TREE (tree)->tree));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-16 00:28:22
|
Revision: 873
http://gpredict.svn.sourceforge.net/gpredict/?rev=873&view=rev
Author: aa1vs
Date: 2011-07-16 00:28:15 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/sat-pref-conditions.c
trunk/src/sat-pref-debug.c
trunk/src/sat-pref-formats.c
trunk/src/sat-pref-help.c
trunk/src/sat-pref-layout.c
trunk/src/sat-pref-list-view.c
trunk/src/sat-pref-map-view.c
trunk/src/sat-pref-multi-pass.c
trunk/src/sat-pref-polar-view.c
trunk/src/sat-pref-qth-editor.c
trunk/src/sat-pref-qth.c
trunk/src/sat-pref-refresh.c
trunk/src/sat-pref-rig-editor.c
trunk/src/sat-pref-rig.c
trunk/src/sat-pref-rot-editor.c
trunk/src/sat-pref-rot.c
trunk/src/sat-pref-single-sat.c
trunk/src/sat-pref-tle.c
Modified: trunk/src/sat-pref-conditions.c
===================================================================
--- trunk/src/sat-pref-conditions.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-conditions.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -405,7 +405,10 @@
static void
spin_changed_cb (GtkWidget *spinner, gpointer data)
{
- dirty = TRUE;
+ (void) spinner; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
+ dirty = TRUE;
}
@@ -454,7 +457,9 @@
static void
reset_cb (GtkWidget *button, gpointer data)
{
-
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
/* get defaults */
gtk_spin_button_set_value (GTK_SPIN_BUTTON (minel),
sat_cfg_get_int_def (SAT_CFG_INT_PRED_MIN_EL));
Modified: trunk/src/sat-pref-debug.c
===================================================================
--- trunk/src/sat-pref-debug.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-debug.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -234,7 +234,10 @@
static void
state_change_cb (GtkWidget *widget, gpointer data)
{
- dirty = TRUE;
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
+ dirty = TRUE;
}
@@ -243,7 +246,10 @@
reset_cb (GtkWidget *button, gpointer data)
{
gint num = sat_cfg_get_int_def (SAT_CFG_INT_LOG_CLEAN_AGE);
-
+
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
switch (num) {
case SEC_PER_DAY:
Modified: trunk/src/sat-pref-formats.c
===================================================================
--- trunk/src/sat-pref-formats.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-formats.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -193,6 +193,9 @@
tfprev_cb (gpointer data)
{
const gchar *fmtstr;
+
+ (void) data; /* avoid unused parameter compiler warning */
+
//struct timeval tval;
//struct timezone tzone;
GTimeVal tval;
@@ -229,8 +232,9 @@
static void
systog_cb (GtkToggleButton *togglebutton, gpointer user_data)
{
- sat_cfg_set_bool (SAT_CFG_BOOL_USE_IMPERIAL,
- gtk_toggle_button_get_active (togglebutton));
+ (void) user_data; /* avoid unused parameter compiler warning */
+ sat_cfg_set_bool (SAT_CFG_BOOL_USE_IMPERIAL,
+ gtk_toggle_button_get_active (togglebutton));
sat_pref_qth_sys_changed (gtk_toggle_button_get_active (togglebutton));
}
@@ -241,8 +245,10 @@
reset_cb (GtkWidget *button, gpointer data)
{
gchar *fmtstr;
+
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
-
fmtstr = sat_cfg_get_str_def (SAT_CFG_STR_TIME_FORMAT);
gtk_entry_set_text (GTK_ENTRY (tfentry), fmtstr);
g_free (fmtstr);
Modified: trunk/src/sat-pref-help.c
===================================================================
--- trunk/src/sat-pref-help.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-help.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -176,6 +176,8 @@
browser_changed_cb (GtkComboBox *cbox, gpointer data)
{
gint idx;
+
+ (void) data; /* avoid unused parameter compiler warning */
idx = gtk_combo_box_get_active (cbox);
Modified: trunk/src/sat-pref-layout.c
===================================================================
--- trunk/src/sat-pref-layout.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-layout.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -140,7 +140,9 @@
void sat_pref_layout_cancel (GKeyFile *cfg)
{
gchar *str;
-
+
+ (void) cfg; /* avoid unused parameter compiler warning */
+
str = sat_cfg_get_str (SAT_CFG_STR_MODULE_GRID);
gtk_entry_set_text (GTK_ENTRY (gridstr), str);
g_free (str);
@@ -322,6 +324,7 @@
gint idx;
gchar *icon;
+ (void) data; /* avoid unused parameter compiler warning */
idx = gtk_combo_box_get_active (combo);
if (idx < PREDEF_NUM) {
@@ -463,6 +466,7 @@
guint i,sel=PREDEF_NUM-1;
gchar *buffer;
+ (void) button; /* avoid unused parameter compiler warning */
/* views */
if (cfg == NULL) {
@@ -509,6 +513,8 @@
/** \brief Toggle window positioning settings. */
static void window_pos_toggle_cb (GtkWidget *toggle, gpointer data)
{
+ (void) toggle; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
dirty = TRUE;
}
@@ -522,8 +528,9 @@
{
gchar *entry, *end, *j;
gint len, pos;
+
+ (void) data; /* avoid unused parameter compiler warning */
-
/* step 1: ensure that only valid characters are entered
(stolen from xlog, tnx pg4i)
*/
Modified: trunk/src/sat-pref-list-view.c
===================================================================
--- trunk/src/sat-pref-list-view.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-list-view.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -190,6 +190,7 @@
void
sat_pref_list_view_cancel (GKeyFile *cfg)
{
+ (void) cfg; /* avoid unused parameter compiler warning */
}
@@ -290,6 +291,7 @@
guint32 flags;
guint i;
+ (void) button; /* avoid unused parameter compiler warning */
if (cfg == NULL) {
@@ -340,7 +342,11 @@
toggle_rh_cb (GtkToggleButton *toggle, gpointer data)
{
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ruleshint)) != rh_flag)
- dirty = TRUE;
+ (void) toggle; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ruleshint)) != rh_flag)
+
+ dirty = TRUE;
}
Modified: trunk/src/sat-pref-map-view.c
===================================================================
--- trunk/src/sat-pref-map-view.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-map-view.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -710,6 +710,9 @@
*/
static void content_changed (GtkToggleButton *but, gpointer data)
{
+ (void) but; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
@@ -723,17 +726,28 @@
*/
static void colour_changed (GtkWidget *but, gpointer data)
{
+ (void) but; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
static void orbit_changed (GtkWidget *spin, gpointer data)
{
+ (void) spin; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
static gboolean shadow_changed (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data)
{
+ (void) range; /* avoid unused parameter compiler warning */
+ (void) scroll; /* avoid unused parameter compiler warning */
+ (void) value; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
/* prevent other signal handlers from being executed */
@@ -758,6 +772,7 @@
guint16 alpha;
guint rgba;
+ (void) button; /* avoid unused parameter compiler warning */
if (cfg == NULL) {
/* global mode, get defaults */
@@ -916,6 +931,8 @@
*/
void sat_pref_map_view_cancel (GKeyFile *cfg)
{
+ (void) cfg; /* avoid unused parameter compiler warning */
+
dirty = FALSE;
g_free (mapf);
@@ -1206,8 +1223,10 @@
static void select_map_cb (GtkWidget *button, gpointer data)
{
gchar *mapfile;
+
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
-
/* execute map selector */
mapfile = select_map (mapf);
Modified: trunk/src/sat-pref-multi-pass.c
===================================================================
--- trunk/src/sat-pref-multi-pass.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-multi-pass.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -218,7 +218,11 @@
reset_cb (GtkWidget *button, gpointer data)
{
guint i;
-
+
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
+
/* get defaults */
flags = sat_cfg_get_int_def (SAT_CFG_INT_PRED_MULTI_COL);
Modified: trunk/src/sat-pref-polar-view.c
===================================================================
--- trunk/src/sat-pref-polar-view.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-polar-view.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -673,6 +673,9 @@
*/
static void content_changed (GtkToggleButton *but, gpointer data)
{
+ (void) but; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
@@ -686,6 +689,9 @@
*/
static void colour_changed (GtkWidget *but, gpointer data)
{
+ (void) but; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
@@ -705,7 +711,9 @@
guint16 alpha;
guint rgba;
+ (void) button; /* avoid unused parameter compiler warning */
+
if (cfg == NULL) {
/* global mode, get defaults */
@@ -860,6 +868,8 @@
*/
void sat_pref_polar_view_cancel (GKeyFile *cfg)
{
+ (void) cfg; /* avoid unused parameter compiler warning */
+
dirty = FALSE;
}
Modified: trunk/src/sat-pref-qth-editor.c
===================================================================
--- trunk/src/sat-pref-qth-editor.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-qth-editor.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -647,6 +647,7 @@
gchar *entry, *end, *j;
gint len, pos;
+ (void) data; /* avoid unused parameter compiler warning */
/* step 1: ensure that only valid characters are entered
(stolen from xlog, tnx pg4i)
@@ -710,6 +711,7 @@
guint qthalt;
gboolean selected = FALSE;
+ (void) widget; /* avoid unused parameter compiler warning */
switch (mode) {
@@ -791,7 +793,10 @@
gchar *locator;
gint retcode;
gdouble latf,lonf;
-
+
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
locator = g_try_malloc (7);
/* no need to check locator != NULL, since hamlib func will do it for us
@@ -852,6 +857,9 @@
gint retcode;
gdouble latf,lonf;
gchar *msg;
+
+ (void) entry; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
retcode = locator2longlat (&lonf, &latf, gtk_entry_get_text (GTK_ENTRY (qra)));
Modified: trunk/src/sat-pref-qth.c
===================================================================
--- trunk/src/sat-pref-qth.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-qth.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -551,6 +551,8 @@
{
GtkTreeView *qthlist = GTK_TREE_VIEW (data);
+ (void) button; /* avoid unused parameter compiler warning */
+
sat_pref_qth_editor_run (qthlist, TRUE);
}
@@ -561,14 +563,20 @@
GtkTreeViewColumn *column,
gpointer user_data)
{
- sat_pref_qth_editor_run (tree_view, FALSE);
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) column; /* avoid unused parameter compiler warning */
+ (void) user_data; /* avoid unused parameter compiler warning */
+
+ sat_pref_qth_editor_run (tree_view, FALSE);
}
static void
edit_cb (GtkWidget *button, gpointer data)
{
GtkTreeView *qthlist = GTK_TREE_VIEW (data);
-
+
+ (void) button; /* avoid unused parameter compiler warning */
+
sat_pref_qth_editor_run (qthlist, FALSE);
}
@@ -594,6 +602,7 @@
GtkTreeSelection *selection;
GtkTreeIter iter;
+ (void) button; /* avoid unused parameter compiler warning */
/* if this is the only entry, tell user that it is not
possible to delete
@@ -745,6 +754,7 @@
{
gchar *thisqth;
+ (void) path; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter,
QTH_LIST_COL_NAME, &thisqth,
@@ -789,7 +799,9 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
gchar hmf = ' ';
-
+
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
/* check whether configuration requests the use
@@ -874,11 +886,13 @@
GtkTreeIter *iter,
gpointer data)
{
- qth_t qth;
+ qth_t qth;
gboolean def = FALSE;
gchar *filename,*confdir;
- gchar *buff;
+ gchar *buff;
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter,
QTH_LIST_COL_DEF, &def,
@@ -1027,8 +1041,9 @@
gint alti;
GtkTreeViewColumn *column;
gchar *title;
+
+ (void) path; /* avoid unused parameter compiler warning */
-
/* first, get the current altitude and other data */
gtk_tree_model_get (model, iter,
QTH_LIST_COL_ALT, &alti,
Modified: trunk/src/sat-pref-refresh.c
===================================================================
--- trunk/src/sat-pref-refresh.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-refresh.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -290,6 +290,7 @@
void
sat_pref_refresh_cancel (GKeyFile *cfg)
{
+ (void) cfg; /* avoid unused parameter compiler warning */
dirty = FALSE;
}
@@ -395,6 +396,9 @@
static void
spin_changed_cb (GtkWidget *spinner, gpointer data)
{
+ (void) spinner; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
@@ -455,6 +459,7 @@
{
gint val;
+ (void) button; /* avoid unused parameter compiler warning */
/* views */
if (cfg == NULL) {
Modified: trunk/src/sat-pref-rig-editor.c
===================================================================
--- trunk/src/sat-pref-rig-editor.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-rig-editor.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -478,6 +478,7 @@
gchar *entry, *end, *j;
gint len, pos;
+ (void) data; /* avoid unused parameter compiler warning */
/* step 1: ensure that only valid characters are entered
(stolen from xlog, tnx pg4i)
@@ -532,6 +533,9 @@
static void
type_changed (GtkWidget *widget, gpointer data)
{
+
+ (void) data; /* avoid unused parameter compiler warning */
+
/* PTT consistency */
if (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == RIG_TYPE_TRX) {
if (gtk_combo_box_get_active (GTK_COMBO_BOX (ptt)) == PTT_TYPE_NONE) {
@@ -563,7 +567,8 @@
static void
ptt_changed (GtkWidget *widget, gpointer data)
{
-
+ (void) data; /* avoid unused parameter compiler warning */
+
if (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == PTT_TYPE_NONE) {
if (gtk_combo_box_get_active (GTK_COMBO_BOX (type)) == RIG_TYPE_TRX) {
/* not good, we need to have PTT for this type */
@@ -581,6 +586,7 @@
static void
vfo_changed (GtkWidget *widget, gpointer data)
{
+ (void) data; /* avoid unused parameter compiler warning */
if (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == 0) {
if (gtk_combo_box_get_active (GTK_COMBO_BOX (type)) == RIG_TYPE_DUPLEX) {
Modified: trunk/src/sat-pref-rig.c
===================================================================
--- trunk/src/sat-pref-rig.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-rig.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -466,6 +466,9 @@
GtkTreeIter item; /* new item added to the list store */
GtkListStore *liststore;
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
radio_conf_t conf = {
.name = NULL,
.host = NULL,
@@ -520,6 +523,9 @@
GtkTreeSelection *selection;
GtkTreeIter iter;
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
radio_conf_t conf = {
.name = NULL,
.host = NULL,
@@ -618,6 +624,8 @@
GtkTreeSelection *selection;
GtkTreeIter iter;
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
/* If there are no entries, we have a bug since the button should
have been disabled. */
@@ -656,6 +664,11 @@
GtkTreeViewColumn *column,
gpointer user_data)
{
+ (void) tree_view; /* avoid unused parameter compiler warning */
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) column; /* avoid unused parameter compiler warning */
+ (void) user_data; /* avoid unused parameter compiler warning */
+
edit_cb (editbutton, NULL);
}
@@ -680,6 +693,8 @@
gchar *fname;
gchar **buff;
guint coli = GPOINTER_TO_UINT (column);
+
+ (void) col; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter, coli, &fname, -1);
@@ -708,7 +723,9 @@
{
guint type;
guint coli = GPOINTER_TO_UINT (column);
-
+
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &type, -1);
switch (type) {
@@ -762,6 +779,8 @@
gint ptt;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &ptt, -1);
switch (ptt) {
@@ -802,6 +821,8 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
/* convert to MHz */
@@ -831,6 +852,8 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
switch (number) {
Modified: trunk/src/sat-pref-rot-editor.c
===================================================================
--- trunk/src/sat-pref-rot-editor.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-rot-editor.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -364,6 +364,7 @@
gchar *entry, *end, *j;
gint len, pos;
+ (void) data; /* avoid unused parameter compiler warning */
/* step 1: ensure that only valid characters are entered
(stolen from xlog, tnx pg4i)
@@ -414,6 +415,8 @@
{
gint type = gtk_combo_box_get_active (box);
+ (void) data; /* avoid unused parameter compiler warning */
+
switch (type) {
case ROT_AZ_TYPE_360:
Modified: trunk/src/sat-pref-rot.c
===================================================================
--- trunk/src/sat-pref-rot.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-rot.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -428,6 +428,9 @@
GtkTreeIter item; /* new item added to the list store */
GtkListStore *liststore;
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
rotor_conf_t conf = {
.name = NULL,
.host = NULL,
@@ -480,6 +483,9 @@
GtkTreeSelection *selection;
GtkTreeIter iter;
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
rotor_conf_t conf = {
.name = NULL,
.host = NULL,
@@ -576,6 +582,8 @@
GtkTreeSelection *selection;
GtkTreeIter iter;
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
/* If there are no entries, we have a bug since the button should
have been disabled. */
@@ -614,6 +622,11 @@
GtkTreeViewColumn *column,
gpointer user_data)
{
+ (void) tree_view; /* avoid unused parameter compiler warning */
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) column; /* avoid unused parameter compiler warning */
+ (void) user_data; /* avoid unused parameter compiler warning */
+
edit_cb (editbutton, NULL);
}
@@ -635,6 +648,8 @@
guint coli = GPOINTER_TO_UINT (column);
gchar *text;
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
text = g_strdup_printf ("%.0f\302\260", number);
@@ -661,6 +676,8 @@
guint coli = GPOINTER_TO_UINT (column);
gchar *text;
+ (void) col; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get (model, iter, coli, &number, -1);
switch (number) {
Modified: trunk/src/sat-pref-single-sat.c
===================================================================
--- trunk/src/sat-pref-single-sat.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-single-sat.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -141,6 +141,8 @@
void
sat_pref_single_sat_cancel (GKeyFile *cfg)
{
+ (void) cfg; /* avoid unused parameter compiler warning */
+
dirty = FALSE;
reset = FALSE;
}
@@ -257,8 +259,9 @@
reset_cb (GtkWidget *button, gpointer cfg)
{
guint i;
+
+ (void) button; /* avoid unused parameter compiler warning */
-
if (cfg == NULL) {
/* global mode, get defaults */
flags = sat_cfg_get_int_def (SAT_CFG_INT_SINGLE_SAT_FIELDS);
Modified: trunk/src/sat-pref-tle.c
===================================================================
--- trunk/src/sat-pref-tle.c 2011-07-15 22:38:47 UTC (rev 872)
+++ trunk/src/sat-pref-tle.c 2011-07-16 00:28:15 UTC (rev 873)
@@ -377,6 +377,8 @@
reset_cb (GtkWidget *button, gpointer data)
{
+ (void) button; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
/* get defaults */
/* update frequency */
@@ -423,6 +425,9 @@
static void
value_changed_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
dirty = TRUE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 22:38:53
|
Revision: 872
http://gpredict.svn.sourceforge.net/gpredict/?rev=872&view=rev
Author: aa1vs
Date: 2011-07-15 22:38:47 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-sat-module.h
Modified: trunk/src/gtk-sat-module.h
===================================================================
--- trunk/src/gtk-sat-module.h 2011-07-15 22:38:24 UTC (rev 871)
+++ trunk/src/gtk-sat-module.h 2011-07-15 22:38:47 UTC (rev 872)
@@ -113,7 +113,7 @@
guint event_timeout;
/* layout and children */
- gint *grid; /*!< The grid layout array [(type,left,right,top,bottom),...] */
+ guint *grid; /*!< The grid layout array [(type,left,right,top,bottom),...] */
guint nviews; /*!< The number of views */
GSList *views; /*!< Pointers to the views */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 22:38:30
|
Revision: 871
http://gpredict.svn.sourceforge.net/gpredict/?rev=871&view=rev
Author: aa1vs
Date: 2011-07-15 22:38:24 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-sat-module.c
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-07-15 22:37:10 UTC (rev 870)
+++ trunk/src/gtk-sat-module.c 2011-07-15 22:38:24 UTC (rev 871)
@@ -121,6 +121,7 @@
sizeof (GtkSatModule),
5, /* n_preallocs */
(GInstanceInitFunc) gtk_sat_module_init,
+ NULL
};
gtk_sat_module_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -618,7 +619,7 @@
/* number of views: we have five numbers per view (type,left,right,top,bottom) */
module->nviews = length / 5;
- module->grid = g_try_new0 (gint, length);
+ module->grid = g_try_new0 (guint, length);
/* if we cannot allocate memory for the grid zero the views out and log */
if ( module->grid != NULL ) {
@@ -959,6 +960,8 @@
geodetic_t obs_geodetic = {0,0,0,0};
gdouble maxdt;
+ (void) key; /* prevent unused parameter compiler warning */
+
g_return_if_fail ((val != NULL) && (data != NULL));
sat = SAT(val);
@@ -1100,6 +1103,7 @@
static void
gtk_sat_module_popup_cb (GtkWidget *button, gpointer data)
{
+ (void) button; /* prevent unused parameter compiler warning */
gtk_sat_module_popup (GTK_SAT_MODULE (data));
}
@@ -1125,6 +1129,8 @@
gchar *name;
gint retcode;
+ (void) button; /* prevent unused parameter compiler warning */
+
name = g_strdup (module->name);
sat_log_log (SAT_LOG_LEVEL_DEBUG,
@@ -1252,7 +1258,8 @@
gtk_sat_mod_state_t laststate;
gint w,h;
-
+ (void) button; /* prevent unused parameter compiler warning */
+
if (module->win != NULL)
toplevel = module->win;
else
@@ -1426,6 +1433,9 @@
static gboolean empty (gpointer key, gpointer val, gpointer data)
{
+ (void) key; /* prevent unused parameter compiler warning */
+ (void) val; /* prevent unused parameter compiler warning */
+ (void) data; /* prevent unused parameter compiler warning */
/* TRUE => sat removed from hash table */
return TRUE;
}
@@ -1517,7 +1527,7 @@
void gtk_sat_module_select_sat (GtkSatModule *module, gint catnum)
{
GtkWidget *child;
- gint i;
+ guint i;
/* select satellite in each child */
@@ -1557,6 +1567,8 @@
*/
void gtk_sat_module_reconf (GtkSatModule *module, gboolean local)
{
+ (void) module; /* prevent unused parameter compiler warning */
+ (void) local; /* prevent unused parameter compiler warning */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 22:37:16
|
Revision: 870
http://gpredict.svn.sourceforge.net/gpredict/?rev=870&view=rev
Author: aa1vs
Date: 2011-07-15 22:37:10 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/menubar.c
Modified: trunk/src/menubar.c
===================================================================
--- trunk/src/menubar.c 2011-07-15 22:16:28 UTC (rev 869)
+++ trunk/src/menubar.c 2011-07-15 22:37:10 UTC (rev 870)
@@ -90,11 +90,11 @@
* \ingroup menupriv
*/
static GtkActionEntry entries[] = {
- { "FileMenu", NULL, N_("_File") },
- { "EditMenu", NULL, N_("_Edit") },
- { "TleMenu", GTK_STOCK_REFRESH, N_("_Update TLE") },
- { "ToolsMenu", NULL, N_("_Tools") },
- { "HelpMenu", NULL, N_("_Help") },
+ { "FileMenu", NULL, N_("_File"), NULL, NULL, NULL },
+ { "EditMenu", NULL, N_("_Edit"), NULL, NULL, NULL },
+ { "TleMenu", GTK_STOCK_REFRESH, N_("_Update TLE"), NULL, NULL, NULL },
+ { "ToolsMenu", NULL, N_("_Tools"), NULL, NULL, NULL },
+ { "HelpMenu", NULL, N_("_Help"), NULL, NULL, NULL },
/* File menu */
{ "New", GTK_STOCK_NEW, N_("_New module"), "<control>N",
@@ -210,7 +210,7 @@
//GtkWidget *menuitem;
//GtkWidget *image;
//gchar *icon;
- gint i;
+ guint i;
/* create action group */
@@ -269,6 +269,8 @@
gchar *confdir;
GtkWidget *module = NULL;
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
sat_log_log (SAT_LOG_LEVEL_DEBUG,
_("%s: Starting new module configurator..."),
@@ -328,6 +330,8 @@
gchar *confdir;
GtkWidget *module = NULL;
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
sat_log_log (SAT_LOG_LEVEL_DEBUG,
_("%s: Open existing module..."),
@@ -394,6 +398,9 @@
static void
menubar_message_log (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
sat_log_browser_open ();
}
@@ -401,6 +408,9 @@
static void
menubar_app_exit_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
gtk_widget_destroy (app);
}
@@ -408,12 +418,17 @@
static void
menubar_freq_edit_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
}
static void
menubar_pref_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
sat_pref_run ();
}
@@ -437,7 +452,8 @@
GtkWidget *label1,*label2; /* activitity and stats labels */
GtkWidget *box;
-
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
/* create new dialog with progress indicator */
dialog = gtk_dialog_new_with_buttons (_("TLE Update"),
@@ -543,6 +559,8 @@
gint response; /* dialog response */
gboolean doupdate = FALSE;
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
/* get last used directory */
dir = sat_cfg_get_str (SAT_CFG_STR_TLE_FILE_DIR);
@@ -691,6 +709,8 @@
static void
menubar_tle_manual_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
//satellite_editor_run ();
}
@@ -703,6 +723,8 @@
{
GtkWidget *dialog;
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
dialog = gtk_message_dialog_new (GTK_WINDOW (app),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -724,6 +746,8 @@
{
GtkWidget *dialog;
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
dialog = gtk_message_dialog_new (GTK_WINDOW (app),
GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -743,6 +767,9 @@
static void
menubar_getting_started_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
gpredict_help_launch (GPREDICT_HELP_GETTING_STARTED);
}
@@ -751,6 +778,9 @@
{
GtkWidget *dialog;
GtkWidget *button;
+
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
dialog = gtk_message_dialog_new (GTK_WINDOW (app),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -774,6 +804,9 @@
static void
menubar_license_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
gpredict_help_show_txt ("COPYING");
}
@@ -781,6 +814,9 @@
static void
menubar_news_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
gpredict_help_show_txt ("NEWS");
}
@@ -788,6 +824,9 @@
static void
menubar_about_cb (GtkWidget *widget, gpointer data)
{
+ (void) widget; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
about_dialog_create ();
}
@@ -1079,8 +1118,9 @@
{
gchar *sat1,*sat2;
gint ret = 0;
+
+ (void) userdata; /* avoid unused parameter compiler warning */
-
gtk_tree_model_get(model, a, 0, &sat1, -1);
gtk_tree_model_get(model, b, 0, &sat2, -1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 22:16:34
|
Revision: 869
http://gpredict.svn.sourceforge.net/gpredict/?rev=869&view=rev
Author: aa1vs
Date: 2011-07-15 22:16:28 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/main.c
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2011-07-15 22:15:58 UTC (rev 868)
+++ trunk/src/main.c 2011-07-15 22:16:28 UTC (rev 869)
@@ -319,7 +319,7 @@
{
/* satlog_log (SAT_LOG_ERROR, "Received signal: %d\n", sig); */
/* satlog_log (SAT_LOG_ERROR, "Trying clean exit...\n"); */
-
+ (void) sig; /* prevent unused parameter compiler warning */
gtk_widget_destroy (app);
}
@@ -341,6 +341,9 @@
GdkEvent *event,
gpointer data)
{
+ (void) widget; /* prevent unused parameter compiler warning */
+ (void) event; /* prevent unused parameter compiler warning */
+ (void) data; /* prevent unused parameter compiler warning */
return FALSE;
}
@@ -359,7 +362,9 @@
gpredict_app_destroy (GtkWidget *widget,
gpointer data)
{
-
+ (void) widget; /* prevent unused parameter compiler warning */
+ (void) data; /* prevent unused parameter compiler warning */
+
/* stop TLE monitoring task */
tle_mon_stop ();
@@ -401,8 +406,8 @@
gpredict_app_config (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
{
gint x, y;
+ (void) data; /* prevent unused parameter compiler warning */
-
/* data is only useful when window is visible */
if (GTK_WIDGET_VISIBLE (widget))
gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
@@ -455,8 +460,11 @@
GTimeVal tval;
GtkWidget *dialog;
GError *err = NULL;
+
+ if (data != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Passed a non-null pointer which should never happen.\n"), __FUNCTION__);
+ }
-
/* sat_log_log (SAT_LOG_LEVEL_DEBUG, */
/* _("%s: Checking whether TLE check should be executed..."), */
/* __FUNCTION__); */
@@ -580,6 +588,7 @@
static gpointer
update_tle_thread (gpointer data)
{
+ (void) data; /* prevent unused parameter compiler warning */
tle_upd_running = TRUE;
tle_update_from_network (TRUE, NULL, NULL, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 22:16:04
|
Revision: 868
http://gpredict.svn.sourceforge.net/gpredict/?rev=868&view=rev
Author: aa1vs
Date: 2011-07-15 22:15:58 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-sky-glance.c
Modified: trunk/src/gtk-sky-glance.c
===================================================================
--- trunk/src/gtk-sky-glance.c 2011-07-15 22:01:30 UTC (rev 867)
+++ trunk/src/gtk-sky-glance.c 2011-07-15 22:15:58 UTC (rev 868)
@@ -82,10 +82,12 @@
GooCanvasItemModel *model,
gpointer data);
static void on_canvas_realized (GtkWidget *canvas, gpointer data);
+#if 0
static gboolean on_button_press (GooCanvasItem *item,
GooCanvasItem *target,
GdkEventButton *event,
gpointer data);
+#endif
static gboolean on_button_release (GooCanvasItem *item,
GooCanvasItem *target,
GdkEventButton *event,
@@ -128,6 +130,7 @@
sizeof (GtkSkyGlance),
1, /* n_preallocs */
(GInstanceInitFunc) gtk_sky_glance_init,
+ NULL
};
gtk_sky_glance_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -622,6 +625,9 @@
gdouble t;
gchar buff[6];
+ (void) item; /* avoid unused parameter compiler warning */
+ (void) target; /* avoid unused parameter compiler warning */
+
/* update cursor tracking line and time label */
pts = goo_canvas_points_new (2);
pts->coords[0] = event->x;
@@ -682,6 +688,8 @@
GooCanvasItemModel *model,
gpointer data)
{
+ (void) canvas; /* avoid unused parameter compiler warning */
+
if (!goo_canvas_item_model_get_parent (model)) {
/* root item / canvas */
g_signal_connect (item, "motion_notify_event", (GtkSignalFunc) on_motion_notify, data);
@@ -706,15 +714,17 @@
* This function is called when a mouse button is pressed on a satellite pass object.
* If the pressed button is 1 (left) pass details will be show.
*/
+#if 0
static gboolean
on_button_press (GooCanvasItem *item,
GooCanvasItem *target,
GdkEventButton *event,
gpointer data)
{
-/* GooCanvasItemModel *model = goo_canvas_item_get_model (item); */
-/* GtkSkyGlance *skg = GTK_SKY_GLANCE (data); */
+ (void) item; /* avoid unused parameter compiler warning */
+ (void) target; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
switch (event->button) {
@@ -728,8 +738,8 @@
return TRUE;
}
+#endif
-
/** \brief Manage button release events.
* \param item The GooCanvasItem object that received the button press event.
* \param target The target of the event (what?).
@@ -751,7 +761,9 @@
GooCanvasItemModel *item_model = goo_canvas_item_get_model (item);
GtkSkyGlance *skg = GTK_SKY_GLANCE (data);
-
+
+ (void) target; /* avoid unused parameter compiler warning */
+
/* get pointer to pass_t structure */
pass_t *pass = (pass_t *) g_object_get_data(G_OBJECT(item_model), "pass");
pass_t *new_pass;
@@ -806,8 +818,11 @@
gpointer data)
{
GooCanvasItemModel *item_model = goo_canvas_item_get_model (item);
- GtkSkyGlance *skg = GTK_SKY_GLANCE (data);
+ (void) target_item; /* avoid unused parameter compiler warning */
+ (void) event; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
/* get pointer to pass_t structure */
pass_t *pass = (pass_t *) g_object_get_data(G_OBJECT(item_model), "pass");
if G_UNLIKELY(pass == NULL) {
@@ -840,6 +855,12 @@
{
//g_print("Mouse leave\n");
+ (void) item; /* avoid unused parameter compiler warning */
+ (void) target_item; /* avoid unused parameter compiler warning */
+ (void) event; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
+
return TRUE;
}
@@ -974,6 +995,8 @@
GooCanvasItemModel *root;
GooCanvasItemModel *lab;
+ (void) key; /* avoid unused parameter compiler warning */
+
/* tooltips vars */
gchar *tooltip; /* the complete tooltips string */
gchar aosstr[100]; /* AOS time string */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-07-15 22:01:36
|
Revision: 867
http://gpredict.svn.sourceforge.net/gpredict/?rev=867&view=rev
Author: aa1vs
Date: 2011-07-15 22:01:30 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-sat-selector.c
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2011-07-15 21:56:24 UTC (rev 866)
+++ trunk/src/gtk-sat-selector.c 2011-07-15 22:01:30 UTC (rev 867)
@@ -99,8 +99,10 @@
{
gchar *name = NULL;
gchar *match;
- //gchar *NULLSTR = "NULL";
+ (void) column; /* avoid unused parameter compiler warning */
+ (void) search_data; /* avoid unused parameter compiler warning */
+
gtk_tree_model_get(model, iter, GTK_SAT_SELECTOR_COL_NAME, &name, -1);
/* sat_log_log(SAT_LOG_LEVEL_MSG, "%s: key %s, name %s", */
/* __FUNCTION__, */
@@ -139,6 +141,7 @@
sizeof (GtkSatSelector),
1, /* n_preallocs */
(GInstanceInitFunc) gtk_sat_selector_init,
+ NULL
};
gtk_sat_selector_type = g_type_register_static (GTK_TYPE_VBOX,
@@ -611,6 +614,7 @@
gchar *sat1,*sat2;
gint ret = 0;
+ (void) userdata; /* avoid unused parameter compiler warning */
gtk_tree_model_get(model, a, GTK_SAT_SELECTOR_COL_NAME, &sat1, -1);
gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_NAME, &sat2, -1);
@@ -697,6 +701,10 @@
gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */
gint catnum; /* catalog number of the selected satellite */
+ (void) view; /* avoid unused parameter compiler warning */
+ (void) path; /* avoid unused parameter compiler warning */
+ (void) column; /* avoid unused parameter compiler warning */
+
/* get the selected row in the treeview */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (selector->tree));
haveselection = gtk_tree_selection_get_selected (selection, &model, &iter);
@@ -774,6 +782,7 @@
gchar *fmtstr;
guint coli = GPOINTER_TO_UINT (column);
+ (void) col; /* avoid unused parameter compiler warning */
gtk_tree_model_get (model, iter, coli, &number, -1);
@@ -901,6 +910,8 @@
GtkTreeView *treeview )
{
GtkTreeModelFilter *filter;
+
+ (void) entry; /* avoid unused parameter compiler warning */
filter = GTK_TREE_MODEL_FILTER( gtk_tree_view_get_model( treeview ) );
gtk_tree_model_filter_refilter( filter );
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:56:29
|
Revision: 866
http://gpredict.svn.sourceforge.net/gpredict/?rev=866&view=rev
Author: aa1vs
Date: 2011-07-15 21:56:24 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Clean pendantic compiler warning.
Modified Paths:
--------------
trunk/src/gtk-sat-module-tmg.c
Modified: trunk/src/gtk-sat-module-tmg.c
===================================================================
--- trunk/src/gtk-sat-module-tmg.c 2011-07-15 21:50:52 UTC (rev 865)
+++ trunk/src/gtk-sat-module-tmg.c 2011-07-15 21:56:24 UTC (rev 866)
@@ -318,6 +318,10 @@
*/
static gint tmg_delete (GtkWidget *tmg, GdkEvent *event, gpointer data)
{
+ (void) tmg; /* avoid unused parameter compiler warning */
+ (void) event; /* avoid unused parameter compiler warning */
+ (void) data; /* avoid unused parameter compiler warning */
+
return FALSE;
}
@@ -327,6 +331,7 @@
{
GtkSatModule *mod = GTK_SAT_MODULE (data);
+ (void) tmg; /* avoid unused parameter compiler warning */
/* reset time keeping variables */
mod->throttle = 1;
@@ -429,6 +434,8 @@
{
GtkSatModule *mod = GTK_SAT_MODULE (data);
+ (void) widget; /* avoid unused parameter compiler warning */
+
/* set reset flag in order to block
widget signals */
mod->reset = TRUE;
@@ -483,6 +490,8 @@
gdouble slider;
gdouble jd;
+ (void) widget; /* avoid unused parameter compiler warning */
+
/* update time only if we are in manual time control */
if (!mod->throttle && !mod->reset) {
@@ -566,7 +575,9 @@
{
GtkSatModule *mod = GTK_SAT_MODULE (data);
gint hour;
-
+
+ (void) widget; /* avoid unused parameter compiler warning */
+
hour = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgHour));
if (hour == 0) {
@@ -593,6 +604,8 @@
GtkSatModule *mod = GTK_SAT_MODULE (data);
gint hr, min;
+ (void) widget; /* avoid unused parameter compiler warning */
+
hr = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgHour));
min = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgMin));
@@ -635,6 +648,8 @@
GtkSatModule *mod = GTK_SAT_MODULE (data);
gint min, sec;
+ (void) widget; /* avoid unused parameter compiler warning */
+
sec = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgSec));
min = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgMin));
@@ -676,6 +691,8 @@
{
GtkSatModule *mod = GTK_SAT_MODULE (data);
gint msec, sec;
+
+ (void) widget; /* avoid unused parameter compiler warning */
sec = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgSec));
msec = gtk_spin_button_get_value (GTK_SPIN_BUTTON (mod->tmgMsec));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|