GTK: Migrate from GtkAction to GAction

This commit is contained in:
Emmanuel Gil Peyrot 2020-08-29 19:49:17 +02:00
parent 0c9a8a5282
commit ef0e3b3adf
4 changed files with 1395 additions and 710 deletions

View File

@ -276,7 +276,7 @@ static void cheatListEnd()
{ {
cheats->save(); cheats->save();
if(shouldBeRunning) if(shouldBeRunning)
Launch(); Launch(NULL, NULL, NULL);
} }
static GtkListStore *cheat_list_populate() static GtkListStore *cheat_list_populate()
@ -331,10 +331,10 @@ static GtkWidget *cheat_list_create_ui()
return tree; return tree;
} }
void CheatList () void CheatList(GSimpleAction *action, GVariant *parameter, gpointer user_data)
{ {
shouldBeRunning = desmume_running(); shouldBeRunning = desmume_running();
Pause(); Pause(NULL, NULL, NULL);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL); win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win),"Cheat List"); gtk_window_set_title(GTK_WINDOW(win),"Cheat List");
gtk_window_set_modal(GTK_WINDOW(win), TRUE); gtk_window_set_modal(GTK_WINDOW(win), TRUE);
@ -425,10 +425,10 @@ static void cheatSearchEnd()
{ {
} }
void CheatSearch () void CheatSearch(GSimpleAction *action, GVariant *parameter, gpointer user_data)
{ {
shouldBeRunning = desmume_running(); shouldBeRunning = desmume_running();
Pause(); Pause(NULL, NULL, NULL);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL); win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(win),"Cheat Search"); gtk_window_set_title(GTK_WINDOW(win),"Cheat Search");
gtk_window_set_modal(GTK_WINDOW(win), TRUE); gtk_window_set_modal(GTK_WINDOW(win), TRUE);

View File

@ -22,8 +22,8 @@
#ifndef __CHEATS_H__ #ifndef __CHEATS_H__
#define __CHEATS_H__ #define __CHEATS_H__
void CheatSearch (); void CheatSearch(GSimpleAction *action, GVariant *parameter, gpointer user_data);
void CheatList (); void CheatList(GSimpleAction *action, GVariant *parameter, gpointer user_data);
#endif /*__CHEATS_H__*/ #endif /*__CHEATS_H__*/

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#ifndef __DESMUME_GTK_MAIN_H__ #ifndef __DESMUME_GTK_MAIN_H__
#define __DESMUME_GTK_MAIN_H__ #define __DESMUME_GTK_MAIN_H__
void Pause(); void Pause(GSimpleAction *action, GVariant *parameter, gpointer user_data);
void Launch(); void Launch(GSimpleAction *action, GVariant *parameter, gpointer user_data);
#endif #endif