Permalink
Browse files

[add] - add nfs to the "Add network location" dialog

  • Loading branch information...
Memphiz committed Jun 18, 2011
1 parent ec74a99 commit 300ecdbe075492c2a504377202a867a19373ec3b
@@ -1727,6 +1727,7 @@
<string id="20256">HTS Tvheadend client</string>
<string id="20257">VDR Streamdev client</string>
<string id="20258">MythTV client</string>
+ <string id="20259">Network Filesystem (NFS)</string>
<string id="20300">Web server directory (HTTP)</string>
<string id="20301">Web server directory (HTTPS)</string>
@@ -1764,6 +1764,8 @@
<string id="20255">Erster Login: Bearbeite dein Profil.</string>
<string id="20256">HTS Tvheadend Client</string>
<string id="20257">VDR Streamdev Client</string>
+
+ <string id="20259">Netzwerk Dateisystem (NFS)</string>
<string id="20300">Webserver-Verzeichnis (HTTP)</string>
<string id="20301">Webserver-Verzeichnis (HTTPS)</string>
@@ -141,6 +141,7 @@ void CGUIDialogNetworkSetup::OnInitWindow()
pSpin->AddLabel(g_localizeStrings.Get(20174), NET_PROTOCOL_DAAP);
pSpin->AddLabel(g_localizeStrings.Get(20175), NET_PROTOCOL_UPNP);
pSpin->AddLabel(g_localizeStrings.Get(20304), NET_PROTOCOL_RSS);
+ pSpin->AddLabel(g_localizeStrings.Get(20259), NET_PROTOCOL_NFS);
@topfs2

topfs2 Jun 19, 2011

Member

Might be good to put an ifdef guard here?

