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