Update of /cvsroot/morphix/langconf/src
In directory sc8-pr-cvs1:/tmp/cvs-serv7389/src
Modified Files:
liblang.c main.c
Log Message:
added euro's to locale-list, fixed annoying select-shadowed bug
Index: liblang.c
===================================================================
RCS file: /cvsroot/morphix/langconf/src/liblang.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** liblang.c 26 Oct 2003 23:02:46 -0000 1.1.1.1
--- liblang.c 28 Oct 2003 01:46:06 -0000 1.2
***************
*** 38,42 ****
return TRUE;
}
! strcpy(current_code,"en_US.UTF-8");
fclose(fp);
return TRUE;
--- 38,42 ----
return TRUE;
}
! strcpy(current_code,"C");
fclose(fp);
return TRUE;
***************
*** 53,57 ****
return FALSE;
}
! fprintf(fp,"LANG=%s",ls->code);
fclose(fp);
return TRUE;
--- 53,57 ----
return FALSE;
}
! fprintf(fp,"LANG=%s\n",ls->code);
fclose(fp);
return TRUE;
***************
*** 71,79 ****
return FALSE;
}
! if (strcmp(ls->type,"utf8") == 0) {
! fprintf(fp,"%s %s",ls->code,"UTF-8");
! }
! else {
! fprintf(fp,"%s %s",ls->code,ls->type); // probably won't work for redhat types, maybe it's time for a combined redhat/debian locales list :)
}
fclose(fp);
--- 71,81 ----
return FALSE;
}
! if (strcmp(ls->code,"C") != 0) {
! if (strcmp(ls->type,"utf8") == 0) {
! fprintf(fp,"%s %s\n",ls->code,"UTF-8");
! }
! else {
! fprintf(fp,"%s %s\n",ls->code,ls->type); // probably won't work for redhat types, maybe it's time for a combined redhat/debian locales list :)
! }
}
fclose(fp);
***************
*** 104,108 ****
free(locales[i].type);
free(locales[i].description);
- free(&locales[i]);
}
free(locales);
--- 106,109 ----
***************
*** 132,136 ****
}
i = 0;
! locales_count = 0;
while (locale_array[i] != NULL) {
if (locale_array[i][0] != '#' && locale_array[i][0] != '\0')
--- 133,137 ----
}
i = 0;
! locales_count = 1; // adding C by default
while (locale_array[i] != NULL) {
if (locale_array[i][0] != '#' && locale_array[i][0] != '\0')
***************
*** 140,144 ****
j = 0;
locales = (struct locale_struct*) malloc(sizeof(loc_struct) * locales_count);
! debug("size of struct: %d\n",sizeof(loc_struct));
for (i = 0; locale_array[i] != NULL; i++) {
gchar code[32];
--- 141,149 ----
j = 0;
locales = (struct locale_struct*) malloc(sizeof(loc_struct) * locales_count);
! locales[0].code = g_strdup("C");
! locales[0].type = g_strdup("UTF-8");
! locales[0].description = g_strdup("English (C/Default)");
! j++;
!
for (i = 0; locale_array[i] != NULL; i++) {
gchar code[32];
Index: main.c
===================================================================
RCS file: /cvsroot/morphix/langconf/src/main.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** main.c 26 Oct 2003 23:02:46 -0000 1.1.1.1
--- main.c 28 Oct 2003 01:46:06 -0000 1.2
***************
*** 17,21 ****
GtkWidget *MainWindow;
! GtkTreeSelection *select;
extern gboolean lang_changed;
--- 17,21 ----
GtkWidget *MainWindow;
! GtkTreeSelection *selector;
extern gboolean lang_changed;
***************
*** 149,155 ****
GtkWidget *treeview = lookup_widget(MainWindow,"treeview1");
! select = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
! gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE);
! g_signal_connect(G_OBJECT(select),"changed",
G_CALLBACK(tree_selection_changed_cb),
NULL);
--- 149,155 ----
GtkWidget *treeview = lookup_widget(MainWindow,"treeview1");
! selector = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
! gtk_tree_selection_set_mode(selector, GTK_SELECTION_SINGLE);
! g_signal_connect(G_OBJECT(selector),"changed",
G_CALLBACK(tree_selection_changed_cb),
NULL);
|