Index: XWikiLib/Clients/IXWikiClient.cs =================================================================== --- XWikiLib/Clients/IXWikiClient.cs (revision 18302) +++ XWikiLib/Clients/IXWikiClient.cs (working copy) @@ -16,7 +16,7 @@ /// /// Specifies if the current user is logged in to the server. /// - bool IsLoggedIn + bool LoggedIn { get; } Index: XWikiLib/Clients/XWikiHTTPClient.cs =================================================================== --- XWikiLib/Clients/XWikiHTTPClient.cs (revision 18302) +++ XWikiLib/Clients/XWikiHTTPClient.cs (working copy) @@ -71,14 +71,6 @@ } /// - /// Specifies if the user is logged in; - /// - public bool LoggedIn - { - get { return isLoggedIn; } - } - - /// /// The webclient's headers. /// public WebHeaderCollection Headers @@ -308,7 +300,7 @@ /// /// Specifies if the current user is logged in. /// - public bool IsLoggedIn + public bool LoggedIn { get { Index: XWikiLib/Clients/XWikiXMLRPCClient.cs =================================================================== --- XWikiLib/Clients/XWikiXMLRPCClient.cs (revision 18302) +++ XWikiLib/Clients/XWikiXMLRPCClient.cs (working copy) @@ -22,7 +22,7 @@ /// /// Specifies if the current user is logged in. /// - public bool IsLoggedIn + public bool LoggedIn { get { Index: XWord/AddinActions.cs =================================================================== --- XWord/AddinActions.cs (revision 18302) +++ XWord/AddinActions.cs (working copy) @@ -72,7 +72,7 @@ /// public FileInfo DownloadAttachment(String pageFullName, String attachmentName, String path) { - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } @@ -102,7 +102,7 @@ { if (pageFullName != null) { - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } @@ -130,7 +130,7 @@ Log.Error("Trying to attach a file to a page with an invalid name!"); return false; } - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } @@ -224,7 +224,7 @@ MessageBox.Show("You are already editing this page.", "XWord"); return; } - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } @@ -250,7 +250,7 @@ { try { - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } @@ -310,7 +310,7 @@ /// The wiki syntax of the saved page. private void SavePage(String pageName, ref String pageContent, String syntax) { - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } @@ -464,7 +464,7 @@ } try { - if (!this.Client.IsLoggedIn) + if (!this.Client.LoggedIn) { Client.Login(addin.username, addin.password); } Index: XWord/AddinSettingsForm.cs =================================================================== --- XWord/AddinSettingsForm.cs (revision 18302) +++ XWord/AddinSettingsForm.cs (working copy) @@ -112,6 +112,11 @@ Addin.password = Password; LoginData loginData = new LoginData(); Addin.Client = new XWikiHTTPClient(ServerURL, UserName, Password); + // refreshes the ribbon buttons + // which allow the user to work with the documents from XWiki server + Globals.Ribbons.XWikiRibbon.Refresh(null, null); + + //TODO if login fails then... //AddTaskPanes(); TODO: Sync all taskpanes if (Addin.XWikiTaskPane != null) Index: XWord/XWikiAddIn.cs =================================================================== --- XWord/XWikiAddIn.cs (revision 18302) +++ XWord/XWikiAddIn.cs (working copy) @@ -537,6 +537,9 @@ if (result == DialogResult.OK) { Client = new XWikiHTTPClient(serverURL, username, password); + // refreshes the ribbon buttons + // which allow the user to work with the documents from XWiki server + Globals.Ribbons.XWikiRibbon.Refresh(null,null); AddTaskPanes(); } } @@ -586,6 +589,9 @@ username = credentials[1]; password = credentials[2]; client = new XWikiHTTPClient(serverURL, username, password); + // refreshes the ribbon buttons + // which allow the user to work with the documents from XWiki server + Globals.Ribbons.XWikiRibbon.Refresh(null, null); AddTaskPanes(); } return canAutoLogin; Index: XWord/XWikiRibbon.cs =================================================================== --- XWord/XWikiRibbon.cs (revision 18302) +++ XWord/XWikiRibbon.cs (working copy) @@ -36,7 +36,24 @@ { } - + /// + /// Refreshes the buttons from the selectionOptionsGroup according to the connection state. + /// + public void Refresh(object sender, EventArgs e) + { + if (Addin.Client.LoggedIn) + { + if (!selectionOptionsGroup.Visible) + { + selectionOptionsGroup.Visible = true; + } + } + else if (selectionOptionsGroup.Visible) + { + selectionOptionsGroup.Visible = false; + } + } + private void SyncSaving_Click(object sender, RibbonControlEventArgs e) { if (syncSaving.Checked)