Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Cameron Cawley
Browse
Commits
37aa211c
Commit
37aa211c
authored
27 years ago
by
David Brown
Browse files
Options
Download
Email Patches
Plain Diff
Canceling of drags implemented
parent
bece97ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
c/Hotlist
c/Hotlist
+54
-1
h/Hotlist
h/Hotlist
+2
-0
No files found.
c/Hotlist
View file @
37aa211c
...
...
@@ -120,6 +120,7 @@ static ToolboxEventHandler hotlist_reset_url_handler;
static
ToolboxEventHandler
hotlist_reset_directory_handler
;
static
ToolboxEventHandler
hotlist_show_descriptions_handler
;
static
ToolboxEventHandler
hotlist_show_urls_handler
;
static
ToolboxEventHandler
hotlist_drag_stop_handler
;
static
WimpMessageHandler
hotlist_data_save_ack_handler
;
static
WimpMessageHandler
hotlist_ram_fetch_handler
;
...
...
@@ -1079,7 +1080,7 @@ static int hotlist_clear_flags(hotlist_item * list, hotlist_type type, unsigned
if
(
type
==
hl_ALL
||
type
==
list
->
type
)
{
if
(
list
->
flags
&
~
flags
!=
list
->
flags
)
if
(
(
list
->
flags
&
~
flags
)
!=
list
->
flags
)
{
list
->
flags
|=
HOTLIST_G_REDRAW_NOW
;
changed
=
1
;
...
...
@@ -3247,6 +3248,11 @@ _kernel_oserror * hotlist_initialise(void)
hotlist_ram_fetch_handler
,
NULL
));
RetError
(
event_register_toolbox_handler
(
-
1
,
HotlistEscape
,
hotlist_drag_stop_handler
,
NULL
));
return
NULL
;
}
...
...
@@ -4052,6 +4058,53 @@ void hotlist_start_drag(void)
// return 0;
// }
/*************************************************/
/* hotlist_drag_stop_handler() */
/* */
/* Terminates any hotlist drag in progress */
/*************************************************/
static
int
hotlist_drag_stop_handler
(
int
event_code
,
ToolboxEvent
*
event
,
IdBlock
*
id_block
,
void
*
handle
)
{
if
(
hotlist_current_highlighted
)
{
hotlist_current_highlighted
->
flags
&=
~
HOTLIST_D_IS_HIGHLIGHTED
;
hotlist_redraw_items
(
highlighted_itemno
,
highlighted_itemno
);
hotlist_current_highlighted
=
NULL
;
}
switch
(
hotlist_dragging
)
{
default:
return
0
;
break
;
case
HOTLIST_SOLID_DRAG_OBJECT
:
/* Stop drag an object */
_swix
(
DragAnObject_Stop
,
0
);
deregister_null_claimant
(
Wimp_ENull
,
hotlist_null_handler
,
NULL
);
hotlist_dragging
=
0
;
break
;
case
HOTLIST_SOLID_DRAG_SPRITE
:
/* Stop drag a sprite */
_swix
(
DragASprite_Stop
,
0
);
deregister_null_claimant
(
Wimp_ENull
,
hotlist_null_handler
,
NULL
);
hotlist_dragging
=
0
;
break
;
case
HOTLIST_BOX_DRAG_SELECTION
:
/* Stop drag box */
wimp_drag_box
(
NULL
);
deregister_null_claimant
(
Wimp_ENull
,
hotlist_null_drag_select_handler
,
NULL
);
hotlist_clear_flags
(
hotlist_root
->
data
.
directory_content
,
hl_ALL
,
HOTLIST_G_DRAG_SELECTED
);
hotlist_redraw_now
();
hotlist_dragging
=
0
;
break
;
}
return
1
;
}
/*************************************************/
/* hotlist_drag_completed_handler() */
/* */
...
...
This diff is collapsed.
Click to expand it.
h/Hotlist
View file @
37aa211c
...
...
@@ -58,6 +58,8 @@
#define HotlistShowDesc 0x3013
#define HotlistShowURLs 0x3014
#define HotlistEscape 0x3015
/* Enumerations */
typedef
enum
hotlist_type
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment