gthumb r2474 - in trunk: . src
- From: mjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gthumb r2474 - in trunk: . src
- Date: Wed, 24 Dec 2008 11:46:21 +0000 (UTC)
Author: mjc
Date: Wed Dec 24 11:46:21 2008
New Revision: 2474
URL: http://svn.gnome.org/viewvc/gthumb?rev=2474&view=rev
Log:
2008-12-24 Michael J. Chudobiak <mjc svn gnome org>
* src/dlg-web-exporter.c: (theme_present):
Simplify theme_present and use gfile-based functions.
Modified:
trunk/ChangeLog
trunk/src/dlg-web-exporter.c
Modified: trunk/src/dlg-web-exporter.c
==============================================================================
--- trunk/src/dlg-web-exporter.c (original)
+++ trunk/src/dlg-web-exporter.c Wed Dec 24 11:46:21 2008
@@ -309,39 +309,17 @@
theme_present (const char *theme_name,
const char *theme_dir)
{
- GnomeVFSResult result;
- GList *file_list = NULL;
- GList *scan;
- gboolean found = FALSE;
+ char *filename;
if (theme_name == NULL)
return FALSE;
- if (theme_dir != NULL)
- result = gnome_vfs_directory_list_load (&file_list,
- theme_dir,
- GNOME_VFS_FILE_INFO_DEFAULT);
- else
- result = GNOME_VFS_ERROR_NOT_A_DIRECTORY;
-
- if (result == GNOME_VFS_OK)
- for (scan = file_list; scan; scan = scan->next) {
- GnomeVFSFileInfo *info = scan->data;
-
- if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY)
- continue;
-
- if ((strcmp (info->name, ".") == 0)
- || (strcmp (info->name, "..") == 0))
- continue;
+ if (theme_dir == NULL)
+ return FALSE;
- if (strcmp (info->name, theme_name) == 0) {
- found = TRUE;
- break;
- }
- }
+ filename = g_build_filename (theme_dir, theme_name, NULL);
- return found;
+ return path_is_dir (filename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]