--- ./dnd_filesel.c.00 2007-01-20 22:10:33.000000000 +0100 +++ ./dnd_filesel.c 2007-01-20 21:48:18.000000000 +0100 @@ -0,0 +1,977 @@ +/* + * $Id: dnd_filesel.c,v 1.4 2002/02/20 16:04:24 stephen Exp $ + * + * dnd_filesel.c - arrange for GtkFileSelection widgets to perform drag & + * drop file saving and loading. + * + * Adapted by Stephen Watson, , from code + * written by Thomas Leonard, . + */ + +/* + * We assume we have a reasonable libc and the GTK+ 1.2.10 libraries available. + * We do not use any other libraries, no matter how useful they would be... + * + * Use dnd_setup_load_sel(filesel, udata) to enable drag & drop loading for the + * file selector. Use dnd_setup_save_sel(filesel, udata) to enable drag & drop + * saving for the file selector. + * + * They work by processing the DnD protocol until the filename has been + * determined, then using gtk_file_selection_set_filename to store it and + * triggering the "clicked" event for the OK button. In each case the udata + * parameter should be the same as that for the "clicked" signal handler for + * the OK button. + * + * See test_dnd.c for an example. + */ + +#include +#include +#include +#include + +#include + +#include + +#include "dnd_filesel.h" + +/* XPM of icon to use for dragging. This is Choices/MIME-icons/text.xpm from + rox-base +*/ +/* XPM */ +static char * unknown_xpm[] = { +"29 34 84 1", +" c None", +". c #121212", +"+ c #000000", +"@ c #050505", +"# c #151515", +"$ c #030303", +"% c #FCFCFC", +"& c #F9F9F9", +"* c #F8F8F8", +"= c #FAFAFA", +"- c #FBFBFB", +"; c #F7F7F7", +"> c #FEFEFE", +", c #F4F4F4", +"' c #D5D5D5", +") c #0B0B0B", +"! c #060606", +"~ c #F5F5F5", +"{ c #F6F6F6", +"] c #F0F0F0", +"^ c #F3F3F3", +"/ c #E5E5E5", +"( c #C6C6C6", +"_ c #F2F2F2", +": c #F1F1F1", +"< c #EBEBEB", +"[ c #EEEEEE", +"} c #EDEDED", +"| c #E7E7E7", +"1 c #D3D3D3", +"2 c #B4B4B4", +"3 c #070707", +"4 c #EFEFEF", +"5 c #EAEAEA", +"6 c #ECECEC", +"7 c #E6E6E6", +"8 c #CACACA", +"9 c #ABABAB", +"0 c #010101", +"a c #E9E9E9", +"b c #C8C8C8", +"c c #A9A9A9", +"d c #090909", +"e c #CDCDCD", +"f c #080808", +"g c #D0D0D0", +"h c #FDFDFD", +"i c #FFFFFF", +"j c #CECECE", +"k c #ACACAC", +"l c #AAAAAA", +"m c #040404", +"n c #E8E8E8", +"o c #CCCCCC", +"p c #CBCBCB", +"q c #E4E4E4", +"r c #A8A8A8", +"s c #E2E2E2", +"t c #C7C7C7", +"u c #A6A6A6", +"v c #E1E1E1", +"w c #E3E3E3", +"x c #C5C5C5", +"y c #A4A4A4", +"z c #0C0C0C", +"A c #A5A5A5", +"B c #020202", +"C c #E0E0E0", +"D c #DFDFDF", +"E c #C4C4C4", +"F c #DDDDDD", +"G c #D9D9D9", +"H c #DADADA", +"I c #C2C2C2", +"J c #A7A7A7", +"K c #C9C9C9", +"L c #C0C0C0", +"M c #B7B7B7", +"N c #DBDBDB", +"O c #A1A1A1", +"P c #A2A2A2", +"Q c #A3A3A3", +"R c #A0A0A0", +"S c #9D9D9D", +".+@#$@@@@@@@@@@@@@@@@@@@@@@@@", +"@%&*=&&===&&*----====&;>=&,')", +"!%*~{;;***;;{*;;;{{{~~]~^]/($", +"!-{__,~~{{~~,,^^__::::<[}|12+", +"3-{::^,~~~~~,^^_::]]4:5<67890", +"!%;^^,~{;;;;{~~,,^_:::66}abc3", +"!%*~~{;;*&&&&**;{~,^^4[66<8cd", +"!%*{;;;*&====&&*;~,^^[_}5}ecf", +"!-*{;;;*&=--=&*;{~^^_4~454gc!", +"@%&{;*&=%h>>i&&*{~,^_]:466jk!", +"@%&{;*&-%h>>i=&*;~,^^]:466jk!", +"!%*{{&=-%h>>>==&;{~,^]:466j9!", +"!%*~{&&-%hhhh==&*{~,^4:[<flags=flags; + rdata->uris=uris; + rdata->udata=udata; + rdata->uri=NULL; + + gtk_signal_connect(GTK_OBJECT(widget), "drag_drop", + GTK_SIGNAL_FUNC(drag_drop), rdata); + gtk_signal_connect(GTK_OBJECT(widget), "drag_data_received", + GTK_SIGNAL_FUNC(drag_data_received), rdata); +} + +/* Use dnd_register_dest on the given fs. drop_for_filesel does the clever + stuff */ +void dnd_setup_load_sel(GtkWidget *fs, gpointer udata) +{ + dnd_register_dest(fs, DND_DEFAULT, drop_for_filesel, udata); + do_hide(fs); +} + +/* Set up a draggable icon for saving, using XDS */ +void dnd_setup_save_sel(GtkWidget *fs, gpointer udata) +{ + GtkWidget *pmap; + GtkWidget *box; + GtkWidget *vbox; + + check_init(); + + g_return_if_fail(fs!=0); + g_return_if_fail(GTK_IS_FILE_SELECTION(fs)); + + /* Make the pixmap (if needed) from the default XPM */ + if(!pixmap) { + gtk_widget_realize(fs); + make_icon_pixmap(fs, NULL); + } + + vbox=GTK_FILE_SELECTION(fs)->action_area; + + box=gtk_event_box_new(); + gtk_box_pack_start(GTK_BOX(vbox), box, FALSE, FALSE, 2); + gtk_widget_show(box); + gtk_widget_add_events(box, GDK_BUTTON_PRESS_MASK); + gtk_signal_connect(GTK_OBJECT(box), "button_press_event", + GTK_SIGNAL_FUNC(press_on_icon), fs); + /*gtk_signal_connect(GTK_OBJECT(fs), "drag_end", + GTK_SIGNAL_FUNC(drag_end), fs);*/ + gtk_signal_connect(GTK_OBJECT(fs), "drag_data_get", + GTK_SIGNAL_FUNC(drag_data_get), fs); + + pmap=gtk_pixmap_new(pixmap, mask); + gtk_container_add(GTK_CONTAINER(box), pmap); + gtk_widget_show(pmap); + + gtk_object_set_data(GTK_OBJECT(fs), "dnd_icon", pmap); + gtk_object_set_data(GTK_OBJECT(fs), "dnd_user_data", udata); + + do_hide(fs); +} + +/* Set the icon to use for this filesel, based on mime type */ +void dnd_set_mime_type(GtkWidget *widget, const char *type) +{ + GtkFileSelection *fs; + GtkWidget *pmap, *box; + + g_return_if_fail(GTK_IS_FILE_SELECTION(widget)); + if(!type) + return; + + /* Get the old icon. If one wasn't set, return without doing anything */ + fs=GTK_FILE_SELECTION(widget); + pmap=gtk_object_get_data(GTK_OBJECT(fs), "dnd_icon"); + if(!pmap) + return; + g_return_if_fail(GTK_IS_PIXMAP(pmap)); + + /* Make the pixmap of the new icon */ + if(!GTK_WIDGET_REALIZED(widget)) + gtk_widget_realize(widget); + make_icon_pixmap(widget, type); + + /* Remove the old icon, put the new one in its place */ + box=pmap->parent; + g_return_if_fail(GTK_IS_CONTAINER(box)); + gtk_container_remove(GTK_CONTAINER(box), pmap); + /* gtk_widget_unref(pmap); */ + pmap=gtk_pixmap_new(pixmap, mask); + gtk_container_add(GTK_CONTAINER(box), pmap); + gtk_widget_show(pmap); + gtk_object_set_data(GTK_OBJECT(fs), "dnd_icon", pmap); +} + +/* + * Private functions + */ + +/* This is the error reporting routine, customize it for the program + you are modifing */ +static void dnd_error(const char *fmt, ...) +{ + gchar *message; + va_list args; + + va_start(args, fmt); + message=g_strdup_vprintf(fmt, args); + va_end(args); + + /* Deal with the message how you see fit. + By default we use g_warning and beep. + */ + g_warning(message); + gdk_beep(); + + g_free(message); +} + +/* Initialise our atoms */ +static void init(void) +{ + XdndDirectSave0=gdk_atom_intern("XdndDirectSave0", FALSE); + xa_text_plain=gdk_atom_intern("text/plain", FALSE); + text_uri_list=gdk_atom_intern("text/uri-list", FALSE); + application_octet_stream=gdk_atom_intern("application/octet-stream", + FALSE); + xa_string=gdk_atom_intern ("STRING", FALSE); + + done_init=TRUE; +} + +static void do_hide(GtkWidget *widget) +{ + GtkFileSelection *fs; + + g_return_if_fail(GTK_IS_FILE_SELECTION(widget)); + + fs=GTK_FILE_SELECTION(widget); + + if(hide_lists) { + gtk_file_selection_hide_fileop_buttons(fs); + + /* Need hide the scrolling window the lists are in, not just the + list itself */ + gtk_widget_hide(fs->dir_list->parent); + gtk_widget_hide(fs->file_list->parent); + + gtk_widget_hide(fs->history_pulldown); + + } else { + gtk_widget_show(fs->dir_list->parent); + gtk_widget_show(fs->file_list->parent); + + gtk_widget_show(fs->history_pulldown); + } +} + +/* Is the sender willing to supply this target type? */ +static gboolean provides(GdkDragContext *context, GdkAtom target) +{ + GList *targets = context->targets; + + while (targets && ((GdkAtom) targets->data != target)) + targets = targets->next; + + return targets != NULL; +} + +static char *get_xds_prop(GdkDragContext *context) +{ + guchar *prop_text; + gint length; + + if(gdk_property_get(context->source_window, + XdndDirectSave0, + xa_text_plain, + 0, MAXURILEN, + FALSE, + NULL, NULL, + &length, &prop_text) && prop_text) { + /* Terminate the string */ + prop_text = g_realloc(prop_text, length + 1); + prop_text[length] = '\0'; + return prop_text; + } + + return NULL; +} + +/* Set the XdndDirectSave0 property on the source window for this context */ +static void set_xds_prop(GdkDragContext *context, char *text) +{ + gdk_property_change(context->source_window, + XdndDirectSave0, + xa_text_plain, 8, + GDK_PROP_MODE_REPLACE, + text, + strlen(text)); +} + +/* Convert a list of URIs into a list of strings. + * Lines beginning with # are skipped. + * The text block passed in is zero terminated (after the final CRLF) + */ +static GSList *uri_list_to_gslist(char *uri_list) +{ + GSList *list = NULL; + + while (*uri_list) { + char *linebreak; + char *uri; + int length; + + linebreak = strchr(uri_list, 13); + + if (!linebreak || linebreak[1] != 10) { + return list; + } + + length = linebreak - uri_list; + + if (length && uri_list[0] != '#') { + uri = g_malloc(sizeof(char) * (length + 1)); + strncpy(uri, uri_list, length); + uri[length] = 0; + list = g_slist_append(list, uri); + } + + uri_list = linebreak + 2; + } + + return list; +} + +/* User has tried to drop some data on us. Decide what format we would + * like the data in. + */ +static gboolean drag_drop(GtkWidget *widget, GdkDragContext *context, + gint x, gint y, guint time, gpointer data) +{ + char *leafname=NULL; + char *path=NULL; + GdkAtom target = GDK_NONE; + ClientData *rdata=(ClientData *) data; + + if(provides(context, XdndDirectSave0)) { + leafname = get_xds_prop(context); + if (leafname) { + gchar *uri; + char host[1025]; + + gethostname(host, sizeof(host)); + uri=g_strconcat("file://", host, "/tmp/", leafname, NULL); + set_xds_prop(context, uri); + if(rdata->uri) + g_free(rdata->uri); + rdata->uri=uri; + + /* Clean up the temp file when we exit */ + if(!tmp_fnames) + atexit(cleanup); + tmp_fnames=g_slist_prepend(tmp_fnames, + g_strconcat("/tmp/", leafname, NULL)); + + target = XdndDirectSave0; + g_dataset_set_data_full(context, "leafname", leafname, g_free); + /*printf("drag drop %s %s\n", uri, leafname);*/ + } + } else if(provides(context, text_uri_list)) + target = text_uri_list; + + gtk_drag_get_data(widget, context, target, time); + + return TRUE; +} + +/* We've got a list of URIs from somewhere (probably a filer window). + * If the files are on the local machine then use the name, + */ +static void got_uri_list(GtkWidget *widget, GdkDragContext *context, + GtkSelectionData *selection_data, + guint32 time, ClientData *rdata) +{ + GSList *uri_list; + char *error = NULL; + gboolean ok; + + uri_list = uri_list_to_gslist(selection_data->data); + + if (!uri_list) { + ok=FALSE; + error = "No URIs in the text/uri-list (nothing to do!)"; + } else if(rdata && rdata->uris) { + GSList *file; + + ok=TRUE; + for(file=uri_list; file; file=g_slist_next(file)) { + ok=ok && rdata->uris(widget, file->data, rdata->udata); + } + } + + if (error) { + dnd_error("Can't process URI list: %s", error); + } + gtk_drag_finish(context, ok, FALSE, time); + + g_slist_foreach(uri_list, (GFunc) g_free, NULL); + g_slist_free(uri_list); +} + +static char *dnd_get_local(const char *uri) +{ + char *host; + char *end; + char hostn[256]; + const char *orig=uri; + + if(strncmp(uri, "file:", 5)==0) + uri+=5; + + if(uri[0]=='/') { + if(uri[1]!='/') + return g_strdup(uri); + if(uri[2]=='/') + return g_strdup(uri+2); + + host=(char *) uri+2; + end=strchr(host, '/'); + host=g_strndup(host, end-host); + + if(strcmp(host, "localhost")==0) { + g_free(host); + return g_strdup(end); + } + + if(gethostname(hostn, sizeof(hostn))==0 && strcmp(host, hostn)==0) { + g_free(host); + return g_strdup(end); + } + + g_free(host); + } + + return NULL; +} + +static void got_xds(GtkWidget *widget, + GdkDragContext *context, + GtkSelectionData *selection_data, + guint32 time, + ClientData *rdata) +{ + char response=*selection_data->data; + gboolean saved=FALSE; + + /*printf("got_xds response=%c %d\n", response, response);*/ + switch(response) { + case 'F': + /* Sender couldn't save there - ask for another + * type if possible. + */ + if (provides(context, text_uri_list)) { + gtk_drag_get_data(widget, context, text_uri_list, time); + return; + } else { + dnd_error("Drag & drop error: sender can't provide data"); + } + break; + + case 'S': + saved=TRUE; + + if(rdata->uris) { + if(!rdata->uris(widget, rdata->uri, rdata->udata)) + saved=FALSE; + } + break; + + case 'E': + break; + + default: + dnd_error("XDS protocol error, '%c' should be S, F or E", response); + break; + } + + if(!saved) + gtk_drag_finish(context, FALSE, FALSE, time); + else + gtk_drag_finish(context, TRUE, FALSE, time); +} + +/* Called when some data arrives from the remote app (which we asked for + * in drag_drop). + */ +static void drag_data_received(GtkWidget *widget, + GdkDragContext *context, + gint x, + gint y, + GtkSelectionData *selection_data, + guint info, + guint32 time, + gpointer user_data) +{ + if (!selection_data->data) { + /* Timeout? */ + gtk_drag_finish(context, FALSE, FALSE, time); /* Failure */ + return; + } + + switch(info) { + case TARGET_XDS: + got_xds(widget, context, selection_data, time, (ClientData *) user_data); + break; + case TARGET_URI_LIST: + got_uri_list(widget, context, selection_data, time, + (ClientData *) user_data); + break; + default: + dnd_error("drag_data_received: unknown target %u", info); + gtk_drag_finish(context, FALSE, FALSE, time); + break; + } +} + +static int drop_for_filesel(GtkWidget* widget, + const char *uri, + void *udata) +{ + char *local; + + local=dnd_get_local(uri); + /*printf("%s %s\n", uri, local? local: "(NULL)");*/ + if(local) { + gboolean state=FALSE; + + if(GTK_IS_FILE_SELECTION(widget)) { + gtk_file_selection_set_filename(GTK_FILE_SELECTION (widget), local); + gtk_signal_emit_by_name(GTK_OBJECT(GTK_FILE_SELECTION(widget)->ok_button), + "clicked", udata); + state=TRUE; + } + + g_free(local); + + return state; + } else { + dnd_error("Cannot handle non-local URI's (%s)", uri); + } + + return FALSE; +} + +/* This is where we act as the source */ +static void make_icon_pixmap(GtkWidget *window, const char *mime_type) +{ + GtkStyle *style; + gchar *xpm_file; + + style=gtk_widget_get_style(window); + + if(pixmap) { + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); + pixmap=NULL; + } + + xpm_file=find_xpm_for_mime_type(mime_type); + if(xpm_file) { + pixmap=gdk_pixmap_create_from_xpm(GTK_WIDGET(window)->window, &mask, + &style->bg[GTK_STATE_NORMAL], + xpm_file); + g_free(xpm_file); + } + + if(!pixmap) { + pixmap=gdk_pixmap_create_from_xpm_d(GTK_WIDGET(window)->window, &mask, + &style->bg[GTK_STATE_NORMAL], + (gchar **) unknown_xpm); + } +} + +static void press_on_icon(GtkWidget *ebox, GdkEventButton *ev, + GtkFileSelection *fs) +{ + gchar *path, *leaf; + GdkDragContext *context; + GtkWidget *icon; + GtkTargetEntry targent[] = { + {"XdndDirectSave0", 0, MY_XDS_TARGET}, + /*{"text/uri-list", 0, MY_XDND_TARGET}*/ + }; + + if(!targets) { + targets=gtk_target_list_new(targent, sizeof(targent)/sizeof(*targent)); + } + + path=gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)); + leaf=strrchr(path, '/'); + if(leaf) + leaf++; + else + leaf=path; + leaf=g_strdup(leaf); + + context=gtk_drag_begin(GTK_WIDGET(fs), targets, GDK_ACTION_COPY, + ev->button, (GdkEvent *) ev); + icon=GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(fs), "dnd_icon")); + gtk_drag_set_icon_pixmap(context, gtk_widget_get_colormap(icon), + pixmap, mask, ev->x, ev->y); + + gdk_property_change(context->source_window, XdndDirectSave0, + xa_text_plain, 8, GDK_PROP_MODE_REPLACE, + leaf, strlen(leaf)); +} + +static void drag_end(GtkWidget *widget, GdkDragContext *context, + GtkFileSelection *fs) +{ + GList *targets; + + for(targets=context->targets; targets; targets=g_list_next(targets)) { + GdkAtom atom=(GdkAtom) targets->data; + gchar *name=gdk_atom_name(atom); + + /* Do something? */ + + g_free(name); + } +} + +static void drag_data_get(GtkWidget *widget, GdkDragContext *context, + GtkSelectionData *data, guint info, guint time, + GtkFileSelection *fs) +{ + GList *targets; + gchar *name; + GdkAtom prop; + gint format, length; + guchar *cdata=NULL; + char xds_reply='E'; + gpointer udata; + + udata=gtk_object_get_data(GTK_OBJECT(fs), "dnd_user_data"); + + if(gdk_property_get(context->source_window, XdndDirectSave0, xa_text_plain, + 0, 1024, FALSE, &prop, &format, &length, &cdata)) { + if(cdata && format==8) + cdata[length]=0; + name=gdk_atom_name(prop); + /*printf("drag_data_get name=%s cdata=%p %s\n", name, cdata, + cdata? (char *) cdata: "");*/ + + if(cdata && format==8 && strncmp(cdata, "file://", 7)==0) { + char *path; + char *sep; + + path=dnd_get_local(cdata); + + if(!path) { + xds_reply='F'; + } else { + gtk_file_selection_set_filename(GTK_FILE_SELECTION (fs), path); + gtk_signal_emit_by_name(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), + "clicked", udata); + xds_reply='S'; + g_free(path); + } + } + g_free(name); + g_free(cdata); + } + + gtk_selection_data_set(data, xa_string, 8, &xds_reply, 1); +} + +static gchar *find_xpm_for_mime_type(const char *mime_type) +{ + gchar *fname=NULL; + gchar **tok, *leaf=NULL; + + if(!mime_type) + return NULL; + + tok=g_strsplit(mime_type, "/", 3); + if(tok[2] && tok[2][0]) { + g_strfreev(tok); + return NULL; + } + + if(tok[1] && tok[1][0]) { + leaf=g_strconcat(tok[0], "_", tok[1], ".xpm", NULL); + fname=choices_find_path_load(leaf, "MIME-icons"); + g_free(leaf); + } + if(!fname && tok[0] && tok[0][0]) { + leaf=g_strconcat(tok[0], ".xpm", NULL); + fname=choices_find_path_load(leaf, "MIME-icons"); + g_free(leaf); + } + + g_strfreev(tok); + return fname; +} + +static void cleanup(void) +{ + while(tmp_fnames) { + unlink((const char *) tmp_fnames->data); + tmp_fnames=g_slist_next(tmp_fnames); + } +} + +/* Short choices implementation */ +static gchar **dir_list = NULL; + +/* Reads in CHOICESPATH and constructs the directory list table. + * You must call this before using any other choices_* functions. + * + * If CHOICESPATH does not exist then a suitable default is used. + */ +static void choices_init(void) +{ + char *choices; + + if(dir_list) + return; + + choices = getenv("CHOICESPATH"); + + if (choices) + { + while (*choices == ':') + choices++; + + if (*choices == '\0') + { + dir_list = g_new(char *, 1); + dir_list[0] = NULL; + } + else + dir_list = g_strsplit(choices, ":", 0); + } + else + { + dir_list = g_new(gchar *, 4); + dir_list[0] = g_strconcat(getenv("HOME"), "/Choices", NULL); + dir_list[1] = g_strdup("/usr/local/share/Choices"); + dir_list[2] = g_strdup("/usr/share/Choices"); + dir_list[3] = NULL; + } + +} + +/* Get the pathname of a choices file to load. Eg: + * + * choices_find_path_load("menus", "ROX-Filer") + * -> "/usr/local/share/Choices/ROX-Filer/menus". + * + * The return values may be NULL - use built-in defaults - otherwise + * g_free() the result. + */ +gchar *choices_find_path_load(const char *leaf, const char *dir) +{ + gchar **cdir; + + if(!dir_list) + choices_init(); + + cdir = dir_list; + + while (*cdir) + { + gchar *path; + + path = g_strconcat(*cdir, "/", dir, "/", leaf, NULL); + + if (exists(path)) + return path; + + g_free(path); + + cdir++; + } + + return NULL; +} + +/* Returns TRUE if the object exists, FALSE if it doesn't */ +static gboolean exists(const char *path) +{ + struct stat info; + + return stat(path, &info) == 0; +} + + +/* + * $Log: dnd_filesel.c,v $ + * Revision 1.4 2002/02/20 16:04:24 stephen + * Allow for use by C++ + * Tidy up temp files on exit. + * + * Revision 1.3 2002/02/01 12:53:50 stephen + * Incorporated some suggestions from rox-devel. + * Call this release 0.1.1 + * + */ + --- ./dnd_filesel.h.00 2007-01-20 22:10:19.000000000 +0100 +++ ./dnd_filesel.h 2007-01-20 21:48:18.000000000 +0100 @@ -0,0 +1,78 @@ +/* + * $Id: dnd_filesel.h,v 1.4 2002/02/20 16:04:24 stephen Exp $ + * + * Adapted by Stephen Watson, , from code + * written by Thomas Leonard, . + */ + +#ifndef _dnd_filesel_h +#define _dnd_filesel_h + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * We assume we have a reasonable libc and the GTK+ 1.2.10 libraries available. + * We do not use any other libraries, no matter how useful they would be... + * + * Use dnd_setup_load_sel(filesel, udata) to enable drag & drop loading for the + * file selector. Use dnd_setup_save_sel(filesel, udata) to enable drag & drop + * saving for the file selector. + * + * They work by processing the DnD protocol until the filename has been + * determined, then using gtk_file_selection_set_filename to store it and + * triggering the "clicked" event for the OK button. In each case the udata + * parameter should be the same as that for the "clicked" signal handler for + * the OK button. + * + * See test_dnd.c for an example. + */ + +/* Flags for dnd_register_dest */ +#define DND_DEFAULT 0u /* Standard options */ +#define DND_ALLOW_MOVE 1u /* The file can be moved */ + +/* + * Function which responds to drop on a widget by processing a URI. + * Return TRUE if handled successfully, FALSE otherwise. + * May get called multiple times if multiple file drops + */ +typedef int (*dnd_handle_uri)(GtkWidget* widget, + const char *uri, + gpointer udata); + +/* Register a widget to handle a drop */ +extern void dnd_register_dest(GtkWidget* widget, unsigned int flags, + dnd_handle_uri, gpointer udata); + +/* Set up a GtkFileSelection to handle drops. udata is the value to pass as + the second parameter to the OK button's clicked signal */ +extern void dnd_setup_load_sel(GtkWidget *fs, gpointer udata); +extern void dnd_setup_save_sel(GtkWidget *fs, gpointer udata); + +/* If hide is true then the widget's file lists are hidden when + dnd_setup_load_sel or dnd_setup_save_sel is called */ +extern void dnd_hide_file_lists(gboolean hide); + +/* Set the icon to use for saving by specifing the mime type. Call it + after dnd_setup_save_sel, but before showing the widget */ +extern void dnd_set_mime_type(GtkWidget *fs, const char *type); + +#ifdef __cplusplus +} +#endif + +#endif + +/* + * $Log: dnd_filesel.h,v $ + * Revision 1.4 2002/02/20 16:04:24 stephen + * Allow for use by C++ + * Tidy up temp files on exit. + * + * Revision 1.3 2002/02/01 12:53:50 stephen + * Incorporated some suggestions from rox-devel. + * Call this release 0.1.1 + * + */ --- ./pixmaps.h.00 2005-10-27 18:20:14.000000000 +0200 +++ ./pixmaps.h 2004-02-10 23:53:02.000000000 +0100 @@ -1,8 +1,7 @@ /* * File: pixmaps.h * - * Copyright (C) 2000, 2001 Jorge Arellano Cid - * Design by John Grantham, Dipl.-Designer; http://www.grantham.de/ + * Copyright (C) 2000, 2001 Jorge Arellano Cid * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,636 +44,226 @@ */ /* XPM */ static char * left_xpm[] = { -"22 22 46 1", +"24 24 9 1", " c None", -". c #000000", -"+ c #FF7856", -"@ c #FF8361", -"# c #FF5325", -"$ c #FF8C68", -"% c #FF6636", -"& c #FF6333", -"* c #FF936B", -"= c #FF6E39", -"- c #FF5111", -"; c #FF8C61", -"> c #FFA685", -", c #FF8659", -"' c #FF996E", -") c #FF773D", -"! c #FF5C16", -"~ c #FF570F", -"{ c #EC510E", -"] c #FF894C", -"^ c #FF7E3B", -"/ c #FF681A", -"( c #FF6414", -"_ c #EC5D13", -": c #C56932", -"< c #CB5A15", -"[ c #F86E19", -"} c #FF711A", -"| c #EC6918", -"1 c #9F5F31", -"2 c #C56118", -"3 c #F87A1E", -"4 c #FF7D1F", -"5 c #EC741D", -"6 c #9F6532", -"7 c #C56A1C", -"8 c #F88523", -"9 c #8C4B14", -"0 c #582F0C", -"a c #894A13", -"b c #9F6B35", -"c c #C57320", -"d c #B96C1E", -"e c #A47339", -"f c #C77C23", -"g c #93601C", -" ", -" ", -" ", -" ", -" .. ", -" .+. ", -" .@#. ", -" .$%&...... .... ", -" .*=-=;>>>,. .,,. ", -" .')!~~~~~~{. .{{. ", -" .]^/(((((((_. .__. ", -" .:<[}}}}}}}|. .||. ", -" .1234444445. .55. ", -" .67879000a. .aa. ", -" .bcd...... .... ", -" .ef. ", -" .g. ", -" .. ", -" .....", -" .>. ", -" . ", -" "}; +". c #020202", +"+ c #2E2E2E", +"@ c #5A7A52", +"# c #83A881", +"$ c #86B282", +"% c #B0C9AF", +"& c #42593B", +"* c #CEDECB", +" ", +" ", +" ", +" . ", +" .. ", +" .%. ", +" .*%. ", +" .*%%........ ", +" .*%%%%%%%%%#. ", +" .*%%%%%%%%%%@. ", +" +*%%%%%%%%%%%@. ", +" .#$#$$#$$$#$$$@. ", +" .&@@@@@@@@@@@&. ", +" .&@@@@@@@@@@&. ", +" .&@@&&&&&&&&. ", +" .&@&........ ", +" .&&. ", +" .&. ", +" .. ", +" . ", +" ", +" ", +" ", +" "}; + /* XPM */ static char * right_xpm[] = { -"22 22 46 1", +"24 24 9 1", " c None", -". c #000000", -"+ c #569A59", -"@ c #228126", -"# c #60A463", -"$ c #2E9132", -"% c #319335", -"& c #65AE68", -"* c #52AC55", -"= c #80C282", -"- c #5BB15E", -"; c #319C35", -"> c #07880C", -", c #65B568", -"' c #008905", -") c #009405", -"! c #07970C", -"~ c #31A935", -"{ c #65BF68", -"] c #009705", -"^ c #00A305", -"/ c #07A60C", -"( c #2AB22E", -"_ c #3CB83F", -": c #00A605", -"< c #00B305", -"[ c #00AE05", -"} c #008E04", -"| c #219424", -"1 c #00B405", -"2 c #00C205", -"3 c #00BD05", -"4 c #009604", -"5 c #218124", -"6 c #007003", -"7 c #004802", -"8 c #007303", -"9 c #00A104", -"0 c #00CB05", -"a c #218924", -"b c #00A304", -"c c #00AD04", -"d c #219024", -"e c #00B804", -"f c #219B24", -"g c #008E03", -" ", -" ", -" ", -" ", -" .. ", -" .+. ", -" .@#. ", -" .... ......$%&. ", -" .**. .*===-;>;,. ", -" .''. .'))))))!~{. ", -" .]]. .]^^^^^^^/(_. ", -" .::. .:<<<<<<<[}|. ", -" .11. .1222222345. ", -" .66. .67778909a. ", -" .... ......bcd. ", -" .ef. ", -" .g. ", -" .. ", -" .....", -" .=. ", -" . ", -" "}; +". c #020202", +"+ c #0E120A", +"@ c #B0CAAE", +"# c #526A46", +"$ c #6F9667", +"% c #465A2E", +"& c #5D7D55", +"* c #A6BEA2", +" ", +" ", +" ", +" . ", +" .. ", +" .$. ", +" .@$. ", +" .......+@@$. ", +" .@@@@@@@@@@$+ ", +" .@@@@@@@@@@@$. ", +" .*@@@@@@@@*@@$. ", +" .$$$$$$$$$$&$$%. ", +" .&&#&#&#&&&&&%. ", +" .&&&&&&&&#&#%. ", +" .&######&&&%. ", +" ........#&%. ", +" .#%. ", +" .%. ", +" .. ", +" . ", +" ", +" ", +" ", +" "}; + /* XPM */ static char * reload_xpm[] = { -"22 22 147 2", +"24 24 9 1", " c None", -". c #000000", -"+ c #BABABA", -"@ c #CCCCCC", -"# c #CBCBCB", -"$ c #5D5D5D", -"% c #909090", -"& c #9C9C9C", -"* c #A0A0A0", -"= c #EBEBEB", -"- c #4C4C4C", -"; c #949494", -"> c #8D8D8D", -", c #FFFFFF", -"' c #E4E4E4", -") c #424242", -"! c #989898", -"~ c #A4A4A4", -"{ c #878787", -"] c #FBFBFB", -"^ c #E1E1E1", -"/ c #393939", -"( c #9B9B9B", -"_ c #A8A8A8", -": c #898989", -"< c #ECECEC", -"[ c #DEDEDE", -"} c #313131", -"| c #0B0B0B", -"1 c #0C0C0C", -"2 c #2B2B2B", -"3 c #575757", -"4 c #8B8B8B", -"5 c #AEAEAE", -"6 c #8E8E8E", -"7 c #DDDDDD", -"8 c #2C2C2C", -"9 c #282828", -"0 c #666666", -"a c #A3A3A3", -"b c #C0C0C0", -"c c #7D7D7D", -"d c #3F3F3F", -"e c #1D1D1D", -"f c #6B6B6B", -"g c #929292", -"h c #585858", -"i c #BEBEBE", -"j c #4F4F4F", -"k c #A5A5A5", -"l c #BDBDBD", -"m c #B1B1B1", -"n c #A9A9A9", -"o c #AAAAAA", -"p c #696969", -"q c #0A0A0A", -"r c #5F5F5F", -"s c #515151", -"t c #545454", -"u c #686868", -"v c #868686", -"w c #B5B5B5", -"x c #B4B4B4", -"y c #7F907F", -"z c #436B43", -"A c #144F14", -"B c #004800", -"C c #1E1E1E", -"D c #838383", -"E c #9F9F9F", -"F c #262626", -"G c #9D9D9D", -"H c #B8B8B8", -"I c #839583", -"J c #577A57", -"K c #7E917E", -"L c #A7AAA7", -"M c #426D42", -"N c #004600", -"O c #A1A1A1", -"P c #404040", -"Q c #636363", -"R c #C6C6C6", -"S c #B7B7B7", -"T c #728C72", -"U c #B0B2B0", -"V c #777777", -"W c #323232", -"X c #C2C2C2", -"Y c #BCBCBC", -"Z c #8EA18E", -"` c #004B00", -" . c #979797", -".. c #0F0F0F", -"+. c #D2D2D2", -"@. c #AFAFAF", -"#. c #C4C4C4", -"$. c #B0B0B0", -"%. c #D9D9D9", -"&. c #C9C9C9", -"*. c #7A5200", -"=. c #B8AE9A", -"-. c #101010", -";. c #DFDFDF", -">. c #CECECE", -",. c #BFBFBF", -"'. c #D4D4D4", -"). c #7F5500", -"!. c #D2D1CE", -"~. c #B4A585", -"{. c #E5E5E5", -"]. c #845800", -"^. c #A58A53", -"/. c #C3B79F", -"(. c #D9D7D3", -"_. c #B09A6E", -":. c #C6BBA5", -"<. c #747474", -"[. c #3A3A3A", -"}. c #EAEAEA", -"|. c #222222", -"1. c #865A00", -"2. c #CCC1AA", -"3. c #AC915B", -"4. c #936C1C", -"5. c #E0E0E0", -"6. c #414141", -"7. c #787878", -"8. c #F0F0F0", -"9. c #8C8C8C", -"0. c #C3C3C3", -"a. c #E2E2E2", -"b. c #F4F4F4", -"c. c #646464", -"d. c #9E9E9E", -"e. c #DCDCDC", -"f. c #6A6A6A", -"g. c #555555", -"h. c #0E0E0E", -"i. c #F8F8F8", -"j. c #E6E6E6", -"k. c #191919", -"l. c #2F2F2F", -"m. c #464646", -"n. c #444444", -"o. c #242424", -"p. c #343434", -" . . . . . . . . . . . ", -" . + @ @ @ @ @ @ @ # $ . ", -" . % & & & & & & & * = - . ", -" . ; * * * * * * * > , ' ) . ", -" . ! ~ ~ ~ ~ ~ ~ ~ { ] , ^ / . ", -" . ( _ _ _ _ _ _ _ : < , , [ } . ", -" . | 1 1 1 2 3 4 5 6 < , , , 7 8 . ", -" . 9 0 a b b a c d e f g : h h f * i . ", -" . j k l m n n m l o p q r f s s t u v . ", -" . - w x y z A A z y B w u C D & & & E * . ", -" F G H I J K L K M N N H O P Q R R R R S . ", -". $ i S T U w w w B B B S i V W @ @ @ @ l . ", -". 6 X Y Z Y Y Y ` ` ` ` Y X ...+.+.+.+.X . ", -". @.R #.#.#.#.#.#.#.#.#.#.R $...%.%.%.%.&.. ", -". n #.@ *.*.*.*.@ @ @ =.@ #.o -.;.;.;.;.>.. ", -". v ,.'.).).).'.'.'.!.~.'.,.% -.{.{.{.{.'.. ", -". 3 w '.].].^./.(./._.:.'.w <.[.}.}.}.}.%.. ", -" |.{ X 1.2.3.4.4.3.2.5.X > 6.7.8.8.8.8.[ . ", -" . [.9.0.a.}.}.}.}.a.0.> $ 9 X b.b.b.b.a.. ", -" . W c.d.R e.e.R d.f.g.h.; i.i.i.i.i.j.. ", -" . k.l.m.j j n.[.o.h.p.3 3 3 3 3 3 { . ", -" . . . . . . . . . . . . . . . . . "}; +". c #020202", +"+ c #121A12", +"@ c #759E6F", +"# c #89B183", +"$ c #2A3A28", +"% c #A4C7A0", +"& c #62855D", +"* c #CBE5C7", +" . ", +" .. ", +" .*. ", +" ...+**. ", +" .@%*****. .. ", +" +#********. .#&. ", +" .@**********. .#&. ", +" $%*#@@@###&. .%. ", +".#*@@@@@@@&. .%&. ", +".%%&&...&&. . .*@. ", +".*@&. .&. .. .%#. ", +".*&. .. .*. .%*@. ", +".#@. . .**...%*%@. ", +".&#. .********@&. ", +" .%. .%******%#@$. ", +" .&#. .%*******#@&. ", +" .&@. .@@#@@@@&&.. ", +" .. .@&@&&&&.. ", +" .@&.... ", +" $@. ", +" .. ", +" . ", +" ", +" "}; + /* XPM */ static char * home_xpm[] = { -"22 22 106 2", +"24 24 9 1", " c None", -". c #190E0B", -"+ c #180D09", -"@ c #D8947D", -"# c #000000", -"$ c #190D09", -"% c #CC6746", -"& c #A7401F", -"* c #C65834", -"= c #1A0D09", -"- c #D16746", -"; c #A63F1F", -"> c #160D09", -", c #C13206", -"' c #D86746", -") c #AD3F1F", -"! c #1C0F0A", -"~ c #9B9376", -"{ c #D2502A", -"] c #1B0D09", -"^ c #DF6746", -"/ c #B43F1F", -"( c #999174", -"_ c #C1B588", -": c #D34721", -"< c #D8461E", -"[ c #1C0D09", -"} c #E76746", -"| c #BB3F1F", -"1 c #1D0F0A", -"2 c #C5B98B", -"3 c #C4B889", -"4 c #93371F", -"5 c #E14821", -"6 c #1B0803", -"7 c #1D0D09", -"8 c #EE6746", -"9 c #C33F1F", -"0 c #1E0F0A", -"a c #9E9678", -"b c #CABD8F", -"c c #CCBF8E", -"d c #CFC290", -"e c #1E0D09", -"f c #F56746", -"g c #CA3F1F", -"h c #21110A", -"i c #A09879", -"j c #CDC091", -"k c #D2C593", -"l c #D8CA97", -"m c #DCCE9A", -"n c #1D0500", -"o c #C63F21", -"p c #9E361F", -"q c #130300", -"r c #988E6A", -"s c #D1C492", -"t c #D5C895", -"u c #DDCF9A", -"v c #E4D69F", -"w c #E9DAA3", -"x c #C9BC8C", -"y c #DACC98", -"z c #E0D29C", -"A c #E8D9A2", -"B c #EFE0A7", -"C c #F2E3A9", -"D c #5E5842", -"E c #676047", -"F c #F9E9AE", -"G c #655F46", -"H c #DBCD99", -"I c #C16C4E", -"J c #D3927C", -"K c #C86F51", -"L c #FCECB0", -"M c #D6D6D6", -"N c #D2D2D2", -"O c #E3D49F", -"P c #A82900", -"Q c #B82C00", -"R c #AB2A00", -"S c #FEEEB1", -"T c #6F6D6D", -"U c #6D6B6B", -"V c #E7D9A2", -"W c #B52A00", -"X c #C42D00", -"Y c #B62A00", -"Z c #FFEFB2", -"` c #696249", -" . c #676048", -".. c #EADBA4", -"+. c #C12A00", -"@. c #D22D00", -"#. c #C22A00", -"$. c #ECDDA5", -"%. c #CE2A00", -"&. c #DF2D00", -"*. c #DA2A00", -"=. c #EC2D00", -"-. c #898060", -";. c #851800", -">. c #551000", -",. c #58523D", -" ", -" . . ", -" + @ @ + # # # ", -" $ % & & % $ # * # ", -" = - ; > > ; - = # , # ", -" = ' ) ! ~ ~ ! ) ' = { # ", -" ] ^ / ! ( _ _ ( ! / : < # ", -" [ } | 1 ~ 2 3 3 2 ~ 1 4 5 6 ", -" 7 8 9 0 a b c d d c b a 0 9 8 7 ", -" e f g h i j k l m m l k j i h g f e ", -" n o p q r s t u v w w v u t s r q p o n ", -" # # # # x y z A B C C B A z y x # # # # ", -" # s D # # # E F G # # D s # ", -" # H # I J K # L # M N # H # ", -" # O # P Q R # S # T U # O # ", -" # V # W X Y # Z ` # # .V # ", -" # ..# +.@.#.# Z Z Z S S ..# ", -" # $.# %.&.%.# Z Z Z Z Z $.# ", -" # $.# *.=.*.# Z Z Z Z Z $.# ", -" # -.# ;.>.;.# ,.,.,.,.,.-.# ", -" # # # # # # # # # # # # # # ", -" "}; +". c #0D0B0A", +"+ c #BEBEBE", +"@ c #A7A29B", +"# c #88766D", +"$ c #B95540", +"% c #565B53", +"& c #964E3C", +"* c #F3F3F3", +" ", +" .. ", +" .... .... ", +" .$&...%%.. ", +" .&&..%%#%.. ", +" .&...@%@+%.. ", +" ...%#+#++*%.. ", +" ..%@@+@*+*+#.. ", +" ..#@+@*+*+*+*%.. ", +" ..+++*+*+*+*+**#.. ", +" ..+++++++++.....##.. ", +" ....********.@+*.#.... ", +" .+*.....*.+**.%. ", +" .+*.@#&.*.+**.%. ", +" .#*.@$$.*.....%. ", +" ..*.@$..+@%%##.. ", +" ..*.@$$.*****+. ", +" .+.@$&.+++++#. ", +" .@.$$$.*****@. ", +" .................... . ", +" .@#@##%%%..###%%%. ", +" .. ......... ...... ", +" ... ", +" "}; + /* XPM */ static char * save_xpm[] = { -"22 22 59 1", +"24 24 9 1", " c None", -". c #000000", -"+ c #638163", -"@ c #4D5A4D", -"# c #A4BDA4", -"$ c #184318", -"% c #0E280E", -"& c #4B7E4B", -"* c #194419", -"= c #0F290F", -"- c #508350", -"; c #1B481B", -"> c #102B10", -", c #568956", -"' c #1D4C1D", -") c #112D11", -"! c #5D905D", -"~ c #205020", -"{ c #133013", -"] c #639663", -"^ c #235223", -"/ c #153115", -"( c #6B9E6B", -"_ c #275627", -": c #173317", -"< c #73A673", -"[ c #2B5A2B", -"} c #2E612E", -"| c #193619", -"1 c #2E5D2E", -"2 c #152A15", -"3 c #326132", -"4 c #838383", -"5 c #9D9D9D", -"6 c #B3B3B3", -"7 c #979797", -"8 c #366536", -"9 c #585858", -"0 c #565656", -"a c #727272", -"b c #6A6A6A", -"c c #386838", -"d c #848484", -"e c #7A7A7A", -"f c #3C6B3C", -"g c #999999", -"h c #8E8E8E", -"i c #366036", -"j c #3F6E3F", -"k c #BDBDBD", -"l c #BABABA", -"m c #ADADAD", -"n c #A0A0A0", -"o c #162616", -"p c #264126", -"q c #949494", -"r c #696969", -"s c #424242", -"t c #676767", -" ", -" ", -" ................ ", -" .+@############@+. ", -" .$%&&&&&&&&&&&&%$. ", -" .*=------------=*. ", -" .;>,,,,,,,,,,,,>;. ", -" .')!!!!!!!!!!!!)'. ", -" .~{]]]]]]]]]]]]{~. ", -" .^/((((((((((((/^. ", -" ._:<<<<<<<<<<<<:_. ", -" .[}||||||||||||}[. ", -" .12............21. ", -" .3.444566666667.3. ", -" .8.9..0aaaaaaab.8. ", -" .c.d..eddddddde.c. ", -" .f.g..hgggggggh.i. ", -" .j.k..lmmmmmmmn.o. ", -" .p.qqqrssssssst.. ", -" ............... ", -" ", -" "}; +". c #080909", +"+ c #616B73", +"@ c #9CA8B6", +"# c #C5CDD3", +"$ c #D77D6E", +"% c #F8F8F7", +"& c #C67268", +"* c #42494D", +" ", +" ................... ", +" .##+#######$##$##+#@. ", +" .#@+$$$&$$$$$$&&&+@+. ", +" .#@+$$&$$$&$&&&&&*@+. ", +" .#@+%%%%%%%%%%%%%+@+. ", +" .#@+%%%%%%%%%%%%%+@*. ", +" .#@+#############+@+. ", +" .#@+%%%%%%%%%%%%%+@*. ", +" .#@+%%%%%%%%%%%%%+@*. ", +" .#@+#############+@+. ", +" .#@+%%%%%%%%%%%%%+@*. ", +" .#@+++++++++++++++@*. ", +" .@@@@@@@@@@@@@@@@@@*. ", +" .#@+@**++++++++**@@*. ", +" .@@+*@#%#%%##@@+*+#*. ", +" .#+@*#%+**###@#*++@*. ", +" .#@+*#%+**#####*++#*. ", +" .@+@*#%***#@##%*++@*. ", +" .+@+*##***##%%%*++@*. ", +" .+++@#@####%#@*+*#*. ", +" .................. ", +" ", +" "}; /* XPM */ static char * stop_xpm[] = { -"22 22 77 1", +"24 24 9 1", " c None", -". c #000000", -"+ c #703434", -"@ c #E57F7F", -"# c #E68080", -"$ c #6F2929", -"% c #DB4343", -"& c #D31A1A", -"* c #CE0000", -"= c #DC4343", -"- c #D51A1A", -"; c #D00000", -"> c #702929", -", c #DF4343", -"' c #D71A1A", -") c #D30000", -"! c #6F1B1B", -"~ c #E14343", -"{ c #DA1A1A", -"] c #D60000", -"^ c #A66666", -"/ c #841717", -"( c #DA0404", -"_ c #DD1A1A", -": c #D90000", -"< c #D56B6B", -"[ c #FFFFFF", -"} c #E7D5D5", -"| c #861717", -"1 c #CC0000", -"2 c #DC0000", -"3 c #E64C4C", -"4 c #FADEDE", -"5 c #EAD5D5", -"6 c #722C2C", -"7 c #CF0000", -"8 c #E00000", -"9 c #EB5C5C", -"0 c #FBDFDF", -"a c #FDF8F8", -"b c #E40000", -"c c #DE3535", -"d c #FEF8F8", -"e c #E70000", -"f c #971C1C", -"g c #EED5D5", -"h c #FEFAFA", -"i c #EB0000", -"j c #AA1C1C", -"k c #EFD5D5", -"l c #FDE3E3", -"m c #F69595", -"n c #C50000", -"o c #D50000", -"p c #EF0000", -"q c #F77777", -"r c #FDE4E4", -"s c #F56565", -"t c #4D0000", -"u c #9E0000", -"v c #D70000", -"w c #F20000", -"x c #FAA7A7", -"y c #F76969", -"z c #420000", -"A c #A00000", -"B c #DA0000", -"C c #F50000", -"D c #A20000", -"E c #DD0000", -"F c #F80000", -"G c #430000", -"H c #A40000", -"I c #DF0000", -"J c #FB0000", -"K c #380000", -"L c #570000", -" ", -" ", -" ......... ", -" .+@#####@+. ", -" .$%&*****&%$. ", -" .$=-;;;;;;;-=$. ", -" .>,')))))))))',>. ", -" .!~{]]^/]]]/^]]{~!. ", -" .(_::<[}|:|}[<::_(. ", -" .122234[565[432221. ", -" .7888890[a[0988887. ", -" .)bbbbbcd[dcbbbbb). ", -" .]eeeefg[h[gfeeee]. ", -" .:iiijk[lml[kjiii:. ", -" .noppq[rspsr[qppon. ", -" .tuvwwxywwwyxwwvut. ", -" .zABCCCCCCCCCBAz. ", -" .zDEFFFFFFFEDz. ", -" .GHIJJJJJIHG. ", -" .KLLLLLLLK. ", -" ......... ", -" "}; +". c #0B0402", +"+ c #FEFEFE", +"@ c #301103", +"# c #E2B7A5", +"$ c #71270A", +"% c #C87C57", +"& c #B14314", +"* c #DC5614", +" ", +" ..@@.. ", +" @$*%%%%&$@ ", +" .&%%%*****&&$. ", +" .&%******&*&*&&. ", +" .&%%********&&&&$. ", +" $%********&&&&&&&$ ", +" @*%**&%&&**&%%&&&&&. ", +" &%***%++#&*%#+#*&&&$ ", +" .%****%+++#%+++#*&&&$. ", +" .%****&%++++++#*%&&$&. ", +" @%&*****%++++#%&&&&&$. ", +" @***&***%++++#*&&&&$$@ ", +" .%&&*&&%++++++#&&&&&$. ", +" .&&&&&%+++##+++#&&$$$. ", +" &&&&$%++#**#++#&&&$@ ", +" .*&&&$%#&&&&%#&&&$$@ ", +" $%&&&&*&&&&*&&&$$@ ", +" .$*&&&&&&&&&&&$$$. ", +" .$&&&&&&&$&$$$$. ", +" .$$&$&$&$$$$@. ", +" .$$$$$$$@@ ", +" ..@... ", +" "}; + /* XPM */ static char * bm_xpm[] = { "22 22 86 1", @@ -791,452 +380,177 @@ /* XPM */ static char * s_left_xpm[] = { -"16 16 33 1", +"16 16 9 1", " c None", -". c #000000", -"+ c #1F120A", -"@ c #FF9A59", -"# c #DE7E42", -"$ c #FF7A26", -"% c #DE8247", -"& c #FF8335", -"* c #FF8232", -"= c #FF6A0C", -"- c #FF9D5E", -"; c #FFB382", -"> c #FF9755", -", c #FF6605", -"' c #EC5E05", -") c #1F0F05", -"! c #DE691E", -"~ c #FF7F2E", -"{ c #180A00", -"] c #A44103", -"^ c #CB5104", -"/ c #F86305", -"( c #120700", -"_ c #7E3203", -": c #C54F04", -"< c #8C3803", -"[ c #582302", -"} c #893703", -"| c #B94A04", -"1 c #833403", -"2 c #C75004", -"3 c #110700", -"4 c #933B03", +". c #020202", +"+ c #B1C9AF", +"@ c #5B7B54", +"# c #3E5437", +"$ c #7EAA7A", +"% c #CEDECB", +"& c #2E2E2E", +"* c #668E62", " ", +" . ", +" .. ", +" .%. ", +" .%+....... ", +" .%+++++++$. ", +" .%++++++++@. ", +" &%+++++++++*. ", +" .#@@@@@@@@#. ", +" .#@@######. ", +" .#@....... ", +" .#. ", " .. ", -" +@. ", -" +#$. ", -" +%&*.... ....", -" +%&=&-;>. .>>.", -" +%&=,,,,'. .''.", -")!~=,,,,,'. .''.", -"{]^/,,,,,'. .''.", -" (_:/,,,,'. .''.", -" (_:/:<[}. .}}.", -" (_:|.... ....", -" (12. ", -" 34. .....", -" .. .;. ", -" . "}; +" . ", +" ", +" "}; + /* XPM */ static char * s_right_xpm[] = { -"16 16 56 1", +"16 16 9 1", " c None", -". c #000000", -"+ c #569A59", -"@ c #0A120A", -"# c #228126", -"$ c #3F8342", -"% c #09130A", -"& c #2E9132", -"* c #319335", -"= c #448D47", -"- c #09140A", -"; c #52AC55", -"> c #80C282", -", c #5BB15E", -"' c #319C35", -") c #07880C", -"! c #449447", -"~ c #09150A", -"{ c #008905", -"] c #009405", -"^ c #07970C", -"/ c #31A935", -"( c #449E47", -"_ c #09160A", -": c #009705", -"< c #00A305", -"[ c #07A60C", -"} c #2AB22E", -"| c #1B971E", -"1 c #041505", -"2 c #00A605", -"3 c #00B305", -"4 c #00AE05", -"5 c #008E04", -"6 c #007303", -"7 c #001100", -"8 c #00B405", -"9 c #00C205", -"0 c #00BD05", -"a c #009604", -"b c #006003", -"c c #000D00", -"d c #007003", -"e c #004802", -"f c #00A104", -"g c #00CB05", -"h c #006803", -"i c #000E00", -"j c #00A304", -"k c #00AD04", -"l c #006F03", -"m c #000F00", -"n c #00B804", -"o c #007A03", -"p c #001000", -"q c #008E03", +". c #020202", +"+ c #0E120A", +"@ c #5A7A52", +"# c #6A8961", +"$ c #729A66", +"% c #7E9E76", +"& c #4D633B", +"* c #ADC8AB", " ", +" . ", +" .. ", +" .%. ", +" .......*$. ", +" .********$+ ", +" .*********%. ", +" .**********#. ", +" .#@#@@@@@@&. ", +" .#&&@&&@@&. ", +" .......@&. ", +" .&. ", " .. ", -" .+@ ", -" .#$% ", -".... ....&*=- ", -".;;. .;>,')'!~ ", -".{{. .{]]]]^/(_ ", -".::. .:<<<<<[}|1", -".22. .2333334567", -".88. .899990abc ", -".dd. .de6fgfhi ", -".... ....jklm ", -" .nop ", -" .qpb....", -" .. .>. ", -" . "}; +" . ", +" ", +" "}; + /* XPM */ static char * s_home_xpm[] = { -"16 16 54 1", +"16 16 9 1", " c None", -". c #170E0B", -"+ c #000000", -"@ c #170C09", -"# c #B0705B", -"$ c #B35636", -"% c #A13F20", -"& c #661B03", -"* c #AA3009", -"= c #190C09", -"- c #AC3F20", -"; c #721C03", -"> c #8E8875", -", c #C24F2D", -"' c #1A0C09", -") c #B93F20", -"! c #7C1C03", -"~ c #8F876F", -"{ c #A9A081", -"] c #A72403", -"^ c #CE4522", -"/ c #1B0C09", -"( c #C63F20", -"_ c #861C03", -": c #A9A080", -"< c #FDEDB3", -"[ c #631503", -"} c #CC2903", -"| c #1B0703", -"1 c #1D0C08", -"2 c #D03E20", -"3 c #871902", -"4 c #847C67", -"5 c #FFEFB2", -"6 c #847C68", -"7 c #851902", -"8 c #CF3A1B", -"9 c #A81E02", -"0 c #721402", -"a c #9A9070", -"b c #8B8163", -"c c #9C926D", -"d c #FDEDB1", -"e c #EADBA4", -"f c #696249", -"g c #ECDDA5", -"h c #C25834", -"i c #FFFFFF", -"j c #BE2D00", -"k c #BF0000", -"l c #898060", -"m c #58523D", -"n c #D90000", -"o c #BB0000", +". c #070505", +"+ c #DEDEDE", +"@ c #B3B3B3", +"# c #5D6156", +"$ c #853D2D", +"% c #3E433D", +"& c #52261A", +"* c #2F312E", " ", -" .. +++ ", -" @##@ +$+ ", -" @%&&%@+*+ ", -" =-;>>;-=,+ ", -" ')!~{{~!]^+ ", -" /(_~:<<:~[}| ", -" 1234:<55<:6781 ", -"+90a{<5555<:b09+", -"+++cd555555dc+++", -" +e5f+f5f+fe+ ", -" +g5+h+5+i+g+ ", -" +g5+j+5f+fg+ ", -" +g5+k+5555g+ ", -" +lm+n+mmmml+ ", -" ++++o+++++++ "}; +" ... .. ", +" .$..##. ", +" .$.#@+#. ", +" ..*#++@@. ", +" .#@+++++#. ", +" .%@@++++++@. ", +" ...+++++*%*... ", +" .+&&&+%+%. ", +" .+&$&+***. ", +" .+&$$+@+@. ", +" .+&$&+@+@. ", +" .+$&&+@+@. ", +" %%##%%*.#%%*# ", +" %..#%#%# #%#% ", +" "}; + /* XPM */ static char * s_reload_xpm[] = { -"16 16 74 1", +"16 16 9 1", " c None", -". c #000000", -"+ c #282828", -"@ c #666666", -"# c #9B9B9B", -"$ c #BFBFBF", -"% c #4F4F4F", -"& c #A5A5A5", -"* c #BDBDBD", -"= c #B1B1B1", -"- c #A9A9A9", -"; c #4C4C4C", -"> c #B5B5B5", -", c #B4B4B4", -"' c #7F907F", -") c #436B43", -"! c #144F14", -"~ c #004800", -"{ c #262626", -"] c #9D9D9D", -"^ c #B8B8B8", -"/ c #839583", -"( c #577A57", -"_ c #7E917E", -": c #A7AAA7", -"< c #426D42", -"[ c #004600", -"} c #5D5D5D", -"| c #BEBEBE", -"1 c #B7B7B7", -"2 c #728C72", -"3 c #B0B2B0", -"4 c #8E8E8E", -"5 c #C2C2C2", -"6 c #BCBCBC", -"7 c #8EA18E", -"8 c #004B00", -"9 c #AFAFAF", -"0 c #C6C6C6", -"a c #C4C4C4", -"b c #CCCCCC", -"c c #7A5200", -"d c #B8AE9A", -"e c #868686", -"f c #D4D4D4", -"g c #7F5500", -"h c #D2D1CE", -"i c #B4A585", -"j c #575757", -"k c #845800", -"l c #A58A53", -"m c #C3B79F", -"n c #D9D7D3", -"o c #B09A6E", -"p c #C6BBA5", -"q c #222222", -"r c #878787", -"s c #865A00", -"t c #CCC1AA", -"u c #AC915B", -"v c #936C1C", -"w c #E0E0E0", -"x c #3A3A3A", -"y c #8C8C8C", -"z c #C3C3C3", -"A c #E2E2E2", -"B c #EAEAEA", -"C c #323232", -"D c #646464", -"E c #9E9E9E", -"F c #DCDCDC", -"G c #191919", -"H c #2F2F2F", -"I c #404040", -" ...... ", -" .+@#$$#@+. ", -" .%&*=--=*&%. ", -" .;>,')!!)'~>;. ", -" {]^/(_:_<[[^]{ ", -".}|123>>>~~~1|}.", -".45676668888654.", -".90aaaaaaaaaa09.", -".-abccccbbbdba-.", -".e$fgggfffhif$e.", -".j>fkklmnmopf>j.", -" qr5stuvvutw5rq ", -" .xyzABBBBAzyx. ", -" .CDE0FF0EDC. ", -" .GHI%%IHG. ", -" ...... "}; +". c #020202", +"+ c #7E9A42", +"@ c #5A6F33", +"# c #DBE4D0", +"$ c #B9CE9B", +"% c #36421A", +"& c #A4AA9E", +"* c #9DB674", +" ", +" . ", +" ..&. ", +" .##$$. ", +" .&*+++. ", +" .*@.%. ", +" .*. . . ", +" .@. .. ", +" .. .#. ", +" . . .+. ", +" .#.@+. ", +" .#+++@. ", +" .*+@@. ", +" .*.. ", +" . ", +" "}; + /* XPM */ static char * s_save_xpm[] = { -"16 16 51 1", +"16 16 9 1", " c None", -". c #000000", -"+ c #638163", -"@ c #8CA28C", -"# c #A4BDA4", -"$ c #184318", -"% c #1A481A", -"& c #4C7F4C", -"* c #1A461A", -"= c #1C4C1C", -"- c #528552", -"; c #1B4A1B", -"> c #1D501D", -", c #598C59", -"' c #1F4E1F", -") c #215421", -"! c #619461", -"~ c #225122", -"{ c #255825", -"] c #699C69", -"^ c #275627", -"/ c #2A5D2A", -"( c #72A572", -"_ c #2B5A2B", -": c #2E612E", -"< c #2F5E2F", -"[ c #152A15", -"} c #336233", -"| c #838383", -"1 c #9D9D9D", -"2 c #B3B3B3", -"3 c #979797", -"4 c #376637", -"5 c #5A5A5A", -"6 c #585858", -"7 c #757575", -"8 c #6C6C6C", -"9 c #3A6A3A", -"0 c #8C8C8C", -"a c #828282", -"b c #345E34", -"c c #3E6D3E", -"d c #B6B6B6", -"e c #A5A5A5", -"f c #999999", -"g c #162616", -"h c #264126", -"i c #919191", -"j c #676767", -"k c #414141", -"l c #656565", -"................", -".+@##########@+.", -".$%&&&&&&&&&&%$.", -".*=----------=*.", -".;>,,,,,,,,,,>;.", -".')!!!!!!!!!!)'.", -".~{]]]]]]]]]]{~.", -".^/((((((((((/^.", -"._::::::::::::_.", -".<[..........[<.", -".}.|||1222223.}.", -".4.5..6777778.4.", -".9.0..a00000a.b.", -".c.d..2eeeeef.g.", -".h.iiijkkkkkl.. ", -" ............. "}; +". c #020202", +"+ c #405666", +"@ c #8995A3", +"# c #9DB0BE", +"$ c #D1D7DB", +"% c #C77667", +"& c #FBFBFB", +"* c #D28F86", +" .............. ", +".&$**********$$.", +".$#%%%%%%%%%%#+.", +".$#$&&&&&&&&&#+.", +".$#$$$$$$$$$&@+.", +".$#$&&&&&&&$&#+.", +".$#$$$$$$#$#&@+.", +".$@&&&&&$&&$&@+.", +".$##$$#$$#$$#@+.", +".$###@@@@@@@@#+.", +".$#@#$#$&$@+@@+.", +".$#@$$.+$#$.+#+.", +".$#@#$++$$#++#+.", +".@@@$&.@#$#.@#+.", +" .++###@@+@++@+.", +" ............. "}; + /* XPM */ static char * s_stop_xpm[] = { -"16 16 65 1", +"16 16 9 1", " c None", -". c #000000", -"+ c #5A3435", -"@ c #BF7F80", -"# c #BF8081", -"$ c #562929", -"% c #A54344", -"& c #911A1C", -"* c #850002", -"= c #582929", -"- c #AA4344", -"; c #981A1C", -"> c #8C0002", -", c #551B1C", -"' c #B04345", -") c #9F1A1D", -"! c #940003", -"~ c #926667", -"{ c #661C1E", -"] c #A00407", -"^ c #A81A1D", -"/ c #9E0003", -"( c #B86B6D", -"_ c #FFFFFF", -": c #E2D5D5", -"< c #581C1D", -"[ c #9C0003", -"} c #A90003", -"| c #C24C4E", -"1 c #F4DDDE", -"2 c #E9DADA", -"3 c #A70003", -"4 c #B40003", -"5 c #C4383A", -"6 c #F5DEDE", -"7 c #B10004", -"8 c #BF0004", -"9 c #9A1C1F", -"0 c #F0D9D9", -"a c #BB0004", -"b c #CA0004", -"c c #971C1F", -"d c #ECD5D5", -"e c #FAE6E6", -"f c #AF0003", -"g c #BE0004", -"h c #D50004", -"i c #E87779", -"j c #FBE5E5", -"k c #EA7E80", -"l c #470001", -"m c #930003", -"n c #C70004", -"o c #E00004", -"p c #F5A7A9", -"q c #EC6568", -"r c #3F0001", -"s c #990003", -"t c #D00004", -"u c #EA0004", -"v c #410001", -"w c #D70004", -"x c #F20005", -"y c #370001", -"z c #560002", -" ........ ", -" .+@####@+. ", -" .$%&****&%$. ", -" .=-;>>>>>>;-=. ", -".,')!~{!!{~!)',.", -".]^/(_:<<:_(/^].", -".[}}|1_22_1|}}[.", -".344456__654443.", -".788890__098887.", -".abbcd_ee_dcbba.", -".fghi_jkkj_ihgf.", -".lmnopqooqponml.", -" .rstuuuuuutsr. ", -" .v/wxxxxw/v. ", -" .yzzzzzzy. ", -" ........ "}; - +". c #020202", +"+ c #F9F3F1", +"@ c #1F0A03", +"# c #F1E2DD", +"$ c #F3DED3", +"% c #5E240C", +"& c #C04718", +"* c #F2DAD2", +" ", +" ...... ", +" .%&&&&%. ", +" @&&&&&&&%@ ", +" .&&&&&&&&&&. ", +" .&&&++&&#+&&%. ", +" .&&&++++++&&%. ", +" @&&&&++++&&&&. ", +" .&&&&++++&&&%. ", +" @&&&++##++&&%. ", +" .%&&$#&&++&&@@ ", +" .&&&&&&&&&%. ", +" @&&&&&&&%@ ", +" .%%&%%@. ", +" ...@@. ", +" "}; /* XPM */ static char * s_bm_xpm[] = { "16 16 63 1", @@ -1322,53 +636,32 @@ /* XPM */ static char * s_new_xpm[] = { -"11 11 35 1", +"16 16 9 1", " c None", -". c #000000", -"+ c #482929", -"@ c #0F0808", -"# c #390606", -"$ c #A04242", -"% c #925050", -"& c #0F0707", -"* c #0B0000", -"= c #500000", -"- c #8C0101", -"; c #944444", -"> c #221515", -", c #0A0000", -"' c #560000", -") c #A10909", -"! c #AE3636", -"~ c #230000", -"{ c #AE0000", -"] c #B40000", -"^ c #180808", -"/ c #B43535", -"( c #C40000", -"_ c #960000", -": c #190606", -"< c #C02B2B", -"[ c #E00000", -"} c #6B0000", -"| c #120000", -"1 c #590000", -"2 c #A30000", -"3 c #680000", -"4 c #0F0000", -"5 c #350000", -"6 c #100000", -" . . ", -" .+@ @+. ", -".#$%& &%$#.", -" *=-;>;-=* ", -" ,')!)', ", -" ~{]{~ ", -" ^/(_(/^ ", -" :<[}|}[<: ", -".1234 4321.", -" .56 65. ", -" . . "}; +". c #020202", +"+ c #363636", +"@ c #5E5E5E", +"# c #BCBCBC", +"$ c #C2C2C2", +"% c #E3E3E3", +"& c #F1F1F1", +"* c #989898", +" ......... ", +" .&&&&&&&%#. ", +" .&&&&&&&$&#. ", +" .&&&&&&&#@@+. ", +" .&&&&&&&%*++. ", +" .&&&&&&&&&%$. ", +" .&&&&&&%&&&$. ", +" .&&&&%&&&&%$. ", +" .&&&&%&%%&&#. ", +" .&&%%%%&%%%$. ", +" .&&&&&%%&%%$. ", +" .&%%%%%&%%%#. ", +" .&&%%&%%%%%#. ", +" .&%%%%%%%%%#. ", +" .$$$###$###*. ", +" ........... "}; /* XPM */ static char * search_xpm[] = { @@ -1384,114 +677,105 @@ "3 c #660000", "4 c #440000", "5 c #330000", -" ..... ", -" . . ", -" . + . ", -". +++ . ", -". + . ", -". . ", -". . ", -" . . ", -" . . ", -" ...545 ", -" 424 ", -" 313 ", -" 2|2 ", -" 2}2 ", -" 2}2 ", -" 11 "}; +" ..... ", +" . . ", +" . + . ", +". +++ . ", +". + . ", +". . ", +". . ", +" . . ", +" . . ", +" ...545 ", +" 424 ", +" 313 ", +" 2|2 ", +" 2}2 ", +" 2}2 ", +" 11 "}; /* XPM */ static char * full_screen_on_xpm[] = { -"13 15 2 1", +"15 15 2 1", " c None", ". c #000000", -" ", -".............", -". . .", -". ... .", -". ..... .", -". ....... .", -". . .", -". . .", -". . .", -". ....... .", -". ..... .", -". ... .", -". . .", -".............", -" "}; +" ", +" ............. ", +" . . . ", +" . ... . ", +" . ..... . ", +" . ....... . ", +" . . . ", +" . . . ", +" . . . ", +" . ....... . ", +" . ..... . ", +" . ... . ", +" . . . ", +" ............. ", +" "}; /* XPM */ static char * full_screen_off_xpm[] = { -"13 15 2 1", +"15 15 2 1", " c None", ". c #000000", -" ", -".............", -". . . . . . .", -".. . . . . ..", -".............", -". .", -". .", -". .", -". .", -". .", -". .", -".............", -". . . . . . .", -".............", -" "}; - +" ", +" ............. ", +" . . . . . . . ", +" .. . . . . .. ", +" ............. ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" ............. ", +" . . . . . . . ", +" ............. ", +" "}; /* XPM */ static char * mini_bug_xpm[] = { -"15 16 6 1", -" c None", +"16 16 5 1", +" c None s None", ". c black", "X c #c0c0c0", "o c #808080", -"b c #303030", "# c white" -" ", -" . . ", -" ... ", -" X.....X ", -" o.#...o ", -" o.#...o.o ", -" ..#oXo... ", -" .....X..... ", -" ....X.... ", -" .o...X...o. ", -" ...X... ", -" .X..X..X. ", -" .o. ", -" .bbb.", -" .o. ", -" . "}; +" ", +" ", +" . . ", +" ... ", +" X.....X ", +" o.#...o ", +" o.#...o.o ", +" ..#oXo... ", +" .....X..... ", +" ....X.... ", +" .o...X...o. ", +" ...X... ", +" .X..X..X. ", +" .o. ", +" ", +" "}; /* XPM */ static char * mini_ok_xpm[] = { -"15 15 5 1", +"11 11 2 1", "@ c #000000", -"a c #808080", -"b c #303030", -"c c #606060", -" s none m none c none", -" ", -" ", -" @ ", -" @@ ", -" @@@ ", -" @@@ ", -" @@ @@@ ", -" @@@ @@@ ", -" @@@ @@@ ", -" @@@@@@ ", -" @@@@@ ", -" @@@@ ", -" @@ @bbb@", -" @a@ ", -" @ " +"_ s none m none c none", +"__________@", +"_________@@", +"________@@@", +"_______@@@_", +"_@@___@@@__", +"@@@__@@@___", +"@@@_@@@____", +"@@@@@@_____", +"@@@@@______", +"@@@@_______", +"_@@________" }; #endif /* __PIXMAPS_H__ */ --- ./Makefile.in.00 2006-04-26 18:07:25.000000000 +0200 +++ ./Makefile.in 2007-01-20 21:56:05.000000000 +0100 @@ -72,7 +72,7 @@ history.$(OBJEXT) nav.$(OBJEXT) plain.$(OBJEXT) menu.$(OBJEXT) \ prefs.$(OBJEXT) colors.$(OBJEXT) bitvec.$(OBJEXT) \ klist.$(OBJEXT) strbuf.$(OBJEXT) url.$(OBJEXT) \ - cookies.$(OBJEXT) dpiapi.$(OBJEXT) + cookies.$(OBJEXT) dnd_filesel.$(OBJEXT) dpiapi.$(OBJEXT) dillo_OBJECTS = $(am_dillo_OBJECTS) dillo_DEPENDENCIES = ../dpip/libDpip.a IO/libDio.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) @@ -323,6 +323,8 @@ list.h \ binaryconst.h \ pixmaps.h \ + dnd_filesel.h \ + dnd_filesel.c \ dpiapi.c \ dpiapi.h