Commit ef3034fa authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Sparse cleanups from kjartan

2007-03-02  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-file.c:
        * libnautilus-private/nautilus-icon-canvas-item.c:
        * libnautilus-private/nautilus-icon-container.c:
        * libnautilus-private/nautilus-program-choosing.c:
        * libnautilus-private/nautilus-trash-file.c:
        * libnautilus-private/nautilus-tree-view-drag-dest.c:
        * src/file-manager/fm-desktop-icon-view.c:
        * src/file-manager/fm-directory-view.c:
        * src/file-manager/fm-list-model.c:
        * src/file-manager/fm-list-view.c:
        * src/file-manager/fm-tree-model.c:
        * src/nautilus-image-properties-page.c:
        * src/nautilus-navigation-bar.c:
        * src/nautilus-query-editor.c:
        * src/nautilus-search-bar.c:
        * src/nautilus-window-private.h:
	Sparse cleanups from kjartan


svn path=/trunk/; revision=12780
parent 928fca68
2007-03-02 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file.c:
* libnautilus-private/nautilus-icon-canvas-item.c:
* libnautilus-private/nautilus-icon-container.c:
* libnautilus-private/nautilus-program-choosing.c:
* libnautilus-private/nautilus-trash-file.c:
* libnautilus-private/nautilus-tree-view-drag-dest.c:
* src/file-manager/fm-desktop-icon-view.c:
* src/file-manager/fm-directory-view.c:
* src/file-manager/fm-list-model.c:
* src/file-manager/fm-list-view.c:
* src/file-manager/fm-tree-model.c:
* src/nautilus-image-properties-page.c:
* src/nautilus-navigation-bar.c:
* src/nautilus-query-editor.c:
* src/nautilus-search-bar.c:
* src/nautilus-window-private.h:
Sparse cleanups from kjartan
2007-03-02 Alexander Larsson <alexl@redhat.com> 2007-03-02 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-list-view.c (create_and_set_up_tree_view): * src/file-manager/fm-list-view.c (create_and_set_up_tree_view):
......
...@@ -1882,7 +1882,7 @@ prepend_automatic_emblem_names (NautilusFile *file, ...@@ -1882,7 +1882,7 @@ prepend_automatic_emblem_names (NautilusFile *file,
{ {
/* Prepend in reverse order. */ /* Prepend in reverse order. */
#if TRASH_IS_FAST_ENOUGH #ifdef TRASH_IS_FAST_ENOUGH
if (nautilus_file_is_in_trash (file)) { if (nautilus_file_is_in_trash (file)) {
names = g_list_prepend names = g_list_prepend
(names, g_strdup (NAUTILUS_FILE_EMBLEM_NAME_TRASH)); (names, g_strdup (NAUTILUS_FILE_EMBLEM_NAME_TRASH));
......
...@@ -938,8 +938,8 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item, ...@@ -938,8 +938,8 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
{ {
NautilusIconCanvasItemDetails *details; NautilusIconCanvasItemDetails *details;
NautilusIconContainer *container; NautilusIconContainer *container;
guint editable_height, editable_width, editable_dx; gint editable_height, editable_width, editable_dx;
guint additional_height, additional_width, additional_dx; gint additional_height, additional_width, additional_dx;
EelCanvasItem *canvas_item; EelCanvasItem *canvas_item;
PangoLayout *editable_layout; PangoLayout *editable_layout;
PangoLayout *additional_layout; PangoLayout *additional_layout;
......
...@@ -6451,7 +6451,7 @@ nautilus_icon_container_show_stretch_handles (NautilusIconContainer *container) ...@@ -6451,7 +6451,7 @@ nautilus_icon_container_show_stretch_handles (NautilusIconContainer *container)
{ {
NautilusIconContainerDetails *details; NautilusIconContainerDetails *details;
NautilusIcon *icon; NautilusIcon *icon;
int initial_size; guint initial_size;
icon = get_first_selected_icon (container); icon = get_first_selected_icon (container);
if (icon == NULL) { if (icon == NULL) {
......
...@@ -121,7 +121,7 @@ application_cannot_open_location (GnomeVFSMimeApplication *application, ...@@ -121,7 +121,7 @@ application_cannot_open_location (GnomeVFSMimeApplication *application,
const char *uri_scheme, const char *uri_scheme,
GtkWindow *parent_window) GtkWindow *parent_window)
{ {
#if NEW_MIME_COMPLETE #ifdef NEW_MIME_COMPLETE
GtkDialog *message_dialog; GtkDialog *message_dialog;
LaunchParameters *launch_parameters; LaunchParameters *launch_parameters;
char *prompt; char *prompt;
...@@ -569,7 +569,7 @@ void nautilus_launch_show_file (NautilusFile *file, ...@@ -569,7 +569,7 @@ void nautilus_launch_show_file (NautilusFile *file,
case GNOME_VFS_ERROR_NO_DEFAULT: case GNOME_VFS_ERROR_NO_DEFAULT:
case GNOME_VFS_ERROR_NO_HANDLER: case GNOME_VFS_ERROR_NO_HANDLER:
#if NEW_MIME_COMPLETE #ifdef NEW_MIME_COMPLETE
nautilus_program_chooser_show_no_choices_message nautilus_program_chooser_show_no_choices_message
(action_type, file, parent_window); (action_type, file, parent_window);
break; break;
...@@ -629,7 +629,7 @@ void nautilus_launch_show_file (NautilusFile *file, ...@@ -629,7 +629,7 @@ void nautilus_launch_show_file (NautilusFile *file,
break; break;
case GNOME_VFS_OK: case GNOME_VFS_OK:
default: default:
#if NEW_MIME_COMPLETE #ifdef NEW_MIME_COMPLETE
nautilus_program_chooser_show_invalid_message nautilus_program_chooser_show_invalid_message
(action_type, file, parent_window); (action_type, file, parent_window);
#endif #endif
...@@ -816,7 +816,7 @@ nautilus_launch_application (GnomeVFSMimeApplication *application, ...@@ -816,7 +816,7 @@ nautilus_launch_application (GnomeVFSMimeApplication *application,
break; break;
default: default:
#if NEW_MIME_COMPLETE #ifdef NEW_MIME_COMPLETE
nautilus_program_chooser_show_invalid_message nautilus_program_chooser_show_invalid_message
(GNOME_VFS_MIME_ACTION_TYPE_APPLICATION, file, parent_window); (GNOME_VFS_MIME_ACTION_TYPE_APPLICATION, file, parent_window);
......
...@@ -558,7 +558,8 @@ trash_file_get_item_count (NautilusFile *file, ...@@ -558,7 +558,8 @@ trash_file_get_item_count (NautilusFile *file,
{ {
NautilusTrashFile *trash; NautilusTrashFile *trash;
GList *node; GList *node;
guint one_count, one_unreadable; guint one_count;
int one_unreadable;
gboolean got_count; gboolean got_count;
trash = NAUTILUS_TRASH_FILE (file); trash = NAUTILUS_TRASH_FILE (file);
......
...@@ -358,7 +358,7 @@ get_drop_action (NautilusTreeViewDragDest *dest, ...@@ -358,7 +358,7 @@ get_drop_action (NautilusTreeViewDragDest *dest,
GtkTreePath *path) GtkTreePath *path)
{ {
char *drop_target; char *drop_target;
guint action; int action;
if (!dest->details->have_drag_data || if (!dest->details->have_drag_data ||
(dest->details->drag_type == NAUTILUS_ICON_DND_GNOME_ICON_LIST && (dest->details->drag_type == NAUTILUS_ICON_DND_GNOME_ICON_LIST &&
......
...@@ -396,7 +396,7 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) ...@@ -396,7 +396,7 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view)
net_workarea_changed (desktop_icon_view, root_window); net_workarea_changed (desktop_icon_view, root_window);
/* Setup the property filter */ /* Setup the property filter */
gdk_window_set_events (root_window, GDK_PROPERTY_NOTIFY); gdk_window_set_events (root_window, GDK_PROPERTY_CHANGE_MASK);
gdk_window_add_filter (root_window, gdk_window_add_filter (root_window,
desktop_icon_view_property_filter, desktop_icon_view_property_filter,
desktop_icon_view); desktop_icon_view);
......
...@@ -791,7 +791,7 @@ fm_directory_view_launch_application (GnomeVFSMimeApplication *application, ...@@ -791,7 +791,7 @@ fm_directory_view_launch_application (GnomeVFSMimeApplication *application,
} }
} }
#if NEW_MIME_COMPLETE #ifdef NEW_MIME_COMPLETE
static void static void
fm_directory_view_chose_application_callback (GnomeVFSMimeApplication *application, fm_directory_view_chose_application_callback (GnomeVFSMimeApplication *application,
gpointer callback_data) gpointer callback_data)
......
...@@ -120,7 +120,7 @@ file_entry_free (FileEntry *file_entry) ...@@ -120,7 +120,7 @@ file_entry_free (FileEntry *file_entry)
g_free (file_entry); g_free (file_entry);
} }
static guint static GtkTreeModelFlags
fm_list_model_get_flags (GtkTreeModel *tree_model) fm_list_model_get_flags (GtkTreeModel *tree_model)
{ {
return GTK_TREE_MODEL_ITERS_PERSIST; return GTK_TREE_MODEL_ITERS_PERSIST;
......
...@@ -2508,11 +2508,9 @@ fm_list_view_emblems_changed (FMDirectoryView *directory_view) ...@@ -2508,11 +2508,9 @@ fm_list_view_emblems_changed (FMDirectoryView *directory_view)
{ {
g_assert (FM_IS_LIST_VIEW (directory_view)); g_assert (FM_IS_LIST_VIEW (directory_view));
#if GNOME2_CONVERSION_COMPLETE
/* FIXME: This needs to update the emblems of the icons, since /* FIXME: This needs to update the emblems of the icons, since
* relative emblems may have changed. * relative emblems may have changed.
*/ */
#endif
} }
static char * static char *
......
...@@ -124,7 +124,7 @@ static void destroy_node_without_reporting (FMTreeModel *model, ...@@ -124,7 +124,7 @@ static void destroy_node_without_reporting (FMTreeModel *model,
static void report_node_contents_changed (FMTreeModel *model, static void report_node_contents_changed (FMTreeModel *model,
TreeNode *node); TreeNode *node);
static guint static GtkTreeModelFlags
fm_tree_model_get_flags (GtkTreeModel *tree_model) fm_tree_model_get_flags (GtkTreeModel *tree_model)
{ {
return GTK_TREE_MODEL_ITERS_PERSIST; return GTK_TREE_MODEL_ITERS_PERSIST;
...@@ -489,7 +489,7 @@ create_node_for_file (FMTreeModelRoot *root, NautilusFile *file) ...@@ -489,7 +489,7 @@ create_node_for_file (FMTreeModelRoot *root, NautilusFile *file)
return node; return node;
} }
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
static char * static char *
get_node_uri (GtkTreeIter *iter) get_node_uri (GtkTreeIter *iter)
...@@ -525,7 +525,7 @@ abandon_node_ref_count (FMTreeModel *model, TreeNode *node) ...@@ -525,7 +525,7 @@ abandon_node_ref_count (FMTreeModel *model, TreeNode *node)
{ {
if (node->parent != NULL) { if (node->parent != NULL) {
decrement_ref_count (model, node->parent, node->ref_count); decrement_ref_count (model, node->parent, node->ref_count);
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
if (node->ref_count != 0) { if (node->ref_count != 0) {
char *uri; char *uri;
...@@ -544,7 +544,7 @@ abandon_dummy_row_ref_count (FMTreeModel *model, TreeNode *node) ...@@ -544,7 +544,7 @@ abandon_dummy_row_ref_count (FMTreeModel *model, TreeNode *node)
{ {
decrement_ref_count (model, node, node->dummy_child_ref_count); decrement_ref_count (model, node, node->dummy_child_ref_count);
if (node->dummy_child_ref_count != 0) { if (node->dummy_child_ref_count != 0) {
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
char *uri; char *uri;
uri = nautilus_file_get_uri (node->file); uri = nautilus_file_get_uri (node->file);
...@@ -1475,7 +1475,7 @@ static void ...@@ -1475,7 +1475,7 @@ static void
fm_tree_model_ref_node (GtkTreeModel *model, GtkTreeIter *iter) fm_tree_model_ref_node (GtkTreeModel *model, GtkTreeIter *iter)
{ {
TreeNode *node, *parent; TreeNode *node, *parent;
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
char *uri; char *uri;
#endif #endif
...@@ -1501,7 +1501,7 @@ fm_tree_model_ref_node (GtkTreeModel *model, GtkTreeIter *iter) ...@@ -1501,7 +1501,7 @@ fm_tree_model_ref_node (GtkTreeModel *model, GtkTreeIter *iter)
} }
schedule_monitoring_update (FM_TREE_MODEL (model)); schedule_monitoring_update (FM_TREE_MODEL (model));
} }
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
uri = get_node_uri (iter); uri = get_node_uri (iter);
g_message ("ref of %s, count is now %d", g_message ("ref of %s, count is now %d",
uri, parent->all_children_ref_count); uri, parent->all_children_ref_count);
...@@ -1514,7 +1514,7 @@ static void ...@@ -1514,7 +1514,7 @@ static void
fm_tree_model_unref_node (GtkTreeModel *model, GtkTreeIter *iter) fm_tree_model_unref_node (GtkTreeModel *model, GtkTreeIter *iter)
{ {
TreeNode *node, *parent; TreeNode *node, *parent;
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
char *uri; char *uri;
#endif #endif
...@@ -1534,7 +1534,7 @@ fm_tree_model_unref_node (GtkTreeModel *model, GtkTreeIter *iter) ...@@ -1534,7 +1534,7 @@ fm_tree_model_unref_node (GtkTreeModel *model, GtkTreeIter *iter)
if (parent != NULL) { if (parent != NULL) {
g_assert (parent->all_children_ref_count > 0); g_assert (parent->all_children_ref_count > 0);
#if LOG_REF_COUNTS #ifdef LOG_REF_COUNTS
uri = get_node_uri (iter); uri = get_node_uri (iter);
g_message ("unref of %s, count is now %d", g_message ("unref of %s, count is now %d",
uri, parent->all_children_ref_count - 1); uri, parent->all_children_ref_count - 1);
......
...@@ -144,7 +144,7 @@ static void ...@@ -144,7 +144,7 @@ static void
exif_content_callback (ExifContent *content, gpointer data) exif_content_callback (ExifContent *content, gpointer data)
{ {
struct ExifAttribute *attribute; struct ExifAttribute *attribute;
#if !HAVE_OLD_EXIF #ifndef HAVE_OLD_EXIF
char b[1024]; char b[1024];
#endif #endif
......
...@@ -72,7 +72,7 @@ nautilus_navigation_bar_class_init (NautilusNavigationBarClass *klass) ...@@ -72,7 +72,7 @@ nautilus_navigation_bar_class_init (NautilusNavigationBarClass *klass)
signals[CANCEL] = g_signal_new signals[CANCEL] = g_signal_new
("cancel", ("cancel",
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | GTK_RUN_ACTION, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (NautilusNavigationBarClass, G_STRUCT_OFFSET (NautilusNavigationBarClass,
cancel), cancel),
NULL, NULL, NULL, NULL,
......
...@@ -209,7 +209,7 @@ nautilus_query_editor_class_init (NautilusQueryEditorClass *class) ...@@ -209,7 +209,7 @@ nautilus_query_editor_class_init (NautilusQueryEditorClass *class)
signals[CANCEL] = signals[CANCEL] =
g_signal_new ("cancel", g_signal_new ("cancel",
G_TYPE_FROM_CLASS (class), G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST | GTK_RUN_ACTION, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (NautilusQueryEditorClass, cancel), G_STRUCT_OFFSET (NautilusQueryEditorClass, cancel),
NULL, NULL, NULL, NULL,
g_cclosure_marshal_VOID__VOID, g_cclosure_marshal_VOID__VOID,
......
...@@ -89,7 +89,7 @@ nautilus_search_bar_class_init (NautilusSearchBarClass *class) ...@@ -89,7 +89,7 @@ nautilus_search_bar_class_init (NautilusSearchBarClass *class)
signals[CANCEL] = signals[CANCEL] =
g_signal_new ("cancel", g_signal_new ("cancel",
G_TYPE_FROM_CLASS (class), G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST | GTK_RUN_ACTION, G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (NautilusSearchBarClass, cancel), G_STRUCT_OFFSET (NautilusSearchBarClass, cancel),
NULL, NULL, NULL, NULL,
g_cclosure_marshal_VOID__VOID, g_cclosure_marshal_VOID__VOID,
......
...@@ -188,7 +188,7 @@ void nautilus_menus_append_bookmark_to_menu (Nautil ...@@ -188,7 +188,7 @@ void nautilus_menus_append_bookmark_to_menu (Nautil
guint merge_id, guint merge_id,
GCallback refresh_callback, GCallback refresh_callback,
NautilusBookmarkFailedCallback failed_callback); NautilusBookmarkFailedCallback failed_callback);
#if NEW_UI_COMPLETE #ifdef NEW_UI_COMPLETE
void nautilus_window_go_up (NautilusWindow *window); void nautilus_window_go_up (NautilusWindow *window);
#endif #endif
void nautilus_window_update_find_menu_item (NautilusWindow *window); void nautilus_window_update_find_menu_item (NautilusWindow *window);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment