summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eom-image.c12
-rw-r--r--src/eom-list-store.c2
-rw-r--r--src/eom-window.c8
3 files changed, 8 insertions, 14 deletions
diff --git a/src/eom-image.c b/src/eom-image.c
index 0ea3a49..36f6ff2 100644
--- a/src/eom-image.c
+++ b/src/eom-image.c
@@ -81,8 +81,6 @@ enum {
static guint signals[SIGNAL_LAST] = { 0 };
-static GList *supported_mime_types = NULL;
-
#define EOM_IMAGE_READ_BUFFER_SIZE 65535
static void
@@ -2214,11 +2212,12 @@ compare_quarks (gconstpointer a, gconstpointer b)
GList *
eom_image_get_supported_mime_types (void)
{
+ static GList *supported_mime_types = NULL;
GSList *format_list, *it;
gchar **mime_types;
int i;
- if (!supported_mime_types) {
+ if (supported_mime_types == NULL) {
format_list = gdk_pixbuf_get_formats ();
for (it = format_list; it != NULL; it = it->next) {
@@ -2246,18 +2245,16 @@ eom_image_get_supported_mime_types (void)
gboolean
eom_image_is_supported_mime_type (const char *mime_type)
{
- GList *supported_mime_types, *result;
+ GList *result;
GQuark quark;
if (mime_type == NULL) {
return FALSE;
}
- supported_mime_types = eom_image_get_supported_mime_types ();
-
quark = g_quark_from_string (mime_type);
- result = g_list_find_custom (supported_mime_types,
+ result = g_list_find_custom (eom_image_get_supported_mime_types (),
GINT_TO_POINTER (quark),
(GCompareFunc) compare_quarks);
@@ -2443,4 +2440,3 @@ eom_image_is_jpeg (EomImage *img)
return ((img->priv->file_type != NULL) && (g_ascii_strcasecmp (img->priv->file_type, EOM_FILE_FORMAT_JPEG) == 0));
}
-
diff --git a/src/eom-list-store.c b/src/eom-list-store.c
index e37dc61..900cbdf 100644
--- a/src/eom-list-store.c
+++ b/src/eom-list-store.c
@@ -407,8 +407,6 @@ file_monitor_changed_cb (GFileMonitor *monitor,
break;
case G_FILE_MONITOR_EVENT_DELETED:
if (is_file_in_list_store_file (store, file, &iter)) {
- EomImage *image;
-
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter,
EOM_LIST_STORE_EOM_IMAGE, &image,
-1);
diff --git a/src/eom-window.c b/src/eom-window.c
index 0365694..1e7afcb 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -3232,12 +3232,12 @@ eom_window_cmd_wallpaper (GtkAction *action, gpointer user_data)
if (filename == NULL || !eom_util_file_is_persistent (file))
{
GList *files = NULL;
- GtkAction *action;
+ GtkAction *action_set_as_wp;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- action = gtk_action_group_get_action (window->priv->actions_image,
- "ImageSetAsWallpaper");
- gtk_action_set_sensitive (action, FALSE);
+ action_set_as_wp = gtk_action_group_get_action (window->priv->actions_image,
+ "ImageSetAsWallpaper");
+ gtk_action_set_sensitive (action_set_as_wp, FALSE);
G_GNUC_END_IGNORE_DEPRECATIONS;
priv->copy_file_cid = gtk_statusbar_get_context_id (GTK_STATUSBAR (priv->statusbar),