Diff

Differences From Artifact [8494a5ff99]:

To Artifact [09654be71d]:


1388
1389
1390
1391
1392
1393
1394
1395



1396



1397
1398
1399
1400
1401
1402
1403
1388
1389
1390
1391
1392
1393
1394

1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408







-
+
+
+

+
+
+







{
    struct gui_data *inst = (struct gui_data *)frontend;
    if (n >= 16)
	n += 256 - 16;
    if (n > NALLCOLOURS)
	return;
    real_palette_set(inst, n, r, g, b);
    if (n == 258)
    if (n == 258) {
	/* Default Background changed. Ensure space between text area and
	 * window border is redrawn */
	set_window_background(inst);
	draw_backing_rect(inst);
	gtk_widget_queue_draw(inst->area);
    }
}

void palette_reset(void *frontend)
{
    struct gui_data *inst = (struct gui_data *)frontend;
    /* This maps colour indices in inst->cfg to those used in inst->cols. */
    static const int ww[] = {
1441
1442
1443
1444
1445
1446
1447


1448




1449
1450
1451
1452
1453
1454
1455
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466







+
+

+
+
+
+







    for (i = 0; i < NALLCOLOURS; i++) {
	if (!success[i])
	    g_error("%s: couldn't allocate colour %d (#%02x%02x%02x)\n",
                    appname, i, inst->cfg.colours[i][0],
                    inst->cfg.colours[i][1], inst->cfg.colours[i][2]);
    }

    /* Since Default Background may have changed, ensure that space
     * between text area and window border is refreshed. */
    set_window_background(inst);
    if (inst->area) {
	draw_backing_rect(inst);
	gtk_widget_queue_draw(inst->area);
    }
}

/* Ensure that all the cut buffers exist - according to the ICCCM, we must
 * do this before we start using cut buffers.
 */
void init_cutbuffers()
{