Silence GTK deprecation warnings in champlain-gtk
[geeqie.git] / src / trash.cc
index f7d83ca..7daa656 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "main.h"
 #include "trash.h"
-#include "utilops.h"
-#include "window.h"
 
+#include <unistd.h>
+
+#include <cstdlib>
+
+#include <gio/gio.h>
+
+#include "debug.h"
 #include "editors.h"
 #include "filedata.h"
+#include "intl.h"
+#include "main-defines.h"
+#include "options.h"
+#include "typedefs.h"
 #include "ui-fileops.h"
+#include "ui-utildlg.h"
+#include "utilops.h"
+#include "window.h"
 
 /*
  *--------------------------------------------------------------------------
@@ -74,7 +85,7 @@ static gint file_util_safe_number(gint64 free_space)
 
                if (!sorted)
                        {
-                       list = filelist_sort(list, SORT_NAME, TRUE);
+                       list = filelist_sort(list, SORT_NAME, TRUE, TRUE);
                        sorted = TRUE;
                        }
 
@@ -86,7 +97,7 @@ static gint file_util_safe_number(gint64 free_space)
                        {
                        file_util_warning_dialog(_("Delete failed"),
                                                 _("Unable to remove old file from trash folder"),
-                                                GTK_STOCK_DIALOG_WARNING, nullptr);
+                                                GQ_ICON_DIALOG_WARNING, nullptr);
                        warned = TRUE;
                        }
                total -= fd->size;
@@ -137,7 +148,7 @@ gboolean file_util_safe_unlink(const gchar *path)
                        {
                        file_util_warning_dialog(_("Delete failed"),
                                                 _("Unable to remove file"),
-                                                GTK_STOCK_DIALOG_WARNING, nullptr);
+                                                GQ_ICON_DIALOG_WARNING, nullptr);
                        success = FALSE;
                        }
                }
@@ -180,7 +191,7 @@ gboolean file_util_safe_unlink(const gchar *path)
                        gchar *buf;
 
                        buf = g_strdup_printf(_("Unable to access or create the trash folder.\n\"%s\""), options->file_ops.safe_delete_path);
-                       gd = file_util_warning_dialog(result, buf, GTK_STOCK_DIALOG_WARNING, nullptr);
+                       gd = file_util_warning_dialog(result, buf, GQ_ICON_DIALOG_WARNING, nullptr);
                        g_free(buf);
                        }
                }
@@ -192,8 +203,8 @@ gboolean file_util_safe_unlink(const gchar *path)
                if (!g_file_trash(tmp, FALSE, &error) )
                        {
                        message = g_strconcat("See the Help file for a possible workaround.\n\n", error->message, NULL);
-                       gd = warning_dialog(_("Move to trash failed\n\n"), message, GTK_STOCK_DIALOG_ERROR, nullptr);
-                       generic_dialog_add_button(gd, GTK_STOCK_HELP, "Help", move_to_trash_failed_cb, FALSE);
+                       gd = warning_dialog(_("Move to trash failed\n\n"), message, GQ_ICON_DIALOG_ERROR, nullptr);
+                       generic_dialog_add_button(gd, GQ_ICON_HELP, _("Help"), move_to_trash_failed_cb, FALSE);
 
                        g_free(message);
                        g_error_free(error);