Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 395747 | Differences between
and this patch

Collapse All | Expand All

(-)fldigi-3.21.33-OLD/src/wefax/wefax-pic.cxx (-2 / +2 lines)
Lines 313-319 Link Here
313
			y_pos += 20 ;
313
			y_pos += 20 ;
314
		}
314
		}
315
		/// NOTE: Might be better to redraw here and not in resize_height.
315
		/// NOTE: Might be better to redraw here and not in resize_height.
316
		wefax_pic_rx_scroll->position( wefax_pic_rx_scroll->xposition(), y_pos );
316
		wefax_pic_rx_scroll->scroll_to( wefax_pic_rx_scroll->xposition(), y_pos );
317
		FL_UNLOCK_D();
317
		FL_UNLOCK_D();
318
	}
318
	}
319
	wefax_pic_rx_picture->pixel(data, pix_pos);
319
	wefax_pic_rx_picture->pixel(data, pix_pos);
Lines 804-810 Link Here
804
	wefax_round_rx_auto_center->hide();
804
	wefax_round_rx_auto_center->hide();
805
805
806
	/// Back to the first line before reading next image.
806
	/// Back to the first line before reading next image.
807
	wefax_pic_rx_scroll->position( 0, 0 );
807
	wefax_pic_rx_scroll->scroll_to( 0, 0 );
808
	FL_UNLOCK_D();
808
	FL_UNLOCK_D();
809
}
809
}
810
810
(-)fldigi-3.21.33-OLD/src/widgets/Fl_Text_Buffer_mod_1_3.cxx (-20 / +35 lines)
Lines 482-487 Link Here
482
    *charsDeleted = nDeleted;
482
    *charsDeleted = nDeleted;
483
}
483
}
484
484
485
486
#if 0
485
void Fl_Text_Buffer_mod::overlay_rectangular(int startPos, int rectStart,
487
void Fl_Text_Buffer_mod::overlay_rectangular(int startPos, int rectStart,
486
					 int rectEnd, const char *text,
488
					 int rectEnd, const char *text,
487
					 int *charsInserted,
489
					 int *charsInserted,
Lines 507-513 Link Here
507
  if (charsDeleted != NULL)
509
  if (charsDeleted != NULL)
508
    *charsDeleted = nDeleted;
510
    *charsDeleted = nDeleted;
509
}
511
}
512
#endif
510
513
514
#if 0
511
void Fl_Text_Buffer_mod::replace_rectangular(int start, int end, int rectStart,
515
void Fl_Text_Buffer_mod::replace_rectangular(int start, int end, int rectStart,
512
					 int rectEnd, const char *text)
516
					 int rectEnd, const char *text)
513
{
517
{
Lines 564-570 Link Here
564
  if (nInsertedLines < nDeletedLines)
568
  if (nInsertedLines < nDeletedLines)
565
    free((void *) insText);
569
    free((void *) insText);
566
}
570
}
571
#endif
567
572
573
#if 0
568
void Fl_Text_Buffer_mod::remove_rectangular(int start, int end, int rectStart,
574
void Fl_Text_Buffer_mod::remove_rectangular(int start, int end, int rectStart,
569
					int rectEnd)
575
					int rectEnd)
570
{
576
{
Lines 579-585 Link Here
579
  call_modify_callbacks(start, end - start, nInserted, 0, deletedText);
585
  call_modify_callbacks(start, end - start, nInserted, 0, deletedText);
580
  free((void *) deletedText);
586
  free((void *) deletedText);
581
}
587
}
588
#endif
582
589
590
#if 0
583
void Fl_Text_Buffer_mod::clear_rectangular(int start, int end, int rectStart,
591
void Fl_Text_Buffer_mod::clear_rectangular(int start, int end, int rectStart,
584
				       int rectEnd)
592
				       int rectEnd)
585
{
593
{
Lines 593-598 Link Here
593
		      NULL, NULL);
601
		      NULL, NULL);
594
  free((void *) newlineString);
602
  free((void *) newlineString);
595
}
603
}
604
#endif
596
605
597
char *Fl_Text_Buffer_mod::text_in_rectangle(int start, int end,
606
char *Fl_Text_Buffer_mod::text_in_rectangle(int start, int end,
598
					int rectStart,
607
					int rectStart,
Lines 659-664 Link Here
659
  redisplay_selection(&oldSelection, &mPrimary);
668
  redisplay_selection(&oldSelection, &mPrimary);
660
}
669
}
661
670
671
#if 0
662
void Fl_Text_Buffer_mod::select_rectangular(int start, int end, int rectStart,
672
void Fl_Text_Buffer_mod::select_rectangular(int start, int end, int rectStart,
663
					int rectEnd)
673
					int rectEnd)
