[PATCH] tiny portability fixes to src/gui-file.c



Appended is a tiny fix to use gtk2.0 features to make gui-file.c more
portable.  This is just straining gnats, but better now than never...
 --scott

Diplomat Waihopai operation Mk 48 Semtex direct action Philadelphia 
DC kibo Bejing spy Blair affinity group atomic cryptographic C4 SLBM 
              ( http://lesser-magoo.lcs.mit.edu/~cananian )

Index: src/gui-file.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/gui-file.c,v
retrieving revision 1.28
diff -u -p -r1.28 gui-file.c
--- src/gui-file.c      2002/02/15 05:50:57     1.28
+++ src/gui-file.c      2002/02/23 07:41:28
@@ -315,11 +315,11 @@ gui_file_open (WorkbookControlGUI *wbcg)
        /* Select current directory if we have one */
        wb = wb_control_workbook (wbc);
        wb_file_name = wb != NULL ? workbook_get_filename (wb) : NULL;
-       if (wb_file_name != NULL && strchr (wb_file_name, '/') != NULL) {
+       if (wb_file_name != NULL && strchr (wb_file_name, G_DIR_SEPARATOR) != NULL) {
                gchar *tmp, *dir_name;
 
                tmp = g_dirname (wb_file_name);
-               dir_name = g_strconcat (tmp, "/", NULL);
+               dir_name = g_strconcat (tmp, G_DIR_SEPARATOR_S, NULL);
                gtk_file_selection_set_filename (fsel, dir_name);
                g_free (dir_name);
                g_free (tmp);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]