Merge pull request #593 (Full URL Support in bitcoin-qt)
authorWladimir J. van der Laan <laanwj@gmail.com>
Thu, 26 Jan 2012 18:00:02 +0000 (19:00 +0100)
committerWladimir J. van der Laan <laanwj@gmail.com>
Thu, 26 Jan 2012 18:00:02 +0000 (19:00 +0100)
1  2 
bitcoin-qt.pro
contrib/debian/changelog
src/init.cpp
src/qt/bitcoingui.cpp

diff --combined bitcoin-qt.pro
@@@ -97,7 -97,6 +97,7 @@@ HEADERS += src/qt/bitcoingui.h 
      src/base58.h \
      src/bignum.h \
      src/checkpoints.h \
 +    src/compat.h \
      src/util.h \
      src/uint256.h \
      src/serialize.h \
      src/qt/qvaluecombobox.h \
      src/qt/askpassphrasedialog.h \
      src/protocol.h \
-     src/qt/notificator.h
+     src/qt/notificator.h \
+     src/qt/qtipcserver.h
  
  SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
      src/qt/transactiontablemodel.cpp \
      src/qt/editaddressdialog.cpp \
      src/qt/bitcoinaddressvalidator.cpp \
      src/util.cpp \
 +    src/netbase.cpp \
      src/key.cpp \
      src/script.cpp \
      src/main.cpp \
      src/qt/qvaluecombobox.cpp \
      src/qt/askpassphrasedialog.cpp \
      src/protocol.cpp \
-     src/qt/notificator.cpp
+     src/qt/notificator.cpp \
+     src/qt/qtipcserver.cpp
  
  RESOURCES += \
      src/qt/bitcoin.qrc
diff --combined contrib/debian/changelog
@@@ -1,11 -1,9 +1,13 @@@
  bitcoin (0.5.1-natty1) natty; urgency=low
  
 +  * Remove mentions on anonymity in package descriptions and manpage.
 +    These should never have been there, bitcoin isnt anonymous without
 +    a ton of work that virtually no users will ever be willing and
 +    capable of doing
+   * Add GNOME/KDE support for bitcoin-qt's bitcoin: URI support.
+     Thanks to luke-jr for the KDE .protocol file.
  
-  -- Matt Corallo <matt@bluematt.me>  Sat, 7 Jan 2012 13:37:00 -0500
+  -- Matt Corallo <matt@bluematt.me>  Fri, 23 Dec 2011 20:25:00 -0500
  
  bitcoin (0.5.1-natty0) natty; urgency=low
  
diff --combined src/init.cpp
@@@ -192,7 -192,7 +192,7 @@@ bool AppInit2(int argc, char* argv[]
              "  -dns             \t  "   + _("Allow DNS lookups for addnode and connect") + "\n" +
              "  -port=<port>     \t\t  " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n" +
              "  -maxconnections=<n>\t  " + _("Maintain at most <n> connections to peers (default: 125)") + "\n" +
 -            "  -addnode=<ip>    \t  "   + _("Add a node to connect to") + "\n" +
 +            "  -addnode=<ip>    \t  "   + _("Add a node to connect to and attempt to keep the connection open") + "\n" +
              "  -connect=<ip>    \t\t  " + _("Connect only to the specified node") + "\n" +
              "  -noirc           \t  "   + _("Don't find peers using internet relay chat") + "\n" +
              "  -nolisten        \t  "   + _("Don't accept connections from outside") + "\n" +
              "  -rpcport=<port>  \t\t  " + _("Listen for JSON-RPC connections on <port> (default: 8332)") + "\n" +
              "  -rpcallowip=<ip> \t\t  " + _("Allow JSON-RPC connections from specified IP address") + "\n" +
              "  -rpcconnect=<ip> \t  "   + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n" +
 +            "  -blocknotify=<cmd> "     + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n" +
              "  -keypool=<n>     \t  "   + _("Set key pool size to <n> (default: 100)") + "\n" +
              "  -rescan          \t  "   + _("Rescan the block chain for missing wallet transactions") + "\n";
  
  
  #ifndef QT_GUI
      for (int i = 1; i < argc; i++)
-         if (!IsSwitchChar(argv[i][0]))
+         if (!IsSwitchChar(argv[i][0]) && !(strlen(argv[i]) > 7 && strncasecmp(argv[i], "bitcoin:", 8) == 0))
              fCommandLine = true;
  
      if (fCommandLine)
      if (mapArgs.count("-proxy"))
      {
          fUseProxy = true;
 -        addrProxy = CAddress(mapArgs["-proxy"]);
 +        addrProxy = CService(mapArgs["-proxy"], 9050);
          if (!addrProxy.IsValid())
          {
              wxMessageBox(_("Invalid -proxy address"), "Bitcoin");
          }
      }
  
 -    bool fTor = (fUseProxy && addrProxy.port == htons(9050));
 +    bool fTor = (fUseProxy && addrProxy.GetPort() == 9050);
      if (fTor)
      {
          // Use SoftSetArg here so user can override any of these if they wish.
      {
          BOOST_FOREACH(string strAddr, mapMultiArgs["-addnode"])
          {
 -            CAddress addr(strAddr, fAllowDNS);
 +            CAddress addr(CService(strAddr, GetDefaultPort(), fAllowDNS));
              addr.nTime = 0; // so it won't relay unless successfully connected
              if (addr.IsValid())
                  AddAddress(addr);
diff --combined src/qt/bitcoingui.cpp
@@@ -417,6 -417,7 +417,6 @@@ void BitcoinGUI::setNumBlocks(int count
  {
      if(!clientModel)
          return;
 -    int initTotal = clientModel->getNumBlocksAtStartup();
      int total = clientModel->getNumBlocksOfPeers();
      QString tooltip;
  
              progressBarLabel->setVisible(true);
              progressBarLabel->setText(tr("Synchronizing with network..."));
              progressBar->setVisible(true);
 -            progressBar->setMaximum(total - initTotal);
 -            progressBar->setValue(count - initTotal);
 +            progressBar->setMaximum(total);
 +            progressBar->setValue(count);
          }
          else
          {
@@@ -670,6 -671,13 +670,13 @@@ void BitcoinGUI::dropEvent(QDropEvent *
      event->acceptProposedAction();
  }
  
+ void BitcoinGUI::handleURL(QString strURL)
+ {
+     gotoSendCoinsPage();
+     QUrl url = QUrl(strURL);
+     sendCoinsPage->handleURL(&url);
+ }
  void BitcoinGUI::setEncryptionStatus(int status)
  {
      switch(status)