diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2024-11-03 21:07:34 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2024-11-03 21:12:10 +0100 |
| commit | e36217208802c001f1fbc758e5f103cbc4f339a2 (patch) | |
| tree | 6b11d491a9bf110d1f89ce9ab8809adf72ca2a4b /src/services/quick-answer-service.c | |
| parent | 497f0388aee4b7ae0df92bb2b3617c524e5a5496 (diff) | |
add unit tests for math
Diffstat (limited to 'src/services/quick-answer-service.c')
| -rw-r--r-- | src/services/quick-answer-service.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/services/quick-answer-service.c b/src/services/quick-answer-service.c index 8071998..670a72f 100644 --- a/src/services/quick-answer-service.c +++ b/src/services/quick-answer-service.c @@ -3,6 +3,12 @@ #include "launcher-item.h" #include <gdk/gdk.h> +// +// FoobarQuickAnswer: +// +// A launcher item representing a quick, one-line answer to the query entered by the user. +// + struct _FoobarQuickAnswer { GObject parent_instance; @@ -48,6 +54,13 @@ G_DEFINE_FINAL_TYPE_WITH_CODE( G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE( FOOBAR_TYPE_LAUNCHER_ITEM, foobar_quick_answer_launcher_item_interface_init ) ) +// +// FoobarQuickAnswerService: +// +// Service providing quick answers for search queries in the launcher (if available). This includes evaluating +// mathematical expressions. +// + struct _FoobarQuickAnswerService { GObject parent_instance; @@ -324,7 +337,7 @@ FoobarQuickAnswer* foobar_quick_answer_service_query_math( gchar const* query ) FoobarMathExpression* expr = foobar_math_parse( tokens, token_count ); if ( expr ) { - foobar_math_expression_print( expr, 0 ); + // foobar_math_expression_print( expr, 0 ); FoobarMathValue val = { 0 }; if ( foobar_math_evaluate( expr, &val ) ) |
