Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 38184 | Differences between
and this patch

Collapse All | Expand All

(-)celestia-1.3.1/src/celestia/gtkmain.cpp.old (-11 / +10 lines)
Lines 1330-1336 Link Here
1330
    Star *selStar =(Star *)gtk_clist_get_row_data(list,row);
1330
    Star *selStar =(Star *)gtk_clist_get_row_data(list,row);
1331
    if (selStar)
1331
    if (selStar)
1332
    {
1332
    {
1333
        browserSel.select(selStar);
1333
        browserSel = Selection(selStar);
1334
	return TRUE;
1334
	return TRUE;
1335
    }
1335
    }
1336
    return FALSE;
1336
    return FALSE;
Lines 1349-1357 Link Here
1349
    if ((body=(Body *)gtk_ctree_node_get_row_data(tree,node)))
1349
    if ((body=(Body *)gtk_ctree_node_get_row_data(tree,node)))
1350
    {
1350
    {
1351
        if (body == (Body *) nearestStar)
1351
        if (body == (Body *) nearestStar)
1352
            browserSel.select((Star *) nearestStar);
1352
            browserSel = Selection((Star *) nearestStar);
1353
        else
1353
        else
1354
            browserSel.select(body);
1354
            browserSel = Selection(body);
1355
	return TRUE;
1355
	return TRUE;
1356
    }
1356
    }
1357
    DPRINTF(0, "Unable to find body for this node.\n");
1357
    DPRINTF(0, "Unable to find body for this node.\n");
Lines 1420-1426 Link Here
1420
    for (unsigned int i = 0; i < currentLength; i++)
1420
    for (unsigned int i = 0; i < currentLength; i++)
1421
        gtk_clist_remove(GTK_CLIST(clist), 0);
1421
        gtk_clist_remove(GTK_CLIST(clist), 0);
1422
    currentLength=(*stars).size();
1422
    currentLength=(*stars).size();
1423
    browserSel.select((Star *)(*stars)[0]);
1423
    browserSel = Selection((Star *)(*stars)[0]);
1424
    UniversalCoord ucPos = appSim->getObserver().getPosition();
1424
    UniversalCoord ucPos = appSim->getObserver().getPosition();
1425
    
1425
    
1426
    for (unsigned int i = 0; i < currentLength; i++)
1426
    for (unsigned int i = 0; i < currentLength; i++)
Lines 1514-1525 Link Here
1514
    {
1514
    {
1515
        sbrowser.refresh();
1515
        sbrowser.refresh();
1516
        loadNearestStarSystem();
1516
        loadNearestStarSystem();
1517
        tmpSel=browserSel.star;
1517
        tmpSel=(Star*)browserSel.obj;
1518
        browserSel.star=(Star *)nearestStar;
1518
        browserSel = Selection((Star *)nearestStar);
1519
        browserSel.body=NULL;
1520
    }
1519
    }
1521
    else
1520
    else
1522
        browserSel.select((Star *)tmpSel);
1521
        browserSel = Selection((Star *)tmpSel);
1523
    return(TRUE);
1522
    return(TRUE);
1524
}
1523
}
1525
1524
Lines 1529-1535 Link Here
1529
    GtkWidget *browser= gnome_dialog_new("Celestial Browser",
1528
    GtkWidget *browser= gnome_dialog_new("Celestial Browser",
1530
				         GNOME_STOCK_BUTTON_OK,
1529
				         GNOME_STOCK_BUTTON_OK,
1531
				         NULL);
1530
				         NULL);
1532
    browserSel.select((Star *)NULL);
1531
    browserSel = Selection((Star *)NULL);
1533
    if (browser == NULL)
1532
    if (browser == NULL)
1534
    {
1533
    {
1535
	DPRINTF(0, "Unable to open celestial browser dialog!\n");
1534
	DPRINTF(0, "Unable to open celestial browser dialog!\n");
Lines 1584-1590 Link Here
1584
    gtk_container_add(GTK_CONTAINER(align),GTK_WIDGET(hbox));
1583
    gtk_container_add(GTK_CONTAINER(align),GTK_WIDGET(hbox));
1585
    sbrowser.setSimulation(appSim);
1584
    sbrowser.setSimulation(appSim);
1586
    addStars();
1585
    addStars();
1587
    tmpSel=browserSel.star;
1586
    tmpSel=(Star*)browserSel.obj;
1588
    gtk_signal_connect(GTK_OBJECT(clist), "select-row",
1587
    gtk_signal_connect(GTK_OBJECT(clist), "select-row",
1589
		       GTK_SIGNAL_FUNC(listSelect), NULL);
1588
		       GTK_SIGNAL_FUNC(listSelect), NULL);
1590
    gtk_clist_select_row(GTK_CLIST(clist), 0, 0);
1589
    gtk_clist_select_row(GTK_CLIST(clist), 0, 0);
Lines 1667-1673 Link Here
1667
    gnome_dialog_run_and_close(GNOME_DIALOG(browser));
1666
    gnome_dialog_run_and_close(GNOME_DIALOG(browser));
1668
    clist=NULL;
1667
    clist=NULL;
1669
    ctree=NULL;
1668
    ctree=NULL;
1670
    browserSel.select((Star *)NULL);
1669
    browserSel = Selection((Star *)NULL);
1671
}
1670
}
1672
1671
1673
1672

Return to bug 38184