Commit 07e074ac authored by Naba Kumar's avatar Naba Kumar

Added mime types.

	* plugins/editor/anjuta-document-manager.plugin.in: Added mime types.

	* plugins/file-manager/an_file_view.c,
	plugins/file-manager/plugin.c: Added file manager preferences to
	show/hide files ignored by version control (e.g. cvsignore).

	* plugins/editor/text_editor.c: Initialize vfs info struct.

	* .cvsignore, global-tags/.cvsignore, libanjuta/.cvsignore,
	libanjuta/interfaces/.cvsignore, libegg/.cvsignore,
	libegg/menu/.cvsignore, libegg/recent-files/.cvsignore,
	libegg/treeviewutils/.cvsignore, libegg/util/.cvsignore,
	omf-install/.cvsignore, pixmaps/.cvsignore,
	plugins/file-manager/anjuta-file-manager-plugin.glade,
	scintilla/.cvsignore, scintilla/include/.cvsignore,
	scripts/.cvsignore, src/.cvsignore, tagmanager/.cvsignore,
	tagmanager/python.c: Updated.
parent 7187ab3f
.tm_project.cache
.anjuta
.tm_project*
aclocal.m4
anjuta.desktop
anjuta.desktop.in
anjuta.pws
anjuta.spec
*.desktop
*.desktop.in
*.pws
*.spec
autom4te.cache
config.h
config.h.in
config.log
config.status
configure
intltool-extract
intltool-merge
intltool-modules
intltool-update
intltool-extract*
intltool-merge*
intltool-modules*
intltool-update*
libtool
prepare.sh
stamp-h
stamp-h.in
stamp-h*
ltmain.sh
mkinstalldirs
config.guess
config.sub
Makefile
Makefile.in
*.bak
*~
#*#
*.gladep
2005-07-15 Naba Kumar <naba@gnome.org>
2005-07-16 Naba Kumar <naba@gnome.org>
* plugins/editor/anjuta-document-manager.plugin.in: Added mime types.
* plugins/file-manager/an_file_view.c,
plugins/file-manager/plugin.c: Added file manager preferences to
show/hide files ignored by version control (e.g. cvsignore).
* plugins/editor/text_editor.c: Initialize vfs info struct.
* .cvsignore, global-tags/.cvsignore, libanjuta/.cvsignore,
libanjuta/interfaces/.cvsignore, libegg/.cvsignore,
libegg/menu/.cvsignore, libegg/recent-files/.cvsignore,
libegg/treeviewutils/.cvsignore, libegg/util/.cvsignore,
omf-install/.cvsignore, pixmaps/.cvsignore,
plugins/file-manager/anjuta-file-manager-plugin.glade,
scintilla/.cvsignore, scintilla/include/.cvsignore,
scripts/.cvsignore, src/.cvsignore, tagmanager/.cvsignore,
tagmanager/python.c: Updated.
2005-07-16 Naba Kumar <naba@gnome.org>
* tagmanager/parse.c, tagmanager/parse.h, tagmanager/python.c:
Fixed python parser to parser class methods.
......
Makefile.in
Makefile
tm_global_tags
anjuta-tags
system.tags
*.lo
*.o
*.bak
......@@ -3,3 +3,8 @@ Makefile.in
*.pc
anjuta-marshal.c
anjuta-marshal.h
*.lo
*.o
*~
*.la
*.bak
......@@ -6,3 +6,8 @@ Makefile.am
*.list
hierarchy.txt
iface-built.stamp
*.lo
*.o
*~
*.la
*.bak
......@@ -2,6 +2,7 @@
.deps
*.lo
*.la
*.o
Makefile
Makefile.in
eggmarshalers.c
......@@ -17,3 +18,5 @@ test-tree-utils
test-union
libeggdocktypebuiltins.c
test-dock
*.bak
*~
......@@ -7,4 +7,5 @@ Makefile.in
test-actions
accels
test-merge
*.bak
*~
......@@ -2,6 +2,8 @@
.deps
*.lo
*.la
*.bak
*~
Makefile
Makefile.in
test-multi-drag
......
......@@ -2,6 +2,8 @@
.deps
*.lo
*.la
*.bak
*~
Makefile
Makefile.in
test-multi-drag
......
......@@ -6,3 +6,5 @@ Makefile.in
*.lo
eggmarshalers.c
eggmarshalers.h
*.bak
*~
......@@ -2,3 +2,5 @@ Makefile
Makefile.in
*.omf
.nautilus-metafile.xml
*.bak
*~
Makefile
Makefile.in
*~
*.bak
.*swp
.xvpics
.thumbnails
......
......@@ -8,4 +8,4 @@ Interfaces=IAnjutaDocumentManager,IAnjutaFile
UserActivatable=no
[File Loader]
SupportedMimeTypes=text/*,text/source,application/x-perl,application/x-python,application/x-shellscript
SupportedMimeTypes=text/*,text/source,application/x-perl,application/x-python,application/x-shellscript,application/x-php,application/x-java,application/x-javascript
......@@ -8,4 +8,4 @@ Interfaces=IAnjutaDocumentManager,IAnjutaFile
UserActivatable=no
[File Loader]
SupportedMimeTypes=text/*,text/source,application/x-perl,application/x-python,application/x-shellscript
SupportedMimeTypes=text/*,text/source,application/x-perl,application/x-python,application/x-shellscript,application/x-php,application/x-java,application/x-javascript
......@@ -377,9 +377,10 @@ text_editor_new (AnjutaPreferences *eo, const gchar *uri, const gchar *name)
te->filename = g_strdup_printf ("Newfile#%d", ++new_file_count);
if (uri)
{
GnomeVFSFileInfo info;
GnomeVFSResult result;
GnomeVFSURI* vfs_uri;
GnomeVFSFileInfo info = {0,0};
new_file_count--;
if (te->filename)
g_free (te->filename);
......
......@@ -61,6 +61,7 @@ typedef struct _FileFilter
GList *dir_unmatch;
gboolean ignore_hidden_files;
gboolean ignore_hidden_dirs;
gboolean ignore_nonrepo_files;
} FileFilter;
static GdlIcons *icon_set = NULL;
......@@ -93,6 +94,7 @@ anjuta_fv_open_file (FileManagerPlugin * fv, const char *path)
#define DIR_FILTER_UNMATCH "filter.dir.unmatch"
#define DIR_FILTER_UNMATCH_COMBO "filter.dir.unmatch.combo"
#define DIR_FILTER_IGNORE_HIDDEN "filter.dir.ignore.hidden"
#define FILE_FILTER_IGNORE_NONREPO "filter.file.ignore.nonrepo"
#define GET_PREF(var, P) \
if (ff->var) \
......@@ -119,6 +121,7 @@ fv_prefs_new (FileManagerPlugin *fv)
GET_PREF(dir_match, DIR_FILTER_MATCH);
GET_PREF(dir_unmatch, DIR_FILTER_UNMATCH);
GET_PREF_BOOL(ignore_hidden_dirs, DIR_FILTER_IGNORE_HIDDEN);
GET_PREF_BOOL(ignore_nonrepo_files, FILE_FILTER_IGNORE_NONREPO);
return ff;
}
......@@ -271,7 +274,6 @@ fv_connect (FileManagerPlugin *fv)
NULL);
}
#if 0
static gboolean
file_entry_apply_filter (const char *name, GList *match, GList *unmatch,
gboolean ignore_hidden)
......@@ -281,9 +283,6 @@ file_entry_apply_filter (const char *name, GList *match, GList *unmatch,
g_return_val_if_fail(name, FALSE);
if (ignore_hidden && ('.' == name[0]))
return FALSE;
/* TTimo - ignore .svn directories */
if (!strcmp(name, ".svn"))
return FALSE;
for (tmp = match; tmp; tmp = g_list_next(tmp))
{
if (0 == fnmatch((char *) tmp->data, name, 0))
......@@ -303,7 +302,6 @@ file_entry_apply_filter (const char *name, GList *match, GList *unmatch,
}
return matched;
}
#endif
static void
fv_add_tree_entry (FileManagerPlugin *fv, const gchar *path, GtkTreeIter *root)
......@@ -317,6 +315,7 @@ fv_add_tree_entry (FileManagerPlugin *fv, const gchar *path, GtkTreeIter *root)
GdkPixbuf *pixbuf;
GSList *file_node;
GSList *files = NULL;
GList *ignore_files = NULL;
gchar *entries = NULL;
g_return_if_fail (path != NULL);
......@@ -347,6 +346,43 @@ fv_add_tree_entry (FileManagerPlugin *fv, const gchar *path, GtkTreeIter *root)
}
}
}
g_snprintf(file_name, PATH_MAX, "%s/.cvsignore", path);
if (ff->ignore_nonrepo_files && 0 == stat(file_name, &s))
{
if (S_ISREG(s.st_mode))
{
int fd;
if ((fd = open(file_name, O_RDONLY)) >= 0)
{
off_t n = 0;
off_t total_read = 0;
gchar **strv = NULL;
gchar **ptrv = NULL;
gchar *content = g_new (char, s.st_size + 2);
while (0 < (n = read(fd, content + total_read,
s.st_size - total_read)))
total_read += n;
content[s.st_size] = '\0';
close(fd);
strv = g_strsplit (content, "\n", -1);
ptrv = strv;
while (strv && *ptrv)
{
ignore_files = g_list_prepend (ignore_files,
g_strdup (*ptrv));
DEBUG_PRINT ("Ignoring: %s", *ptrv);
ptrv++;
}
g_strfreev (strv);
g_free (content);
}
}
}
if (NULL != (dir = opendir(path)))
{
while (NULL != (dir_entry = readdir(dir)))
......@@ -359,6 +395,10 @@ fv_add_tree_entry (FileManagerPlugin *fv, const gchar *path, GtkTreeIter *root)
(0 == strcmp(file, ".")) ||
(0 == strcmp(file, "..")))
continue;
if (ignore_files &&
!file_entry_apply_filter (file, NULL, ignore_files,
FALSE))
continue;
g_snprintf(file_name, PATH_MAX, "%s/%s", path, file);
......@@ -438,6 +478,11 @@ fv_add_tree_entry (FileManagerPlugin *fv, const gchar *path, GtkTreeIter *root)
}
if (entries)
g_free (entries);
if (ignore_files)
{
g_list_foreach (ignore_files, (GFunc)g_free, NULL);
g_list_free (ignore_files);
}
}
static void
......
......@@ -179,7 +179,7 @@
<widget class="GtkTable" id="table1">
<property name="border_width">10</property>
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">5</property>
......@@ -484,6 +484,28 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="preferences_toggle:bool:1:0:filter.file.ignore.nonrepo">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Do not show files ignore by version control</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
</child>
......
......@@ -93,6 +93,7 @@ prefs_init (FileManagerPlugin *fv)
REGISTER_NOTIFY ("filter.file.ignore.hidden", on_gconf_notify_prefs);
REGISTER_NOTIFY ("filter.file.match", on_gconf_notify_prefs);
REGISTER_NOTIFY ("filter.file.unmatch", on_gconf_notify_prefs);
REGISTER_NOTIFY ("filter.file.ignore.nonrepo", on_gconf_notify_prefs);
}
static void
......
Makefile
Makefile.in
*.o
*.lo
*.la
*~
*.a
*.bak
.*swp
.deps
.libs
.sources
.nautilus-metafile.xml
*.a
test-scintilla
Makefile
Makefile.in
*.o
*.la
*.lo
*~
.*swp
.deps
.libs
.sources
.nautilus-metafile.xml
*.bak
Makefile.in
Makefile
anjuta_import.sh
*.bak
*~
Makefile
Makefile.in
*.o
*.lo
*.la
*~
*.bak
*.gladep
.*swp
.gdbinit
.deps
......
Makefile.in
Makefile
*.o
*.lo
*.la
*~
*.bak
......@@ -109,6 +109,7 @@ static void findPythonTags (void)
}
}
vStringDelete (name);
vStringDelete (lastClass);
}
extern parserDefinition* PythonParser (void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment