X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fgtk%2Ffilemenu.c;h=3c36fec6449784df97ef6962766044c17037ca45;hb=f7e3f1d8d0438f52e4f988a12318075cc1b43568;hp=d2dae9c15b3d840124b6fff3f23adea6cff25bfd;hpb=1eb382f72510d50b3636fb88c4bfaf17183672b6;p=emu8051.git diff --git a/src/gtk/filemenu.c b/src/gtk/filemenu.c index d2dae9c..3c36fec 100644 --- a/src/gtk/filemenu.c +++ b/src/gtk/filemenu.c @@ -4,19 +4,7 @@ * Copyright (C) 1999 Jonathan St-André * Copyright (C) 1999 Hugo Villeneuve * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + * This file is released under the GPLv2 */ #if HAVE_CONFIG_H @@ -28,7 +16,7 @@ #include #include "common.h" -#include "emugtk.h" +#include "main.h" #include "messagebox.h" #include "filemenu.h" @@ -56,14 +44,18 @@ remember_current_folder(GtkFileChooser *chooser) } } -void -FileOpenEvent(GtkObject *object, gpointer data) +static void +file_open_event(GtkObject *object, gpointer data) { GtkWidget *file_dialog; char *dir; char *cwd = NULL; - log_info("FileOpenEvent()"); + /* Remove compiler warning about unused variables. */ + (void) object; + (void) data; + + log_info("file_open_event()"); /* Create a new file selection widget. */ file_dialog = gtk_file_chooser_dialog_new( @@ -105,13 +97,16 @@ FileOpenEvent(GtkObject *object, gpointer data) } static void -FileQuitEvent(gchar *string) +file_quit_event(gchar *string) { + /* Remove compiler warning about unused variables. */ + (void) string; + emugtk_quit_gui(); } void -FileAddMenu(GtkWidget *menu_bar) +file_add_menu(GtkWidget *menu_bar) { GtkWidget *item; GtkWidget *menu; @@ -122,14 +117,14 @@ FileAddMenu(GtkWidget *menu_bar) item = gtk_menu_item_new_with_label(FILENAME_DESCRIPTION); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); /* Attach the callback functions to the activate signal. */ - g_signal_connect(item, "activate", G_CALLBACK(FileOpenEvent), NULL); + g_signal_connect(item, "activate", G_CALLBACK(file_open_event), NULL); - AddMenuSeparator(menu); + add_menu_separator(menu); item = gtk_menu_item_new_with_label("Exit"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); /* We can attach the Quit menu item to our exit function */ - g_signal_connect(item, "activate", G_CALLBACK(FileQuitEvent), + g_signal_connect(item, "activate", G_CALLBACK(file_quit_event), (gpointer) "file.quit"); /* Adding submenu title. */