Add option no-define to AM_INIT_AUTOMAKE
[emu8051.git] / src / gtk / filemenu.c
index d2dae9c..3c36fec 100644 (file)
@@ -4,19 +4,7 @@
  * Copyright (C) 1999 Jonathan St-AndrĂ©
  * Copyright (C) 1999 Hugo Villeneuve <hugo@hugovil.com>
  *
- * 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 <gtk/gtk.h>
 
 #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. */