mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-15 08:47:56 +01:00
cleanup from code review
This commit is contained in:
parent
57e8a5da81
commit
c73fcd336e
10 changed files with 25 additions and 48 deletions
|
@ -327,13 +327,16 @@ public class BoardDelegate extends DelegateBase
|
|||
OnClickListener lstnr2 = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick( DialogInterface dlg, int bx ) {
|
||||
handleViaThread( JNICmd.CMD_COMMIT, true, false, badWordsKey );
|
||||
handleViaThread( JNICmd.CMD_COMMIT, true,
|
||||
false, badWordsKey );
|
||||
}
|
||||
};
|
||||
|
||||
String buttonTxt = LocUtils.getString( m_activity, R.string.buttonYesAnd );
|
||||
String withSaveMsg = LocUtils.getQuantityString( m_activity, R.plurals.yesAndMsgFmt,
|
||||
count, buttonTxt );
|
||||
String buttonTxt = LocUtils.getString( m_activity,
|
||||
R.string.buttonYesAnd );
|
||||
String withSaveMsg = LocUtils
|
||||
.getQuantityString( m_activity, R.plurals.yesAndMsgFmt,
|
||||
count, buttonTxt );
|
||||
|
||||
dialog = ab.setTitle( R.string.phonies_found_title )
|
||||
.setMessage( (String)params[0] + "\n\n" + withSaveMsg )
|
||||
|
|
|
@ -196,7 +196,7 @@ public class NetUtils {
|
|||
{
|
||||
HttpURLConnection result = null;
|
||||
try {
|
||||
String url = String.format( "%s/%s", ensureProto( context,path ), proc );
|
||||
String url = String.format( "%s/%s", ensureProto( context, path ), proc );
|
||||
result = (HttpURLConnection)new URL(url).openConnection(); // class cast exception
|
||||
} catch ( java.net.MalformedURLException mue ) {
|
||||
Assert.assertNull( result );
|
||||
|
|
|
@ -354,8 +354,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
|||
}
|
||||
if ( !skipIt ) {
|
||||
gotOne = true;
|
||||
String url = NetUtils.ensureProto( m_context,
|
||||
urlParm );
|
||||
String url = NetUtils.ensureProto( m_context, urlParm );
|
||||
Intent intent;
|
||||
if ( useBrowser ) {
|
||||
intent = new Intent( Intent.ACTION_VIEW,
|
||||
|
|
|
@ -2868,4 +2868,15 @@
|
|||
<string name="not_again_newsawnew_fmt">The most recent move is now
|
||||
drawn using a new background color.\n\nYou can customize that color
|
||||
in %1$s, where the color setting is called “%2$s”.</string>
|
||||
|
||||
<!-- For Debug builds only, there's a prefs setting allowing to
|
||||
choose whether web api connections are made using http or
|
||||
https. Depending on the OS version, one or the other is the
|
||||
default. -->
|
||||
<string name="title_url_scheme">Scheme for Web APIs</string>
|
||||
<string name="url_scheme_default">Use device OS default</string>
|
||||
<string name="url_scheme_http">Force http</string>
|
||||
<string name="url_scheme_https">Force https</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -9,12 +9,6 @@
|
|||
the quashing was accidental) -->
|
||||
<string name="menu_unquash">Unquash</string>
|
||||
|
||||
|
||||
<string name="title_url_scheme">Scheme for Web APIs</string>
|
||||
<string name="url_scheme_default">Use device OS default</string>
|
||||
<string name="url_scheme_http">Force http</string>
|
||||
<string name="url_scheme_https">Force https</string>
|
||||
|
||||
<string name="gamel_menu_legalPhonies">Legal phonies</string>
|
||||
<string name="gamel_menu_clearLPs">Clear all</string>
|
||||
<string name="gamel_menu_listLPs">Show all</string>
|
||||
|
|
|
@ -1022,7 +1022,6 @@ dvc_isLegalPhony( XW_DUtilCtxt* dutil, XWEnv xwe,
|
|||
return fpd.found;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
registerIf( XW_DUtilCtxt* dutil, XWEnv xwe )
|
||||
{
|
||||
|
@ -1096,7 +1095,6 @@ dvc_init( XW_DUtilCtxt* dutil, XWEnv xwe )
|
|||
void
|
||||
dvc_cleanup( XW_DUtilCtxt* dutil, XWEnv xwe )
|
||||
{
|
||||
LOG_FUNC();
|
||||
DevCtxt* dc = freePhonyState( dutil, xwe, NULL );
|
||||
|
||||
pthread_mutex_destroy( &dc->webSendMutex );
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#define _DEVICE_H_
|
||||
|
||||
#include "dutil.h"
|
||||
#include "dictmgr.h"
|
||||
|
||||
// void device_load( XW_DUtilCtxt dctxt );
|
||||
# ifdef XWFEATURE_DEVICE
|
||||
|
|
|
@ -515,12 +515,9 @@ kplr_cleanup( XW_DUtilCtxt* dutil )
|
|||
KPState* state = *statep;
|
||||
if ( !!state ) {
|
||||
XP_ASSERT( !state->inUse );
|
||||
while ( !!state->players ) {
|
||||
KnownPlayer* node = state->players;
|
||||
state->players = (KnownPlayer*)
|
||||
dll_remove( &state->players->links, &node->links );
|
||||
freeKP( dutil, node );
|
||||
}
|
||||
XP_LOGFF( "removing %d elems", dll_length(&state->players->links) );
|
||||
DelState ds = { .dutil = dutil,};
|
||||
dll_removeAll( &state->players->links, delFreeProc, &ds );
|
||||
XP_FREEP( dutil->mpool, statep );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* -*- compile-command: "make MEMDEBUG=TRUE -j5"; -*- */
|
||||
/*
|
||||
* Copyright 2001-2024 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
* Copyright 2024 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -30,12 +29,6 @@ typedef struct _AskBadState {
|
|||
const char* dictName;
|
||||
} AskBadState;
|
||||
|
||||
/* static void */
|
||||
/* handle_response( GtkWidget* item, AskBadState* state ) */
|
||||
/* { */
|
||||
/* LOG_FUNC(); */
|
||||
/* } */
|
||||
|
||||
static void
|
||||
handle_check_toggled( GtkWidget* item, AskBadState* state )
|
||||
{
|
||||
|
@ -44,20 +37,6 @@ handle_check_toggled( GtkWidget* item, AskBadState* state )
|
|||
XP_LOGFF( "checked: %s", boolToStr(state->skipNext) );
|
||||
}
|
||||
|
||||
/* static void */
|
||||
/* handle_ok( GtkWidget* XP_UNUSED(item), AskBadState* state ) */
|
||||
/* { */
|
||||
/* state->confirmed = true; */
|
||||
/* gtk_main_quit(); */
|
||||
/* } */
|
||||
|
||||
/* static void */
|
||||
/* handle_cancel( GtkWidget* XP_UNUSED(item), AskBadState* state ) */
|
||||
/* { */
|
||||
/* state->confirmed = false; */
|
||||
/* gtk_main_quit(); */
|
||||
/* } */
|
||||
|
||||
static GtkWidget*
|
||||
buildDialog( AskBadState* state )
|
||||
{
|
||||
|
@ -67,9 +46,6 @@ buildDialog( AskBadState* state )
|
|||
"Cancel", GTK_RESPONSE_REJECT,
|
||||
NULL );
|
||||
|
||||
/* GtkWidget* bc = gtk_dialog_get_action_area( GTK_DIALOG(dialog) ); */
|
||||
/* g_object_set_property( G_OBJECT(bc), "halign", GTK_ALIGN_CENTER ); */
|
||||
|
||||
GtkWidget* vbox = gtk_dialog_get_content_area( GTK_DIALOG(dialog) );
|
||||
|
||||
gchar* words = g_strjoinv( "\n", state->words );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*- compile-command: "make MEMDEBUG=TRUE -j5"; -*- */
|
||||
/*
|
||||
* Copyright 2001-2024 by Eric House (xwords@eehouse.org). All rights
|
||||
* Copyright 2024 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
|
Loading…
Add table
Reference in a new issue