664
{
674
{
Lines 667-684 Link Here
667
  mPrimary.set_rectangular(start, end, rectStart, rectEnd);
677
  mPrimary.set_rectangular(start, end, rectStart, rectEnd);
668
  redisplay_selection(&oldSelection, &mPrimary);
678
  redisplay_selection(&oldSelection, &mPrimary);
669
}
679
}
680
#endif
670
681
671
int Fl_Text_Buffer_mod::selection_position(int *start, int *end)
682
int Fl_Text_Buffer_mod::selection_position(int *start, int *end)
672
{
683
{
673
  return mPrimary.position(start, end);
684
  return mPrimary.position(start, end);
674
}
685
}
675
686
687
#if 0
676
int Fl_Text_Buffer_mod::selection_position(int *start, int *end,
688
int Fl_Text_Buffer_mod::selection_position(int *start, int *end,
677
				       int *isRect, int *rectStart,
689
				       int *isRect, int *rectStart,
678
				       int *rectEnd)
690
				       int *rectEnd)
679
{
691
{
680
  return mPrimary.position(start, end, isRect, rectStart, rectEnd);
692
  return mPrimary.position(start, end, isRect, rectStart, rectEnd);
681
}
693
}
694
#endif
682
695
683
char *Fl_Text_Buffer_mod::selection_text()
696
char *Fl_Text_Buffer_mod::selection_text()
684
{
697
{
Lines 711-716 Link Here
711
  redisplay_selection(&oldSelection, &mSecondary);
724
  redisplay_selection(&oldSelection, &mSecondary);
712
}
725
}
713
726
727
#if 0
714
void Fl_Text_Buffer_mod::secondary_select_rectangular(int start, int end,
728
void Fl_Text_Buffer_mod::secondary_select_rectangular(int start, int end,
715
						  int rectStart,
729
						  int rectStart,
716
						  int rectEnd)
730
						  int rectEnd)
Lines 720-731 Link Here
720
  mSecondary.set_rectangular(start, end, rectStart, rectEnd);
734
  mSecondary.set_rectangular(start, end, rectStart, rectEnd);
721
  redisplay_selection(&oldSelection, &mSecondary);
735
  redisplay_selection(&oldSelection, &mSecondary);
