Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 303595 Details for
Bug 195416
scim-chewing needs initial input mode configuration
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
finished patch 1/2
scim-chewing-0.3.1-15.bz195416.patch (text/x-patch), 9.29 KB, created by
Caius Chance
on 2008-04-24 06:51:53 UTC
(
hide
)
Description:
finished patch 1/2
Filename:
MIME Type:
Creator:
Caius Chance
Created:
2008-04-24 06:51:53 UTC
Size:
9.29 KB
patch
obsolete
>diff -up scim-chewing-0.3.1/src/scim_chewing_config_entry.h.9-bz195416 scim-chewing-0.3.1/src/scim_chewing_config_entry.h >--- scim-chewing-0.3.1/src/scim_chewing_config_entry.h.9-bz195416 2006-05-31 01:06:34.000000000 +1000 >+++ scim-chewing-0.3.1/src/scim_chewing_config_entry.h 2008-04-24 16:22:50.000000000 +1000 >@@ -39,6 +39,9 @@ > #define SCIM_CONFIG_IMENGINE_CHEWING_CHI_ENG_KEY \ > "/IMEngine/Chewing/ChiEngKey" > >+#define SCIM_CONFIG_IMENGINE_CHEWING_CHI_ENG_MODE \ >+ "/IMEngine/Chewing/ChiEngMode" >+ > #define SCIM_CONFIG_IMENGINE_CHEWING_USE_CAPSLOCK \ > "/IMEngine/Chewing/UseCapslock" > >diff -up scim-chewing-0.3.1/src/scim_chewing_imengine.cpp.9-bz195416 scim-chewing-0.3.1/src/scim_chewing_imengine.cpp >--- scim-chewing-0.3.1/src/scim_chewing_imengine.cpp.9-bz195416 2008-04-24 16:22:50.000000000 +1000 >+++ scim-chewing-0.3.1/src/scim_chewing_imengine.cpp 2008-04-24 16:25:55.000000000 +1000 >@@ -35,7 +35,7 @@ > #define bind_textdomain_codeset(domain,codeset) > #endif > >-#define SCIM_PROP_CHIENG \ >+#define SCIM_PROP_CHI_ENG_MODE \ > "/IMEngine/Chinese/Chewing/ChiEngMode" > #define SCIM_PROP_LETTER \ > "/IMEngine/Chinese/Chewing/FullHalfLetter" >@@ -57,7 +57,7 @@ using namespace scim; > static IMEngineFactoryPointer _scim_chewing_factory( 0 ); > static ConfigPointer _scim_config( 0 ); > >-static Property _chieng_property (SCIM_PROP_CHIENG, ""); >+static Property _chieng_property (SCIM_PROP_CHI_ENG_MODE, ""); > static Property _letter_property (SCIM_PROP_LETTER, ""); > static Property _kbtype_property (SCIM_PROP_KBTYPE, ""); > //static Property _punct_property (SCIM_PROP_PUNCT, _("Full/Half Punct")); >@@ -150,12 +150,20 @@ void ChewingIMEngineFactory::reload_conf > String( "Shift+Shift_R+KeyRelease" ) ); > scim_string_to_key_list( m_chi_eng_keys, str ); > >- // Load keyboard type >+ // Load input mode > SCIM_DEBUG_IMENGINE( 2 ) << >+ "Load input mode\n"; >+ m_input_mode = m_config->read ( >+ String( SCIM_CONFIG_IMENGINE_CHEWING_CHI_ENG_MODE ), >+ String( "Chi" )); >+ >+ // Load keyboard type >+ SCIM_DEBUG_IMENGINE( 2 ) << > "Load keyboard type\n"; > m_KeyboardType = m_config->read ( > String( SCIM_CONFIG_IMENGINE_CHEWING_USER_KB_TYPE ), > String( "KB_DEFAULT" )); >+ > > // SCIM_CONFIG_IMENGINE_CHEWING_USER_SELECTION_KEYS > m_selection_keys = m_config->read( >@@ -327,9 +335,9 @@ bool ChewingIMEngineInstance::process_ke > > if ( match_key_event( m_factory->m_chi_eng_keys, key ) ) { > m_prev_key = key; >- trigger_property( SCIM_PROP_CHIENG ); >+ trigger_property( SCIM_PROP_CHI_ENG_MODE ); > SCIM_DEBUG_IMENGINE( 2 ) << >- "Matcg Chi/Eng Key, End Process\n"; >+ "Match Chi/Eng Key, End Process\n"; > return true; > } > m_prev_key = key; >@@ -494,6 +502,14 @@ void ChewingIMEngineInstance::reset() > /* Configure Keyboard Type */ > chewing_set_KBType( ctx, chewing_KBStr2Num( > (char *) m_factory->m_KeyboardType.c_str() )); >+ >+ /* Configure Chinese/English Input Mode */ >+ int chieng_mode_flag; >+ if ( m_factory->m_input_mode == "Chi" ) >+ chieng_mode_flag = 1; >+ else >+ chieng_mode_flag = 0; >+ chewing_set_ChiEngMode( ctx, chieng_mode_flag ); > > /* Configure selection keys definition */ > int i = 0; >@@ -531,9 +547,8 @@ void ChewingIMEngineInstance::focus_out( > > void ChewingIMEngineInstance::trigger_property( const String& property ) > { >- if ( property == SCIM_PROP_CHIENG ) { >- chewing_handle_Capslock( ctx ); >- commit( ctx->output ); >+ if ( property == SCIM_PROP_CHI_ENG_MODE ) { >+ chewing_set_ChiEngMode( ctx, !chewing_get_ChiEngMode( ctx ) ); > } else if ( property == SCIM_PROP_LETTER ) { > chewing_set_ShapeMode( ctx, !chewing_get_ShapeMode( ctx ) ); > } else if ( property == SCIM_PROP_KBTYPE ) { >diff -up scim-chewing-0.3.1/src/scim_chewing_imengine.h.9-bz195416 scim-chewing-0.3.1/src/scim_chewing_imengine.h >--- scim-chewing-0.3.1/src/scim_chewing_imengine.h.9-bz195416 2008-04-24 16:22:50.000000000 +1000 >+++ scim-chewing-0.3.1/src/scim_chewing_imengine.h 2008-04-24 16:22:50.000000000 +1000 >@@ -60,6 +60,7 @@ private: > KeyEventList m_chi_eng_keys; > String m_KeyboardType; > String m_selection_keys; >+ String m_input_mode; > int m_selection_keys_num; > bool m_add_phrase_forward; > bool m_space_as_selection; >diff -up scim-chewing-0.3.1/src/scim_chewing_imengine_setup.cpp.9-bz195416 scim-chewing-0.3.1/src/scim_chewing_imengine_setup.cpp >--- scim-chewing-0.3.1/src/scim_chewing_imengine_setup.cpp.9-bz195416 2008-04-24 16:22:50.000000000 +1000 >+++ scim-chewing-0.3.1/src/scim_chewing_imengine_setup.cpp 2008-04-24 16:22:50.000000000 +1000 >@@ -140,6 +140,7 @@ static String __config_kb_type_data; > static String __config_kb_type_data_translated; > static String __config_selKey_type_data; > static String __config_selKey_num_data; >+static String __config_chieng_mode_data; > static bool __have_changed = false; > > // static GtkWidget * __widget_use_capslock = 0; >@@ -150,8 +151,10 @@ static GtkWidget * __widget_kb_type = > static GList *kb_type_list = 0; > static GtkWidget * __widget_selKey_type = 0; > static GtkWidget * __widget_selKey_num = 0; >+static GtkWidget * __widget_chieng_mode = 0; > static GList *selKey_type_list = 0; > static GList *selKey_num_list = 0; >+static GList *chieng_mode_list = 0; > // static GtkWidget * __widget_show_candidate_comment= 0; > static GtkTooltips * __widget_tooltips = 0; > >@@ -408,12 +411,17 @@ static const char *builtin_selectkeys_nu > "5" > }; > >+static const char *builtin_chieng_mode[] = { >+ "Chi", >+ "Eng" >+}; >+ > static GtkWidget *create_keyboard_page() > { > GtkWidget *table; > GtkWidget *label; > >- table = gtk_table_new (4, 5, FALSE); >+ table = gtk_table_new (5, 5, FALSE); > gtk_widget_show (table); > > unsigned int i; >@@ -512,6 +520,40 @@ static GtkWidget *create_keyboard_page() > G_CALLBACK (on_default_editable_changed), > &(__config_selKey_type_data)); > >+ // Setup chieng_mode combo box >+ __widget_chieng_mode = gtk_combo_new(); >+ gtk_widget_show (__widget_chieng_mode); >+ >+ for (i = 0; >+ i < (sizeof(builtin_chieng_mode) / sizeof(builtin_chieng_mode[0])); >+ i++) { >+ chieng_mode_list = g_list_append( >+ chieng_mode_list, >+ (void *) builtin_chieng_mode[ i ] ); >+ } >+ >+ gtk_combo_set_popdown_strings (GTK_COMBO (__widget_chieng_mode), chieng_mode_list); >+ g_list_free(chieng_mode_list); >+ gtk_combo_set_use_arrows (GTK_COMBO (__widget_chieng_mode), TRUE); >+ gtk_editable_set_editable (GTK_EDITABLE (GTK_ENTRY (GTK_COMBO (__widget_chieng_mode)->entry)), FALSE); >+ label = gtk_label_new (_("Initial trigger Chinese/English mode:")); >+ gtk_widget_show (label); >+ gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); >+ gtk_misc_set_padding (GTK_MISC (label), 4, 0); >+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, i, i+1, >+ (GtkAttachOptions) (GTK_FILL), >+ (GtkAttachOptions) (GTK_FILL), 4, 4); >+ gtk_table_attach (GTK_TABLE (table), __widget_chieng_mode, 1, 2, i, i+1, >+ (GtkAttachOptions) (GTK_FILL|GTK_EXPAND), >+ (GtkAttachOptions) (GTK_FILL), 4, 4); >+ gtk_tooltips_set_tip (__widget_tooltips, GTK_COMBO (__widget_chieng_mode)->entry, >+ _("Change the default Chinese/English mode on every trigger"), NULL); >+ g_signal_connect( >+ (gpointer) GTK_ENTRY(GTK_COMBO(__widget_chieng_mode)->entry), >+ "changed", >+ G_CALLBACK (on_default_editable_changed), >+ &(__config_chieng_mode_data)); >+ > // Setup selKey_num combo box > __widget_selKey_num = gtk_combo_new(); > gtk_widget_show (__widget_selKey_num); >@@ -725,6 +767,23 @@ void setup_widget_value() > GTK_ENTRY(GTK_COMBO(__widget_selKey_num)->entry), > builtin_selectkeys_num[index_selectkeys_num] > ); >+ >+ /* chieng_mode */ >+ int index_chieng_mode = >+ sizeof(builtin_chieng_mode) / sizeof(builtin_chieng_mode[0]) - 1; >+ for ( ; index_chieng_mode >= 0; index_chieng_mode--) { >+ if ( __config_chieng_mode_data == >+ builtin_chieng_mode[index_chieng_mode]) { >+ break; >+ } >+ } >+ if (index_chieng_mode < 0) >+ index_chieng_mode = 0; >+ >+ gtk_entry_set_text ( >+ GTK_ENTRY(GTK_COMBO(__widget_chieng_mode)->entry), >+ builtin_chieng_mode[index_chieng_mode] >+ ); > } > > void load_config( const ConfigPointer &config ) >@@ -754,6 +813,10 @@ void load_config( const ConfigPointer &c > config->read( String( SCIM_CHEWING_SELECTION_KEYS_NUM ), > __config_selKey_num_data); > >+ __config_chieng_mode_data = >+ config->read( String( SCIM_CONFIG_IMENGINE_CHEWING_CHI_ENG_MODE ), >+ __config_chieng_mode_data); >+ > for (int i = 0; __config_keyboards[ i ].key; ++ i) { > __config_keyboards[ i ].data = > config->read( String( __config_keyboards [ i ].key ), >@@ -834,8 +897,21 @@ void save_config( const ConfigPointer &c > config->write (String (SCIM_CHEWING_SELECTION_KEYS_NUM), > __config_selKey_num_data); > >-// config->write (String (SCIM_CONFIG_IMENGINE_CHEWING_SHOW_CANDIDATE_COMMENT), >-// __config_show_candidate_comment); >+ // SCIM_CONFIG_IMENGINE_CHEWING_CHI_ENG_MODE >+ int index_chieng_mode = >+ sizeof(builtin_chieng_mode) / sizeof(builtin_chieng_mode[0]) - 1; >+ for ( ; index_chieng_mode >= 0; index_chieng_mode--) { >+ if (__config_chieng_mode_data == >+ builtin_chieng_mode[index_chieng_mode]) { >+ break; >+ } >+ } >+ if (index_chieng_mode < 0) >+ index_chieng_mode = 0; >+ __config_chieng_mode_data = >+ builtin_chieng_mode[index_chieng_mode]; >+ >+ config->write (String (SCIM_CONFIG_IMENGINE_CHEWING_CHI_ENG_MODE) , __config_chieng_mode_data); > > for (int i = 0; __config_keyboards [i].key; ++ i) { > config->write (String (__config_keyboards [i].key),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 195416
:
135941
|
303562
|
303563
| 303595 |
303596