mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 20:42:48 -05:00
GTK1 build fixes.
Looks as if I haven't retried the GTK1 build for a while, and recent GTK frontend development has broken it. The selection revamp has pointed out that GTK1 didn't have the accessor function gtk_selection_data_get_selection(), the standard GdkAtom value GDK_SELECTION_CLIPBOARD, or keysyms for alphabetic characters; and also I had an initialisation of one of my own structure fields (dp->selparams) accidentally not guarded by the same GTK-versioning ifdef that controls whether or not it was defined.
This commit is contained in:
@ -51,6 +51,11 @@
|
||||
#define NALLCOLOURS (NCFGCOLOURS + NEXTCOLOURS)
|
||||
|
||||
GdkAtom compound_text_atom, utf8_string_atom;
|
||||
GdkAtom clipboard_atom
|
||||
#if GTK_CHECK_VERSION(2,0,0) /* GTK1 will have to fill this in at startup */
|
||||
= GDK_SELECTION_CLIPBOARD
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef JUST_USE_GTK_CLIPBOARD_UTF8
|
||||
/*
|
||||
@ -2689,7 +2694,7 @@ void set_clipboard_atom(struct gui_data *inst, int clipboard, GdkAtom atom)
|
||||
int init_clipboard(struct gui_data *inst)
|
||||
{
|
||||
set_clipboard_atom(inst, CLIP_PRIMARY, GDK_SELECTION_PRIMARY);
|
||||
set_clipboard_atom(inst, CLIP_CLIPBOARD, GDK_SELECTION_CLIPBOARD);
|
||||
set_clipboard_atom(inst, CLIP_CLIPBOARD, clipboard_atom);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -3233,7 +3238,7 @@ void init_clipboard(struct gui_data *inst)
|
||||
#endif
|
||||
|
||||
inst->clipstates[CLIP_PRIMARY].atom = GDK_SELECTION_PRIMARY;
|
||||
inst->clipstates[CLIP_CLIPBOARD].atom = GDK_SELECTION_CLIPBOARD;
|
||||
inst->clipstates[CLIP_CLIPBOARD].atom = clipboard_atom;
|
||||
init_one_clipboard(inst, CLIP_PRIMARY);
|
||||
init_one_clipboard(inst, CLIP_CLIPBOARD);
|
||||
|
||||
@ -4999,6 +5004,8 @@ void new_session_window(Conf *conf, const char *geometry_string)
|
||||
compound_text_atom = gdk_atom_intern("COMPOUND_TEXT", FALSE);
|
||||
if (!utf8_string_atom)
|
||||
utf8_string_atom = gdk_atom_intern("UTF8_STRING", FALSE);
|
||||
if (!clipboard_atom)
|
||||
clipboard_atom = gdk_atom_intern("CLIPBOARD", FALSE);
|
||||
|
||||
inst->area = gtk_drawing_area_new();
|
||||
gtk_widget_set_name(GTK_WIDGET(inst->area), "drawing-area");
|
||||
|
Reference in New Issue
Block a user