Update of /cvsroot/morphix/langconf/src
In directory sc8-pr-cvs1:/tmp/cvs-serv17206/src
Modified Files:
liblang.c liblang.h main.c
Log Message:
more install-fixes
Index: liblang.c
===================================================================
RCS file: /cvsroot/morphix/langconf/src/liblang.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** liblang.c 28 Oct 2003 01:46:06 -0000 1.2
--- liblang.c 7 Nov 2003 00:41:46 -0000 1.3
***************
*** 121,128 ****
gint i, j, ret;
! if (!g_file_get_contents(LIST_LOCALES,&locs,&locs_len,NULL)) {
! if (!g_file_get_contents(LIST_LOCALES_2,&locs,&locs_len,NULL)) {
! return FALSE;
! }
}
--- 121,131 ----
gint i, j, ret;
! if (list_locales == NULL) {
! debug("Locales path not yet set up, returning false from r_l_l\n");
! return FALSE;
! }
!
! if (!g_file_get_contents(list_locales,&locs,&locs_len,NULL)) {
! return FALSE;
}
Index: liblang.h
===================================================================
RCS file: /cvsroot/morphix/langconf/src/liblang.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** liblang.h 26 Oct 2003 23:02:46 -0000 1.1.1.1
--- liblang.h 7 Nov 2003 00:41:46 -0000 1.2
***************
*** 3,8 ****
#include <gtk/gtk.h>
- #define LIST_LOCALES "../locale-list"
- #define LIST_LOCALES_2 "/usr/share/libconf/locale-list"
#define LOCALE_GEN "/etc/locale.gen"
#define ETC_ENVIRONMENT "/etc/environment"
--- 3,6 ----
***************
*** 25,28 ****
--- 23,27 ----
gint locales_count;
+ gchar *list_locales;
gchar current_code[64];
loc_struct *find_language_entry(gchar *desc);
Index: main.c
===================================================================
RCS file: /cvsroot/morphix/langconf/src/main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** main.c 3 Nov 2003 00:26:45 -0000 1.3
--- main.c 7 Nov 2003 00:41:46 -0000 1.4
***************
*** 22,25 ****
--- 22,26 ----
extern loc_struct *selected_locale;
extern gboolean realised;
+ extern gchar *list_locales;
enum {
***************
*** 51,55 ****
GtkWidget *image = lookup_widget(MainWindow,"image1");
! gchar *image_loc;
gint length = strlen(PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps/globe.png");
image_loc = (gchar *)malloc(length + 1);
--- 52,56 ----
GtkWidget *image = lookup_widget(MainWindow,"image1");
! gchar *image_loc, list_loc;
gint length = strlen(PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps/globe.png");
image_loc = (gchar *)malloc(length + 1);
***************
*** 60,63 ****
--- 61,71 ----
gtk_image_set_from_file(GTK_IMAGE(image),image_loc);
free(image_loc);
+
+ length = strlen(PACKAGE_DATA_DIR "/" PACKAGE "/lists/locale-list");
+ list_locales = (gchar *)malloc(length + 1);
+ strcpy(list_locales,PACKAGE_DATA_DIR "/" PACKAGE "/lists/locale-list");
+ if (list_locales == NULL) {
+ debug("Malloc failed in setup!\n");
+ }
/*
fp = fopen(GLOBE_LOC,"r");
***************
*** 84,87 ****
--- 92,96 ----
void quit_langconf() {
cleanup_locale_list();
+ // free(list_locales);
exit(0);
}
|