diff --git a/thunar/thunar-dbus-service.c b/thunar/thunar-dbus-service.c index 8a332fe2102e1a548efdeedc720a7a95ba897bcd..78413301ffc633aff0861552a2ccc7be2fa6db91 100644 --- a/thunar/thunar-dbus-service.c +++ b/thunar/thunar-dbus-service.c @@ -115,6 +115,11 @@ static gboolean thunar_dbus_service_terminate (ThunarDBusServi +/* include generate dbus infos */ +#include <thunar/thunar-dbus-service-infos.h> + + + struct _ThunarDBusServiceClass { GObjectClass __parent__; @@ -166,8 +171,7 @@ thunar_dbus_service_get_type (void) static void thunar_dbus_service_class_init (ThunarDBusServiceClass *klass) { - extern const DBusGObjectInfo dbus_glib_thunar_dbus_service_object_info; - GObjectClass *gobject_class; + GObjectClass *gobject_class; /* determine the parent type class */ thunar_dbus_service_parent_class = g_type_class_peek_parent (klass); @@ -762,7 +766,3 @@ thunar_dbus_service_terminate (ThunarDBusService *dbus_service, /* we cannot fail */ return TRUE; } - - - -#include <thunar/thunar-dbus-service-infos.h> diff --git a/thunar/thunar-exec.c b/thunar/thunar-exec.c index 900c136f12475b947b56586ddab2f42c65df7e84..f2f5a4078c28f5654c8438d0b5dba28f2fd169d7 100644 --- a/thunar/thunar-exec.c +++ b/thunar/thunar-exec.c @@ -40,6 +40,9 @@ #ifdef HAVE_STRING_H #include <string.h> #endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif #include <glib.h> #include <gio/gio.h> @@ -411,7 +414,9 @@ thunar_exec_on_screen (GdkScreen *screen, SnDisplay *sn_display = NULL; gint sn_workspace; #endif +#ifndef HAVE_UNISTD_H extern gchar **environ; +#endif gboolean succeed; gchar *display_name; gchar **cenvp = envp; diff --git a/thunar/thunar-io-jobs-util.c b/thunar/thunar-io-jobs-util.c index bd577f717579885a4da3639661725b0a19bfb2ac..1f9a1516735cfd3220be628466e34c0c57856e84 100644 --- a/thunar/thunar-io-jobs-util.c +++ b/thunar/thunar-io-jobs-util.c @@ -113,7 +113,7 @@ thunar_io_jobs_util_next_duplicate_file (ThunarJob *job, name_index = MIN (n-1, G_N_ELEMENTS (duplicate_names)-1); /* generate the display name for the nth copy/link of the source file */ - if (name_index < G_N_ELEMENTS (duplicate_names)-1) + if (name_index < (gint) G_N_ELEMENTS (duplicate_names)-1) { display_name = g_strdup_printf (gettext (duplicate_names[name_index][type_index]), g_file_info_get_display_name (info)); diff --git a/thunar/thunar-io-scan-directory.c b/thunar/thunar-io-scan-directory.c index cacc381cfcc4a1d3fa7c14abdb81f03e0f6d503f..3cb0bee886762d503cd153b69c0cf2b6703b5f03 100644 --- a/thunar/thunar-io-scan-directory.c +++ b/thunar/thunar-io-scan-directory.c @@ -29,6 +29,7 @@ #include <thunar/thunar-gio-extensions.h> #include <thunar/thunar-job.h> #include <thunar/thunar-private.h> +#include <thunar/thunar-io-scan-directory.h> diff --git a/thunar/thunar-list-model.c b/thunar/thunar-list-model.c index c8f02f5088f815dd30d730b4f2084914821aa022..c9d55a161005961df4fbf8e8d98e716f0453b632 100644 --- a/thunar/thunar-list-model.c +++ b/thunar/thunar-list-model.c @@ -85,7 +85,7 @@ static void thunar_list_model_set_property (GObject static GtkTreeModelFlags thunar_list_model_get_flags (GtkTreeModel *model); static gint thunar_list_model_get_n_columns (GtkTreeModel *model); static GType thunar_list_model_get_column_type (GtkTreeModel *model, - gint index); + gint idx); static gboolean thunar_list_model_get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path); @@ -601,9 +601,9 @@ thunar_list_model_get_n_columns (GtkTreeModel *model) static GType thunar_list_model_get_column_type (GtkTreeModel *model, - gint index) + gint idx) { - switch (index) + switch (idx) { case THUNAR_COLUMN_DATE_ACCESSED: return G_TYPE_STRING; @@ -674,14 +674,14 @@ thunar_list_model_get_path (GtkTreeModel *model, GtkTreeIter *iter) { ThunarListModel *store = THUNAR_LIST_MODEL (model); - gint index = 0; + gint idx = 0; _thunar_return_val_if_fail (THUNAR_IS_LIST_MODEL (store), NULL); _thunar_return_val_if_fail (iter->stamp == store->stamp, NULL); - index = g_slist_position (store->rows, iter->user_data); - if (G_LIKELY (index >= 0)) - return gtk_tree_path_new_from_indices (index, -1); + idx = g_slist_position (store->rows, iter->user_data); + if (G_LIKELY (idx >= 0)) + return gtk_tree_path_new_from_indices (idx, -1); return NULL; } @@ -1026,7 +1026,7 @@ thunar_list_model_set_default_sort_func (GtkTreeSortable *sortable, gpointer data, GtkDestroyNotify destroy) { - g_error ("ThunarListModel has sorting facilities built-in!"); + g_critical ("ThunarListModel has sorting facilities built-in!"); } @@ -1038,7 +1038,7 @@ thunar_list_model_set_sort_func (GtkTreeSortable *sortable, gpointer data, GtkDestroyNotify destroy) { - g_error ("ThunarListModel has sorting facilities built-in!"); + g_critical ("ThunarListModel has sorting facilities built-in!"); } @@ -1298,7 +1298,7 @@ thunar_list_model_files_added (ThunarFolder *folder, GSList *prev = NULL; GSList *row; gint *indices; - gint index = 0; + gint idx = 0; /* we use a simple trick here to avoid allocating * GtkTreePath's again and again, by simply accessing @@ -1330,7 +1330,7 @@ thunar_list_model_files_added (ThunarFolder *folder, if (G_UNLIKELY (store->rows == NULL || thunar_list_model_cmp (store, file, store->rows->data) < 0)) { prev = NULL; - index = 0; + idx = 0; row->next = store->rows; store->rows = row; } @@ -1343,10 +1343,10 @@ thunar_list_model_files_added (ThunarFolder *folder, if (G_UNLIKELY (prev == NULL || thunar_list_model_cmp (store, file, prev->data) < 0)) { prev = store->rows; - index = 1; + idx = 1; } - for (; prev->next != NULL; ++index, prev = prev->next) + for (; prev->next != NULL; ++idx, prev = prev->next) if (thunar_list_model_cmp (store, file, prev->next->data) < 0) break; @@ -1360,7 +1360,7 @@ thunar_list_model_files_added (ThunarFolder *folder, GTK_TREE_ITER_INIT (iter, store->stamp, row); /* tell the view about the new item */ - indices[0] = index; + indices[0] = idx; gtk_tree_model_row_inserted (GTK_TREE_MODEL (store), path, &iter); } } @@ -2137,14 +2137,14 @@ thunar_list_model_get_paths_for_files (ThunarListModel *store, { GSList *row; GList *paths = NULL; - gint index = 0; + gint idx = 0; _thunar_return_val_if_fail (THUNAR_IS_LIST_MODEL (store), NULL); /* find the rows for the given files */ - for (row = store->rows; row != NULL; ++index, row = row->next) + for (row = store->rows; row != NULL; ++idx, row = row->next) if (g_list_find (files, row->data) != NULL) - paths = g_list_prepend (paths, gtk_tree_path_new_from_indices (index, -1)); + paths = g_list_prepend (paths, gtk_tree_path_new_from_indices (idx, -1)); return paths; } @@ -2174,7 +2174,7 @@ thunar_list_model_get_paths_for_pattern (ThunarListModel *store, GPatternSpec *pspec; GSList *row; GList *paths = NULL; - gint index = 0; + gint idx = 0; _thunar_return_val_if_fail (THUNAR_IS_LIST_MODEL (store), NULL); _thunar_return_val_if_fail (g_utf8_validate (pattern, -1, NULL), NULL); @@ -2183,9 +2183,9 @@ thunar_list_model_get_paths_for_pattern (ThunarListModel *store, pspec = g_pattern_spec_new (pattern); /* find all rows that match the given pattern */ - for (row = store->rows; row != NULL; ++index, row = row->next) + for (row = store->rows; row != NULL; ++idx, row = row->next) if (g_pattern_match_string (pspec, thunar_file_get_display_name (row->data))) - paths = g_list_prepend (paths, gtk_tree_path_new_from_indices (index, -1)); + paths = g_list_prepend (paths, gtk_tree_path_new_from_indices (idx, -1)); /* release the pattern */ g_pattern_spec_free (pspec); diff --git a/thunar/thunar-location-button.c b/thunar/thunar-location-button.c index d34b18dd7c9c1412f6fc3a6c3f225168c5e1e6bb..b34663d086ab4760e791dcbb95f89936da23cb72 100644 --- a/thunar/thunar-location-button.c +++ b/thunar/thunar-location-button.c @@ -74,7 +74,7 @@ static void thunar_location_button_style_set (GtkWidget static GdkDragAction thunar_location_button_get_dest_actions (ThunarLocationButton *location_button, GdkDragContext *context, GtkWidget *button, - guint time); + guint timestamp); static void thunar_location_button_file_changed (ThunarLocationButton *location_button, ThunarFile *file); static void thunar_location_button_file_destroy (ThunarLocationButton *location_button, @@ -92,13 +92,13 @@ static gboolean thunar_location_button_drag_drop (GtkWidget GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarLocationButton *location_button); static void thunar_location_button_drag_data_get (GtkWidget *button, GdkDragContext *context, GtkSelectionData *selection_data, guint info, - guint time, + guint timestamp, ThunarLocationButton *location_button); static void thunar_location_button_drag_data_received (GtkWidget *button, GdkDragContext *context, @@ -106,17 +106,17 @@ static void thunar_location_button_drag_data_received (GtkWidget gint y, GtkSelectionData *selection_data, guint info, - guint time, + guint timestamp, ThunarLocationButton *location_button); static void thunar_location_button_drag_leave (GtkWidget *button, GdkDragContext *context, - guint time, + guint timestamp, ThunarLocationButton *location_button); static gboolean thunar_location_button_drag_motion (GtkWidget *button, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarLocationButton *location_button); static gboolean thunar_location_button_enter_timeout (gpointer user_data); static void thunar_location_button_enter_timeout_destroy (gpointer user_data); @@ -427,7 +427,7 @@ static GdkDragAction thunar_location_button_get_dest_actions (ThunarLocationButton *location_button, GdkDragContext *context, GtkWidget *button, - guint time) + guint timestamp) { GdkDragAction actions = 0; GdkDragAction action = 0; @@ -440,7 +440,7 @@ thunar_location_button_get_dest_actions (ThunarLocationButton *location_button, } /* tell Gdk whether we can drop here */ - gdk_drag_status (context, action, time); + gdk_drag_status (context, action, timestamp); return actions; } @@ -618,7 +618,7 @@ thunar_location_button_drag_drop (GtkWidget *button, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarLocationButton *location_button) { GdkAtom target; @@ -637,7 +637,7 @@ thunar_location_button_drag_drop (GtkWidget *button, location_button->drop_occurred = TRUE; /* request the drag data from the source */ - gtk_drag_get_data (button, context, target, time); + gtk_drag_get_data (button, context, target, timestamp); /* we'll call gtk_drag_finish() later */ return TRUE; @@ -650,7 +650,7 @@ thunar_location_button_drag_data_get (GtkWidget *button, GdkDragContext *context, GtkSelectionData *selection_data, guint info, - guint time, + guint timestamp, ThunarLocationButton *location_button) { gchar *uri_string; @@ -683,7 +683,7 @@ thunar_location_button_drag_data_received (GtkWidget *button, gint y, GtkSelectionData *selection_data, guint info, - guint time, + guint timestamp, ThunarLocationButton *location_button) { GdkDragAction actions; @@ -708,12 +708,12 @@ thunar_location_button_drag_data_received (GtkWidget *button, location_button->drop_occurred = FALSE; /* determine the drop dest actions */ - actions = thunar_location_button_get_dest_actions (location_button, context, button, time); + actions = thunar_location_button_get_dest_actions (location_button, context, button, timestamp); if (G_LIKELY ((actions & (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)) != 0)) { /* as the user what to do with the drop data */ action = (context->action == GDK_ACTION_ASK) - ? thunar_dnd_ask (button, location_button->file, location_button->drop_file_list, time, actions) + ? thunar_dnd_ask (button, location_button->file, location_button->drop_file_list, timestamp, actions) : context->action; /* perform the requested action */ @@ -722,10 +722,10 @@ thunar_location_button_drag_data_received (GtkWidget *button, } /* tell the peer that we handled the drop */ - gtk_drag_finish (context, succeed, FALSE, time); + gtk_drag_finish (context, succeed, FALSE, timestamp); /* disable the highlighting and release the drag data */ - thunar_location_button_drag_leave (button, context, time, location_button); + thunar_location_button_drag_leave (button, context, timestamp, location_button); } } @@ -734,7 +734,7 @@ thunar_location_button_drag_data_received (GtkWidget *button, static void thunar_location_button_drag_leave (GtkWidget *button, GdkDragContext *context, - guint time, + guint timestamp, ThunarLocationButton *location_button) { _thunar_return_if_fail (GTK_IS_BUTTON (button)); @@ -771,7 +771,7 @@ thunar_location_button_drag_motion (GtkWidget *button, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarLocationButton *location_button) { ThunarFileIconState file_icon_state; @@ -803,16 +803,16 @@ thunar_location_button_drag_motion (GtkWidget *button, if (G_LIKELY (target == gdk_atom_intern_static_string ("text/uri-list"))) { /* request the drop data from the source */ - gtk_drag_get_data (button, context, target, time); + gtk_drag_get_data (button, context, target, timestamp); } /* tell GDK that it cannot drop here (yet!) */ - gdk_drag_status (context, 0, time); + gdk_drag_status (context, 0, timestamp); } else { /* check whether we can drop into the buttons' folder */ - actions = thunar_location_button_get_dest_actions (location_button, context, button, time); + actions = thunar_location_button_get_dest_actions (location_button, context, button, timestamp); /* determine the new file icon state */ file_icon_state = (actions == 0) ? THUNAR_FILE_ICON_STATE_DEFAULT : THUNAR_FILE_ICON_STATE_DROP; diff --git a/thunar/thunar-path-entry.c b/thunar/thunar-path-entry.c index 2946f02186a757495c3a2a919b57a9ee5fe2dcd1..c0b3ff6f755e32e34dc8aa1afa67f983e36d154b 100644 --- a/thunar/thunar-path-entry.c +++ b/thunar/thunar-path-entry.c @@ -93,7 +93,7 @@ static void thunar_path_entry_drag_data_get (GtkWidget GdkDragContext *context, GtkSelectionData *selection_data, guint info, - guint time); + guint timestamp); static void thunar_path_entry_activate (GtkEntry *entry); static void thunar_path_entry_changed (GtkEditable *editable); static void thunar_path_entry_do_insert_text (GtkEditable *editable, @@ -745,7 +745,7 @@ thunar_path_entry_drag_data_get (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, - guint time) + guint timestamp) { ThunarPathEntry *path_entry = THUNAR_PATH_ENTRY (widget); GList file_list; diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c index 96ca63a9a4084fa971d53c293b5261aa7d2f708a..93a7a417db7ea012ac0da57a2f21036e647fffed 100644 --- a/thunar/thunar-renamer-dialog.c +++ b/thunar/thunar-renamer-dialog.c @@ -80,7 +80,7 @@ static void thunar_renamer_dialog_response (GtkDialog gint response); static void thunar_renamer_dialog_context_menu (ThunarRenamerDialog *renamer_dialog, guint button, - guint32 time); + guint32 timestamp); static void thunar_renamer_dialog_help (ThunarRenamerDialog *renamer_dialog); static void thunar_renamer_dialog_save (ThunarRenamerDialog *renamer_dialog); static void thunar_renamer_dialog_action_add_files (GtkAction *action, @@ -102,23 +102,23 @@ static void thunar_renamer_dialog_drag_data_received (GtkWidget gint y, GtkSelectionData *selection_data, guint info, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog); static void thunar_renamer_dialog_drag_leave (GtkWidget *tree_view, GdkDragContext *context, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog); static gboolean thunar_renamer_dialog_drag_motion (GtkWidget *tree_view, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog); static gboolean thunar_renamer_dialog_drag_drop (GtkWidget *tree_view, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog); static void thunar_renamer_dialog_notify_page (GtkNotebook *notebook, GParamSpec *pspec, @@ -865,7 +865,7 @@ thunar_renamer_dialog_response (GtkDialog *dialog, static void thunar_renamer_dialog_context_menu (ThunarRenamerDialog *renamer_dialog, guint button, - guint32 time) + guint32 timestamp) { GtkActionGroup *renamer_actions = NULL; ThunarxRenamer *renamer; @@ -921,7 +921,7 @@ thunar_renamer_dialog_context_menu (ThunarRenamerDialog *renamer_dialog, /* run the menu on the dialog's screen */ menu = gtk_ui_manager_get_widget (renamer_dialog->ui_manager, "/file-context-menu"); - thunar_gtk_menu_run (GTK_MENU (menu), GTK_WIDGET (renamer_dialog), NULL, NULL, button, time); + thunar_gtk_menu_run (GTK_MENU (menu), GTK_WIDGET (renamer_dialog), NULL, NULL, button, timestamp); /* remove the previously merge items from the UI manager */ if (G_UNLIKELY (renamer_merge_id != 0)) @@ -1325,7 +1325,7 @@ thunar_renamer_dialog_drag_data_received (GtkWidget *tree_view, gint y, GtkSelectionData *selection_data, guint info, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog) { ThunarFile *file; @@ -1387,7 +1387,7 @@ thunar_renamer_dialog_drag_data_received (GtkWidget *tree_view, } /* finish the drag */ - gtk_drag_finish (context, (file_list != NULL), FALSE, time); + gtk_drag_finish (context, (file_list != NULL), FALSE, timestamp); /* release the list */ g_list_free (file_list); @@ -1402,7 +1402,7 @@ thunar_renamer_dialog_drag_data_received (GtkWidget *tree_view, static void thunar_renamer_dialog_drag_leave (GtkWidget *tree_view, GdkDragContext *context, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog) { _thunar_return_if_fail (THUNAR_IS_RENAMER_DIALOG (renamer_dialog)); @@ -1426,7 +1426,7 @@ thunar_renamer_dialog_drag_motion (GtkWidget *tree_view, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog) { GdkAtom target; @@ -1503,7 +1503,7 @@ thunar_renamer_dialog_drag_motion (GtkWidget *tree_view, } /* we can handle the drop */ - gdk_drag_status (context, action, time); + gdk_drag_status (context, action, timestamp); return TRUE; } @@ -1514,7 +1514,7 @@ thunar_renamer_dialog_drag_drop (GtkWidget *tree_view, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarRenamerDialog *renamer_dialog) { GdkAtom target; @@ -1533,7 +1533,7 @@ thunar_renamer_dialog_drag_drop (GtkWidget *tree_view, if (G_LIKELY (target == gdk_atom_intern_static_string ("text/uri-list"))) { /* request the data, we call gtk_drag_finish() later */ - gtk_drag_get_data (tree_view, context, target, time); + gtk_drag_get_data (tree_view, context, target, timestamp); } else if (target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW")) { @@ -1560,7 +1560,7 @@ thunar_renamer_dialog_drag_drop (GtkWidget *tree_view, } /* finish the dnd operation */ - gtk_drag_finish (context, TRUE, FALSE, time); + gtk_drag_finish (context, TRUE, FALSE, timestamp); } else { diff --git a/thunar/thunar-renamer-model.c b/thunar/thunar-renamer-model.c index 2eb612124d4704ad1a9799c9aeeed093fa7063ed..a328aa6317d65a4425c40e2256ad677606f61495 100644 --- a/thunar/thunar-renamer-model.c +++ b/thunar/thunar-renamer-model.c @@ -117,7 +117,7 @@ static gboolean thunar_renamer_model_conflict_item (ThunarR ThunarRenamerModelItem *item); static gchar *thunar_renamer_model_process_item (ThunarRenamerModel *renamer_model, ThunarRenamerModelItem *item, - guint index); + guint idx); static gboolean thunar_renamer_model_update_idle (gpointer user_data); static void thunar_renamer_model_update_idle_destroy (gpointer user_data); static ThunarRenamerModelItem *thunar_renamer_model_item_new (ThunarFile *file) G_GNUC_MALLOC; @@ -479,17 +479,17 @@ thunar_renamer_model_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter) { ThunarRenamerModel *renamer_model = THUNAR_RENAMER_MODEL (tree_model); - gint index; + gint idx; _thunar_return_val_if_fail (THUNAR_IS_RENAMER_MODEL (renamer_model), NULL); _thunar_return_val_if_fail (iter->stamp == renamer_model->stamp, NULL); - /* determine the index of the item */ - index = g_list_position (renamer_model->items, iter->user_data); - if (G_UNLIKELY (index < 0)) + /* determine the idx of the item */ + idx = g_list_position (renamer_model->items, iter->user_data); + if (G_UNLIKELY (idx < 0)) return NULL; - return gtk_tree_path_new_from_indices (index, -1); + return gtk_tree_path_new_from_indices (idx, -1); } @@ -677,7 +677,7 @@ thunar_renamer_model_file_destroyed (ThunarRenamerModel *renamer_model, { GtkTreePath *path; GList *lp; - gint index; + gint idx; _thunar_return_if_fail (THUNAR_IS_RENAMER_MODEL (renamer_model)); _thunar_return_if_fail (renamer_model->file_monitor == file_monitor); @@ -688,8 +688,8 @@ thunar_renamer_model_file_destroyed (ThunarRenamerModel *renamer_model, for (lp = renamer_model->items; lp != NULL; lp = lp->next) if (THUNAR_RENAMER_MODEL_ITEM (lp->data)->file == file) { - /* determine the index of the item */ - index = g_list_position (renamer_model->items, lp); + /* determine the idx of the item */ + idx = g_list_position (renamer_model->items, lp); /* free the item data */ thunar_renamer_model_item_free (lp->data); @@ -698,7 +698,7 @@ thunar_renamer_model_file_destroyed (ThunarRenamerModel *renamer_model, renamer_model->items = g_list_delete_link (renamer_model->items, lp); /* tell the view that the item is gone */ - path = gtk_tree_path_new_from_indices (index, -1); + path = gtk_tree_path_new_from_indices (idx, -1); gtk_tree_model_row_deleted (GTK_TREE_MODEL (renamer_model), path); gtk_tree_path_free (path); @@ -811,7 +811,7 @@ thunar_renamer_model_conflict_item (ThunarRenamerModel *renamer_model, static gchar* thunar_renamer_model_process_item (ThunarRenamerModel *renamer_model, ThunarRenamerModelItem *item, - guint index) + guint idx) { ThunarRenamerMode mode; const gchar *display_name; @@ -850,7 +850,7 @@ thunar_renamer_model_process_item (ThunarRenamerModel *renamer_model, text = g_strndup (display_name, (dot - display_name)); /* determine the new name */ - prefix = thunarx_renamer_process (renamer_model->renamer, THUNARX_FILE_INFO (item->file), text, index); + prefix = thunarx_renamer_process (renamer_model->renamer, THUNARX_FILE_INFO (item->file), text, idx); /* determine the new full name */ name = g_strconcat (prefix, dot, NULL); @@ -862,7 +862,7 @@ thunar_renamer_model_process_item (ThunarRenamerModel *renamer_model, case THUNAR_RENAMER_MODE_SUFFIX: /* determine the new suffix */ - suffix = thunarx_renamer_process (renamer_model->renamer, THUNARX_FILE_INFO (item->file), dot + 1, index); + suffix = thunarx_renamer_process (renamer_model->renamer, THUNARX_FILE_INFO (item->file), dot + 1, idx); /* generate the new file name */ name = g_new (gchar, (dot - display_name) + 1 + strlen (suffix) + 1); @@ -875,7 +875,7 @@ thunar_renamer_model_process_item (ThunarRenamerModel *renamer_model, case THUNAR_RENAMER_MODE_BOTH: /* determine the new full name */ - name = thunarx_renamer_process (renamer_model->renamer, THUNARX_FILE_INFO (item->file), display_name, index); + name = thunarx_renamer_process (renamer_model->renamer, THUNARX_FILE_INFO (item->file), display_name, idx); break; default: @@ -906,7 +906,7 @@ thunar_renamer_model_update_idle (gpointer user_data) GtkTreeIter iter; gboolean changed = FALSE; gboolean conflict; - guint index; + guint idx; gchar *name; GList *lp; @@ -916,7 +916,7 @@ thunar_renamer_model_update_idle (gpointer user_data) if (G_LIKELY (!renamer_model->frozen)) { /* process the first dirty item */ - for (index = 0, lp = renamer_model->items; !changed && lp != NULL; ++index, lp = lp->next) + for (idx = 0, lp = renamer_model->items; !changed && lp != NULL; ++idx, lp = lp->next) { /* check if this item is dirty */ item = THUNAR_RENAMER_MODEL_ITEM (lp->data); @@ -931,7 +931,7 @@ thunar_renamer_model_update_idle (gpointer user_data) item->dirty = FALSE; /* determine the new name for the item */ - name = thunar_renamer_model_process_item (renamer_model, item, index); + name = thunar_renamer_model_process_item (renamer_model, item, idx); if (!exo_str_is_equal (item->name, name)) { /* apply new name */ @@ -965,7 +965,7 @@ thunar_renamer_model_update_idle (gpointer user_data) GTK_TREE_ITER_INIT (iter, renamer_model->stamp, lp); /* emit "row-changed" for this item */ - path = gtk_tree_path_new_from_indices (index, -1); + path = gtk_tree_path_new_from_indices (idx, -1); gtk_tree_model_row_changed (GTK_TREE_MODEL (renamer_model), path, &iter); gtk_tree_path_free (path); } diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c index f5895df418e8a4d882156640ac676fdf2330c3dd..e15c83c86b6253b7d067aac2256ddc7f6e878226 100644 --- a/thunar/thunar-shortcuts-view.c +++ b/thunar/thunar-shortcuts-view.c @@ -75,20 +75,20 @@ static void thunar_shortcuts_view_drag_data_received (GtkWid gint y, GtkSelectionData *selection_data, guint info, - guint time); + guint timestamp); static gboolean thunar_shortcuts_view_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time); + guint timestamp); static gboolean thunar_shortcuts_view_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time); + guint timestamp); static void thunar_shortcuts_view_drag_leave (GtkWidget *widget, GdkDragContext *context, - guint time); + guint timestamp); static gboolean thunar_shortcuts_view_popup_menu (GtkWidget *widget); static void thunar_shortcuts_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path, @@ -422,7 +422,7 @@ thunar_shortcuts_view_drag_data_received (GtkWidget *widget, gint y, GtkSelectionData *selection_data, guint info, - guint time) + guint timestamp) { GtkTreeViewDropPosition position = GTK_TREE_VIEW_DROP_BEFORE; ThunarShortcutsView *view = THUNAR_SHORTCUTS_VIEW (widget); @@ -486,7 +486,7 @@ thunar_shortcuts_view_drag_data_received (GtkWidget *widget, { /* ask the user what to do with the drop data */ if (G_UNLIKELY (action == GDK_ACTION_ASK)) - action = thunar_dnd_ask (widget, file, view->drop_file_list, time, actions); + action = thunar_dnd_ask (widget, file, view->drop_file_list, timestamp, actions); /* perform the requested action */ if (G_LIKELY (action != 0)) @@ -507,14 +507,14 @@ thunar_shortcuts_view_drag_data_received (GtkWidget *widget, } /* disable the drop highlighting */ - thunar_shortcuts_view_drag_leave (widget, context, time); + thunar_shortcuts_view_drag_leave (widget, context, timestamp); /* tell the peer that we handled the drop */ - gtk_drag_finish (context, succeed, FALSE, time); + gtk_drag_finish (context, succeed, FALSE, timestamp); } else { - gdk_drag_status (context, 0, time); + gdk_drag_status (context, 0, timestamp); } } @@ -525,7 +525,7 @@ thunar_shortcuts_view_drag_drop (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time) + guint timestamp) { ThunarShortcutsView *view = THUNAR_SHORTCUTS_VIEW (widget); GtkTreeSelection *selection; @@ -547,7 +547,7 @@ thunar_shortcuts_view_drag_drop (GtkWidget *widget, view->drop_occurred = TRUE; /* request the drag data from the source. */ - gtk_drag_get_data (widget, context, target, time); + gtk_drag_get_data (widget, context, target, timestamp); } else if (target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW")) { @@ -576,7 +576,7 @@ thunar_shortcuts_view_drag_drop (GtkWidget *widget, gtk_tree_path_free (dst_path); /* finish the dnd operation */ - gtk_drag_finish (context, TRUE, FALSE, time); + gtk_drag_finish (context, TRUE, FALSE, timestamp); } else { @@ -594,7 +594,7 @@ thunar_shortcuts_view_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, - guint time) + guint timestamp) { GtkTreeViewDropPosition position = GTK_TREE_VIEW_DROP_BEFORE; ThunarShortcutsView *view = THUNAR_SHORTCUTS_VIEW (widget); @@ -614,7 +614,7 @@ thunar_shortcuts_view_drag_motion (GtkWidget *widget, if (G_UNLIKELY (!view->drop_data_ready)) { /* request the drag data from the source */ - gtk_drag_get_data (widget, context, target, time); + gtk_drag_get_data (widget, context, target, timestamp); /* gdk_drag_status() will be called by drag_data_received */ return TRUE; @@ -667,7 +667,7 @@ thunar_shortcuts_view_drag_motion (GtkWidget *widget, } /* tell Gdk whether we can drop here */ - gdk_drag_status (context, action, time); + gdk_drag_status (context, action, timestamp); return TRUE; } @@ -677,7 +677,7 @@ thunar_shortcuts_view_drag_motion (GtkWidget *widget, static void thunar_shortcuts_view_drag_leave (GtkWidget *widget, GdkDragContext *context, - guint time) + guint timestamp) { ThunarShortcutsView *view = THUNAR_SHORTCUTS_VIEW (widget); @@ -698,7 +698,7 @@ thunar_shortcuts_view_drag_leave (GtkWidget *widget, gtk_widget_queue_draw (widget); /* call the parent's handler */ - (*GTK_WIDGET_CLASS (thunar_shortcuts_view_parent_class)->drag_leave) (widget, context, time); + (*GTK_WIDGET_CLASS (thunar_shortcuts_view_parent_class)->drag_leave) (widget, context, timestamp); } diff --git a/thunar/thunar-simple-job.c b/thunar/thunar-simple-job.c index 1df1a83b8c9eefc132457bac473f9e2047eef1d4..dcc6abe89923bf6034187e4e615de257cd5bc35c 100644 --- a/thunar/thunar-simple-job.c +++ b/thunar/thunar-simple-job.c @@ -189,7 +189,7 @@ thunar_simple_job_launch (ThunarSimpleJobFunc func, va_list var_args; GValue value = { 0, }; gchar *error_message; - gint n; + guint n; /* allocate and initialize the simple job */ simple_job = g_object_new (THUNAR_TYPE_SIMPLE_JOB, NULL); diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c index 28aa848bb10ae6edacab80b46f7426606c9dfaf5..f04890747e0780247012fb34b8c65baf878d93bf 100644 --- a/thunar/thunar-standard-view.c +++ b/thunar/thunar-standard-view.c @@ -140,7 +140,7 @@ static gboolean thunar_standard_view_get_visible_range (Thu ThunarFile **end_file); static void thunar_standard_view_scroll_to_file (ThunarView *view, ThunarFile *file, - gboolean select, + gboolean select_file, gboolean use_align, gfloat row_align, gfloat col_align); @@ -1435,7 +1435,7 @@ thunar_standard_view_get_visible_range (ThunarView *view, static void thunar_standard_view_scroll_to_file (ThunarView *view, ThunarFile *file, - gboolean select, + gboolean select_file, gboolean use_align, gfloat row_align, gfloat col_align) @@ -1456,7 +1456,7 @@ thunar_standard_view_scroll_to_file (ThunarView *view, { /* remember a reference for the new file and settings */ standard_view->priv->scroll_to_file = g_object_ref (G_OBJECT (file)); - standard_view->priv->scroll_to_select = select; + standard_view->priv->scroll_to_select = select_file; standard_view->priv->scroll_to_use_align = use_align; standard_view->priv->scroll_to_row_align = row_align; standard_view->priv->scroll_to_col_align = col_align; @@ -1476,7 +1476,7 @@ thunar_standard_view_scroll_to_file (ThunarView *view, (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->scroll_to_path) (standard_view, paths->data, use_align, row_align, col_align); /* check if we should also alter the selection */ - if (G_UNLIKELY (select)) + if (G_UNLIKELY (select_file)) { /* select only the file in question */ (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->unselect_all) (standard_view); @@ -1528,7 +1528,7 @@ thunar_standard_view_get_dest_actions (ThunarStandardView *standard_view, GdkDragContext *context, gint x, gint y, - guint time, + guint timestamp, ThunarFile **file_return) { GdkDragAction actions = 0; @@ -1575,7 +1575,7 @@ thunar_standard_view_get_dest_actions (ThunarStandardView *standard_view, (*THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->highlight_path) (standard_view, path); /* tell Gdk whether we can drop here */ - gdk_drag_status (context, action, time); + gdk_drag_status (context, action, timestamp); /* clean up */ if (G_LIKELY (file != NULL)) diff --git a/thunar/thunar-thumbnailer.c b/thunar/thunar-thumbnailer.c index c50edecc724a6313101e4fa1845c70a1dfaa95be..ae651a0b2d36f69842420685fe1666302d44ee70 100644 --- a/thunar/thunar-thumbnailer.c +++ b/thunar/thunar-thumbnailer.c @@ -1063,8 +1063,8 @@ thunar_thumbnailer_queue_files (ThunarThumbnailer *thumbnailer, } - -void +#if 0 +static void thunar_thumbnailer_unqueue (ThunarThumbnailer *thumbnailer, gpointer request) { @@ -1094,3 +1094,4 @@ thunar_thumbnailer_unqueue (ThunarThumbnailer *thumbnailer, g_mutex_unlock (thumbnailer->lock); #endif } +#endif diff --git a/thunar/thunar-view.c b/thunar/thunar-view.c index 7b74f8171ef4961c3861de59d313b143ce1818d6..85672f719436689f9efce67b0743c89309ec24c7 100644 --- a/thunar/thunar-view.c +++ b/thunar/thunar-view.c @@ -231,7 +231,7 @@ thunar_view_set_zoom_level (ThunarView *view, ThunarZoomLevel zoom_level) { _thunar_return_if_fail (THUNAR_IS_VIEW (view)); - _thunar_return_if_fail (zoom_level >= 0 && zoom_level < THUNAR_ZOOM_N_LEVELS); + _thunar_return_if_fail (zoom_level < THUNAR_ZOOM_N_LEVELS); (*THUNAR_VIEW_GET_IFACE (view)->set_zoom_level) (view, zoom_level); } diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index ef5421583c9b59ef9f63ea49594f443103b9c84c..455d4d6d8a5dd96e935750165f5cd7ffc131e184 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -88,8 +88,6 @@ enum -static void thunar_window_class_init (ThunarWindowClass *klass); -static void thunar_window_init (ThunarWindow *window); static void thunar_window_dispose (GObject *object); static void thunar_window_finalize (GObject *object); static void thunar_window_get_property (GObject *object, @@ -139,8 +137,6 @@ static void thunar_window_action_tree_changed (GtkToggleAction ThunarWindow *window); static void thunar_window_action_statusbar_changed (GtkToggleAction *action, ThunarWindow *window); -static void thunar_window_action_toolbar_changed (GtkToggleAction *action, - ThunarWindow *window); static void thunar_window_action_zoom_in (GtkAction *action, ThunarWindow *window); static void thunar_window_action_zoom_out (GtkAction *action, @@ -558,7 +554,7 @@ view_type2index (GType type) static inline GType -view_index2type (gint index) +view_index2type (gint idx) { /* this necessary for platforms where sizeof(GType) != sizeof(gint), * see http://bugzilla.xfce.org/show_bug.cgi?id=2726 for details. @@ -566,12 +562,12 @@ view_index2type (gint index) if (sizeof (GType) == sizeof (gint)) { /* no need to map anything */ - return (GType) index; + return (GType) idx; } else { /* map from indices to unique types */ - switch (index) + switch (idx) { case 0: return THUNAR_TYPE_COMPACT_VIEW; case 1: return THUNAR_TYPE_DETAILS_VIEW; @@ -1912,7 +1908,7 @@ thunar_window_action_open_home (GtkAction *action, g_object_unref (home); } -gboolean +static gboolean thunar_window_open_user_folder (GtkAction *action, ThunarWindow *window, ThunarUserDirectory thunar_user_dir, @@ -2672,7 +2668,7 @@ thunar_window_set_zoom_level (ThunarWindow *window, ThunarZoomLevel zoom_level) { _thunar_return_if_fail (THUNAR_IS_WINDOW (window)); - _thunar_return_if_fail (zoom_level >= 0 && zoom_level < THUNAR_ZOOM_N_LEVELS); + _thunar_return_if_fail (zoom_level < THUNAR_ZOOM_N_LEVELS); /* check if we have a new zoom level */ if (G_LIKELY (window->zoom_level != zoom_level)) diff --git a/thunar/xfce-heading.c b/thunar/xfce-heading.c index e0ebdcd85c4866569dbff6a11e50abd25bb84045..ec738fccb5bd8c1593f990efefbd49501fa9dbc0 100644 --- a/thunar/xfce-heading.c +++ b/thunar/xfce-heading.c @@ -53,8 +53,6 @@ enum -static void xfce_heading_class_init (XfceHeadingClass *klass); -static void xfce_heading_init (XfceHeading *heading); static void xfce_heading_finalize (GObject *object); static void xfce_heading_get_property (GObject *object, guint prop_id, diff --git a/thunar/xfce-titled-dialog.c b/thunar/xfce-titled-dialog.c index 9a1224376531770babec1136fabcb2205715bd73..44b50fd18b1b1adcd0fe7e31c89f2a2cc1ed395c 100644 --- a/thunar/xfce-titled-dialog.c +++ b/thunar/xfce-titled-dialog.c @@ -46,8 +46,6 @@ enum -static void xfce_titled_dialog_class_init (XfceTitledDialogClass *klass); -static void xfce_titled_dialog_init (XfceTitledDialog *titled_dialog); static void xfce_titled_dialog_finalize (GObject *object); static void xfce_titled_dialog_get_property (GObject *object, guint prop_id,