make the GError argument in the callbacks const.
2005-12-13 Kristian Rietveld <kris@imendio.com> * gtk/gtkfilesystem.h: make the GError argument in the callbacks const. * gtk/gtkfilechooserbutton.c: update callbacks, * gtk/gtkfilechooserentry.c: likewise, * gtk/gtkfilechooserdefault.c: likewise, * gtk/gtkfilesystemmodel.c: likewise, * gtk/gtkpathbar.c: likewise. * gtk/gtkfilechooserdefault.c (edited_idle_create_folder_cb): copy the error which will be passed to error_creating_folder_dialog(), (action_create_folder_cb): likewise, (file_list_drag_data_received_get_info_cb): add forgotten GError declaration.
This commit is contained in:
committed by
Kristian Rietveld
parent
881e00c1d9
commit
909146bd83
17
ChangeLog
17
ChangeLog
@@ -1,3 +1,20 @@
|
||||
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtkfilesystem.h: make the GError argument in the callbacks
|
||||
const.
|
||||
|
||||
* gtk/gtkfilechooserbutton.c: update callbacks,
|
||||
* gtk/gtkfilechooserentry.c: likewise,
|
||||
* gtk/gtkfilechooserdefault.c: likewise,
|
||||
* gtk/gtkfilesystemmodel.c: likewise,
|
||||
* gtk/gtkpathbar.c: likewise.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (edited_idle_create_folder_cb): copy
|
||||
the error which will be passed to error_creating_folder_dialog(),
|
||||
(action_create_folder_cb): likewise,
|
||||
(file_list_drag_data_received_get_info_cb): add forgotten GError
|
||||
declaration.
|
||||
|
||||
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtkpathbar.c (get_button_image), (set_button_image),
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtkfilesystem.h: make the GError argument in the callbacks
|
||||
const.
|
||||
|
||||
* gtk/gtkfilechooserbutton.c: update callbacks,
|
||||
* gtk/gtkfilechooserentry.c: likewise,
|
||||
* gtk/gtkfilechooserdefault.c: likewise,
|
||||
* gtk/gtkfilesystemmodel.c: likewise,
|
||||
* gtk/gtkpathbar.c: likewise.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (edited_idle_create_folder_cb): copy
|
||||
the error which will be passed to error_creating_folder_dialog(),
|
||||
(action_create_folder_cb): likewise,
|
||||
(file_list_drag_data_received_get_info_cb): add forgotten GError
|
||||
declaration.
|
||||
|
||||
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
* gtk/gtkpathbar.c (get_button_image), (set_button_image),
|
||||
|
||||
@@ -913,7 +913,7 @@ struct DndSelectFolderData
|
||||
static void
|
||||
dnd_select_folder_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct DndSelectFolderData *data = user_data;
|
||||
@@ -1105,7 +1105,7 @@ struct ChangeIconThemeData
|
||||
static void
|
||||
change_icon_theme_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -1288,7 +1288,7 @@ struct SetDisplayNameData
|
||||
static void
|
||||
set_info_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -1417,7 +1417,7 @@ model_free_row_data (GtkFileChooserButton *button,
|
||||
static void
|
||||
model_add_special_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -1938,7 +1938,7 @@ update_combo_box (GtkFileChooserButton *button)
|
||||
static void
|
||||
update_label_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
@@ -1097,7 +1097,7 @@ struct ReloadIconsData
|
||||
static void
|
||||
shortcuts_reload_icons_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -1272,7 +1272,7 @@ struct ShortcutsInsertRequest
|
||||
static void
|
||||
get_file_info_finished (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
gpointer item_data;
|
||||
@@ -1992,7 +1992,7 @@ new_folder_button_clicked (GtkButton *button,
|
||||
static void
|
||||
edited_idle_create_folder_cb (GtkFileSystemHandle *handle,
|
||||
const GtkFilePath *path,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFileChooserDefault *impl = data;
|
||||
@@ -2000,7 +2000,7 @@ edited_idle_create_folder_cb (GtkFileSystemHandle *handle,
|
||||
if (error)
|
||||
change_folder_and_display_error (impl, path);
|
||||
else
|
||||
error_creating_folder_dialog (impl, path, error);
|
||||
error_creating_folder_dialog (impl, path, g_error_copy (error));
|
||||
}
|
||||
|
||||
/* Idle handler for creating a new folder after editing its name cell, or for
|
||||
@@ -3568,7 +3568,7 @@ struct FileListDragData
|
||||
static void
|
||||
file_list_drag_data_received_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
gint i;
|
||||
@@ -3599,6 +3599,7 @@ file_list_drag_data_received_get_info_cb (GtkFileSystemHandle *handle,
|
||||
if (data->impl->select_multiple)
|
||||
{
|
||||
GtkFilePath *path;
|
||||
GError *error = NULL;
|
||||
|
||||
for (i = 1; data->uris[i]; i++)
|
||||
{
|
||||
@@ -5354,7 +5355,7 @@ show_and_select_paths_finished_loading (GtkFileFolder *folder,
|
||||
static void
|
||||
show_and_select_paths_get_folder_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileFolder *folder,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (error)
|
||||
@@ -5586,7 +5587,7 @@ struct UpdateCurrentFolderData
|
||||
static void
|
||||
update_current_folder_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct UpdateCurrentFolderData *data = user_data;
|
||||
@@ -6145,7 +6146,7 @@ struct AddShortcutData
|
||||
static void
|
||||
add_shortcut_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
int pos;
|
||||
@@ -6624,13 +6625,13 @@ should_respond_after_confirm_overwrite (GtkFileChooserDefault *impl,
|
||||
static void
|
||||
action_create_folder_cb (GtkFileSystemHandle *handle,
|
||||
const GtkFilePath *path,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFileChooserDefault *impl = data;
|
||||
|
||||
if (error)
|
||||
error_creating_folder_dialog (impl, path, error);
|
||||
error_creating_folder_dialog (impl, path, g_error_copy (error));
|
||||
}
|
||||
|
||||
/* Implementation for GtkFileChooserEmbed::should_respond() */
|
||||
@@ -6990,7 +6991,7 @@ check_preview_change (GtkFileChooserDefault *impl)
|
||||
static void
|
||||
shortcuts_activate_volume_mount_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileSystemVolume *volume,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFilePath *path;
|
||||
@@ -7063,7 +7064,7 @@ struct ShortcutsActivateData
|
||||
static void
|
||||
shortcuts_activate_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct ShortcutsActivateData *data = user_data;
|
||||
@@ -7553,7 +7554,7 @@ struct UpdateFromEntryData
|
||||
static void
|
||||
update_from_entry_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *file_info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
struct UpdateFromEntryData *update_data = data;
|
||||
|
||||
@@ -602,7 +602,7 @@ files_deleted_cb (GtkFileSystem *file_system,
|
||||
static void
|
||||
load_directory_get_folder_callback (GtkFileSystemHandle *handle,
|
||||
GtkFileFolder *folder,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFileChooserEntry *chooser_entry = data;
|
||||
|
||||
@@ -155,19 +155,19 @@ GType gtk_file_system_handle_get_type (void);
|
||||
|
||||
typedef void (* GtkFileSystemGetInfoCallback) (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *file_info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data);
|
||||
typedef void (* GtkFileSystemGetFolderCallback) (GtkFileSystemHandle *handle,
|
||||
GtkFileFolder *folder,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data);
|
||||
typedef void (* GtkFileSystemCreateFolderCallback) (GtkFileSystemHandle *handle,
|
||||
const GtkFilePath *path,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data);
|
||||
typedef void (* GtkFileSystemVolumeMountCallback) (GtkFileSystemHandle *handle,
|
||||
GtkFileSystemVolume *volume,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data);
|
||||
|
||||
/*
|
||||
|
||||
@@ -662,7 +662,7 @@ queue_finished_loading (GtkFileSystemModel *model)
|
||||
static void
|
||||
got_root_folder_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileFolder *folder,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
GSList *roots = NULL;
|
||||
@@ -1041,7 +1041,7 @@ struct RefPathData
|
||||
static void
|
||||
ref_path_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileFolder *folder,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
struct RefPathData *info = data;
|
||||
@@ -1477,7 +1477,7 @@ struct GetChildrenData
|
||||
static void
|
||||
get_children_get_folder_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileFolder *folder,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GSList *child_paths, *tmp_list;
|
||||
|
||||
@@ -990,7 +990,7 @@ struct SetButtonImageData
|
||||
static void
|
||||
set_button_image_get_info_cb (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -1417,7 +1417,7 @@ gtk_path_bar_set_path_finish (struct SetPathInfo *info,
|
||||
static void
|
||||
gtk_path_bar_get_info_callback (GtkFileSystemHandle *handle,
|
||||
GtkFileInfo *file_info,
|
||||
GError *error,
|
||||
const GError *error,
|
||||
gpointer data)
|
||||
{
|
||||
struct SetPathInfo *path_info = data;
|
||||
|
||||
Reference in New Issue
Block a user