722
}
736
}
737
#endif
723
738
724
int Fl_Text_Buffer_mod::secondary_selection_position(int *start, int *end)
739
int Fl_Text_Buffer_mod::secondary_selection_position(int *start, int *end)
725
{
740
{
726
  return mSecondary.position(start, end);
741
  return mSecondary.position(start, end);
727
}
742
}
728
743
744
#if 0
729
int Fl_Text_Buffer_mod::secondary_selection_position(int *start, int *end,
745
int Fl_Text_Buffer_mod::secondary_selection_position(int *start, int *end,
730
						 int *isRect,
746
						 int *isRect,
731
						 int *rectStart,
747
						 int *rectStart,
Lines 733-738 Link Here
733
{
749
{
734
  return mSecondary.position(start, end, isRect, rectStart, rectEnd);
750
  return mSecondary.position(start, end, isRect, rectStart, rectEnd);
735
}
751
}
752
#endif
736
753
737
char *Fl_Text_Buffer_mod::secondary_selection_text()
754
char *Fl_Text_Buffer_mod::secondary_selection_text()
738
{
755
{
Lines 765-770 Link Here
765
  redisplay_selection(&oldSelection, &mHighlight);
782
  redisplay_selection(&oldSelection, &mHighlight);
766
}
783
}
767
784
785
#if 0
768
void Fl_Text_Buffer_mod::highlight_rectangular(int start, int end,
786
void Fl_Text_Buffer_mod::highlight_rectangular(int start, int end,
769
					   int rectStart, int rectEnd)
787
					   int rectStart, int rectEnd)
770
{
788
{
Lines 773-790 Link Here
773
  mHighlight.set_rectangular(start, end, rectStart, rectEnd);
791
  mHighlight.set_rectangular(start, end, rectStart, rectEnd);
774
  redisplay_selection(&oldSelection, &mHighlight);
792
  redisplay_selection(&oldSelection, &mHighlight);
775
}
793
}
794
#endif
776
795
777
int Fl_Text_Buffer_mod::highlight_position(int *start, int *end)
796
int Fl_Text_Buffer_mod::highlight_position(int *start, int *end)
778
{
797
{
779
  return mHighlight.position(start, end);
798
  return mHighlight.position(start, end);
780
}
799
}
781
800
801
#if 0
782
int Fl_Text_Buffer_mod::highlight_position(int *start, int *end,
802
int Fl_Text_Buffer_mod::highlight_position(int *start, int *end,
783
				       int *isRect, int *rectStart,
803
				       int *isRect, int *rectStart,
784
				       int *rectEnd)
804
				       int *rectEnd)
785
{
805
{
786
  return mHighlight.position(start, end, isRect, rectStart, rectEnd);
806
  return mHighlight.position(start, end, isRect, rectStart, rectEnd);
787
}
807
}
808
#endif
788
809
789
char *Fl_Text_Buffer_mod::highlight_text()
810
char *Fl_Text_Buffer_mod::highlight_text()
790
{
811
{
Lines 1403-1408 Link Here
1403
  free((void *) outStr);
1424
  free((void *) outStr);
1404
}
1425
}
1405
1426
1427
#if 0
1406
void Fl_Text_Buffer_mod::remove_rectangular_(int start, int end, int rectStart,
1428
void Fl_Text_Buffer_mod::remove_rectangular_(int start, int end, int rectStart,
1407
					 int rectEnd, int *replaceLen,
1429
					 int rectEnd, int *replaceLen,
1408
					 int *endPos)
1430
					 int *endPos)
Lines 1449-1455 Link Here
1449
  *endPos = start + (outPtr - outStr) - len + endOffset;
1471
  *endPos = start + (outPtr - outStr) - len + endOffset;
1450
  free((void *) outStr);
1472
  free((void *) outStr);
1451
}
1473
}
1474
#endif
1452
1475
1476
#if 0
1453
void Fl_Text_Buffer_mod::overlay_rectangular_(int startPos, int rectStart,
1477
void Fl_Text_Buffer_mod::overlay_rectangular_(int startPos, int rectStart,
1454
					  int rectEnd, const char *insText,
1478
					  int rectEnd, const char *insText,
1455
					  int *nDeleted, int *nInserted,
1479
					  int *nDeleted, int *nInserted,
Lines 1511-1516 Link Here
1511
  *endPos = start + (outPtr - outStr) - len + endOffset;
1535
  *endPos = start + (outPtr - outStr) - len + endOffset;
1512
  free((void *) outStr);
1536
  free((void *) outStr);
1513
}
1537
}
1538
#endif
1514
1539
1515
/*
1540
/*
1516
 Inserts characters from single-line string \p insLine in single-line string
1541
 Inserts characters from single-line string \p insLine in single-line string
Lines 1765-1776 Link Here
1765
  *outLen = (outPtr - outStr) + strlen(linePtr);
1790
  *outLen = (outPtr - outStr) + strlen(linePtr);
1766
}
1791
}
1767
1792
1768
1769
char *Fl_Text_Buffer_mod::selection_text_(Fl_Text_Selection * sel) const {
1793
char *Fl_Text_Buffer_mod::selection_text_(Fl_Text_Selection * sel) const {
1770
  int start, end, isRect, rectStart, rectEnd;
1794
  int start, end;
1771
  
1795
  
1772
  /* If there's no selection, return an allocated empty string */
1796
  /* If there's no selection, return an allocated empty string */
1773
  if (!sel->position(&start, &end, &isRect, &rectStart, &rectEnd))
1797
  if (!sel->position(&start, &end))
1774
  {
1798
  {
1775
    char *s = (char *) malloc(1);
1799
    char *s = (char *) malloc(1);
1776
    *s = '\0';
1800
    *s = '\0';
Lines 1778-1801 Link Here
1778
  }
1802
  }
1779
  
1803
  
1780
  /* If the selection is not rectangular, return the selected range */
1804
  /* If the selection is not rectangular, return the selected range */
1781
  if (isRect)
1805
  return text_range(start, end);
1782
    return text_in_rectangle(start, end, rectStart, rectEnd);
1783
  else
1784
    return text_range(start, end);
