mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
menuselect: Fix GTK menu callbacks for Fedora 42 compatibility
This patch resolves a build failure in `menuselect_gtk.c` when running
`make menuconfig` on Fedora 42. The new version of GTK introduced stricter
type checking for callback signatures.
Changes include:
- Add wrapper functions to match the expected `void (*)(void)` signature.
- Update `menu_items` array to use these wrappers.
Fixes: #1243
(cherry picked from commit 28f5d4a2ec
)
This commit is contained in:
committed by
George Joseph
parent
ea1c2fb9b8
commit
6a5981307b
@@ -48,9 +48,9 @@ enum {
|
|||||||
NUM_COLUMNS,
|
NUM_COLUMNS,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void handle_save(GtkWidget *w, gpointer data);
|
static void handle_save(void);
|
||||||
static void handle_about(GtkWidget *w, gpointer data);
|
static void handle_about(void);
|
||||||
static void handle_quit(GtkWidget *w, gpointer data);
|
static void handle_quit(void);
|
||||||
|
|
||||||
static GtkItemFactoryEntry menu_items[] = {
|
static GtkItemFactoryEntry menu_items[] = {
|
||||||
{ "/_File", NULL, NULL, 0, "<Branch>" },
|
{ "/_File", NULL, NULL, 0, "<Branch>" },
|
||||||
@@ -70,13 +70,13 @@ static GtkWidget *window;
|
|||||||
static int main_res = 1;
|
static int main_res = 1;
|
||||||
static int change_made = 0;
|
static int change_made = 0;
|
||||||
|
|
||||||
static void handle_save(GtkWidget *w, gpointer data)
|
static void handle_save()
|
||||||
{
|
{
|
||||||
main_res = 0;
|
main_res = 0;
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_about(GtkWidget *w, gpointer data)
|
static void handle_about()
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_quit(GtkWidget *widget, gpointer data)
|
static void handle_quit()
|
||||||
{
|
{
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user