[tepl] LanguageChooser: add some comments



commit b9531b732c1731bdee2a1109e89f80f97542e81d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Nov 1 23:49:28 2020 +0100

    LanguageChooser: add some comments

 tepl/tepl-language-chooser.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/tepl/tepl-language-chooser.c b/tepl/tepl-language-chooser.c
index e2e660e..c380f0e 100644
--- a/tepl/tepl-language-chooser.c
+++ b/tepl/tepl-language-chooser.c
@@ -10,6 +10,17 @@
  * @Short_description: Interface implemented by widgets for choosing a #GtkSourceLanguage
  */
 
+/* API design:
+ * Consistency with GtkSourceStyleSchemeChooser:
+ * - The name, but applied for GtkSourceLanguage.
+ * - The fact to have an interface with different implementations.
+ *
+ * Previous names, in gedit: GeditHighlightModeSelector for the widget,
+ * GeditHighlightModeDialog for the dialog. Without an interface, the Selector
+ * object (used by composition) was exposed in the API of the Dialog, to avoid
+ * repeating the API.
+ */
+
 enum
 {
        SIGNAL_LANGUAGE_ACTIVATED,
@@ -41,6 +52,9 @@ tepl_language_chooser_default_init (TeplLanguageChooserInterface *interface)
         *
         * Since: 5.2
         */
+       /* Note about the signal name, it's to be consistent with
+        * ::row-activated.
+        */
        signals[SIGNAL_LANGUAGE_ACTIVATED] =
                g_signal_new ("language-activated",
                              G_TYPE_FROM_INTERFACE (interface),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]