betr. GTK & toggeled-Buttons & doWhile-loop (1)

hi leute,
hab ein kleines problem mit gtk:
wie kann ich in 2 toggeled-buttons (start & stop) ein doWhile-loop ausfuehren,
so dass, wenn ich den stop-button anclicke der while-loop beendet wird
und ich was anderes machen kann ?
es muss gesagt werden dass extEvents() in einem anderen source-file liegt,
da die ganze anwendung recht gross ist.

ich waer um jeden hinweis & tip sehr dankbar
mfg nomad

--- source-ausschnitt ---

-- gtk_main-file

// Starting_ToggleButton 1
void togglebutton1_funk(GtkWidget *widget, gpointer zdaten)
{
if(GTK_TOGGLE_BUTTON (togglebutton1)->active)
{
/* If control reaches here, the toggle button is down */
printf("Starting_ToggleButton 1 is Active\n");

// hier sind diverse anweisungen
// und funktioen eingebaut

CompassCourseCalc();

// Playing if bool_waypoints = false
if((bool_NauticalStartPoint == true)&&(bool_start == true))
{

if(bool_waypoints == false)
{
gtk_entry_set_text(GTK_ENTRY(entry1),"Starting is active and running....Playing");
printf("Starting_ToggleButton 1 is Active and Playing\n");

// playing & umherwandern
nx = nomadXpos;
ny = nomadYpos;
ax = nx;
ay = ny;

ext_Events(); dies waer der uebeltaeter

ax = nx;
ay = ny;
nomadXpos = nx;
nomadYpos = ny;
}
// if waypoints == true
if(bool_waypoints == true)
{
// here stuff for goto waypoint 1
printf("Starting_ToggleButton 1 is Active and WayPoints\n");
gtk_entry_set_text(GTK_ENTRY(entry1),"Starting is active and running....WayPoints");
}

} // end if((bool_NauticalStartPoint == true)&&(bool_start == true))

}
else
{
/* If control reaches here, the toggle button is up */
printf("GO_ToggleButton 1 is not Active\n");
gtk_entry_set_text(GTK_ENTRY(entry1),"Starting is not active and stoped....");
}
}

// StopToggleButton2
void togglebutton2_funk(GtkWidget *widget, gpointer zdaten)
{
printf("StopToggleButton2\n");
if(GTK_TOGGLE_BUTTON (togglebutton2)->active)
{
/* If control reaches here, the toggle button is down */
printf("StopToggleButton 2 is Active\n");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (togglebutton1), FALSE);
}
else
{
/* If control reaches here, the toggle button is up */
printf("StopToggleButton 2 is not Active\n");
}
}

-- gtk_sub-file

ext_Events()
{
do
{
AntPatternMoves();

Timer_1();
if(zeit==10)
{
break;
}

} while(zeit==10); // (stop);
}


--- source-ende ---