예제 #1
0
 // #sijapp cond.if modules_TOUCH is "true"#
 protected void stylusXMoved(TouchState state) {
   if (getWidth() / 2 < Math.abs(state.fromX - state.x)) {
     boolean isTrue = state.fromX < state.x;
     int currentModel = 0;
     if (Options.getBoolean(Options.OPTION_CL_HIDE_OFFLINE)) currentModel = 1;
     if (((RosterContent) content).getModel() == getUpdater().getChatModel()) currentModel = 2;
     currentModel = (currentModel + 3 + (isTrue ? -1 : +1)) % 3;
     switch (currentModel) {
       case 0:
         Options.setBoolean(Options.OPTION_CL_HIDE_OFFLINE, false);
         updateOfflineStatus();
         Options.safeSave();
         break;
       case 1:
         Options.setBoolean(Options.OPTION_CL_HIDE_OFFLINE, true);
         updateOfflineStatus();
         Options.safeSave();
         break;
       case 2:
         ((RosterContent) content).setModel(getUpdater().getChatModel());
         break;
     }
     updateTitle();
     Jimm.getJimm().getCL().activate();
   }
 }
예제 #2
0
파일: GetVersion.java 프로젝트: fin-nick/fj
 private static void setLastVersion(String version) {
   Options.setString(Options.OPTION_LAST_VERSION, version);
   if (hasNewVersion()) {
     Options.setInt(Options.OPTION_UPDATE_CHECK_TIME, 0);
   }
   Options.safeSave();
 }
예제 #3
0
파일: Notify.java 프로젝트: fin-nick/fj
 public static void changeSoundMode(boolean showPopup) {
   boolean newValue = !Options.getBoolean(Options.OPTION_SILENT_MODE);
   if (showPopup) {
     PopupWindow.showShadowPopup(
         "Jimm", ResourceBundle.getString(newValue ? "#sound_is_off" : "#sound_is_on"));
   }
   getSound().vibrate(newValue ? 0 : 100);
   getSound().closePlayer();
   Options.setBoolean(Options.OPTION_SILENT_MODE, newValue);
   Options.safeSave();
 }
예제 #4
0
파일: GetVersion.java 프로젝트: fin-nick/fj
 public static void checkUpdates() {
   if (Options.getBoolean(Options.OPTION_CHECK_UPDATES) && !hasNewVersion()) {
     final int today = (int) (System.currentTimeMillis() / (24L * 60 * 60 * 1000));
     final int nextCheck = Options.getInt(Options.OPTION_UPDATE_CHECK_TIME);
     if (nextCheck <= today) {
       new GetVersion(TYPE_DATE).get();
       final int nextDay = today + CHECK_UPDATES_INTERVAL;
       Options.setInt(Options.OPTION_UPDATE_CHECK_TIME, nextDay);
       Options.safeSave();
     }
   }
 }
예제 #5
0
파일: GetVersion.java 프로젝트: fin-nick/fj
 public static boolean showUpdates() {
   if (Options.getBoolean(Options.OPTION_CHECK_UPDATES) && hasNewVersion()) {
     final int today = (int) (System.currentTimeMillis() / (24L * 60 * 60 * 1000));
     final int nextCheck = Options.getInt(Options.OPTION_UPDATE_CHECK_TIME);
     if (nextCheck <= today) {
       final int nextDay = today + SHOW_NEW_VERSION_INTERVAL;
       Options.setInt(Options.OPTION_UPDATE_CHECK_TIME, nextDay);
       Options.safeSave();
       return true;
     }
   }
   return false;
 }