]> git.vomp.tv Git - vompclient.git/commitdiff
Language changes, fix for main menu hang
authorChris Tallon <chris@vomp.tv>
Tue, 9 May 2006 16:15:23 +0000 (16:15 +0000)
committerChris Tallon <chris@vomp.tv>
Tue, 9 May 2006 16:15:23 +0000 (16:15 +0000)
audiomvp.cc
command.cc
dsock.cc
dsock.h
language-data.h
region.cc
vdr.cc
voptionsmenu.cc
vtimeredit.cc

index 1a42351b0af38eea2b7e862afb3c90943a04cf6e..f1bfe70f60694c877d56d601ef9c6b97b480f740 100644 (file)
@@ -232,7 +232,7 @@ int AudioMVP::test()
   int b = ioctl(fdAudio, AV_SET_AUD_DISABLE_SYNC, &a);
 
 
-  printf("Audio sync disable = %i\n", b); // is in a DEV block
+  /*OK*/ printf("Audio sync disable = %i\n", b);
 
   return 1;
 
index f77610dffa8e78fd284a67ac29e823404f16491c..38560baa0cb870d985ce9af2db9c65ac4cd761e6 100644 (file)
@@ -135,7 +135,6 @@ void Command::run()
   viewman->add(vconnect);
   vconnect->run();
 
-
   UCHAR button = 0;
   while(irun)
   {
@@ -145,7 +144,6 @@ void Command::run()
 #else
     ReleaseMutex(masterLock);
 #endif
-
     button = remote->getButtonPress(2);  // FIXME why is this set to 2 and not 0? so it can quit
     // something happened, lock and process
 
index 4d7d98b94ed1a0f8bcfac10f942895c53dc3f38b..36e6a8edf9eda566e41b95525c884f383b7c0ee1 100644 (file)
--- a/dsock.cc
+++ b/dsock.cc
@@ -27,11 +27,12 @@ DatagramSocket::DatagramSocket(short port)
   theInstance = this;
   myPort = port;
   addrlen = sizeof(struct sockaddr);
+  initted = false;
 }
 
 DatagramSocket::~DatagramSocket()
 {
-  CLOSESOCKET(socketnum);
+  if (initted) shutdown();
 }
 
 DatagramSocket* DatagramSocket::theInstance = 0;
