~ubuntu-branches/debian/squeeze/putty/squeeze

« back to all changes in this revision

Viewing changes to unix/gtkwin.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2006-07-17 10:21:38 UTC
  • mfrom: (2.1.4 dapper)
  • Revision ID: james.westby@ubuntu.com-20060717102138-s08srub8708welk7
Tags: 0.58-5
Remove Icon= from putty and pterm desktop files, as there are no icons
yet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1187
1187
 
1188
1188
static gint timer_trigger(gpointer data)
1189
1189
{
1190
 
    long now = GPOINTER_TO_INT(data);
 
1190
    long now = (long)data;
1191
1191
    long next;
1192
1192
    long ticks;
1193
1193
 
1194
1194
    if (run_timers(now, &next)) {
1195
1195
        ticks = next - GETTICKCOUNT();
1196
1196
        timer_id = gtk_timeout_add(ticks > 0 ? ticks : 1, timer_trigger,
1197
 
                                   GINT_TO_POINTER(next));
 
1197
                                   (gpointer)next);
1198
1198
    }
1199
1199
 
1200
1200
    /*
1216
1216
        ticks = 1;                     /* just in case */
1217
1217
 
1218
1218
    timer_id = gtk_timeout_add(ticks, timer_trigger,
1219
 
                               GINT_TO_POINTER(next));
 
1219
                               (gpointer)next);
1220
1220
}
1221
1221
 
1222
1222
void fd_input_func(gpointer data, gint sourcefd, GdkInputCondition condition)
1429
1429
 */
1430
1430
void init_cutbuffers()
1431
1431
{
1432
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1433
 
                    XA_CUT_BUFFER0, XA_STRING, 8, PropModeAppend, "", 0);
1434
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1435
 
                    XA_CUT_BUFFER1, XA_STRING, 8, PropModeAppend, "", 0);
1436
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1437
 
                    XA_CUT_BUFFER2, XA_STRING, 8, PropModeAppend, "", 0);
1438
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1439
 
                    XA_CUT_BUFFER3, XA_STRING, 8, PropModeAppend, "", 0);
1440
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1441
 
                    XA_CUT_BUFFER4, XA_STRING, 8, PropModeAppend, "", 0);
1442
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1443
 
                    XA_CUT_BUFFER5, XA_STRING, 8, PropModeAppend, "", 0);
1444
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1445
 
                    XA_CUT_BUFFER6, XA_STRING, 8, PropModeAppend, "", 0);
1446
 
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
1447
 
                    XA_CUT_BUFFER7, XA_STRING, 8, PropModeAppend, "", 0);
 
1432
    unsigned char empty[] = "";
 
1433
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1434
                    XA_CUT_BUFFER0, XA_STRING, 8, PropModeAppend, empty, 0);
 
1435
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1436
                    XA_CUT_BUFFER1, XA_STRING, 8, PropModeAppend, empty, 0);
 
1437
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1438
                    XA_CUT_BUFFER2, XA_STRING, 8, PropModeAppend, empty, 0);
 
1439
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1440
                    XA_CUT_BUFFER3, XA_STRING, 8, PropModeAppend, empty, 0);
 
1441
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1442
                    XA_CUT_BUFFER4, XA_STRING, 8, PropModeAppend, empty, 0);
 
1443
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1444
                    XA_CUT_BUFFER5, XA_STRING, 8, PropModeAppend, empty, 0);
 
1445
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1446
                    XA_CUT_BUFFER6, XA_STRING, 8, PropModeAppend, empty, 0);
 
1447
    XChangeProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
 
1448
                    XA_CUT_BUFFER7, XA_STRING, 8, PropModeAppend, empty, 0);
1448
1449
}
1449
1450
 
1450
1451
/* Store the data in a cut-buffer. */
1564
1565
    struct gui_data *inst = (struct gui_data *)data;
1565
1566
    if (seldata->target == utf8_string_atom)
1566
1567
        gtk_selection_data_set(seldata, seldata->target, 8,
1567
 
                               inst->pasteout_data_utf8,
 
1568
                               (unsigned char *)inst->pasteout_data_utf8,
1568
1569
                               inst->pasteout_data_utf8_len);
1569
1570
    else if (seldata->target == compound_text_atom)
1570
1571
        gtk_selection_data_set(seldata, seldata->target, 8,
1571
 
                               inst->pasteout_data_ctext,
 
1572
                               (unsigned char *)inst->pasteout_data_ctext,
1572
1573
                               inst->pasteout_data_ctext_len);
1573
1574
    else
1574
1575
        gtk_selection_data_set(seldata, seldata->target, 8,
1575
 
                               inst->pasteout_data, inst->pasteout_data_len);
 
1576
                               (unsigned char *)inst->pasteout_data,
 
1577
                               inst->pasteout_data_len);
1576
1578
}
1577
1579
 
1578
1580
gint selection_clear(GtkWidget *widget, GdkEventSelection *seldata,
2444
2446
            cfg->line_codepage[sizeof(cfg->line_codepage)-1] = '\0';
2445
2447
 
2446
2448
        } else if (!strcmp(p, "-geometry")) {
2447
 
            int flags, x, y, w, h;
 
2449
            int flags, x, y;
 
2450
            unsigned int w, h;
2448
2451
            EXPECTS_ARG;
2449
2452
            SECOND_PASS_ONLY;
2450
2453
 
2451
2454
            flags = XParseGeometry(val, &x, &y, &w, &h);
2452
2455
            if (flags & WidthValue)
2453
 
                cfg->width = w;
 
2456
                cfg->width = (int)w;
2454
2457
            if (flags & HeightValue)
2455
 
                cfg->height = h;
 
2458
                cfg->height = (int)h;
2456
2459
 
2457
2460
            if (flags & (XValue | YValue)) {
2458
2461
                inst->xpos = x;