Commit 3860e1c4 authored by Simon Morlat's avatar Simon Morlat
Browse files

attempt workaround for GtkEntry bug under windows and chinese language.

parent 9f02a12f
......@@ -77,6 +77,7 @@ static gboolean iconified=FALSE;
static gchar *workingdir=NULL;
static char *progpath=NULL;
gchar *linphone_logfile=NULL;
static gboolean workaround_gtk_entry_chinese_bug=FALSE;
static GOptionEntry linphone_options[]={
......@@ -347,6 +348,11 @@ GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_n
return w;
static void entry_unmapped(GtkWidget *entry){
g_message("Entry is unmapped, calling unrealize to workaround chinese bug.");
GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
GtkBuilder *builder=(GtkBuilder*)g_object_get_data(G_OBJECT(window),"builder");
GObject *w;
......@@ -358,6 +364,15 @@ GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
if (w==NULL){
g_error("No widget named %s found in xml interface.",name);
if (workaround_gtk_entry_chinese_bug){
if (strcmp(G_OBJECT_TYPE_NAME(w),"GtkEntry")==0){
if (g_object_get_data(G_OBJECT(w),"entry_bug_workaround")==NULL){
g_message("%s is a GtkEntry",name);
return GTK_WIDGET(w);
......@@ -1765,6 +1780,9 @@ int main(int argc, char *argv[]){
char tmp[128];
if (strncmp(lang,"zh",2)==0){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment