[vlc-devel] commit: Interaction: remove dummy new state ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Feb 1 13:31:13 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Feb 1 14:30:47 2009 +0200| [6a25e4f971209a5262a6f2719c8fee21bf513ec2] | committer: Rémi Denis-Courmont
Interaction: remove dummy new state
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a25e4f971209a5262a6f2719c8fee21bf513ec2
---
include/vlc_interface.h | 3 +--
src/interface/interaction.c | 15 ++++++---------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/include/vlc_interface.h b/include/vlc_interface.h
index d4ea0df..2c63d4a 100644
--- a/include/vlc_interface.h
+++ b/include/vlc_interface.h
@@ -252,8 +252,7 @@ enum
/** Possible status */
enum
{
- NEW_DIALOG, ///< Just created
- SENT_DIALOG, ///< Sent to interface
+ SENT_DIALOG=1, ///< Sent to interface
UPDATED_DIALOG, ///< Update to send
ANSWERED_DIALOG, ///< Got "answer"
HIDING_DIALOG, ///< Hiding requested
diff --git a/src/interface/interaction.c b/src/interface/interaction.c
index f0ebee5..2ebb86a 100644
--- a/src/interface/interaction.c
+++ b/src/interface/interaction.c
@@ -77,7 +77,7 @@ static int DialogSend( interaction_dialog_t * );
if( !p_new ) return err; \
p_new->p_parent = vlc_object_hold( p_this ); \
p_new->b_cancelled = false; \
- p_new->i_status = NEW_DIALOG; \
+ p_new->i_status = SENT_DIALOG; \
p_new->i_flags = 0; \
p_new->i_type = INTERACT_DIALOG_##type; \
p_new->psz_returned[0] = NULL; \
@@ -502,7 +502,12 @@ static int DialogSend( interaction_dialog_t *p_dialog )
p_dialog->i_flags & DIALOG_BLOCKING_ERROR ||
p_dialog->i_flags & DIALOG_NONBLOCKING_ERROR )
{
+ vlc_value_t val;
+
p_dialog->p_interaction = p_interaction;
+ p_dialog->i_action = INTERACT_NEW;
+ val.p_address = p_dialog;
+ var_Set( p_dialog->p_interface, "interaction", val );
/* Check if we have already added this dialog */
vlc_object_lock( p_interaction );
@@ -612,14 +617,6 @@ static void InteractionManage( interaction_t *p_interaction )
i_index--;
DialogDestroy( p_dialog );
break;
- case NEW_DIALOG:
- /* This is truly a new dialog, send it. */
-
- p_dialog->i_action = INTERACT_NEW;
- val.p_address = p_dialog;
- var_Set( p_dialog->p_interface, "interaction", val );
- p_dialog->i_status = SENT_DIALOG;
- break;
}
}
}
More information about the vlc-devel
mailing list