Update installation script for metadata spelling
[geeqie.git] / src / ui_tabcomp.c
index c3fff00..8b5616d 100644 (file)
 #endif
 
 
-/* ----------------------------------------------------------------
-   Tab completion routines, can be connected to any gtkentry widget
-   using the tab_completion_add_to_entry() function.
-   Use remove_trailing_slash() to strip the trailing G_DIR_SEPARATOR.
-   ----------------------------------------------------------------*/
+/**
+ * @file
+ * ----------------------------------------------------------------
+ * Tab completion routines, can be connected to any gtkentry widget
+ * using the tab_completion_add_to_entry() function.
+ * 
+ * Use remove_trailing_slash() to strip the trailing G_DIR_SEPARATOR.
+ * 
+ * ----------------------------------------------------------------
+ */
 
 typedef struct _TabCompData TabCompData;
 struct _TabCompData
@@ -136,7 +141,8 @@ static void tab_completion_read_dir(TabCompData *td, const gchar *path)
        while ((dir = readdir(dp)) != NULL)
                {
                gchar *name = dir->d_name;
-               if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0)
+               if (strcmp(name, ".") != 0 && strcmp(name, "..") != 0 &&
+                                               (name[0] != '.' || options->file_filter.show_hidden_files))
                        {
                        gchar *abspath = g_build_filename(pathl, name, NULL);
 
@@ -428,7 +434,7 @@ static gboolean tab_completion_do(TabCompData *td)
 
        if (entry_text[0] == '\0')
                {
-               entry_dir = g_strdup(G_DIR_SEPARATOR_S); /* FIXME: root directory win32 */
+               entry_dir = g_strdup(G_DIR_SEPARATOR_S); /** @FIXME root directory win32 */
                gtk_entry_set_text(GTK_ENTRY(td->entry), entry_dir);
                gtk_editable_set_position(GTK_EDITABLE(td->entry), strlen(entry_dir));
                g_free(entry_dir);
@@ -519,7 +525,7 @@ static gboolean tab_completion_do(TabCompData *td)
        if (strlen(entry_dir) == 0)
                {
                g_free(entry_dir);
-               entry_dir = g_strdup(G_DIR_SEPARATOR_S); /* FIXME: win32 */
+               entry_dir = g_strdup(G_DIR_SEPARATOR_S); /** @FIXME win32 */
                }
 
        if (isdir(entry_dir))