Improve some sieve-related translations
[claws.git] / src / plugins / notification / gtkhotkey / gtk-hotkey-utils.c
blob61e79b5c2fc8832706b6580440c9e50af103f2ed
1 /*
2 * This file is part of GtkHotkey.
3 * Copyright Mikkel Kamstrup Erlandsen, March, 2008
5 * GtkHotkey is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GtkHotkey is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with GtkHotkey. If not, see <http://www.gnu.org/licenses/>.
19 #include "config.h"
21 #include <gio/gio.h>
23 GFileType
24 gtk_hotkey_g_file_get_type (GFile *file)
26 GFileInfo *info;
27 GFileType type;
28 GError *error;
30 g_return_val_if_fail (G_IS_FILE(file), G_FILE_TYPE_UNKNOWN);
32 if (!g_file_query_exists(file, NULL))
33 return G_FILE_TYPE_UNKNOWN;
35 g_return_val_if_fail (G_IS_FILE(file), G_FILE_TYPE_UNKNOWN);
36 error = NULL;
37 info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TYPE,
38 0, NULL, &error);
40 if (error) {
41 g_critical ("Failed to create GFileInfo: %s", error->message);
42 g_error_free (error);
43 return G_FILE_TYPE_UNKNOWN;
46 type = g_file_info_get_file_type (info);
47 g_object_unref (info);
49 return type;