* 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
#include <gtk/gtk.h>
#include "common.h"
-#include "emugtk.h" /* For AddMenuSeparator() function. */
+#include "main.h" /* For AddMenuSeparator() function. */
#include "messagebox.h"
#include "viewmenu.h"
#include "app-config.h"
{
int id;
- id = GPOINTER_TO_UINT(data);
+ id = GPOINTER_TO_UINT(data);
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
log_info(" Switching to layout %d", id);
cfg->layout = id;
- emugtk_restart_gui();
+
+ message_show_information(
+ "You must restart for the changes to take effect");
}
}
{
int bytes_per_row;
- bytes_per_row = GPOINTER_TO_UINT(data);
+ bytes_per_row = GPOINTER_TO_UINT(data);
if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) {
log_info(" Bytes per row = %d", bytes_per_row);
layout2 = gtk_radio_menu_item_new_with_label(group, "Layout2");
if (cfg->layout == UI_LAYOUT1)
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(layout1), TRUE);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(layout1),
+ TRUE);
else
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(layout2), TRUE);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(layout2),
+ TRUE);
g_signal_connect(G_OBJECT(layout1), "activate",
G_CALLBACK(toggle_layout), (gpointer) UI_LAYOUT1);
item2 = gtk_radio_menu_item_new_with_label(group, "16");
if (cfg->bytes_per_row == 8)
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item1), TRUE);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item1),
+ TRUE);
else
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item2), TRUE);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item2),
+ TRUE);
g_signal_connect(G_OBJECT(item1), "activate",
G_CALLBACK(toggle_bytes_per_row), (gpointer) 8);
}
void
-ViewAddMenu(GtkWidget *menu_bar)
+view_add_menu(GtkWidget *menu_bar)
{
GtkWidget *item;
GtkWidget *menu;
g_signal_connect(G_OBJECT(item), "activate",
G_CALLBACK(toggle_ext_memory), NULL);
- AddMenuSeparator(menu);
+ add_menu_separator(menu);
/* Add layout submenu */
view_add_layout_submenu(menu);
- AddMenuSeparator(menu);
+ add_menu_separator(menu);
/* Add bytes per row submenu */
view_add_bytes_per_row_submenu(menu);