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

Catroid-1617 Main menu Scratch-converter beta removed. #5060

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion catroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ android {
buildConfigField "boolean", "FEATURE_NFC_ENABLED", "true"
buildConfigField "boolean", "FEATURE_POCKETMUSIC_ENABLED", "true"
buildConfigField "boolean", "FEATURE_RASPI_ENABLED", "true"
buildConfigField "boolean", "FEATURE_SCRATCH_CONVERTER_ENABLED", "true"
//buildConfigField "boolean", "FEATURE_SCRATCH_CONVERTER_ENABLED", "true"
buildConfigField "boolean", "FEATURE_USER_REPORTERS_ENABLED", "true"
buildConfigField "boolean", "FEATURE_MULTIPLAYER_VARIABLES_ENABLED", "true"
buildConfigField "boolean", "FEATURE_TESTBRICK_ENABLED", "true"
Expand Down
1 change: 0 additions & 1 deletion catroid/gradle/code_quality_tasks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ task pmd(type: Pmd) {

reports {
xml.required = true
html.enabled = false
xml.destination file("build/reports/pmd.xml")
}
}
Expand Down
3 changes: 2 additions & 1 deletion catroid/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustNothing" />

<!-- Menu Scratch Converter removed.
<activity
android:name=".ui.ScratchConverterActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustNothing">
</activity>
</activity> -->

<activity
android:name=".ui.ScratchProgramDetailsActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import static org.catrobat.catroid.common.SharedPreferenceKeys.SCRATCH_CONVERTER_CLIENT_ID_PREFERENCE_KEY;
import static org.catrobat.catroid.common.SharedPreferenceKeys.SCRATCH_CONVERTER_DOWNLOAD_STATE_PREFERENCE_KEY;

/*
public class ScratchConversionManager implements ConversionManager {

private static final String TAG = ScratchConversionManager.class.getSimpleName();
Expand Down Expand Up @@ -600,3 +601,4 @@ public void onUserCanceledDownload(String url) {
}
}
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.catrobat.catroid.scratchconverter.protocol.message.base.ErrorMessage;
import org.catrobat.catroid.scratchconverter.protocol.message.base.InfoMessage;

/*
public final class WebSocketClient<T extends MessageListener & StringCallback>
implements Client, BaseMessageHandler, CompletedCallback {

Expand Down Expand Up @@ -289,3 +290,5 @@ private void sendCommand(final Command command) {
webSocket.send(dataToSend);
}
}

*/
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class MainMenuActivity : BaseCastActivity(), ProjectLoadListener {
}
}

/*
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_main_menu, menu)
val scratchConverter = getString(R.string.main_menu_scratch_converter)
Expand All @@ -261,15 +262,17 @@ class MainMenuActivity : BaseCastActivity(), ProjectLoadListener {
menu.findItem(R.id.menu_scratch_converter).title = scratchConverterBeta
return super.onCreateOptionsMenu(menu)
}

*/
override fun onPrepareOptionsMenu(menu: Menu): Boolean {
menu.findItem(R.id.menu_login).isVisible =
!Utils.isUserLoggedIn(this)
menu.findItem(R.id.menu_logout).isVisible =
Utils.isUserLoggedIn(this)
/*
if (!BuildConfig.FEATURE_SCRATCH_CONVERTER_ENABLED) {
menu.removeItem(R.id.menu_scratch_converter)
}
*/
return true
}

Expand Down Expand Up @@ -303,9 +306,13 @@ class MainMenuActivity : BaseCastActivity(), ProjectLoadListener {
supportFragmentManager,
AboutDialogFragment.TAG
)
R.id.menu_scratch_converter -> if (Utils.checkIsNetworkAvailableAndShowErrorMessage(this)) {
/* Scratch Converter removed
R.id.menu_scratch_converter -> if (Utils.checkIsNetworkAvailableAndShowErrorMessage
(this)) {
startActivity(Intent(this, ScratchConverterActivity::class.java))
}

*/
R.id.settings -> startActivity(Intent(this, SettingsActivity::class.java))
R.id.menu_login -> startActivity(Intent(this, SignInActivity::class.java))
R.id.menu_logout -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@

import static org.catrobat.catroid.common.SharedPreferenceKeys.SCRATCH_CONVERTER_CLIENT_ID_PREFERENCE_KEY;

//Scratch Converter activity removal
/*
public class ScratchConverterActivity extends BaseActivity implements
BaseInfoViewListener,
JobViewListener,
Expand Down Expand Up @@ -362,3 +364,5 @@ public interface OnJobListListener {
void onJobListChanged();
}
}

*/
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@

import static org.catrobat.catroid.utils.NumberFormats.toMetricUnitRepresentation;

/*
public class ScratchProgramDetailsActivity extends BaseActivity implements
FetchScratchProgramDetailsTask.ScratchProgramListTaskDelegate,
JobViewListener, Client.ProjectDownloadCallback,
Expand Down Expand Up @@ -398,3 +399,5 @@ public void onUserCanceledDownload(final String url) {
}
}
}

*/
3 changes: 2 additions & 1 deletion catroid/src/main/res/layout/activity_scratch_converter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
Expand Down Expand Up @@ -67,4 +68,4 @@
android:layout_above="@id/bottom_bar" />

</RelativeLayout>
</LinearLayout>
</LinearLayout>
4 changes: 3 additions & 1 deletion catroid/src/main/res/menu/menu_main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@
android:title="@string/main_menu_about"
app:showAsAction="never"
android:icon="@drawable/ic_info"/>

<!-- Menu Scratch converter beta removed
<item
android:id="@+id/menu_scratch_converter"
android:title="@string/main_menu_scratch_converter"
app:showAsAction="never"
android:icon="@drawable/ic_placeholder"/>
android:icon="@drawable/ic_placeholder"/> -->
<item
android:id="@+id/settings"
android:title="@string/settings"
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 09 18:08:52 CEST 2023
#Wed Jan 08 06:56:42 IST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists