summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-background.c12
-rw-r--r--eel/eel-canvas.c4
-rw-r--r--eel/eel-glib-extensions.c2
-rw-r--r--eel/eel-mate-extensions.c20
-rw-r--r--eel/eel-string.c4
-rw-r--r--eel/eel-wrap-table.c2
6 files changed, 12 insertions, 32 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index dc1dc1f5..94f9a299 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -66,7 +66,7 @@ enum
LAST_SIGNAL
};
-static guint signals[LAST_SIGNAL];
+static guint signals[LAST_SIGNAL] = { 0 };
struct EelBackgroundDetails
{
@@ -936,19 +936,21 @@ eel_bg_set_image_uri_helper (EelBackground *self,
const gchar *image_uri,
gboolean emit_signal)
{
- gchar *filename = g_strdup (""); /* GSettings expects a string, not NULL */
+ gchar *filename;
- if (image_uri != NULL)
+ if (image_uri != NULL) {
filename = g_filename_from_uri (image_uri, NULL, NULL);
+ } else {
+ filename = g_strdup (""); /* GSettings expects a string, not NULL */
+ }
mate_bg_set_filename (self->details->bg, filename);
+ g_free (filename);
if (emit_signal)
g_signal_emit (self, signals[SETTINGS_CHANGED], 0, GDK_ACTION_COPY);
set_image_properties (self);
-
- g_free (filename);
}
/* Use this function to set an image only (no color).
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index 8341958a..602986c8 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -115,7 +115,7 @@ static void eel_canvas_item_class_init (EelCanvasItemClass *klass);
static void eel_canvas_item_init (EelCanvasItem *item);
static int emit_event (EelCanvas *canvas, GdkEvent *event);
-static guint item_signals[ITEM_LAST_SIGNAL];
+static guint item_signals[ITEM_LAST_SIGNAL] = { 0 };
static GObjectClass *item_parent_class;
@@ -1856,7 +1856,7 @@ static void eel_canvas_draw_background (EelCanvas *canvas,
static GtkLayoutClass *canvas_parent_class;
-static guint canvas_signals[LAST_SIGNAL];
+static guint canvas_signals[LAST_SIGNAL] = { 0 };
/**
* eel_canvas_get_type:
diff --git a/eel/eel-glib-extensions.c b/eel/eel-glib-extensions.c
index 96eeb354..68ed9e86 100644
--- a/eel/eel-glib-extensions.c
+++ b/eel/eel-glib-extensions.c
@@ -38,8 +38,6 @@
#include <time.h>
#include <locale.h>
-#include <src/glibcompat.h> /* for g_list_free_full */
-
/* Legal conversion specifiers, as specified in the C standard. */
#define C_STANDARD_STRFTIME_CHARACTERS "aAbBcdHIjmMpSUwWxXyYZ"
#define C_STANDARD_NUMERIC_STRFTIME_CHARACTERS "dHIjmMSUwWyY"
diff --git a/eel/eel-mate-extensions.c b/eel/eel-mate-extensions.c
index f1974397..4d4e9beb 100644
--- a/eel/eel-mate-extensions.c
+++ b/eel/eel-mate-extensions.c
@@ -194,24 +194,8 @@ eel_mate_open_terminal_on_screen (const char *command,
g_message ("Could not start a terminal");
return;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
- GdkAppLaunchContext *launch_context;
- GAppInfo *app_info = NULL;
- app_info = g_app_info_create_from_commandline (command_line,
- NULL,
- G_APP_INFO_CREATE_NONE,
- NULL);
- if (app_info != NULL)
- {
- launch_context = gdk_app_launch_context_new ();
- gdk_app_launch_context_set_screen (launch_context, screen);
- g_app_info_launch (app_info, NULL, G_APP_LAUNCH_CONTEXT (launch_context), NULL);
- g_object_unref (launch_context);
- g_object_unref (app_info);
- }
-#else
- gdk_spawn_command_line_on_screen (screen, command_line, NULL);
-#endif
+
+ mate_gdk_spawn_command_line_on_screen(screen, command_line, NULL);
g_free (command_line);
}
diff --git a/eel/eel-string.c b/eel/eel-string.c
index 3a8f2581..5d74c317 100644
--- a/eel/eel-string.c
+++ b/eel/eel-string.c
@@ -988,11 +988,7 @@ retry_atomic_decrement:
{
G_LOCK (unique_ref_strs);
/* Need to recheck after taking lock to avoid races with _get_unique() */
-#if !GLIB_CHECK_VERSION (2, 30, 0)
- if (g_atomic_int_exchange_and_add (count, -1) == 0x80000001)
-#else
if (g_atomic_int_add (count, -1) == 0x80000001)
-#endif
{
g_hash_table_remove (unique_ref_strs, (char *)str);
g_free ((char *)count);
diff --git a/eel/eel-wrap-table.c b/eel/eel-wrap-table.c
index eea8b2d0..2107ceca 100644
--- a/eel/eel-wrap-table.c
+++ b/eel/eel-wrap-table.c
@@ -780,7 +780,7 @@ wrap_table_child_focus_in (GtkWidget *widget,
gpointer data)
{
gint x, y;
- GtkWidget *container, *viewport;
+ GtkWidget *container, *viewport = NULL;
GtkAdjustment *hadj, *vadj;
container = gtk_widget_get_parent (widget);