Changed message shown to be "prescence" instead of "status"

ALso show an error on setting sttaus when not connected to any server
This commit is contained in:
Tristan B. Kildaire 2021-01-27 22:39:33 +02:00
parent 97295cf042
commit f5791f2eae
1 changed files with 13 additions and 1 deletions

View File

@ -288,6 +288,18 @@ public class GUI : Thread
import std.string;
private void setStatusMessage(Entry f)
{
/* If there are no connections */
if(!connections.length)
{
import gtk.MessageDialog;
MessageDialog errorDialog = new MessageDialog(mainWindow, GtkDialogFlags.MODAL, GtkMessageType.ERROR, GtkButtonsType.CLOSE, false, "Cannot set status\n\nYou are not connected to a server");
errorDialog.setIconName("user-available");
// errorDialog.set
errorDialog.run();
return;
}
/* Get the current connection */
Connection currentConnection = connections[notebook.getCurrentPage()];
@ -554,7 +566,7 @@ public class GUI : Thread
else
{
import gtk.MessageDialog;
MessageDialog errorDialog = new MessageDialog(mainWindow, GtkDialogFlags.MODAL, GtkMessageType.ERROR, GtkButtonsType.CLOSE, false, "Cannot set status\n\nYou are not connected to a server");
MessageDialog errorDialog = new MessageDialog(mainWindow, GtkDialogFlags.MODAL, GtkMessageType.ERROR, GtkButtonsType.CLOSE, false, "Cannot set prescence\n\nYou are not connected to a server");
errorDialog.setIconName("user-available");
// errorDialog.set
errorDialog.run();