gtk_toggle_button_get_active() is an API newer than Gtk+ 1.1.13. Replaced it

with legacy code that just looks at active field of widget directly (I could
use the GtkObject interfaces, but those are kludgy and the reason that the
newer API was introduced). Eventually (hopefully soon) we'll migrate to Gtk+
1.2 (which will fix some rendering bugs as well...)
This commit is contained in:
syd%netscape.com 1999-03-13 05:25:31 +00:00
Родитель bd6cb52f35
Коммит f216949dfc
2 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -71,19 +71,19 @@ DoPrint (GtkWidget *widget, UnixPrOps *prOps)
strcpy( prOps->prData->path, strcpy( prOps->prData->path,
gtk_entry_get_text( GTK_ENTRY( prOps->widgets.pathEntry ) ) ); gtk_entry_get_text( GTK_ENTRY( prOps->widgets.pathEntry ) ) );
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.fpfToggle ) ) == PR_TRUE ) if ( GTK_TOGGLE_BUTTON( prOps->widgets.fpfToggle )->active == PR_TRUE )
prOps->prData->fpf = PR_TRUE; prOps->prData->fpf = PR_TRUE;
else else
prOps->prData->fpf = PR_FALSE; prOps->prData->fpf = PR_FALSE;
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.greyToggle ) ) ) if ( GTK_TOGGLE_BUTTON( prOps->widgets.greyToggle )->active == PR_TRUE )
prOps->prData->grayscale = PR_TRUE; prOps->prData->grayscale = PR_TRUE;
else else
prOps->prData->grayscale = PR_FALSE; prOps->prData->grayscale = PR_FALSE;
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.letterToggle ) ) ) if ( GTK_TOGGLE_BUTTON( prOps->widgets.letterToggle )->active == PR_TRUE )
prOps->prData->size = SizeLetter; prOps->prData->size = SizeLetter;
else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.legalToggle ) ) ) else if ( GTK_TOGGLE_BUTTON( prOps->widgets.legalToggle )->active == PR_TRUE )
prOps->prData->size = SizeLegal; prOps->prData->size = SizeLegal;
else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.execToggle ) ) ) else if ( GTK_TOGGLE_BUTTON( prOps->widgets.execToggle )->active == PR_TRUE )
prOps->prData->size = SizeExecutive; prOps->prData->size = SizeExecutive;
else else
prOps->prData->size = SizeA4; prOps->prData->size = SizeA4;

Просмотреть файл

@ -71,19 +71,19 @@ DoPrint (GtkWidget *widget, UnixPrOps *prOps)
strcpy( prOps->prData->path, strcpy( prOps->prData->path,
gtk_entry_get_text( GTK_ENTRY( prOps->widgets.pathEntry ) ) ); gtk_entry_get_text( GTK_ENTRY( prOps->widgets.pathEntry ) ) );
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.fpfToggle ) ) == PR_TRUE ) if ( GTK_TOGGLE_BUTTON( prOps->widgets.fpfToggle )->active == PR_TRUE )
prOps->prData->fpf = PR_TRUE; prOps->prData->fpf = PR_TRUE;
else else
prOps->prData->fpf = PR_FALSE; prOps->prData->fpf = PR_FALSE;
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.greyToggle ) ) ) if ( GTK_TOGGLE_BUTTON( prOps->widgets.greyToggle )->active == PR_TRUE )
prOps->prData->grayscale = PR_TRUE; prOps->prData->grayscale = PR_TRUE;
else else
prOps->prData->grayscale = PR_FALSE; prOps->prData->grayscale = PR_FALSE;
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.letterToggle ) ) ) if ( GTK_TOGGLE_BUTTON( prOps->widgets.letterToggle )->active == PR_TRUE )
prOps->prData->size = SizeLetter; prOps->prData->size = SizeLetter;
else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.legalToggle ) ) ) else if ( GTK_TOGGLE_BUTTON( prOps->widgets.legalToggle )->active == PR_TRUE )
prOps->prData->size = SizeLegal; prOps->prData->size = SizeLegal;
else if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( prOps->widgets.execToggle ) ) ) else if ( GTK_TOGGLE_BUTTON( prOps->widgets.execToggle )->active == PR_TRUE )
prOps->prData->size = SizeExecutive; prOps->prData->size = SizeExecutive;
else else
prOps->prData->size = SizeA4; prOps->prData->size = SizeA4;