Skip to content

Commit

Permalink
desktop indicator for open mentions. issue #2018
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Oct 2, 2023
1 parent 291d5f8 commit 18ec8ad
Show file tree
Hide file tree
Showing 17 changed files with 1,473 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docker/getversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jlversion=`echo "$jlversion" | tr _ .`

# tadaaa!
# echo $jlversion
echo 2.5.0.0
echo 2.5.0.1

Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@
import com.jdimension.jlawyer.client.events.FaxStatusEvent;
import com.jdimension.jlawyer.client.events.NewInstantMessagesEvent;
import com.jdimension.jlawyer.client.events.NewsEvent;
import com.jdimension.jlawyer.client.events.OpenMentionsEvent;
import com.jdimension.jlawyer.client.events.OpenTimesheetPositionsEvent;
import com.jdimension.jlawyer.client.events.ScannerStatusEvent;
import com.jdimension.jlawyer.client.events.ServicesEvent;
Expand Down Expand Up @@ -778,7 +779,7 @@ public JKanzleiGUI() {
b.subscribeConsumer(this, Event.TYPE_BEASTATUS);
b.subscribeConsumer(this, Event.TYPE_DREBISSTATUS);
b.subscribeConsumer(this, Event.TYPE_OPENTIMESHEETPOSITIONS);
b.subscribeConsumer(this, Event.TYPE_INSTANTMESSAGING_NEWMESSAGES);
b.subscribeConsumer(this, Event.TYPE_INSTANTMESSAGING_OPENMENTIONS);

ClientSettings settings = ClientSettings.getInstance();
String randomBackgrounds = UserSettings.getInstance().getSetting(UserSettings.CONF_DESKTOP_RANDOM_BACKGROUND, "0");
Expand Down Expand Up @@ -1044,14 +1045,16 @@ public void onEvent(Event e) {
this.lblBeaStatus.setText("-");
this.lblBeaStatus.setToolTipText("keine ungelesenen beA-Nachrichten");
}
} else if (e instanceof NewInstantMessagesEvent) {
} else if (e instanceof OpenMentionsEvent) {
this.lblUnreadInstantMessages.setEnabled(true);
if (((NewInstantMessagesEvent) e).getNewMessages().size() > 0) {
this.lblUnreadInstantMessages.setText("" + ((NewInstantMessagesEvent) e).getNewMessages().size());
this.lblUnreadInstantMessages.setToolTipText("ungelesene Elemente im Nachrichtencenter");
if (((OpenMentionsEvent) e).getOpenMentions() > 0) {
this.lblUnreadInstantMessages.setEnabled(true);
this.lblUnreadInstantMessages.setText("" + ((OpenMentionsEvent) e).getOpenMentions());
this.lblUnreadInstantMessages.setToolTipText("unbearbeitete Erwähnungen im Nachrichtencenter");
} else {
this.lblUnreadInstantMessages.setEnabled(false);
this.lblUnreadInstantMessages.setText("");
this.lblUnreadInstantMessages.setToolTipText("keine ungelesenen Elemente im Nachrichtencenter");
this.lblUnreadInstantMessages.setToolTipText(null);
}
} else if (e instanceof DrebisStatusEvent) {

Expand Down
4 changes: 2 additions & 2 deletions j-lawyer-client/src/com/jdimension/jlawyer/client/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,8 @@ private void showSplash(String cmdHost, String cmdPort, String cmdUser, String c
instantMessages.setModuleName("Post");
instantMessages.setDefaultIcon(new javax.swing.ImageIcon(getClass().getResource("/icons32/material/baseline_chat_blue_48dp.png")));
instantMessages.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/icons32/material/baseline_chat_green_48dp.png")));
instantMessages.setStatusEventType(Event.TYPE_INSTANTMESSAGING_NEWMESSAGES);
instantMessages.setResetIndicatorOnClick(true);
instantMessages.setStatusEventType(Event.TYPE_INSTANTMESSAGING_OPENMENTIONS);
instantMessages.setResetIndicatorOnClick(false);
mail.addChildModule(instantMessages);

ModuleMetadata mailInbox = new ModuleMetadata(java.util.ResourceBundle.getBundle("com/jdimension/jlawyer/client/Modules").getString("mod.comm.inbox"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@
import com.jdimension.jlawyer.client.events.EventConsumer;
import com.jdimension.jlawyer.client.events.FaxFailedEvent;
import com.jdimension.jlawyer.client.events.FaxStatusEvent;
import com.jdimension.jlawyer.client.events.NewInstantMessagesEvent;
import com.jdimension.jlawyer.client.events.NewsEvent;
import com.jdimension.jlawyer.client.events.OpenMentionsEvent;
import com.jdimension.jlawyer.client.events.ScannerStatusEvent;
import com.jdimension.jlawyer.client.launcher.DocumentObserverTask;
import com.jdimension.jlawyer.client.settings.ClientSettings;
Expand Down Expand Up @@ -792,7 +792,7 @@ public DesktopPanel() {
b.subscribeConsumer(this, Event.TYPE_MAILSTATUS);
b.subscribeConsumer(this, Event.TYPE_BEASTATUS);
b.subscribeConsumer(this, Event.TYPE_DREBISSTATUS);
b.subscribeConsumer(this, Event.TYPE_INSTANTMESSAGING_NEWMESSAGES);
b.subscribeConsumer(this, Event.TYPE_INSTANTMESSAGING_OPENMENTIONS);

Timer timer1 = new Timer();
TimerTask systemStateTask = new SystemStateTimerTask(this, this.lblAddressCount, this.lblArchiveFileCount, this.lblArchiveFileArchivedCount, this.lblDocumentCount, this.lblVoipBalance);
Expand Down Expand Up @@ -1725,14 +1725,16 @@ public void onEvent(Event e) {

this.revalidate();
this.repaint();
} else if(e instanceof NewInstantMessagesEvent) {
} else if(e instanceof OpenMentionsEvent) {
this.lblUnreadInstantMessages.setEnabled(true);
if (((NewInstantMessagesEvent) e).getNewMessages().size() > 0) {
this.lblUnreadInstantMessages.setText("" + ((NewInstantMessagesEvent) e).getNewMessages().size());
this.lblUnreadInstantMessages.setToolTipText("ungelesene Elemente im Nachrichtencenter");
if (((OpenMentionsEvent) e).getOpenMentions() > 0) {
this.lblUnreadInstantMessages.setEnabled(true);
this.lblUnreadInstantMessages.setText("" + ((OpenMentionsEvent) e).getOpenMentions());
this.lblUnreadInstantMessages.setToolTipText("unbearbeitete Erwähnungen im Nachrichtencenter");
} else {
this.lblUnreadInstantMessages.setEnabled(false);
this.lblUnreadInstantMessages.setText("");
this.lblUnreadInstantMessages.setToolTipText("keine ungelesenen Elemente im Nachrichtencenter");
this.lblUnreadInstantMessages.setToolTipText(null);
}

this.revalidate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,6 @@ public boolean execute() throws Exception {
this.progress("Aktualisiere Dialog: Beteiligte...");

this.contactsForCasePanel.removeAll();
// BoxLayout layout = new javax.swing.BoxLayout(this.contactsForCasePanel, javax.swing.BoxLayout.Y_AXIS);
// this.contactsForCasePanel.setLayout(layout);
int i = 0;
for (ArchiveFileAddressesBean afab : involvementForCase) {
AddressBean address = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ public abstract class Event {

public static final Integer TYPE_INSTANTMESSAGING_NEWMESSAGES=160;
public static final Integer TYPE_INSTANTMESSAGING_MENTIONCHANGED=170;
public static final Integer TYPE_INSTANTMESSAGING_OPENMENTIONS=180;


private Integer type=TYPE_DEFAULT;
Expand Down
Loading

0 comments on commit 18ec8ad

Please sign in to comment.