~ubuntu-branches/ubuntu/karmic/mhwaveedit/karmic

« back to all changes in this revision

Viewing changes to src/chunkview.c

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2008-01-08 22:20:37 UTC
  • mfrom: (2.1.6 hardy)
  • Revision ID: james.westby@ubuntu.com-20080108222037-tsazhckl5vmc8yih
Tags: 1.4.14-2
Added desktop file (Closes: #457849), thanks to Marco Rodrigues

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
enum { VIEW_CHANGED_SIGNAL, SELECTION_CHANGED_SIGNAL, CURSOR_CHANGED_SIGNAL, 
36
36
       CHUNK_CHANGED_SIGNAL, DOUBLE_CLICK_SIGNAL, LAST_SIGNAL };
37
 
static gint chunk_view_signals[LAST_SIGNAL] = { 0 };
 
37
static guint chunk_view_signals[LAST_SIGNAL] = { 0 };
38
38
 
39
39
static void chunk_view_update_image(ChunkView *view, guint xs, guint xe);
40
40
static void chunk_view_redraw_samples(ChunkView *cv, off_t start, off_t end);
496
496
     ui2 = dragstart+(off_t)((gfloat)(d->viewend-dragstart))*zf;
497
497
     if (ui1 < 0) ui1 = 0;
498
498
     if (ui2 < dragstart || ui2 > d->chunk->length) ui2 = d->chunk->length;
499
 
     if (ui2 == ui1) ui2++;
 
499
     if (ui2 == ui1) {
 
500
          if (ui2 < d->chunk->length)
 
501
               ui2++;
 
502
          else if (ui1 > 0)
 
503
               ui1--;
 
504
     }
500
505
     document_set_view(d,ui1,ui2);
501
506
     return FALSE;
502
507
}
668
673
static gint chunk_view_button_release(GtkWidget *widget, GdkEventButton *event)
669
674
{
670
675
     ChunkView *cv = CHUNKVIEW(widget);
671
 
     if (event->button == 2) {
 
676
     if (event->button == 2 && cv->doc != NULL) {
672
677
          document_play_selection(cv->doc,FALSE,1.0);
673
678
     }
674
679
     autoscroll = FALSE;
722
727
#else
723
728
          PangoLayout *pl;
724
729
          pl = gtk_widget_create_pango_layout( GTK_WIDGET(obj), "0123456789" );
725
 
          pango_layout_get_pixel_size(pl, NULL, &font_height);
 
730
          pango_layout_get_pixel_size(pl, NULL, (gint *)&font_height);
726
731
          g_object_unref(pl);
727
732
#endif
728
733
     }