Commit 30ffe1bc authored by Chris Lahey's avatar Chris Lahey

Fixed Drag & Drop.

parent 8539f7e0
1998-10-19 Christopher James Lahey <clahey@umich.edu>
* app/docindex.c: New Drag & Drop works now.
1998-10-19 Christopher James Lahey <clahey@umich.edu>
* app/docindex.c: Updated document index to use new Drag & Drop interface.
* app/docindex.c, app/docindexif.c, app/docindexif.h: Moved internationalization #include to make docindex work with go again.
Sun Oct 18 16:26:51 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/paleete.c: ooops, commited a work in progress
......
......@@ -27,7 +27,7 @@ static gint x = 0, y = 0, width = 0, height = 0;
enum {
TARGET_URI_LIST,
TARGET_URI_LIST
};
static void create_idea_list( void );
......@@ -36,6 +36,8 @@ static void load_idea_manager( idea_manager * );
static void
docindex_dnd_filenames_dropped( GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection_data,
guint info,
guint time)
......@@ -47,7 +49,7 @@ docindex_dnd_filenames_dropped( GtkWidget *widget,
switch ( info )
{
case TARGET_URI_LIST:
data = selection_data->data;
data = (gchar *) selection_data->data;
len = selection_data->length;
while( len > 0 )
{
......@@ -55,7 +57,14 @@ docindex_dnd_filenames_dropped( GtkWidget *widget,
if ( end != NULL )
*end = 0;
if ( *data != '#' )
open_file_in_position( data, -1 );
{
gchar *filename = strchr( data, ':' );
if ( filename != NULL )
filename ++;
else
filename = data;
open_file_in_position( filename, -1 );
}
if ( end )
{
len -= end - data + 2;
......@@ -92,6 +101,8 @@ docindex_configure_drop_on_widget(GtkWidget * widget)
static void
docindex_cell_dnd_filenames_dropped( GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection_data,
guint info,
guint time)
......@@ -104,7 +115,7 @@ docindex_cell_dnd_filenames_dropped( GtkWidget *widget,
switch ( info )
{
case TARGET_URI_LIST:
data = selection_data->data;
data = (gchar *) selection_data->data;
len = selection_data->length;
while( len > 0 )
{
......@@ -112,7 +123,14 @@ docindex_cell_dnd_filenames_dropped( GtkWidget *widget,
if ( end != NULL )
*end = 0;
if ( *data != '#' )
open_file_in_position( data, position );
{
gchar *filename = strchr( data, ':' );
if ( filename != NULL )
filename ++;
else
filename = data;
open_file_in_position( filename, position );
}
if ( end )
{
len -= end - data + 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment