]> git.sesse.net Git - vlc/blobdiff - src/interface/dialog.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / src / interface / dialog.c
index 50500405adad7f948af61129ad033187744f6011..fd3568c33f3148c30e7e1b2a765ab4465f6a5cd6 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <vlc_common.h>
 #include <vlc_dialog.h>
+#include <vlc_extensions.h>
 #include <assert.h>
 #include "libvlc.h"
 
@@ -130,7 +131,7 @@ void dialog_VFatal (vlc_object_t *obj, bool modal, const char *title,
 #undef dialog_Login
 /**
  * Requests a username and password through the user interface.
- * @param obj the VLC object requesting credential informations
+ * @param obj the VLC object requesting credential information
  * @param username a pointer to the specified username [OUT]
  * @param password a pointer to the specified password [OUT]
  * @param title title for the dialog
@@ -259,3 +260,23 @@ bool dialog_ProgressCancelled (dialog_progress_bar_t *dialog)
     return dialog->pf_check (dialog->p_sys);
 }
 
+#undef dialog_ExtensionUpdate
+int dialog_ExtensionUpdate (vlc_object_t *obj, extension_dialog_t *dialog)
+{
+    assert (obj);
+    assert (dialog);
+
+    vlc_object_t *dp = dialog_GetProvider(obj);
+    if (!dp)
+    {
+        msg_Warn (obj, "Dialog provider is not set, can't update dialog '%s'",
+                  dialog->psz_title);
+        return VLC_EGENERIC;
+    }
+
+    // Signaling the dialog provider
+    int ret = var_SetAddress (dp, "dialog-extension", dialog);
+
+    vlc_object_release (dp);
+    return ret;
+}