diff options
Diffstat (limited to 'src/file-manager')
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 3 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 39 | ||||
-rw-r--r-- | src/file-manager/fm-ditem-page.c | 3 | ||||
-rw-r--r-- | src/file-manager/fm-icon-container.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-icon-view.c | 10 | ||||
-rw-r--r-- | src/file-manager/fm-list-model.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.c | 44 | ||||
-rw-r--r-- | src/file-manager/fm-tree-model.c | 2 | ||||
-rw-r--r-- | src/file-manager/fm-tree-view.c | 2 |
10 files changed, 43 insertions, 68 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index 06fdc930..7f02efb5 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -600,6 +600,8 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view) g_signal_connect_object (desktop_icon_view, "unrealize", G_CALLBACK (unrealized_callback), desktop_icon_view, 0); + default_zoom_level_changed (desktop_icon_view); + g_signal_connect_swapped (caja_icon_view_preferences, "changed::" CAJA_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL, G_CALLBACK (default_zoom_level_changed), @@ -610,7 +612,6 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view) G_CALLBACK (font_changed_callback), desktop_icon_view); - default_zoom_level_changed (desktop_icon_view); fm_desktop_icon_view_update_icon_container_fonts (desktop_icon_view); g_signal_connect_swapped (mate_lockdown_preferences, 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); } diff --git a/src/file-manager/fm-ditem-page.c b/src/file-manager/fm-ditem-page.c index 52958feb..0acec773 100644 --- a/src/file-manager/fm-ditem-page.c +++ b/src/file-manager/fm-ditem-page.c @@ -218,6 +218,7 @@ fm_ditem_page_exec_drag_data_received (GtkWidget *widget, GdkDragContext *contex } file = caja_file_get_by_uri (uris[0]); + g_strfreev (uris); g_return_if_fail (file != NULL); @@ -248,8 +249,6 @@ fm_ditem_page_exec_drag_data_received (GtkWidget *widget, GdkDragContext *contex g_free (uri); caja_file_unref (file); - - g_strfreev (uris); } static void diff --git a/src/file-manager/fm-icon-container.c b/src/file-manager/fm-icon-container.c index 0ecc0180..08b87529 100644 --- a/src/file-manager/fm-icon-container.c +++ b/src/file-manager/fm-icon-container.c @@ -595,6 +595,10 @@ fm_icon_container_class_init (FMIconContainerClass *klass) static void fm_icon_container_init (FMIconContainer *icon_container) { +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (icon_container)), + GTK_STYLE_CLASS_VIEW); +#endif } CajaIconContainer * diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 6ab19c4e..3d29bead 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -2146,7 +2146,13 @@ get_preview_argv (char *uri) return argv; } - command = g_find_program_in_path ("gst-launch-0.10"); + command = g_find_program_in_path ("gst-launch-1.0"); + + if (!command) + { + command = g_find_program_in_path ("gst-launch-0.10"); + } + if (command) { argv = g_new (char *, 10); @@ -2155,7 +2161,7 @@ get_preview_argv (char *uri) argv[i++] = g_strdup ("playbin"); argv[i++] = g_strconcat ("uri=", uri, NULL); /* do not display videos */ - argv[i++] = g_strdup ("current-video=-1"); + argv[i++] = g_strdup ("video-sink=fakesink"); argv[i++] = NULL; return argv; } diff --git a/src/file-manager/fm-list-model.c b/src/file-manager/fm-list-model.c index 1be811f4..6a1692f4 100644 --- a/src/file-manager/fm-list-model.c +++ b/src/file-manager/fm-list-model.c @@ -35,8 +35,6 @@ #include <libcaja-private/caja-dnd.h> #include <glib.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - enum { SUBDIRECTORY_UNLOADED, diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index c92e0c12..626c3836 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -61,8 +61,6 @@ #include <libcaja-private/caja-clipboard.h> #include <libcaja-private/caja-cell-renderer-text-ellipsized.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - struct FMListViewDetails { GtkTreeView *tree_view; diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index ddec36b9..ba305015 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -68,8 +68,6 @@ #include <sys/mount.h> #endif -#include <src/glibcompat.h> /* for g_list_free_full */ - #define USED_FILL_R (0.988235294 * 65535) #define USED_FILL_G (0.91372549 * 65535) #define USED_FILL_B (0.309803922 * 65535) @@ -2321,14 +2319,10 @@ directory_contents_value_field_update (FMPropertiesWindow *window) } else { char *size_str; - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - size_str = g_format_size_full (total_size, G_FORMAT_SIZE_IEC_UNITS); - else - size_str = g_format_size(total_size); - #else - size_str = g_format_size_for_display(total_size); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + size_str = g_format_size_full (total_size, G_FORMAT_SIZE_IEC_UNITS); + else + size_str = g_format_size(total_size); text = g_strdup_printf (ngettext("%'d item, with size %s", "%'d items, totalling %s", @@ -3147,22 +3141,16 @@ create_pie_widget (FMPropertiesWindow *window) GFile *location; GFileInfo *info; - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) { - capacity = g_format_size_full(window->details->volume_capacity, G_FORMAT_SIZE_IEC_UNITS); - free = g_format_size_full(window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); - used = g_format_size_full(window->details->volume_capacity - window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); - } - else { - capacity = g_format_size(window->details->volume_capacity); - free = g_format_size(window->details->volume_free); - used = g_format_size(window->details->volume_capacity - window->details->volume_free); - } - #else - capacity = g_format_size_for_display(window->details->volume_capacity); - free = g_format_size_for_display(window->details->volume_free); - used = g_format_size_for_display(window->details->volume_capacity - window->details->volume_free); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) { + capacity = g_format_size_full(window->details->volume_capacity, G_FORMAT_SIZE_IEC_UNITS); + free = g_format_size_full(window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); + used = g_format_size_full(window->details->volume_capacity - window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); + } + else { + capacity = g_format_size(window->details->volume_capacity); + free = g_format_size(window->details->volume_free); + used = g_format_size(window->details->volume_capacity - window->details->volume_free); + } file = get_original_file (window); @@ -3209,7 +3197,9 @@ create_pie_widget (FMPropertiesWindow *window) if (info) { fs_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE); if (fs_type != NULL) { - gtk_label_set_text (GTK_LABEL (fstype_label), g_strconcat (_("Filesystem type:"), " ", fs_type, NULL)); + gchar *fstype_text = g_strconcat (_("Filesystem type:"), " ", fs_type, NULL); + gtk_label_set_text (GTK_LABEL (fstype_label), fstype_text); + g_free (fstype_text); } g_object_unref (info); diff --git a/src/file-manager/fm-tree-model.c b/src/file-manager/fm-tree-model.c index 604c660e..504dd89a 100644 --- a/src/file-manager/fm-tree-model.c +++ b/src/file-manager/fm-tree-model.c @@ -37,8 +37,6 @@ #include <gtk/gtk.h> #include <string.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - enum { ROW_LOADED, diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c index ab2f1593..f86a0634 100644 --- a/src/file-manager/fm-tree-view.c +++ b/src/file-manager/fm-tree-view.c @@ -55,8 +55,6 @@ #include <libcaja-private/caja-window-info.h> #include <libcaja-private/caja-window-slot-info.h> -#include <src/glibcompat.h> /* for g_list_free_full */ - typedef struct { GObject parent; |