freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 0dac541 3/5: [ftinspect] Minor.


From: Werner LEMBERG
Subject: [freetype2-demos] master 0dac541 3/5: [ftinspect] Minor.
Date: Wed, 04 May 2016 19:33:05 +0000

branch: master
commit 0dac541b74ce3d1b3d31804f1083f4573e1e0104
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [ftinspect] Minor.
    
    * src/ftinspect.h, src/ftinspect.cpp:
    s/checkCurrentFontFileIndex/checkCurrentFontIndex/,
    s/currentFontFileIndex/currentFontIndex/.
---
 ChangeLog         |    8 ++++++++
 src/ftinspect.cpp |   36 ++++++++++++++++++------------------
 src/ftinspect.h   |    4 ++--
 3 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0414cbe..679beb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,14 @@
 
        [ftinspect] Minor.
 
+       * src/ftinspect.h, src/ftinspect.cpp:
+       s/checkCurrentFontFileIndex/checkCurrentFontIndex/,
+       s/currentFontFileIndex/currentFontIndex/.
+
+2016-05-04  Werner Lemberg  <address@hidden>
+
+       [ftinspect] Minor.
+
        * src/ftinspect.h (Engine): Add destructor.
        (MainGUI): Use point to `engine'.
 
diff --git a/src/ftinspect.cpp b/src/ftinspect.cpp
index 16a89ac..a977b80 100644
--- a/src/ftinspect.cpp
+++ b/src/ftinspect.cpp
@@ -180,9 +180,9 @@ MainGUI::loadFonts()
   // if we have new fonts, set the current index to the first new one
   if (!fontFileNames.isEmpty()
       && oldSize < fontFileNames.size())
-    currentFontFileIndex = oldSize;
+    currentFontIndex = oldSize;
 
-  checkCurrentFontFileIndex();
+  checkCurrentFontIndex();
 
   // XXX trigger redisplay
 }
@@ -191,12 +191,12 @@ MainGUI::loadFonts()
 void
 MainGUI::closeFont()
 {
-  if (currentFontFileIndex >= 0)
-    fontFileNames.removeAt(currentFontFileIndex);
-  if (currentFontFileIndex >= fontFileNames.size())
-    currentFontFileIndex--;
+  if (currentFontIndex >= 0)
+    fontFileNames.removeAt(currentFontIndex);
+  if (currentFontIndex >= fontFileNames.size())
+    currentFontIndex--;
 
-  checkCurrentFontFileIndex();
+  checkCurrentFontIndex();
 
   // XXX trigger redisplay
 }
@@ -283,19 +283,19 @@ MainGUI::checkUnits()
 
 
 void
-MainGUI::checkCurrentFontFileIndex()
+MainGUI::checkCurrentFontIndex()
 {
   if (fontFileNames.size() < 2)
   {
     previousFontButton->setEnabled(false);
     nextFontButton->setEnabled(false);
   }
-  else if (currentFontFileIndex == 0)
+  else if (currentFontIndex == 0)
   {
     previousFontButton->setEnabled(false);
     nextFontButton->setEnabled(true);
   }
-  else if (currentFontFileIndex == fontFileNames.size() - 1)
+  else if (currentFontIndex == fontFileNames.size() - 1)
   {
     previousFontButton->setEnabled(true);
     nextFontButton->setEnabled(false);
@@ -337,10 +337,10 @@ MainGUI::checkCurrentFaceIndex()
 void
 MainGUI::previousFont()
 {
-  if (currentFontFileIndex > 0)
+  if (currentFontIndex > 0)
   {
-    currentFontFileIndex--;
-    checkCurrentFontFileIndex();
+    currentFontIndex--;
+    checkCurrentFontIndex();
   }
 }
 
@@ -348,10 +348,10 @@ MainGUI::previousFont()
 void
 MainGUI::nextFont()
 {
-  if (currentFontFileIndex < fontFileNames.size() - 1)
+  if (currentFontIndex < fontFileNames.size() - 1)
   {
-    currentFontFileIndex++;
-    checkCurrentFontFileIndex();
+    currentFontIndex++;
+    checkCurrentFontIndex();
   }
 }
 
@@ -729,7 +729,7 @@ MainGUI::clearStatusBar()
 void
 MainGUI::setDefaults()
 {
-  currentFontFileIndex = -1;
+  currentFontIndex = -1;
 
   // XXX only dummy values right now
 
@@ -751,7 +751,7 @@ MainGUI::setDefaults()
   checkAntiAliasing();
   checkShowPoints();
   checkUnits();
-  checkCurrentFontFileIndex();
+  checkCurrentFontIndex();
   checkCurrentFaceIndex();
 }
 
diff --git a/src/ftinspect.h b/src/ftinspect.h
index 7f7ef70..a024e63 100644
--- a/src/ftinspect.h
+++ b/src/ftinspect.h
@@ -130,7 +130,7 @@ private slots:
   void about();
   void checkAntiAliasing();
   void checkCurrentFaceIndex();
-  void checkCurrentFontFileIndex();
+  void checkCurrentFontIndex();
   void checkHintingMode();
   void checkShowPoints();
   void checkUnits();
@@ -145,7 +145,7 @@ private:
   const Engine* engine;
 
   QStringList fontFileNames;
-  int currentFontFileIndex;
+  int currentFontIndex;
 
   int numFaces;
   int currentFaceIndex;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]