mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
6d5f07d86e
* libnautilus/gnome-icon-container-dnd.c: (create_selection_shadow): (set_gnome_icon_list_selection): (get_gnome_icon_list_selection): (gnome_icon_container_receive_dropped_icons): Redid drag code so that it will work if there are multiple windows involved, although we still don't handle copies. Changed selection to include the width and height of the icon, and to hold the top left of the icon. * libnautilus/gnome-icon-container-private.h: libnautilus/gnome-icon-container.c: (move_icon): (gnome_icon_container_move_icon): Made move_icon visible to the DnD code, and added a raise boolean so it could move and icon and bring it to the front. (gnome_icon_container_get_icon_by_uri): (gnome_icon_container_select_list_unselect_others): Added new functions for use by DnD code. * libnautilus/gnome-icon-container-private.h: libnautilus/gnome-icon-container.c: (handle_icon_button_press): Got rid of unused drag_x_offset and drag_y_offset. * libnautilus/gnome-icon-container.c: (icon_select): (icon_toggle_selected): (select_icon): (select_one_unselect_others): (toggle_icon): (unselect_all_but_one): (unselect_all): (rubberband_select_in_cell): (kbd_move_to): (kbd_space): (linger_select_timeout_cb): (handle_icon_button_press): (gnome_icon_container_select_all): (gnome_icon_container_unselect_all): Cleaned up selection logic and made it simpler. * libnautilus/gnome-icon-container.h: libnautilus/gnome-icon-container.c: (gnome_icon_container_xlate_selected): Got rid of unused function. * libnautilus/nautilus-self-checks.h: libnautilus/nautilus-self-checks.c: (nautilus_self_checks_failed): (nautilus_exit_if_self_checks_failed): src/ntl-main.c: (main): Added blank lines before and after the first and last failed checks when at least one check fails. * src/ntl-view.c: (nautilus_view_destroy): Removed a straggler message. (I hope Elliot's not still using it.) * RENAMING: Some new name ideas.
62 lines
2.2 KiB
C
62 lines
2.2 KiB
C
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
|
|
|
|
nautilus-self-checks.h: The self-check framework.
|
|
|
|
Copyright (C) 1999 Eazel, Inc.
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public
|
|
License along with this program; if not, write to the
|
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA.
|
|
|
|
Author: Darin Adler <darin@eazel.com>
|
|
*/
|
|
|
|
#ifndef NAUTILUS_SELF_CHECKS_H
|
|
#define NAUTILUS_SELF_CHECKS_H
|
|
|
|
#include <glib.h>
|
|
|
|
#define NAUTILUS_CHECK_RESULT(type, expression, expected_value) \
|
|
G_STMT_START { \
|
|
nautilus_before_check (#expression, __FILE__, __LINE__); \
|
|
nautilus_check_##type##_result (expression, expected_value); \
|
|
} G_STMT_END
|
|
|
|
#define NAUTILUS_CHECK_BOOLEAN_RESULT(expression, expected_value) \
|
|
NAUTILUS_CHECK_RESULT(boolean, expression, expected_value)
|
|
#define NAUTILUS_CHECK_INTEGER_RESULT(expression, expected_value) \
|
|
NAUTILUS_CHECK_RESULT(integer, expression, expected_value)
|
|
#define NAUTILUS_CHECK_STRING_RESULT(expression, expected_value) \
|
|
NAUTILUS_CHECK_RESULT(string, expression, expected_value)
|
|
|
|
void nautilus_exit_if_self_checks_failed (void);
|
|
|
|
void nautilus_before_check (const char *expression,
|
|
const char *file_name,
|
|
int line_number);
|
|
|
|
void nautilus_check_boolean_result (gboolean result,
|
|
gboolean expected_value);
|
|
void nautilus_check_integer_result (long result,
|
|
long expected_value);
|
|
void nautilus_check_string_result (char *result,
|
|
const char *expected_value);
|
|
|
|
#define NAUTILUS_SELF_CHECK_FUNCTION_PROTOTYPE(function) \
|
|
void function (void);
|
|
|
|
#define NAUTILUS_CALL_SELF_CHECK_FUNCTION(function) \
|
|
function ();
|
|
|
|
#endif /* NAUTILUS_SELF_CHECKS_H */
|