View | Details | Raw Unified
Collapse All | Expand All

(-) celestia-1.3.1/src/celestia/gtkmain.cpp.old (-11 / +10 lines)
 Lines 1330-1336    Link Here 
    Star *selStar =(Star *)gtk_clist_get_row_data(list,row);
    Star *selStar =(Star *)gtk_clist_get_row_data(list,row);
    if (selStar)
    if (selStar)
    {
    {
        browserSel.select(selStar);
        browserSel = Selection(selStar);
	return TRUE;
	return TRUE;
    }
    }
    return FALSE;
    return FALSE;
 Lines 1349-1357    Link Here 
    if ((body=(Body *)gtk_ctree_node_get_row_data(tree,node)))
    if ((body=(Body *)gtk_ctree_node_get_row_data(tree,node)))
    {
    {
        if (body == (Body *) nearestStar)
        if (body == (Body *) nearestStar)
            browserSel.select((Star *) nearestStar);
            browserSel = Selection((Star *) nearestStar);
        else
        else
            browserSel.select(body);
            browserSel = Selection(body);
	return TRUE;
	return TRUE;
    }
    }
    DPRINTF(0, "Unable to find body for this node.\n");
    DPRINTF(0, "Unable to find body for this node.\n");
 Lines 1420-1426    Link Here 
    for (unsigned int i = 0; i < currentLength; i++)
    for (unsigned int i = 0; i < currentLength; i++)
        gtk_clist_remove(GTK_CLIST(clist), 0);
        gtk_clist_remove(GTK_CLIST(clist), 0);
    currentLength=(*stars).size();
    currentLength=(*stars).size();
    browserSel.select((Star *)(*stars)[0]);
    browserSel = Selection((Star *)(*stars)[0]);
    UniversalCoord ucPos = appSim->getObserver().getPosition();
    UniversalCoord ucPos = appSim->getObserver().getPosition();
    
    
    for (unsigned int i = 0; i < currentLength; i++)
    for (unsigned int i = 0; i < currentLength; i++)
 Lines 1514-1525    Link Here 
    {
    {
        sbrowser.refresh();
        sbrowser.refresh();
        loadNearestStarSystem();
        loadNearestStarSystem();
        tmpSel=browserSel.star;
        tmpSel=(Star*)browserSel.obj;
        browserSel.star=(Star *)nearestStar;
        browserSel = Selection((Star *)nearestStar);
        browserSel.body=NULL;
    }
    }
    else
    else
        browserSel.select((Star *)tmpSel);
        browserSel = Selection((Star *)tmpSel);
    return(TRUE);
    return(TRUE);
}
}
 Lines 1529-1535    Link Here 
    GtkWidget *browser= gnome_dialog_new("Celestial Browser",
    GtkWidget *browser= gnome_dialog_new("Celestial Browser",
				         GNOME_STOCK_BUTTON_OK,
				         GNOME_STOCK_BUTTON_OK,
				         NULL);
				         NULL);
    browserSel.select((Star *)NULL);
    browserSel = Selection((Star *)NULL);
    if (browser == NULL)
    if (browser == NULL)
    {
    {
	DPRINTF(0, "Unable to open celestial browser dialog!\n");
	DPRINTF(0, "Unable to open celestial browser dialog!\n");
 Lines 1584-1590    Link Here 
    gtk_container_add(GTK_CONTAINER(align),GTK_WIDGET(hbox));
    gtk_container_add(GTK_CONTAINER(align),GTK_WIDGET(hbox));
    sbrowser.setSimulation(appSim);
    sbrowser.setSimulation(appSim);
    addStars();
    addStars();
    tmpSel=browserSel.star;
    tmpSel=(Star*)browserSel.obj;
    gtk_signal_connect(GTK_OBJECT(clist), "select-row",
    gtk_signal_connect(GTK_OBJECT(clist), "select-row",
		       GTK_SIGNAL_FUNC(listSelect), NULL);
		       GTK_SIGNAL_FUNC(listSelect), NULL);
    gtk_clist_select_row(GTK_CLIST(clist), 0, 0);
    gtk_clist_select_row(GTK_CLIST(clist), 0, 0);
 Lines 1667-1673    Link Here 
    gnome_dialog_run_and_close(GNOME_DIALOG(browser));
    gnome_dialog_run_and_close(GNOME_DIALOG(browser));
    clist=NULL;
    clist=NULL;
    ctree=NULL;
    ctree=NULL;
    browserSel.select((Star *)NULL);
    browserSel = Selection((Star *)NULL);
}
}