codebrainz commented on this pull request.
@@ -736,13 +739,9 @@ static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, gpoint
} else if (event->button == 3) { - static GtkWidget *popup_menu = NULL;
One of the meanings in C of `static` is that it's only initialized once for the whole runtime, so the above code initializes `popup_menu` to `NULL` for the only/one-time initialization. Then the `if (popup_menu == NULL)` branch says "if this is the first time through this code, assign `popup_menu` with some runtime value and then never enter this branch again." It's not terribly good code, IMO, but it isn't wrong either.
I have to revert this?
I'm not strictly opposed to the change, it just looks completely unrelated to the pull request and an argument could be made that if it's only used in one place, and it's going to leak memory anyway, then having the variable definition closer to the use of it is best.