@techee approved this pull request.

@b4n Thanks for having a look at those! Happy Colomban, happy everyone around 
:-).

Apart from the minor suggestion regarding the parentheses, everything looks 
good to me.

> @@ -906,7 +906,12 @@ static gint sort_found_tags(gconstpointer a, 
> gconstpointer b, gpointer user_data
         * followed by workspace tags,
         * followed by global tags */
        if (t1->type & tm_tag_local_var_t && t2->type & tm_tag_local_var_t)
-               return info->sort_by_name ? g_strcmp0(t1->name, t2->name) : 
t2->line - t1->line;
+       {
+               if (info->sort_by_name)
+                       return g_strcmp0(t1->name, t2->name);
+               else /* just like (t2->line - t1->line), but doesn't overflow 
converting to int */
+                       return (t2->line > t1->line) ? 1 : (t2->line < 
t1->line) ? -1 : 0;

I'd just suggest another pair of parentheses around the second ternary operator 
expression.

> -              * { 0, 19, "geany-3.0.css" },
-                */
-       };
-
-       guint gtk_version = gtk_get_minor_version();
-       for (guint i = 0; i < G_N_ELEMENTS(css_files); i++)
-       {
-               if (gtk_version >= css_files[i].min_version &&
-                       gtk_version <= css_files[i].max_version)
-               {
-                       theme_fn = g_build_filename(app->datadir, 
css_files[i].file, NULL);
-                       load_css_theme(theme_fn, 
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-                       g_free(theme_fn);
-               }
-       }
-

Yeah, I kept this when removing the old GTK3 stuff thinking it could be used 
for possible GTK4 or future versions (ambitious plans given Scintilla doesn't 
support it yet) but the code can always be revived from older Geany versions so 
it can go.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3665#pullrequestreview-1710927669
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3665/review/1710927...@github.com>

Reply via email to