1785
}
1806
}
1786
1807
1787
void Fl_Text_Buffer_mod::remove_selection_(Fl_Text_Selection * sel)
1808
void Fl_Text_Buffer_mod::remove_selection_(Fl_Text_Selection * sel)
1788
{
1809
{
1789
  int start, end, isRect, rectStart, rectEnd;
1810
  int start, end;
1790
  
1811
  
1791
  if (!sel->position(&start, &end, &isRect, &rectStart, &rectEnd))
1812
  if (!sel->position(&start, &end))
1792
    return;
1813
    return;
1793
  if (isRect)
1814
  
1794
    remove_rectangular(start, end, rectStart, rectEnd);
1815
  remove(start, end);
1795
  else {
1816
  //undoyankcut = undocut;
1796
    remove(start, end);
1797
    //undoyankcut = undocut;
1798
  }
1799
}
1817
}
1800
1818
1801
1819
Lines 1805-1818 Link Here
1805
  Fl_Text_Selection oldSelection = *sel;
1823
  Fl_Text_Selection oldSelection = *sel;
1806
  
1824
  
1807
  /* If there's no selection, return */
1825
  /* If there's no selection, return */
1808
  int start, end, isRect, rectStart, rectEnd;
1826
  int start, end;
1809
  if (!sel->position(&start, &end, &isRect, &rectStart, &rectEnd))
1827
  if (!sel->position(&start, &end))
1810
    return;
1828
    return;
1811
  
1829
  
1812
  /* Do the appropriate type of replace */
1830
  /* Do the appropriate type of replace */
1813
  if (isRect)
1814
    replace_rectangular(start, end, rectStart, rectEnd, text);
1815
  else
1816
    replace(start, end, text);
1831
    replace(start, end, text);
1817
  
1832
  
