Skip to content

Commit

Permalink
Merge branch 'rdp_console_mode_sdcard'
Browse files Browse the repository at this point in the history
  • Loading branch information
iiordanov committed Mar 18, 2014
2 parents c3f7cd1 + f997788 commit 160a7e9
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eclipse_projects/bVNC/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.iiordanov.bVNC" android:installLocation="auto"
android:versionCode="3590" android:versionName="v3.5.9">
android:versionCode="3600" android:versionName="v3.6.0">

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"></uses-sdk>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Expand Down
14 changes: 14 additions & 0 deletions eclipse_projects/bVNC/res/layout-large/main_rdp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,20 @@ android:layout_height="fill_parent">
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
<CheckBox
android:id="@+id/checkboxConsoleMode"
android:text="@string/rdp_adv_console_mode"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="wrap_content"
android:gravity="left|center_vertical"
android:layout_height="wrap_content"/>
<CheckBox
android:id="@+id/checkboxRedirectSdCard"
android:text="@string/rdp_adv_redirect_sdcard"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="wrap_content"
android:gravity="left|center_vertical"
android:layout_height="wrap_content"/>
<CheckBox
android:id="@+id/checkboxRemoteFx"
android:text="@string/rdp_adv_remotefx"
Expand Down
14 changes: 14 additions & 0 deletions eclipse_projects/bVNC/res/layout/main_rdp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,20 @@ android:layout_height="fill_parent">
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
<CheckBox
android:id="@+id/checkboxConsoleMode"
android:text="@string/rdp_adv_console_mode"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:gravity="left|center_vertical"
android:layout_height="wrap_content"/>
<CheckBox
android:id="@+id/checkboxRedirectSdCard"
android:text="@string/rdp_adv_redirect_sdcard"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:gravity="left|center_vertical"
android:layout_height="wrap_content"/>
<CheckBox
android:id="@+id/checkboxRemoteFx"
android:text="@string/rdp_adv_remotefx"
Expand Down
2 changes: 2 additions & 0 deletions eclipse_projects/bVNC/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ If you are looking for a quick performance boost, try setting the Color mode to
<string name="port_ssh_hint">Port</string>
<string name="portrait_mode">Switch to portrait mode when connected</string>
<string name="rdp_address_caption_hint">RDP Server</string>
<string name="rdp_adv_console_mode">Console Mode</string>
<string name="rdp_adv_redirect_sdcard">Redirect SD Card</string>
<string name="rdp_adv_remotefx">Enable RemoteFX</string>
<string name="rdp_adv_desktop_background">Show desktop background</string>
<string name="rdp_adv_font_smoothing">Perform font smoothing</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public class ConnectionBean extends AbstractConnectionBean implements Comparable
setWindowContents(false);
setMenuAnimation(false);
setVisualStyles(false);
setConsoleMode(false);
setRedirectSdCard(false);
setEnableSound(false);
setViewOnly(false);
c = context;
Expand Down
12 changes: 11 additions & 1 deletion eclipse_projects/bVNC/src/com/iiordanov/bVNC/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ public class Database extends SQLiteOpenHelper {
static final int DBV_2_1_0 = 329;
static final int DBV_2_1_1 = 335;
static final int DBV_2_1_2 = 336;
static final int DBV_2_1_3 = 360;

public final static String TAG = Database.class.toString();

Database(Context context) {
super(context, "VncDatabase", null, DBV_2_1_2);
super(context, "VncDatabase", null, DBV_2_1_3);
}

/* (non-Javadoc)
Expand Down Expand Up @@ -216,5 +217,14 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+AbstractConnectionBean.GEN_FIELD_VIEWONLY + " BOOLEAN DEFAULT FALSE");
oldVersion = DBV_2_1_2;
}

if (oldVersion == DBV_2_1_2) {
Log.i(TAG,"Doing upgrade from 336 to 360");
db.execSQL("ALTER TABLE " + AbstractConnectionBean.GEN_TABLE_NAME + " ADD COLUMN "
+AbstractConnectionBean.GEN_FIELD_CONSOLEMODE + " BOOLEAN DEFAULT FALSE");
db.execSQL("ALTER TABLE " + AbstractConnectionBean.GEN_TABLE_NAME + " ADD COLUMN "
+AbstractConnectionBean.GEN_FIELD_REDIRECTSDCARD + " BOOLEAN DEFAULT FALSE");
oldVersion = DBV_2_1_3;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ interface IConnectionBean {
@FieldAccessor
boolean getVisualStyles();
@FieldAccessor
boolean getRedirectSdCard();
@FieldAccessor
boolean getConsoleMode();
@FieldAccessor
boolean getEnableSound();
@FieldAccessor
boolean getViewOnly();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ private void startRdpConnection() throws Exception {
performanceFlags.setMenuAnimations(connection.getMenuAnimation());
performanceFlags.setTheming(connection.getVisualStyles());

BookmarkBase.AdvancedSettings advancedSettings = session.getBookmark().getAdvancedSettings();
advancedSettings.setRedirectSDCard(connection.getRedirectSdCard());
advancedSettings.setConsoleMode(connection.getConsoleMode());

rdpcomm = new RdpCommunicator (session);
rfbconn = rdpcomm;
pointer = new RemoteRdpPointer (rfbconn, RemoteCanvas.this, handler);
Expand Down
8 changes: 8 additions & 0 deletions eclipse_projects/bVNC/src/com/iiordanov/bVNC/aRDP.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ public class aRDP extends Activity implements MainConfiguration {
private EditText rdpHeight;
private CheckBox checkboxKeepPassword;
private CheckBox checkboxUseDpadAsArrows;
private CheckBox checkboxConsoleMode;
private CheckBox checkboxRedirectSdCard;
private CheckBox checkboxRemoteFx;
private CheckBox checkboxDesktopBackground;
private CheckBox checkboxFontSmoothing;
Expand Down Expand Up @@ -225,6 +227,8 @@ public void onNothingSelected(AdapterView<?> arg0) {
}
});

checkboxConsoleMode = (CheckBox)findViewById(R.id.checkboxConsoleMode);
checkboxRedirectSdCard = (CheckBox)findViewById(R.id.checkboxRedirectSdCard);
checkboxRemoteFx = (CheckBox)findViewById(R.id.checkboxRemoteFx);
checkboxDesktopBackground = (CheckBox)findViewById(R.id.checkboxDesktopBackground);
checkboxFontSmoothing = (CheckBox)findViewById(R.id.checkboxFontSmoothing);
Expand Down Expand Up @@ -427,6 +431,8 @@ protected void updateViewFromSelected() {
rdpWidth.setText(Integer.toString(selected.getRdpWidth()));
rdpHeight.setText(Integer.toString(selected.getRdpHeight()));
setRemoteWidthAndHeight ();
checkboxConsoleMode.setChecked(selected.getConsoleMode());
checkboxRedirectSdCard.setChecked(selected.getRedirectSdCard());
checkboxRemoteFx.setChecked(selected.getRemoteFx());
checkboxDesktopBackground.setChecked(selected.getDesktopBackground());
checkboxFontSmoothing.setChecked(selected.getFontSmoothing());
Expand Down Expand Up @@ -527,6 +533,8 @@ private void updateSelectedFromView() {
selected.setRdpWidth(Integer.parseInt(rdpWidth.getText().toString()));
selected.setRdpHeight(Integer.parseInt(rdpHeight.getText().toString()));
} catch (NumberFormatException nfe) {}
selected.setConsoleMode(checkboxConsoleMode.isChecked());
selected.setRedirectSdCard(checkboxRedirectSdCard.isChecked());
selected.setRemoteFx(checkboxRemoteFx.isChecked());
selected.setDesktopBackground(checkboxDesktopBackground.isChecked());
selected.setFontSmoothing(checkboxFontSmoothing.isChecked());
Expand Down

0 comments on commit 160a7e9

Please sign in to comment.