Mercurial > dwindows
changeset 164:d35771f70bdd
Allow tree-select to work on container controls.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 17 Nov 2002 13:00:37 +0000 |
parents | 0322836c5299 |
children | d03716228b7f |
files | gtk/dw.c |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/dw.c Sun Nov 17 12:34:54 2002 +0000 +++ b/gtk/dw.c Sun Nov 17 13:00:37 2002 +0000 @@ -541,6 +541,15 @@ return FALSE; } +gint _container_select_row(GtkWidget *widget, gint row, gint column, GdkEventButton *event, gpointer data) +{ + SignalHandler *work = (SignalHandler *)data; + char *rowdata = gtk_clist_get_row_data(GTK_CLIST(widget), row); + int (*contextfunc)(HWND, char *, void *) = work->func; + + return contextfunc(work->window, rowdata, work->data);; +} + gint _unselect_row(GtkWidget *widget, gint row, gint column, GdkEventButton *event, gpointer data) { GList *tmp; @@ -5008,6 +5017,7 @@ if(*handle == NULL) { strncpy(errorbuf, dlerror(), 1024); + printf("%s\n", errorbuf); sprintf(newname, "lib%s.so", name); *handle = dlopen(newname, RTLD_NOW); } @@ -6967,6 +6977,11 @@ thisname = "button_press_event"; thisfunc = _findsigfunc("container-select"); } + else if(GTK_IS_CLIST(thiswindow) && strcmp(signame, "tree-select") == 0) + { + thisname = "select_row"; + thisfunc = (void *)_container_select_row; + } else if(GTK_IS_COMBO(thiswindow) && strcmp(signame, "item-select") == 0) { thisname = "select_child";