mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
cleanup
This commit is contained in:
parent
d01a71736d
commit
55cb36d091
7 changed files with 18 additions and 61 deletions
|
@ -635,41 +635,6 @@ public class DictBrowseDelegate extends DelegateBase
|
|||
return result;
|
||||
}
|
||||
|
||||
private void setMinMax( int min, int max )
|
||||
{
|
||||
// I can't make a second call to setListAdapter() work, nor does
|
||||
// notifyDataSetChanged do anything toward refreshing the
|
||||
// adapter/making it recognize a changed dataset. So, as a
|
||||
// workaround, relaunch the activity with different parameters.
|
||||
// if ( m_browseState.m_minShown != min ||
|
||||
// m_browseState.m_maxShown != max ) {
|
||||
|
||||
// m_browseState.m_pos = 0;
|
||||
// m_browseState.m_top = 0;
|
||||
// m_browseState.m_minShown = min;
|
||||
// m_browseState.m_maxShown = max;
|
||||
// m_browseState.m_pats = getFindText();
|
||||
// DBUtils.dictsSetOffset( m_activity, m_name, m_loc, m_browseState );
|
||||
|
||||
// setUpSpinners();
|
||||
|
||||
// initList();
|
||||
// }
|
||||
}
|
||||
|
||||
private void figureMinMax( int[] counts )
|
||||
{
|
||||
Assert.assertTrue( counts.length == XwJNI.MAX_COLS_DICT + 1 );
|
||||
m_minAvail = 0;
|
||||
while ( 0 == counts[m_minAvail] ) {
|
||||
++m_minAvail;
|
||||
}
|
||||
m_maxAvail = XwJNI.MAX_COLS_DICT;
|
||||
while ( 0 == counts[m_maxAvail] ) { //
|
||||
--m_maxAvail;
|
||||
}
|
||||
}
|
||||
|
||||
private String[] m_nums;
|
||||
private void makeSpinnerAdapter( Spinner spinner, int curVal )
|
||||
{
|
||||
|
|
|
@ -43,16 +43,9 @@ public class PatTableRow extends TableRow {
|
|||
{
|
||||
getFields();
|
||||
|
||||
// PatDesc result = null;
|
||||
String strPat = mEdit.getText().toString();
|
||||
out.strPat = strPat;
|
||||
out.anyOrderOk = mCheck.isChecked();
|
||||
// if ( null != strPat && 0 < strPat.length() ) {
|
||||
// result = new PatDesc();
|
||||
// result.strPat = strPat;
|
||||
// result.anyOrderOk = mCheck.isChecked();
|
||||
// }
|
||||
// return result;
|
||||
}
|
||||
|
||||
public void setFromDesc( PatDesc desc )
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:id="@+id/dicts_showtiles"
|
||||
android:title="@string/show_tiles_menu"
|
||||
/>
|
||||
<item android:id="@+id/dicts_shownote"
|
||||
android:title="@string/show_note_menu"
|
||||
/>
|
||||
<item android:id="@+id/dicts_showfaq"
|
||||
android:title="@string/button_faq"
|
||||
/>
|
||||
<item android:id="@+id/dicts_shownote"
|
||||
android:title="@string/show_note_menu"
|
||||
/>
|
||||
<item android:id="@+id/dicts_showtiles"
|
||||
android:title="@string/show_tiles_menu"
|
||||
/>
|
||||
<item android:id="@+id/dicts_showfaq"
|
||||
android:title="@string/button_faq"
|
||||
/>
|
||||
</menu>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*- compile-command: "cd ../linux && make MEMDEBUG=TRUE -j3"; -*- */
|
||||
/*
|
||||
* Copyright 1997 - 2011 by Eric House (xwords@eehouse.org). All rights
|
||||
* Copyright 1997 - 2020 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -57,19 +57,17 @@ typedef struct DictIter DictIter;
|
|||
* tile sets (e.g. [A.B.C]); also [^A.B.C] means NOT these, and [+A.B.C] means
|
||||
* use at most once [+A.B.C]{3} would mean "use all of them once each"
|
||||
*
|
||||
* '?' (meaning anything, same as '.' in most regex languages),
|
||||
* '_' (meaning blank/anything, same as '.' in most regex languages),
|
||||
*
|
||||
* '*' meaning 0 or more of what's before
|
||||
*
|
||||
* '+' meaning 1 or more of what's before
|
||||
*
|
||||
* '{m[,n]}' meaning between m and n of what's before, so ?{2,15} matches
|
||||
* '{m[,n]}' meaning between m and n of what's before, so _{2,15} matches
|
||||
* everything
|
||||
*
|
||||
* '()' also required to express word length: (AB_*CD){2,15} is "an word
|
||||
* beginning with AB and ending with CD from 2 to 15 letters long.
|
||||
*
|
||||
* '^' and '$' matching beginning and end of word (not required, so not yet)
|
||||
* '()' (not implemented) also required to express word length: (AB_*CD){2,15}
|
||||
* is "an word beginning with AB and ending with CD from 2 to 15 letters long.
|
||||
*/
|
||||
|
||||
/* di_makeIter: It's either-or: provide the pattern as a reg-ex string, or as
|
||||
|
|
|
@ -101,7 +101,7 @@ dmgr_get( DictMgrCtxt* dmgr, XWEnv xwe, const XP_UCHAR* key )
|
|||
}
|
||||
|
||||
void
|
||||
dmgr_put( DictMgrCtxt* dmgr, XWEnv xwe, const XP_UCHAR* key, DictionaryCtxt* dict )
|
||||
dmgr_put( DictMgrCtxt* dmgr, XWEnv xwe, const XP_UCHAR* key, const DictionaryCtxt* dict )
|
||||
{
|
||||
pthread_mutex_lock( &dmgr->mutex );
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ typedef struct DictMgrCtxt DictMgrCtxt;
|
|||
DictMgrCtxt* dmgr_make( MPFORMAL_NOCOMMA );
|
||||
void dmgr_destroy( DictMgrCtxt* dmgr, XWEnv xwe );
|
||||
|
||||
void dmgr_put( DictMgrCtxt* dmgr, XWEnv xwe, const XP_UCHAR* key, DictionaryCtxt* dict );
|
||||
void dmgr_put( DictMgrCtxt* dmgr, XWEnv xwe, const XP_UCHAR* key, const DictionaryCtxt* dict );
|
||||
const DictionaryCtxt* dmgr_get( DictMgrCtxt* dmgr, XWEnv xwe, const XP_UCHAR* key );
|
||||
|
||||
#ifdef CPLUS
|
||||
|
|
|
@ -80,6 +80,8 @@ p_dict_unref( const DictionaryCtxt* dict, XWEnv xwe
|
|||
#endif
|
||||
pthread_mutex_unlock( &_dict->mutex );
|
||||
if ( 0 == _dict->refCount ) {
|
||||
/* There's a race here. If another thread locks the mutex we'll
|
||||
still destroy the dict (and the locked mutex!!!) PENDING */
|
||||
pthread_mutex_destroy( &_dict->mutex );
|
||||
(*dict->destructor)( _dict, xwe );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue