summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-directory-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file-manager/fm-directory-view.c')
-rw-r--r--src/file-manager/fm-directory-view.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index eadb3750..ebf80eb3 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -83,7 +83,8 @@
#include <libcaja-private/caja-icon-names.h>
#include <libcaja-private/caja-undostack-manager.h>
-#include <src/glibcompat.h> /* for g_list_free_full */
+#define MATE_DESKTOP_USE_UNSTABLE_API
+#include <libmate-desktop/mate-desktop-utils.h>
/* Minimum starting update inverval */
#define UPDATE_INTERVAL_MIN 100
@@ -150,7 +151,7 @@ enum
};
-static guint signals[LAST_SIGNAL];
+static guint signals[LAST_SIGNAL] = { 0 };
static GdkAtom copied_files_atom;
@@ -2326,14 +2327,10 @@ fm_directory_view_display_selection_info (FMDirectoryView *view)
if (non_folder_size_known) {
char *size_string;
- #if GLIB_CHECK_VERSION(2, 30, 0)
- if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS))
- size_string = g_format_size_full (non_folder_size, G_FORMAT_SIZE_IEC_UNITS);
- else
- size_string = g_format_size(non_folder_size);
- #else
- size_string = g_format_size_for_display(non_folder_size);
- #endif
+ if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS))
+ size_string = g_format_size_full (non_folder_size, G_FORMAT_SIZE_IEC_UNITS);
+ else
+ size_string = g_format_size(non_folder_size);
/* This is marked for translation in case a localiser
* needs to use something other than parentheses. The
@@ -10195,23 +10192,8 @@ fm_directory_view_move_copy_items (const GList *item_uris,
if (screen == NULL) {
screen = gdk_screen_get_default ();
}
-#if GTK_CHECK_VERSION (3, 0, 0)
- GdkAppLaunchContext *launch_context;
- GAppInfo *app_info = NULL;
- app_info = g_app_info_create_from_commandline (command,
- 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, NULL);
-#endif
+
+ mate_gdk_spawn_command_line_on_screen(screen, command, NULL);
g_free (command);
return;
@@ -10519,6 +10501,7 @@ fm_directory_view_handle_netscape_url_drop (FMDirectoryView *view,
handle_netscape_url_drop_ask_cb,
data);
+ g_strfreev (bits);
g_free (container_uri);
return;
}
@@ -10534,6 +10517,7 @@ fm_directory_view_handle_netscape_url_drop (FMDirectoryView *view,
eel_show_warning_dialog (_("Drag and drop is not supported."),
_("An invalid drag type was used."),
fm_directory_view_get_containing_window (view));
+ g_strfreev (bits);
g_free (container_uri);
return;
}
@@ -10592,7 +10576,6 @@ fm_directory_view_handle_netscape_url_drop (FMDirectoryView *view,
}
g_strfreev (bits);
-
g_free (container_uri);
}