Mercurial > geeqie.yaz
comparison src/ui_tabcomp.c @ 726:a1dcef8cd1ae
Use G_DIR_SEPARATOR where applicable.
| author | zas_ |
|---|---|
| date | Wed, 21 May 2008 11:07:23 +0000 |
| parents | 9a145206ec2c |
| children | e6ebae313d46 |
comparison
equal
deleted
inserted
replaced
| 725:eda074e91ddd | 726:a1dcef8cd1ae |
|---|---|
| 49 | 49 |
| 50 | 50 |
| 51 /* ---------------------------------------------------------------- | 51 /* ---------------------------------------------------------------- |
| 52 Tab completion routines, can be connected to any gtkentry widget | 52 Tab completion routines, can be connected to any gtkentry widget |
| 53 using the tab_completion_add_to_entry() function. | 53 using the tab_completion_add_to_entry() function. |
| 54 Use remove_trailing_slash() to strip the trailing '/'. | 54 Use remove_trailing_slash() to strip the trailing G_DIR_SEPARATOR. |
| 55 ----------------------------------------------------------------*/ | 55 ----------------------------------------------------------------*/ |
| 56 | 56 |
| 57 typedef struct _TabCompData TabCompData; | 57 typedef struct _TabCompData TabCompData; |
| 58 struct _TabCompData | 58 struct _TabCompData |
| 59 { | 59 { |
| 819 gint l; | 819 gint l; |
| 820 | 820 |
| 821 if (!path) return NULL; | 821 if (!path) return NULL; |
| 822 | 822 |
| 823 l = strlen(path); | 823 l = strlen(path); |
| 824 while (l > 1 && path[l - 1] == '/') l--; | 824 while (l > 1 && path[l - 1] == G_DIR_SEPARATOR) l--; |
| 825 | 825 |
| 826 return g_strndup(path, l); | 826 return g_strndup(path, l); |
| 827 } | 827 } |
| 828 | 828 |
| 829 static void tab_completion_select_cancel_cb(FileDialog *fd, gpointer data) | 829 static void tab_completion_select_cancel_cb(FileDialog *fd, gpointer data) |
