Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please ignore this commit,it looks i do some wrong operation #182

Open
wants to merge 9 commits into
base: 2.36
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ this software and associated documentation files (the "Software"), to deal
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
Expand Down Expand Up @@ -3800,12 +3801,16 @@ public void run() {
private final static int HISTORY_SCROLL_AMOUNT=1;
private void setHistoryContextButtonListener() {
setHistoryScrollButtonVisibility();
mGp.syncHistoryListView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
mGp.syncHistoryListView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
public void onScrollStateChanged(AbsListView view, int scrollState) {}

@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
setHistoryScrollButtonVisibility();
}
});

mContextHistoryButtonSendTo.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Expand Down Expand Up @@ -4916,14 +4921,17 @@ public void run() {
private final static int MESSAGE_SCROLL_AMOUNT=1;
private void setMessageContextButtonListener() {
setMessageScrollButtonVisibility();
mGp.syncMessageListView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
mGp.syncMessageListView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {}

@Override
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
setMessageScrollButtonVisibility();
}
});

mContextMessageButtonScrollUp.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, 50, false, new OnClickListener() {
mContextMessageButtonScrollUp.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, DEFAULT_LONG_PRESS_REPEAT_INTERVAL, false, new OnClickListener() {
@Override
public void onClick(View v) {
int sel = mGp.syncMessageListView.getFirstVisiblePosition() - MESSAGE_SCROLL_AMOUNT;
Expand All @@ -4935,7 +4943,7 @@ public void onClick(View v) {
}
}));

mContextMessageButtonScrollDown.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, 50, false, new OnClickListener() {
mContextMessageButtonScrollDown.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, DEFAULT_LONG_PRESS_REPEAT_INTERVAL, false, new OnClickListener() {
@Override
public void onClick(View v) {
int sel = mGp.syncMessageListView.getFirstVisiblePosition() + MESSAGE_SCROLL_AMOUNT;
Expand All @@ -4948,7 +4956,7 @@ public void onClick(View v) {
}
}));

mContextMessageButtonPageUp.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, 50, false, new OnClickListener() {
mContextMessageButtonPageUp.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, DEFAULT_LONG_PRESS_REPEAT_INTERVAL, false, new OnClickListener() {
@Override
public void onClick(View v) {
int lv_height = mGp.syncMessageListView.getHeight();
Expand All @@ -4974,7 +4982,7 @@ public void onClick(View v) {
}
}));

mContextMessageButtonPageDown.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, 50, false, new OnClickListener() {
mContextMessageButtonPageDown.setOnTouchListener(new RepeatListener(ANDROID_LONG_PRESS_TIMEOUT, DEFAULT_LONG_PRESS_REPEAT_INTERVAL, false, new OnClickListener() {
@Override
public void onClick(View v) {
int last_item_pos = mGp.syncMessageListView.getLastVisiblePosition() - mGp.syncMessageListView.getFirstVisiblePosition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ final public String createSyncResultFilePath(String syncProfName) {
fn = fn.replaceAll(Pattern.quote(invalid_str), "_");
}
for(String invalid_str:SMBSYNC2_PROF_SYNC_LOG_FILE_INVALID_CHARS_TAIL) {
if (fn.startsWith(invalid_str))
if (fn.endsWith(invalid_str))
fn = fn.replaceFirst(Pattern.quote(invalid_str), "_");
}

Expand Down
Binary file modified SMBSync2/src/main/res/drawable/ic_128_execute_schedule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified SMBSync2/src/main/res/drawable/ic_32_execute_schedule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading