X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkdlg.c;h=190619889e16a6a61b37be0767128a8858e022af;hb=42c592c4ef024af30af91241f651f699d6dbff0b;hp=ffdf3236b2e10e5c4e0496e4f206961294e6b0d3;hpb=0ab2e03ef2dba047c5e2bd5faf346b42b445fb70;p=PuTTY.git diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index ffdf3236..19061988 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -37,8 +37,6 @@ struct Shortcuts { struct uctrl { union control *ctrl; GtkWidget *toplevel; - void *privdata; - int privdata_needs_free; GtkWidget **buttons; int nbuttons; /* for radio buttons */ GtkWidget *entry; /* for editbox, filesel, fontsel */ GtkWidget *button; /* for filesel, fontsel */ @@ -189,8 +187,6 @@ static void dlg_cleanup(struct dlgparam *dp) dp->byctrl = NULL; while ( (uc = index234(dp->bywidget, 0)) != NULL) { del234(dp->bywidget, uc); - if (uc->privdata_needs_free) - sfree(uc->privdata); sfree(uc->buttons); sfree(uc); } @@ -228,34 +224,6 @@ static struct uctrl *dlg_find_bywidget(struct dlgparam *dp, GtkWidget *w) return ret; } -void *dlg_get_privdata(union control *ctrl, void *dlg) -{ - struct dlgparam *dp = (struct dlgparam *)dlg; - struct uctrl *uc = dlg_find_byctrl(dp, ctrl); - return uc->privdata; -} - -void dlg_set_privdata(union control *ctrl, void *dlg, void *ptr) -{ - struct dlgparam *dp = (struct dlgparam *)dlg; - struct uctrl *uc = dlg_find_byctrl(dp, ctrl); - uc->privdata = ptr; - uc->privdata_needs_free = FALSE; -} - -void *dlg_alloc_privdata(union control *ctrl, void *dlg, size_t size) -{ - struct dlgparam *dp = (struct dlgparam *)dlg; - struct uctrl *uc = dlg_find_byctrl(dp, ctrl); - /* - * This is an internal allocation routine, so it's allowed to - * use smalloc directly. - */ - uc->privdata = smalloc(size); - uc->privdata_needs_free = FALSE; - return uc->privdata; -} - union control *dlg_last_focused(union control *ctrl, void *dlg) { struct dlgparam *dp = (struct dlgparam *)dlg; @@ -1832,8 +1800,6 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs, uc = snew(struct uctrl); uc->ctrl = ctrl; - uc->privdata = NULL; - uc->privdata_needs_free = FALSE; uc->buttons = NULL; uc->entry = NULL; #if !GTK_CHECK_VERSION(2,4,0) @@ -3439,7 +3405,7 @@ static void licence_clicked(GtkButton *button, gpointer data) char *title; char *licence = - "Copyright 1997-2014 Simon Tatham.\n\n" + "Copyright 1997-2015 Simon Tatham.\n\n" "Portions copyright Robert de Bath, Joris van Rantwijk, Delian " "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas " @@ -3520,7 +3486,7 @@ void about_box(void *window) w, FALSE, FALSE, 5); gtk_widget_show(w); - w = gtk_label_new("Copyright 1997-2014 Simon Tatham. All rights reserved"); + w = gtk_label_new("Copyright 1997-2015 Simon Tatham. All rights reserved"); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(aboutbox)->vbox), w, FALSE, FALSE, 5); gtk_widget_show(w);