1818
  /* Unselect (happens automatically in BufReplace, but BufReplaceRect
1833
  /* Unselect (happens automatically in BufReplace, but BufReplaceRect
(-)fldigi-3.21.33-OLD/src/widgets/Fl_Text_Display_mod_1_3.cxx (+4 lines)
Lines 786-791 Link Here
786
/**
786
/**
787
   Return 1 if position (X, Y) is inside of the primary Fl_Text_Selection
787
   Return 1 if position (X, Y) is inside of the primary Fl_Text_Selection
788
*/
788
*/
789
#if 0
789
int Fl_Text_Display_mod::in_selection( int X, int Y ) const {
790
int Fl_Text_Display_mod::in_selection( int X, int Y ) const {
790
  int row, column, pos = xy_to_position( X, Y, CHARACTER_POS );
791
  int row, column, pos = xy_to_position( X, Y, CHARACTER_POS );
791
  Fl_Text_Buffer_mod *buf = mBuffer;
792
  Fl_Text_Buffer_mod *buf = mBuffer;
Lines 805-810 Link Here
805
    column = wrapped_column(row, column);
806
    column = wrapped_column(row, column);
806
  return buf->primary_selection()->includes(pos, buf->line_start( pos ), column);
807
  return buf->primary_selection()->includes(pos, buf->line_start( pos ), column);
807
}
808
}
809
#endif
808
810
809
/**
811
/**
810
   Correct a column number based on an unconstrained position (as returned by
812
   Correct a column number based on an unconstrained position (as returned by
Lines 1847-1858 Link Here
1847
        style = (unsigned char) styleBuf->character( pos);
1849
        style = (unsigned char) styleBuf->character( pos);
1848
    }
1850
    }
1849
  }
1851
  }
1852
#if 0
1850
  if (buf->primary_selection()->includes(pos, lineStartPos, dispIndex))
1853
  if (buf->primary_selection()->includes(pos, lineStartPos, dispIndex))
1851
    style |= PRIMARY_MASK;
1854
    style |= PRIMARY_MASK;
1852
  if (buf->highlight_selection()->includes(pos, lineStartPos, dispIndex))
1855
  if (buf->highlight_selection()->includes(pos, lineStartPos, dispIndex))
1853
    style |= HIGHLIGHT_MASK;
1856
    style |= HIGHLIGHT_MASK;
1854
  if (buf->secondary_selection()->includes(pos, lineStartPos, dispIndex))
1857
  if (buf->secondary_selection()->includes(pos, lineStartPos, dispIndex))
1855
    style |= SECONDARY_MASK;
1858
    style |= SECONDARY_MASK;
1859
#endif
1856
  return style;
1860
  return style;
1857
}
1861
}
1858
1862
(-)fldigi-3.21.33-OLD/src/widgets/Panel.cxx (-7 / +7 lines)
Lines 9-15 Link Here
9
// Fldigi is free software: you can redistribute it and/or modify
9
// Fldigi is free software: you can redistribute it and/or modify
10
// it under the terms of the GNU General Public License as published by
10
// it under the terms of the GNU General Public License as published by
11
// the Free Software Foundation, either version 3 of the License, or
11
// the Free Software Foundation, either version 3 of the License, or
12
// (at your option) aRY later version.
12
// (at your option) any later version.
13
//
13
//
14
// Fldigi is distributed in the hope that it will be useful,
14
// Fldigi is distributed in the hope that it will be useful,
15
// but WITHOUT ARY WARRANTY; without even the implied warranty of
15
// but WITHOUT ARY WARRANTY; without even the implied warranty of
Lines 37-43 Link Here
37
int Panel::orgx()
37
int Panel::orgx()
38
{
38
{
39
	int oldx = w();
39
	int oldx = w();
40
	short* p = sizes()+8;
40
	int* p = sizes()+8;
41
	for (int i=children(); i--; p += 4)
41
	for (int i=children(); i--; p += 4)
42
		if (p[1] < oldx) oldx = p[1];
42
		if (p[1] < oldx) oldx = p[1];
43
	return oldx;
43
	return oldx;
Lines 46-52 Link Here
46
int Panel::orgy()
46
int Panel::orgy()
47
{
47
{
48
	int oldy = h();
48
	int oldy = h();
49
	short* p = sizes()+8;
49
	int* p = sizes()+8;
50
	for (int i=children(); i--; p += 4)
50
	for (int i=children(); i--; p += 4)
51
		if (p[3] < oldy) oldy = p[3];
51
		if (p[3] < oldy) oldy = p[3];
52
	return oldy;
52
	return oldy;
Lines 55-61 Link Here
55
void Panel::position(int oix, int oiy, int newx, int newy) {
55
void Panel::position(int oix, int oiy, int newx, int newy) {
56
//printf("oix %3d, oiy %3d, nux %3d, nuy %3d\n", oix, oiy, newx, newy);
56
//printf("oix %3d, oiy %3d, nux %3d, nuy %3d\n", oix, oiy, newx, newy);
57
	Fl_Widget* const* a = array();
57
	Fl_Widget* const* a = array();
58
	short* p = sizes();
58
	int* p = sizes();
59
//printf("p0 %3d, p1 %3d, p2 %3d, p3 %3d\n", p[0], p[1], p[2], p[3]);
59
//printf("p0 %3d, p1 %3d, p2 %3d, p3 %3d\n", p[0], p[1], p[2], p[3]);
60
//printf("p4 %3d, p5 %3d, p6 %3d, p7 %3d\n", p[0], p[1], p[2], p[3]);
60
//printf("p4 %3d, p5 %3d, p6 %3d, p7 %3d\n", p[0], p[1], p[2], p[3]);
61
	p += 8; // skip group & resizable's saved size
61
	p += 8; // skip group & resizable's saved size
Lines 90-96 Link Here
90
// move the lower-right corner (sort of):
90
// move the lower-right corner (sort of):
91
void Panel::resize(int X,int Y,int W,int H) {
91
void Panel::resize(int X,int Y,int W,int H) {
92
	// remember how much to move the child widgets:
92
	// remember how much to move the child widgets:
93
	short* p = sizes();
93
	int* p = sizes();
94
	int OX = x();
94
	int OX = x();
95
	int OY = y();
95
	int OY = y();
96
	int OW = w();
96
	int OW = w();
Lines 191-198 Link Here
191
		int oldx = 0;
191
		int oldx = 0;
192
		int oldy = 0;
192
		int oldy = 0;
193
		Fl_Widget*const* a = array();
193
		Fl_Widget*const* a = array();
194
		short* q = sizes();
194
		int* q = sizes();
195
		short* p = q+8;
195
		int* p = q+8;
196
		for (int i=children(); i--; p += 4) {
196
		for (int i=children(); i--; p += 4) {
197
			Fl_Widget* o = *a++;
197
			Fl_Widget* o = *a++;
198
			if (o == resizable()) continue;
198
			if (o == resizable()) continue;

Return to bug 395747