[Gpredict-svn] SF.net SVN: gpredict:[879] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
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] |