@@ -42,7 +43,8 @@ DatagramSocket* DatagramSocket::getInstance(void)
 
 int DatagramSocket::init()
 {
-  CLOSESOCKET(socketnum);
+  if (initted) return 0;
+
   if ((socketnum = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
   { perror("socket"); return 0; }
 
@@ -62,11 +64,22 @@ int DatagramSocket::init()
   int allowed = 1;
   setsockopt(socketnum, SOL_SOCKET, SO_BROADCAST, (char*)&allowed, sizeof(allowed));
 
+  initted = true;
+
   return 1;
 }
 
+void DatagramSocket::shutdown()
+{
+  if (!initted) return;
+  CLOSESOCKET(socketnum);
+  initted = false;
+}
+
 unsigned char DatagramSocket::waitforMessage(unsigned char how)
 {
+  if (!initted) return 0;
+
   /* how = 0 - block
      how = 1 - start new wait
      how = 2 - continue wait
@@ -137,6 +150,8 @@ short DatagramSocket::getFromPort(void) const   {  return fromPort; }
 
 void DatagramSocket::send(char *ipa, short port, char *message, int length)
 {
+  if (!initted) return;
+
   if (DSOCKDEBUG)
   {
     printf("%s:%i\tOUT %i\t", ipa, port, length);
diff --git a/dsock.h b/dsock.h
index 734bd050b38d7aec62eea4a0f9bdd26eb3de8b6b..25545e17b9bec147858cd0fccd87cc13fc1d4e39 100644 (file)
--- a/dsock.h
+++ b/dsock.h
@@ -51,6 +51,7 @@ class DatagramSocket
     ~DatagramSocket();
     static DatagramSocket* getInstance(void);
     int init();
+    void shutdown();
     unsigned char waitforMessage(unsigned char); // int =0-block =1-new wait =2-continue wait
     int getDataLength(void) const;
     char *getData(void);               // returns a pointer to the data
@@ -59,6 +60,7 @@ class DatagramSocket
     void send(char *, short, char *, int); // send wants: IP Address ddn style, port,
                                            // data, length of data
   private:
+    bool initted;
     ULONG getIPNumber(ULONG num);
     static ULONG iterate_ip;
     const static char DSOCKDEBUG = 0;
index 971482f2f7df14c44a530bb6c4179ede888ebf10..1a0e42cece32b066acd2861cb26e176a8371c211 100644 (file)
@@ -144,10 +144,10 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "4",
   },
   { "4. Timers",
-    "",
+    "4. Timer",
     "",
     "4. Felvétel",
-    "",
+    "4. Ajastukset",
     "",
     "5",
   },
@@ -204,8 +204,8 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "[ok] = Menü",
     "[ok] = meny",
     "[ok] = menü",
-    "[ok] = menu",
     "[ok] = valikko",
+    "[ok] = menu",
     "12",
   },
   { "%lu%% used, %iGB free",
@@ -333,6 +333,78 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "Options",
     "27",
   },
+  { "General",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.1",
+  },
+  { "Advanced",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.3",
+  },
+  { "General Options",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.4",
+  },
+  { "Timer Options",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.5",
+  },
+  { "Default start margin (minutes)",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.51",
+  },
+  { "Default end margin (minutes)",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.52",
+  },
+  { "Default priority",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.53",
+  },
+  { "Default lifetime",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.54",
+  },
+  { "Advanced Options",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "27.6",
+  },
   { "TV connection type",
     "TV-Anschlußart",
     "Typ av TV-anslutning",
@@ -403,7 +475,15 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "VDR-Pri 0=OK !lásd. fórum!",
     "VDR-Pri 0=OK !Lue forumit!",
     "VDR-Pri 0=OK !Voir forums!",
-    "34a",
+    "34.1",
+  },
+  { "TCP receive window size",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "34.2",
   },
   // Option choices
   { "Old",
@@ -439,7 +519,7 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "38",
   },
   { "Chop sides",
-    "Seiten abschneiden",
+    "Zuschneiden",
     "Ta bort på sidorna",
     "Szélek levágva",
     "Leikkaa sivut",
@@ -637,7 +717,7 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "61.5",
   },
   { "Guide / Back: Close",
-    "Back: EPG schließen",
+    "Back:EPG schließen",
     "Guide / Back: Stäng",
     "Guide/Back: Bezárás",
     "Guide / Back: Sulje",
@@ -645,7 +725,7 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "62",
   },
   { "Rec: Set timer",
-    "Rec: Aufnahme programmieren",
+    "Rec: Neuer Timer",
     "Rec: Programmera timer",
     "Rec: Felvétel beállítása",
     "Rec: Aseta ajastus",
@@ -676,14 +756,119 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "Pas de detail du programme",
     "66",
   },
+  { "Set Timer",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "66.1",
+  },
+  { "Create this timer?",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "66.2",
+  },
+  // Timers
+  { "Timers",
+    "Timer",
+    "",
+    "Felvétel",
+    "Ajastukset",
+    "",
+    "66.5",
+  },
   // Edit timer
   { "Edit Timer",
+    "Timer bearbeiten",
     "",
     "",
+    "Muuta ajastusta",
     "",
+    "67",
+  },
+  { "Active",
     "",
     "",
-    "67",
+    "",
+    "",
+    "",
+    "68",
+  },
+  { "Channel",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "69",
+  },
+  { "Name",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "70",
+  },
+  { "Directory",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "71",
+  },
+  { "Start",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "72",
+  },
+  { "Stop",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "73",
+  },
+  { "Priority",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "74",
+  },
+  { "Lifetime",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "75",
+  },
+  { "Current",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "76",
+  },
+  { "Recording",
+    "",
+    "",
+    "",
+    "",
+    "",
+    "77",
   },
  // End marker.
   { NULL }
index f92326fe3d41536e22911faf41e8ab4cf701c0b3..fbcb79390330f0e0b98137ad265221f82160441e 100644 (file)
--- a/region.cc
+++ b/region.cc
@@ -30,8 +30,8 @@ UINT Region::y2()
 /*
 Region Region::subtract(Region& other)
 {
-  printf("This:           %i %i %i %i\n", x, y, w, h);
-  printf("Subtract this:  %i %i %i %i\n", other.x, other.y, other.w, other.h);
+  OK printf("This:           %i %i %i %i\n", x, y, w, h);
+  OK printf("Subtract this:  %i %i %i %i\n", other.x, other.y, other.w, other.h);
 
 
   Region s;
@@ -75,7 +75,7 @@ Region Region::subtract(Region& other)
     s.w = 0;
     s.h = 0;
   }
-  printf("Result:         %i %i %i %i\n", s.x, s.y, s.w, s.h);
+  OK printf("Result:         %i %i %i %i\n", s.x, s.y, s.w, s.h);
 
   return s;
 }
diff --git a/vdr.cc b/vdr.cc
index 50006677845f84ada42f12c57a1418de33e892ba..4ddf1bfb539ce6a3d9b2e311e50c27c1c9e06690 100644 (file)
--- a/vdr.cc
+++ b/vdr.cc
@@ -93,6 +93,7 @@ void VDR::findServers(vector<VDRServer>& servers)
   {
     if (waitType == 1)
     {
+      ds.shutdown();
       ds.init();
       logger->log("VDR", Log::NOTICE, "Broadcasting for server");
       ds.send("255.255.255.255", 3024, message, strlen(message));
index f57ee10e63a82bf4e4ed32882537fdd745ef9aa5..0639347eff7bb8110bd2fcc4ce4a70b937be6e7e 100644 (file)
@@ -45,7 +45,7 @@ VOptionsMenu::VOptionsMenu()
   WButton* wb;
 
   wb = new WButton();
-  wb->setText("General");
+  wb->setText(tr("General"));
   wb->setSurface(surface);
   wb->setSurfaceOffset(160, 60);
   wb->setDimensions(140, fontHeight);
@@ -53,7 +53,7 @@ VOptionsMenu::VOptionsMenu()
   buttons.push_back(wb);
 
   wb = new WButton();
-  wb->setText("Timers");
+  wb->setText(tr("Timers"));
   wb->setSurface(surface);
   wb->setSurfaceOffset(160, 100);
   wb->setDimensions(140, fontHeight);
@@ -61,7 +61,7 @@ VOptionsMenu::VOptionsMenu()
   buttons.push_back(wb);
 
   wb = new WButton();
-  wb->setText("Advanced");
+  wb->setText(tr("Advanced"));
   wb->setSurface(surface);
   wb->setSurfaceOffset(160, 140);
   wb->setDimensions(140, fontHeight);
index 4c75c0d8f44c3fbbb28713aaa8539c4b2ea32ae8..29fe6ebc8062f93c4e6dc02644d92079586d3cb0 100644 (file)
@@ -47,18 +47,18 @@ VTimerEdit::VTimerEdit(RecTimer* trt)
 
   int xpos = 20;
   int ypos = 50;
-  drawText("Active", xpos, ypos, Colour::LIGHTTEXT);         ypos += surface->getFontHeight();
-  drawText("Channel", xpos, ypos, Colour::LIGHTTEXT);        ypos += surface->getFontHeight();
-  drawText("Name", xpos, ypos, Colour::LIGHTTEXT);           ypos += surface->getFontHeight();
-  drawText("Directory", xpos, ypos, Colour::LIGHTTEXT);      ypos += surface->getFontHeight();
+  drawText(tr("Active"), xpos, ypos, Colour::LIGHTTEXT);         ypos += surface->getFontHeight();
+  drawText(tr("Channel"), xpos, ypos, Colour::LIGHTTEXT);        ypos += surface->getFontHeight();
+  drawText(tr("Name"), xpos, ypos, Colour::LIGHTTEXT);           ypos += surface->getFontHeight();
+  drawText(tr("Directory"), xpos, ypos, Colour::LIGHTTEXT);      ypos += surface->getFontHeight();
                                                              ypos += surface->getFontHeight();
-  drawText("Start", xpos, ypos, Colour::LIGHTTEXT);          ypos += surface->getFontHeight();
-  drawText("Stop", xpos, ypos, Colour::LIGHTTEXT);           ypos += surface->getFontHeight();
-  drawText("Priority", xpos, ypos, Colour::LIGHTTEXT);       ypos += surface->getFontHeight();
-  drawText("Lifetime", xpos, ypos, Colour::LIGHTTEXT);       ypos += surface->getFontHeight();
+  drawText(tr("Start"), xpos, ypos, Colour::LIGHTTEXT);          ypos += surface->getFontHeight();
+  drawText(tr("Stop"), xpos, ypos, Colour::LIGHTTEXT);           ypos += surface->getFontHeight();
+  drawText(tr("Priority"), xpos, ypos, Colour::LIGHTTEXT);       ypos += surface->getFontHeight();
+  drawText(tr("Lifetime"), xpos, ypos, Colour::LIGHTTEXT);       ypos += surface->getFontHeight();
                                                              ypos += surface->getFontHeight();
-  drawText("Current", xpos, ypos, Colour::LIGHTTEXT);        ypos += surface->getFontHeight();
-  drawText("Recording", xpos, ypos, Colour::LIGHTTEXT);      ypos += surface->getFontHeight();
+  drawText(tr("Current"), xpos, ypos, Colour::LIGHTTEXT);        ypos += surface->getFontHeight();
+  drawText(tr("Recording"), xpos, ypos, Colour::LIGHTTEXT);      ypos += surface->getFontHeight();
 
 
   // Temp