aboutsummaryrefslogtreecommitdiff
path: root/src/slide_sorter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/slide_sorter.c')
-rw-r--r--src/slide_sorter.c44
1 files changed, 15 insertions, 29 deletions
diff --git a/src/slide_sorter.c b/src/slide_sorter.c
index 8130ffa..54b6804 100644
--- a/src/slide_sorter.c
+++ b/src/slide_sorter.c
@@ -99,7 +99,7 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct slide_sorter *n)
int x = i % n->width;
int y = i / n->width;
- struct slide *s = n->p->slides[i];
+ //struct slide *s = n->p->slides[i];
cairo_save(cr);
@@ -120,17 +120,9 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct slide_sorter *n)
cairo_rectangle(cr, 0.0, 0.0, n->tw, n->th);
cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
cairo_fill_preserve(cr);
- if ( (s != NULL) && (s->rendered_thumb != NULL) ) {
- cairo_set_source_surface(cr, s->rendered_thumb,
- 0.0, 0.0);
- } else {
- printf("Slide %i: %p", i, s);
- if ( s != NULL ) {
- printf(" %p\n", s->rendered_thumb);
- } else {
- printf("\n");
- }
- }
+ /* FIXME */
+ //cairo_set_source_surface(cr, s->rendered_thumb,
+ // 0.0, 0.0);
cairo_fill(cr);
cairo_rectangle(cr, 0.5, 0.5, n->tw, n->th);
@@ -348,10 +340,10 @@ static void dnd_receive(GtkWidget *widget, GdkDragContext *drag_context,
} else {
- const char *sc;
+ //const char *sc;
struct slide *s = NULL;
- sc = (const char *)gtk_selection_data_get_data(seldata);
+ //sc = (const char *)gtk_selection_data_get_data(seldata);
n->dragging = 0;
gtk_drag_finish(drag_context, TRUE, TRUE, time);
@@ -363,23 +355,17 @@ static void dnd_receive(GtkWidget *widget, GdkDragContext *drag_context,
if ( s != NULL ) {
/* FIXME: Do something */
- int sn = slide_number(n->p, s);
+ //int sn = slide_number(n->p, s);
- s->rendered_thumb = render_slide(s, n->tw,
- n->p->slide_width,
- n->p->slide_height,
- n->p->is,
- ISZ_THUMBNAIL, sn);
+ //s->rendered_thumb = render_slide(s, n->tw,
+ // n->p->slide_width,
+ // n->p->slide_height,
+ // n->p->is,
+ // ISZ_THUMBNAIL, sn);
/* FIXME: Transfer the notes as well */
- if ( n->dragging_cur_edit_slide ) {
- change_edit_slide(n->p, s);
- } else {
- /* Slide order has changed, so slide change
- * buttons might need to be greyed out */
- update_toolbar(n->p);
- }
+ change_edit_slide(n->p->slidewindow, s);
if ( n->dragging_cur_proj_slide ) {
fixup_proj(n->p, s);
@@ -413,6 +399,7 @@ static void dnd_get(GtkWidget *widget, GdkDragContext *drag_context,
char *sc;
/* FIXME: packed sc */
//sc = packed_sc(n->p->slides[n->selection]->top, n->p->ss);
+ sc = NULL;
gtk_selection_data_set(seldata, target, 8, (guchar *)sc,
strlen(sc));
@@ -468,8 +455,7 @@ static void dnd_delete(GtkWidget *widget, GdkDragContext *drag_context,
ct = sn - 1;
}
- change_edit_slide(n->p, n->p->slides[ct]);
- update_toolbar(n->p);
+ change_edit_slide(n->p->slidewindow, n->p->slides[ct]);
}