pSpin->SetValue(m_protocol);
OnProtocolChange();
@@ -205,6 +206,8 @@ void CGUIDialogNetworkSetup::OnProtocolChange()
m_port = "2004";
else if (m_protocol == NET_PROTOCOL_MYTH)
m_port = "6543";
+ else if (m_protocol == NET_PROTOCOL_NFS)
+ m_port = "2049";
UpdateButtons();
}
@@ -238,7 +241,8 @@ void CGUIDialogNetworkSetup::UpdateButtons()
m_protocol == NET_PROTOCOL_HTTPS ||
m_protocol == NET_PROTOCOL_RSS ||
m_protocol == NET_PROTOCOL_DAV ||
- m_protocol == NET_PROTOCOL_DAVS)
+ m_protocol == NET_PROTOCOL_DAVS||
+ m_protocol == NET_PROTOCOL_NFS)
{
SET_CONTROL_LABEL(CONTROL_REMOTE_PATH, 1011); // Remote Path
}
@@ -252,7 +256,8 @@ void CGUIDialogNetworkSetup::UpdateButtons()
SET_CONTROL_LABEL2(CONTROL_USERNAME, m_username);
CONTROL_ENABLE_ON_CONDITION(CONTROL_USERNAME, m_protocol != NET_PROTOCOL_DAAP &&
m_protocol != NET_PROTOCOL_VTP &&
- m_protocol != NET_PROTOCOL_UPNP);
+ m_protocol != NET_PROTOCOL_UPNP &&
+ m_protocol != NET_PROTOCOL_NFS);
SendMessage(GUI_MSG_SET_TYPE, CONTROL_USERNAME, CGUIEditControl::INPUT_TYPE_TEXT, 1019);
@@ -268,20 +273,22 @@ void CGUIDialogNetworkSetup::UpdateButtons()
m_protocol == NET_PROTOCOL_VTP ||
m_protocol == NET_PROTOCOL_MYTH ||
m_protocol == NET_PROTOCOL_RSS ||
- m_protocol == NET_PROTOCOL_DAAP);
+ m_protocol == NET_PROTOCOL_DAAP ||
+ m_protocol == NET_PROTOCOL_NFS);
SendMessage(GUI_MSG_SET_TYPE, CONTROL_PORT_NUMBER, CGUIEditControl::INPUT_TYPE_NUMBER, 1018);
// password
SET_CONTROL_LABEL2(CONTROL_PASSWORD, m_password);
CONTROL_ENABLE_ON_CONDITION(CONTROL_PASSWORD, m_protocol != NET_PROTOCOL_DAAP &&
m_protocol != NET_PROTOCOL_VTP &&
- m_protocol != NET_PROTOCOL_UPNP);
+ m_protocol != NET_PROTOCOL_UPNP &&
+ m_protocol != NET_PROTOCOL_NFS);
SendMessage(GUI_MSG_SET_TYPE, CONTROL_PASSWORD, CGUIEditControl::INPUT_TYPE_PASSWORD, 12326);
// TODO: FIX BETTER DAAP SUPPORT
- // server browse should be disabled if we are in DAAP, FTP, HTTP, HTTPS, RSS, HTSP, VTP, TUXBOX, DAV or DAVS
+ // server browse should be disabled if we are in DAAP, FTP, HTTP, HTTPS, RSS, HTSP, VTP, TUXBOX, DAV, NFS or DAVS
CONTROL_ENABLE_ON_CONDITION(CONTROL_SERVER_BROWSE, !m_server.IsEmpty() || !(m_protocol == NET_PROTOCOL_FTP ||
m_protocol == NET_PROTOCOL_HTTP ||
m_protocol == NET_PROTOCOL_HTTPS ||
@@ -292,7 +299,8 @@ void CGUIDialogNetworkSetup::UpdateButtons()
m_protocol == NET_PROTOCOL_HTSP ||
m_protocol == NET_PROTOCOL_VTP ||
m_protocol == NET_PROTOCOL_MYTH ||
- m_protocol == NET_PROTOCOL_TUXBOX));
+ m_protocol == NET_PROTOCOL_TUXBOX||
+ m_protocol == NET_PROTOCOL_NFS));
}
CStdString CGUIDialogNetworkSetup::ConstructPath() const
@@ -324,6 +332,9 @@ CStdString CGUIDialogNetworkSetup::ConstructPath() const
url.SetProtocol("vtp");
else if (m_protocol == NET_PROTOCOL_MYTH)
url.SetProtocol("myth");
+ else if (m_protocol == NET_PROTOCOL_NFS)
+ url.SetProtocol("nfs");
+
if (!m_username.IsEmpty())
{
url.SetUserName(m_username);
@@ -342,7 +353,8 @@ CStdString CGUIDialogNetworkSetup::ConstructPath() const
(m_protocol == NET_PROTOCOL_HTSP) ||
(m_protocol == NET_PROTOCOL_VTP) ||
(m_protocol == NET_PROTOCOL_MYTH) ||
- (m_protocol == NET_PROTOCOL_TUXBOX))
+ (m_protocol == NET_PROTOCOL_TUXBOX) ||
+ (m_protocol == NET_PROTOCOL_NFS))
&& !m_port.IsEmpty() && atoi(m_port.c_str()) > 0)
{
url.SetPort(atoi(m_port));
@@ -382,6 +394,8 @@ void CGUIDialogNetworkSetup::SetPath(const CStdString &path)
m_protocol = NET_PROTOCOL_MYTH;
else if (protocol == "rss")
m_protocol = NET_PROTOCOL_RSS;
+ else if (protocol == "nfs")
+ m_protocol = NET_PROTOCOL_NFS;
else
m_protocol = NET_PROTOCOL_SMB; // default to smb
m_username = url.GetUserName();
@@ -40,7 +40,8 @@ class CGUIDialogNetworkSetup :
NET_PROTOCOL_HTSP,
NET_PROTOCOL_VTP,
NET_PROTOCOL_MYTH,
- NET_PROTOCOL_TUXBOX};
+ NET_PROTOCOL_TUXBOX,
+ NET_PROTOCOL_NFS};
CGUIDialogNetworkSetup(void);
virtual ~CGUIDialogNetworkSetup(void);
virtual bool OnMessage(CGUIMessage& message);

0 comments on commit 300ecdb

Please sign in to comment.