summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-06-24 13:06:53 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-06-24 13:06:53 +0000
commit83a65e471b7b30c874cc59830bccc60501d6c660 (patch)
treedc6838d987460d9e39ba02fdcd87e3744564aa3b /mixgtk
parent0804fe838eceeec07f6935511789bec5e56f68fb (diff)
downloadmdk-83a65e471b7b30c874cc59830bccc60501d6c660.tar.gz
mdk-83a65e471b7b30c874cc59830bccc60501d6c660.tar.bz2
split windows mode
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/.cvsignore3
-rw-r--r--mixgtk/Makefile.am6
-rw-r--r--mixgtk/mixgtk.c64
-rw-r--r--mixgtk/mixgtk.glade1417
-rw-r--r--mixgtk/mixgtk_cmd_dispatcher.c11
-rw-r--r--mixgtk/mixgtk_cmd_dispatcher.h2
-rw-r--r--mixgtk/mixgtk_config.c22
-rw-r--r--mixgtk/mixgtk_config.h7
-rw-r--r--mixgtk/mixgtk_fontsel.c23
-rw-r--r--mixgtk/mixgtk_fontsel.h2
-rw-r--r--mixgtk/mixgtk_mixal.c13
-rw-r--r--mixgtk/mixgtk_mixal.h3
-rw-r--r--mixgtk/mixgtk_mixvm.c23
-rw-r--r--mixgtk/mixgtk_mixvm.h3
-rw-r--r--mixgtk/mixgtk_widgets.c32
-rw-r--r--mixgtk/mixgtk_widgets.h7
-rw-r--r--mixgtk/mixgtk_wm.c139
-rw-r--r--mixgtk/mixgtk_wm.h46
18 files changed, 1761 insertions, 62 deletions
diff --git a/mixgtk/.cvsignore b/mixgtk/.cvsignore
index 3682f8f..cf6d3f7 100644
--- a/mixgtk/.cvsignore
+++ b/mixgtk/.cvsignore
@@ -5,5 +5,8 @@ gmixvm
gmixvm.core
hello.mix
mixgtk
+mixgtk.glade.org
+mixgtk.glade1
+mixgtk.split.glade
paper.dev
semantic.cache
diff --git a/mixgtk/Makefile.am b/mixgtk/Makefile.am
index 83b5035..c7e9aed 100644
--- a/mixgtk/Makefile.am
+++ b/mixgtk/Makefile.am
@@ -10,9 +10,10 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-EXTRA_DIST = mixgtk.glade
+EXTRA_DIST = mixgtk.glade mixgtk.split.glade
INCLUDES = -I$(includedir) -DGLADE_FILE=\""$(pkgdatadir)/mixgtk.glade"\"\
-DLOCAL_GLADE_FILE=\"mixgtk.glade\"
+
LDADD = $(top_builddir)/mixlib/libmix.a $(top_builddir)/lib/libreplace.a $(INTLLIBS)
if MAKE_GUI
@@ -28,7 +29,8 @@ gmixvm_SOURCES = gmixvm.c mixgtk.h mixgtk.c \
mixgtk_mixal.h mixgtk_mixal.c \
mixgtk_input.h mixgtk_input.c \
mixgtk_colorsel.h mixgtk_colorsel.c \
- mixgtk_fontsel.h mixgtk_fontsel.c
+ mixgtk_fontsel.h mixgtk_fontsel.c \
+ mixgtk_wm.h mixgtk_wm.c
endif
diff --git a/mixgtk/mixgtk.c b/mixgtk/mixgtk.c
index ff218f6..6089dd2 100644
--- a/mixgtk/mixgtk.c
+++ b/mixgtk/mixgtk.c
@@ -32,27 +32,20 @@
#include "mixgtk_colorsel.h"
#include "mixgtk_fontsel.h"
#include "mixgtk_config.h"
+#include "mixgtk_wm.h"
#include "mixgtk.h"
+static const gchar *SPLIT_ARG_ = "-s";
+static const gchar *SPLIT_LONG_ARG_ = "--s";
/* initialise the app */
gboolean
mixgtk_init (int argc, char *argv[])
{
mix_vm_t *vm;
-
- const gchar *gfile = GLADE_FILE;
- FILE *f = fopen (gfile, "r");
- if (!f && !(f = fopen ((gfile = LOCAL_GLADE_FILE), "r")))
- {
- g_error ("Configuration file not found (tried %s and %s)",
- GLADE_FILE, LOCAL_GLADE_FILE);
- return FALSE;
- }
- fclose (f);
+ gboolean split = FALSE;
+ gint k;
- gtk_init (&argc, &argv);
-
mix_init_lib ();
if (!mixgtk_config_load ())
@@ -61,41 +54,62 @@ mixgtk_init (int argc, char *argv[])
return FALSE;
}
- if (!mixgtk_widget_factory_init (gfile))
+ for (k = 0; k < argc; ++k)
+ if (!strcmp (argv[k], SPLIT_ARG_) || !strcmp (argv[k], SPLIT_LONG_ARG_))
+ {
+ split = TRUE;
+ break;
+ }
+ if (!split && mixgtk_config_is_split ()) split = TRUE;
+ mixgtk_config_set_split (split);
+
+ gtk_init (&argc, &argv);
+
+ if (!mixgtk_widget_factory_init (split))
{
- g_error ("Unable to initialise application using %s\n", gfile);
+ g_error ("Unable to initialise application: missing glade file");
return FALSE;
}
- if (!mixgtk_cmd_dispatcher_init ())
+ if (!mixgtk_cmd_dispatcher_init (MIXGTK_MAIN))
{
g_error ("Unable to initialise application (command dispatcher)\n");
return FALSE;
}
+ if (split)
+ gtk_widget_show (mixgtk_widget_factory_get_dialog (MIXGTK_MAIN));
+
vm = mixgtk_cmd_dispatcher_get_vm ();
- if (!mixgtk_device_init (GTK_NOTEBOOK
- (mixgtk_widget_factory_get (MIXGTK_WIDGET_DEVICE)),
- vm))
+ if (!mixgtk_mixvm_init (vm, MIXGTK_MIXVM_DIALOG))
{
- g_error ("Unable to initialise application (devices)\n");
+ g_error ("Unable to initialise application (mixvm widgets)\n");
return FALSE;
}
- if (!mixgtk_mixvm_init (vm))
+ if (!mixgtk_mixal_init (vm, MIXGTK_MIXAL_DIALOG))
{
- g_error ("Unable to initialise application (mixvm widgets)\n");
+ g_error ("Unable to initialise application (mixal widgets)\n");
return FALSE;
}
- if (!mixgtk_mixal_init (vm))
+ if (!mixgtk_device_init (GTK_NOTEBOOK
+ (mixgtk_widget_factory_get
+ (MIXGTK_DEVICES_DIALOG, MIXGTK_WIDGET_DEVICE)),
+ vm))
{
- g_error ("Unable to initialise application (mixal widgets)\n");
+ g_error ("Unable to initialise application (devices)\n");
return FALSE;
}
-
- mixgtk_fontsel_load_defaults ();
+
+ if (!mixgtk_wm_init ())
+ {
+ g_error ("Unable to initialise application (visibility)\n");
+ return FALSE;
+ }
+
+ mixgtk_fontsel_load_defaults (split);
return TRUE;
}
diff --git a/mixgtk/mixgtk.glade b/mixgtk/mixgtk.glade
index 9962eb7..9d6fa49 100644
--- a/mixgtk/mixgtk.glade
+++ b/mixgtk/mixgtk.glade
@@ -352,6 +352,25 @@
</widget>
<widget>
+ <class>GtkCheckMenuItem</class>
+ <name>split_windows</name>
+ <signal>
+ <name>toggled</name>
+ <handler>on_split_windows_toggled</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:39:53 GMT</last_modification_time>
+ </signal>
+ <label>_Split windows</label>
+ <active>False</active>
+ <always_show_toggle>False</always_show_toggle>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>separator3</name>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
<class>GtkMenuItem</class>
<name>save</name>
<tooltip>Save current settings</tooltip>
@@ -1344,6 +1363,535 @@
</widget>
<widget>
+ <class>GtkWindow</class>
+ <name>split_main_window</name>
+ <visible>False</visible>
+ <signal>
+ <name>destroy</name>
+ <handler>on_main_window_destroy</handler>
+ <last_modification_time>Tue, 20 Feb 2001 21:58:29 GMT</last_modification_time>
+ </signal>
+ <title>gmixvm</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>570</default_width>
+ <default_height>215</default_height>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>True</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>main_vbox</name>
+ <border_width>2</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GtkMenuBar</class>
+ <name>mainmenubar</name>
+ <shadow_type>GTK_SHADOW_OUT</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file</name>
+ <label>_File</label>
+ <right_justify>False</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>file_menu</name>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file_open</name>
+ <tooltip>Load a MIX file</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_F3</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_file_open_activate</handler>
+ <last_modification_time>Tue, 20 Feb 2001 22:37:58 GMT</last_modification_time>
+ </signal>
+ <label>_Load...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>edit</name>
+ <tooltip>Edit a MIXAL source file</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_F4</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_file_edit_activate</handler>
+ <last_modification_time>Fri, 08 Jun 2001 21:11:13 GMT</last_modification_time>
+ </signal>
+ <label>_Edit...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>compile</name>
+ <tooltip>Compile a MIXAL source file</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_F5</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_file_compile_activate</handler>
+ <last_modification_time>Fri, 08 Jun 2001 21:11:33 GMT</last_modification_time>
+ </signal>
+ <label>_Compile...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>separator2</name>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file_exit</name>
+ <tooltip>Exit application</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_Q</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_file_exit_activate</handler>
+ <last_modification_time>Tue, 20 Feb 2001 22:37:58 GMT</last_modification_time>
+ </signal>
+ <label>E_xit</label>
+ <right_justify>False</right_justify>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>view</name>
+ <label>_View</label>
+ <right_justify>False</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>view_menu</name>
+
+ <widget>
+ <class>GtkCheckMenuItem</class>
+ <name>mix_view</name>
+ <signal>
+ <name>toggled</name>
+ <handler>on_view_toggled</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:24:52 GMT</last_modification_time>
+ </signal>
+ <label>_MIX</label>
+ <active>True</active>
+ <always_show_toggle>False</always_show_toggle>
+ </widget>
+
+ <widget>
+ <class>GtkCheckMenuItem</class>
+ <name>mixal_view</name>
+ <signal>
+ <name>toggled</name>
+ <handler>on_view_toggled</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:25:14 GMT</last_modification_time>
+ </signal>
+ <label>MI_XAL</label>
+ <active>True</active>
+ <always_show_toggle>False</always_show_toggle>
+ </widget>
+
+ <widget>
+ <class>GtkCheckMenuItem</class>
+ <name>devices_view</name>
+ <signal>
+ <name>toggled</name>
+ <handler>on_view_toggled</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:25:38 GMT</last_modification_time>
+ </signal>
+ <label>_Devices</label>
+ <active>True</active>
+ <always_show_toggle>False</always_show_toggle>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>debug</name>
+ <label>D_ebug</label>
+ <right_justify>False</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>debug_menu</name>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>debug_run</name>
+ <tooltip>Run program</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_R</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_debug_run_activate</handler>
+ <last_modification_time>Sat, 10 Mar 2001 11:35:16 GMT</last_modification_time>
+ </signal>
+ <label>_Run</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>debug_next</name>
+ <tooltip>Execute next instruction</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_N</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_debug_next_activate</handler>
+ <last_modification_time>Sat, 10 Mar 2001 11:35:16 GMT</last_modification_time>
+ </signal>
+ <label>_Next</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>clear_breakpoints</name>
+ <tooltip>Clear all set breakpoints</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_C</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_clear_breakpoints_activate</handler>
+ <last_modification_time>Thu, 15 Mar 2001 23:26:49 GMT</last_modification_time>
+ </signal>
+ <label>_Clear breakpoints</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>symbols</name>
+ <tooltip>Show the symbol table</tooltip>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_Y</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_symbols_activate</handler>
+ <last_modification_time>Mon, 18 Jun 2001 22:17:06 GMT</last_modification_time>
+ </signal>
+ <label>_Symbols...</label>
+ <right_justify>False</right_justify>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>settings1</name>
+ <label>_Settings</label>
+ <right_justify>False</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>settings1_menu</name>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>colors</name>
+ <tooltip>Change colors of MIXAL</tooltip>
+ <signal>
+ <name>activate</name>
+ <handler>on_colors_activate</handler>
+ <last_modification_time>Wed, 11 Apr 2001 23:15:11 GMT</last_modification_time>
+ </signal>
+ <label>_Colors...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>fonts1</name>
+ <label>Change _font</label>
+ <right_justify>False</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>fonts1_menu</name>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>mix</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_mix_font_activate</handler>
+ <last_modification_time>Wed, 25 Apr 2001 01:55:53 GMT</last_modification_time>
+ </signal>
+ <label>_MIX</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>mixal</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_mixal_font_activate</handler>
+ <last_modification_time>Wed, 25 Apr 2001 01:55:53 GMT</last_modification_time>
+ </signal>
+ <label>MI_XAL</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>command_prompt</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_prompt_font_activate</handler>
+ <last_modification_time>Wed, 25 Apr 2001 01:55:53 GMT</last_modification_time>
+ </signal>
+ <label>Command _prompt</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>command_log</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_log_font_activate</handler>
+ <last_modification_time>Wed, 25 Apr 2001 01:55:53 GMT</last_modification_time>
+ </signal>
+ <label>Command l_og</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>devices</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_devices_font_activate</handler>
+ <last_modification_time>Thu, 10 May 2001 21:38:40 GMT</last_modification_time>
+ </signal>
+ <label>De_vices</label>
+ <right_justify>False</right_justify>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>device_output1</name>
+ <tooltip>Change format of binary devices output</tooltip>
+ <signal>
+ <name>activate</name>
+ <handler>on_devform_activate</handler>
+ <last_modification_time>Wed, 30 May 2001 20:44:48 GMT</last_modification_time>
+ </signal>
+ <label>_Device output...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>external_programs1</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_external_programs_activate</handler>
+ <last_modification_time>Fri, 01 Jun 2001 23:35:01 GMT</last_modification_time>
+ </signal>
+ <label>E_xternal programs...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>separator1</name>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkCheckMenuItem</class>
+ <name>split_windows</name>
+ <signal>
+ <name>toggled</name>
+ <handler>on_split_windows_toggled</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:26:00 GMT</last_modification_time>
+ </signal>
+ <label>_Split windows</label>
+ <active>True</active>
+ <always_show_toggle>False</always_show_toggle>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>separator3</name>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>save</name>
+ <tooltip>Save current settings</tooltip>
+ <signal>
+ <name>activate</name>
+ <handler>on_save_activate</handler>
+ <last_modification_time>Sat, 28 Apr 2001 22:51:02 GMT</last_modification_time>
+ </signal>
+ <label>_Save</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkCheckMenuItem</class>
+ <name>save_on_exit</name>
+ <tooltip>Toogle save settings on exit</tooltip>
+ <signal>
+ <name>toggled</name>
+ <handler>on_save_on_exit_toggle</handler>
+ <last_modification_time>Sun, 29 Apr 2001 10:26:16 GMT</last_modification_time>
+ </signal>
+ <label>Save on _exit</label>
+ <active>False</active>
+ <always_show_toggle>False</always_show_toggle>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>help</name>
+ <label>_Help</label>
+ <right_justify>True</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>help_menu</name>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>about</name>
+ <signal>
+ <name>activate</name>
+ <handler>on_about_activate</handler>
+ <last_modification_time>Tue, 13 Mar 2001 01:37:20 GMT</last_modification_time>
+ </signal>
+ <label>_About...</label>
+ <right_justify>True</right_justify>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkStatusbar</class>
+ <name>main_statusbar</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox3</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>mixcmd_scrolledwindow</name>
+ <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>command_log</name>
+ <editable>False</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>command_prompt</name>
+ <tooltip>Enter MIXVM command here</tooltip>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <signal>
+ <name>key_press_event</name>
+ <handler>on_command_prompt_key_press_event</handler>
+ <after>True</after>
+ <last_modification_time>Wed, 06 Jun 2001 06:46:05 GMT</last_modification_time>
+ </signal>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
<class>GtkDialog</class>
<name>word_dialog</name>
<visible>False</visible>
@@ -2910,4 +3458,873 @@
</widget>
</widget>
+<widget>
+ <class>GtkWindow</class>
+ <name>mixvm_window</name>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:33:45 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>destroy_event</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:33:54 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>destroy</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:34:03 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>show</name>
+ <handler>mixgtk_mixvm_update_vm_widgets</handler>
+ <after>True</after>
+ <last_modification_time>Sun, 24 Jun 2001 12:45:56 GMT</last_modification_time>
+ </signal>
+ <title>Virtual machine</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>640</default_width>
+ <default_height>290</default_height>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>mixvm_widget</name>
+ <width>640</width>
+ <height>287</height>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rJ_entry</name>
+ <x>304</x>
+ <y>88</y>
+ <width>60</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:45:00 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rA_entry</name>
+ <x>40</x>
+ <y>24</y>
+ <width>120</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Mon, 12 Mar 2001 23:09:49 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rX_entry</name>
+ <x>248</x>
+ <y>24</y>
+ <width>120</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:43:29 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI2_entry</name>
+ <x>40</x>
+ <y>144</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:45:39 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI1_entry</name>
+ <x>40</x>
+ <y>88</y>
+ <width>60</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:43:44 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI3_entry</name>
+ <x>40</x>
+ <y>200</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:46:37 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI4_entry</name>
+ <x>168</x>
+ <y>88</y>
+ <width>60</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:44:21 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI6_entry</name>
+ <x>168</x>
+ <y>200</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:46:58 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label100</name>
+ <x>8</x>
+ <y>91</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I1</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label102</name>
+ <x>8</x>
+ <y>200</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I3</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label101</name>
+ <x>8</x>
+ <y>144</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I2</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label103</name>
+ <x>136</x>
+ <y>88</y>
+ <width>32</width>
+ <height>16</height>
+ <label>I4</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label104</name>
+ <x>136</x>
+ <y>144</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I5</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label105</name>
+ <x>136</x>
+ <y>200</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I6</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label98</name>
+ <x>216</x>
+ <y>24</y>
+ <width>31</width>
+ <height>16</height>
+ <label>X</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label97</name>
+ <x>8</x>
+ <y>24</y>
+ <width>31</width>
+ <height>16</height>
+ <label>A</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator2</name>
+ <x>0</x>
+ <y>8</y>
+ <width>16</width>
+ <height>263</height>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator3</name>
+ <x>626</x>
+ <y>8</y>
+ <width>16</width>
+ <height>267</height>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label99</name>
+ <x>272</x>
+ <y>88</y>
+ <width>31</width>
+ <height>16</height>
+ <label>J</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator2</name>
+ <x>6</x>
+ <y>265</y>
+ <width>627</width>
+ <height>16</height>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label159</name>
+ <x>8</x>
+ <y>248</y>
+ <width>64</width>
+ <height>16</height>
+ <label>Elapsed:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label158</name>
+ <x>128</x>
+ <y>248</y>
+ <width>64</width>
+ <height>16</height>
+ <label>Program:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label157</name>
+ <x>256</x>
+ <y>248</y>
+ <width>48</width>
+ <height>16</height>
+ <label>Uptime:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator1</name>
+ <x>376</x>
+ <y>10</y>
+ <width>16</width>
+ <height>263</height>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI5_entry</name>
+ <x>168</x>
+ <y>144</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>button_press_event</name>
+ <handler>on_register_click</handler>
+ <last_modification_time>Sun, 11 Mar 2001 11:46:05 GMT</last_modification_time>
+ </signal>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>loc_entry</name>
+ <x>300</x>
+ <y>200</y>
+ <width>40</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label167</name>
+ <x>256</x>
+ <y>200</y>
+ <width>48</width>
+ <height>16</height>
+ <label>LOC</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>loc_arrow</name>
+ <x>346</x>
+ <y>202</y>
+ <width>29</width>
+ <height>18</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>on_loc_arrow_clicked</handler>
+ <last_modification_time>Fri, 09 Mar 2001 20:18:22 GMT</last_modification_time>
+ </signal>
+ <label>-&gt;</label>
+ <relief>GTK_RELIEF_NONE</relief>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator1</name>
+ <x>8</x>
+ <y>232</y>
+ <width>377</width>
+ <height>16</height>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>program_label</name>
+ <x>184</x>
+ <y>248</y>
+ <width>56</width>
+ <height>16</height>
+ <label>000000</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>elapsed_label</name>
+ <x>64</x>
+ <y>248</y>
+ <width>48</width>
+ <height>16</height>
+ <label>000000</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>uptime_label</name>
+ <x>296</x>
+ <y>248</y>
+ <width>72</width>
+ <height>16</height>
+ <label>00000000</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkCheckButton</class>
+ <name>over_toggle</name>
+ <x>288</x>
+ <y>168</y>
+ <width>88</width>
+ <height>16</height>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>toggled</name>
+ <handler>on_overflow_toggled</handler>
+ <last_modification_time>Tue, 06 Mar 2001 21:32:39 GMT</last_modification_time>
+ </signal>
+ <label>Overflow</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>greater_radio</name>
+ <x>336</x>
+ <y>128</y>
+ <width>32</width>
+ <height>24</height>
+ <tooltip>Comparison flag: greater</tooltip>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>toggled</name>
+ <handler>on_cmp_g_toggled</handler>
+ <last_modification_time>Tue, 06 Mar 2001 21:21:40 GMT</last_modification_time>
+ </signal>
+ <label>G</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>cmp_group</group>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>memory_scroll</name>
+ <x>398</x>
+ <y>16</y>
+ <width>225</width>
+ <height>248</height>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>memory_cells</name>
+ <width>195</width>
+ <height>248</height>
+ <tooltip>Click cell to change value</tooltip>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>select_row</name>
+ <handler>on_memory_cells_select_row</handler>
+ <after>True</after>
+ <last_modification_time>Tue, 13 Mar 2001 07:38:52 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>click_column</name>
+ <handler>on_memory_cells_click_column</handler>
+ <last_modification_time>Wed, 14 Mar 2001 14:18:57 GMT</last_modification_time>
+ </signal>
+ <columns>2</columns>
+ <column_widths>53,135</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label165</name>
+ <label>address</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label166</name>
+ <label>contents</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>lesser_radio</name>
+ <x>264</x>
+ <y>128</y>
+ <width>35</width>
+ <height>24</height>
+ <tooltip>Comparison flag: lesser</tooltip>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>toggled</name>
+ <handler>on_cmp_l_toggled</handler>
+ <last_modification_time>Tue, 06 Mar 2001 21:21:51 GMT</last_modification_time>
+ </signal>
+ <label>L</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>cmp_group</group>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>equal_radio</name>
+ <x>304</x>
+ <y>128</y>
+ <width>31</width>
+ <height>24</height>
+ <tooltip>Comparison flag: equal</tooltip>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>toggled</name>
+ <handler>on_cmp_e_toggled</handler>
+ <last_modification_time>Tue, 06 Mar 2001 21:22:04 GMT</last_modification_time>
+ </signal>
+ <label>E</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>cmp_group</group>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator3</name>
+ <x>6</x>
+ <y>1</y>
+ <width>627</width>
+ <height>16</height>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>mixal_window</name>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:34:28 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>destroy_event</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:34:36 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>destroy</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:34:42 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>show</name>
+ <handler>mixgtk_mixal_update</handler>
+ <after>True</after>
+ <last_modification_time>Sun, 24 Jun 2001 12:43:33 GMT</last_modification_time>
+ </signal>
+ <title>MIXAL source</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>475</default_width>
+ <default_height>200</default_height>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow27</name>
+ <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>mixal_clist</name>
+ <tooltip>Click to toggle breakpoint</tooltip>
+ <can_focus>True</can_focus>
+ <events>GDK_POINTER_MOTION_MASK</events>
+ <signal>
+ <name>select_row</name>
+ <handler>on_mixal_select_row</handler>
+ <after>True</after>
+ <last_modification_time>Sun, 11 Mar 2001 01:15:28 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>motion_notify_event</name>
+ <handler>on_mixal_motion_notify_event</handler>
+ <last_modification_time>Sun, 17 Jun 2001 19:44:48 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>leave_notify_event</name>
+ <handler>on_mixal_leave_notify_event</handler>
+ <last_modification_time>Sat, 23 Jun 2001 22:26:17 GMT</last_modification_time>
+ </signal>
+ <columns>2</columns>
+ <column_widths>152,80</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label213</name>
+ <label>memory</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label214</name>
+ <label>source</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>devices_window</name>
+ <visible>False</visible>
+ <signal>
+ <name>delete_event</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:34:51 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>destroy_event</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:34:59 GMT</last_modification_time>
+ </signal>
+ <signal>
+ <name>destroy</name>
+ <handler>on_window_hide</handler>
+ <last_modification_time>Sun, 24 Jun 2001 12:35:09 GMT</last_modification_time>
+ </signal>
+ <title>Devices</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>550</default_width>
+ <default_height>250</default_height>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox4</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>devices_notebook</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>True</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label</name>
+ <label>label</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
</GTK-Interface>
diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c
index 240cf9e..be24fd5 100644
--- a/mixgtk/mixgtk_cmd_dispatcher.c
+++ b/mixgtk/mixgtk_cmd_dispatcher.c
@@ -290,13 +290,15 @@ on_extern_ok_button_clicked ()
/* initialise the command dispatcher */
gboolean
-mixgtk_cmd_dispatcher_init (void)
+mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top)
{
if (!dis_data_.prompt)
{
- dis_data_.prompt = mixgtk_widget_factory_get (MIXGTK_WIDGET_PROMPT);
+ dis_data_.prompt =
+ mixgtk_widget_factory_get (top, MIXGTK_WIDGET_PROMPT);
g_return_val_if_fail (dis_data_.prompt != NULL, FALSE);
- dis_data_.log = mixgtk_widget_factory_get (MIXGTK_WIDGET_LOG);
+ dis_data_.log =
+ mixgtk_widget_factory_get (top, MIXGTK_WIDGET_LOG);
g_return_val_if_fail (dis_data_.log != NULL, FALSE);
}
@@ -324,7 +326,8 @@ mixgtk_cmd_dispatcher_init (void)
if (!dis_data_.status)
{
- dis_data_.status = mixgtk_widget_factory_get (MIXGTK_WIDGET_STATUSBAR);
+ dis_data_.status =
+ mixgtk_widget_factory_get (MIXGTK_MAIN, MIXGTK_WIDGET_STATUSBAR);
g_return_val_if_fail (dis_data_.status != NULL, FALSE);
dis_data_.context = gtk_statusbar_get_context_id (GTK_STATUSBAR
(dis_data_.status),
diff --git a/mixgtk/mixgtk_cmd_dispatcher.h b/mixgtk/mixgtk_cmd_dispatcher.h
index 915f72b..a67ec26 100644
--- a/mixgtk/mixgtk_cmd_dispatcher.h
+++ b/mixgtk/mixgtk_cmd_dispatcher.h
@@ -30,7 +30,7 @@
/* initialise the command dispatcher */
extern gboolean
-mixgtk_cmd_dispatcher_init (void);
+mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top);
/* dispatch an externally provided command */
extern void
diff --git a/mixgtk/mixgtk_config.c b/mixgtk/mixgtk_config.c
index b886238..dfb1ad8 100644
--- a/mixgtk/mixgtk_config.c
+++ b/mixgtk/mixgtk_config.c
@@ -29,9 +29,13 @@
#include "mixgtk.h"
#include "mixgtk_config.h"
-#define CONFIG_FILENAME "config"
-#define COMMENT_PREFIX '#'
-#define AUTOSAVE_FLAG "Autosave"
+static const gchar *CONFIG_FILENAME = "config";
+static const gchar COMMENT_PREFIX = '#';
+static const gchar *AUTOSAVE_FLAG = "Autosave";
+static const gchar *SPLIT_KEY = "Split";
+static const gchar *SPLIT_YES = "Yes";
+static const gchar *SPLIT_NO = "No";
+
static GHashTable *items_;
static gchar *config_ = NULL;
@@ -147,3 +151,15 @@ mixgtk_config_save (void)
+gboolean
+mixgtk_config_is_split (void)
+{
+ const gchar *split = mixgtk_config_get (SPLIT_KEY);
+ return (split && !strcmp (split, SPLIT_YES));
+}
+
+void
+mixgtk_config_set_split (gboolean split)
+{
+ mixgtk_config_update (SPLIT_KEY, split? SPLIT_YES : SPLIT_NO);
+}
diff --git a/mixgtk/mixgtk_config.h b/mixgtk/mixgtk_config.h
index 04cc1d4..ea54ba4 100644
--- a/mixgtk/mixgtk_config.h
+++ b/mixgtk/mixgtk_config.h
@@ -50,6 +50,13 @@ mixgtk_config_get (const gchar *key);
extern void
mixgtk_config_save (void);
+/* shared config params */
+extern gboolean
+mixgtk_config_is_split (void);
+
+extern void
+mixgtk_config_set_split (gboolean split);
+
#endif /* MIXGTK_CONFIG_H */
diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c
index 0e7712d..ffb2209 100644
--- a/mixgtk/mixgtk_fontsel.c
+++ b/mixgtk/mixgtk_fontsel.c
@@ -46,6 +46,14 @@ static mixgtk_widget_id_t widget_ids_[] = {
MIXGTK_WIDGET_DEVICE
};
+static mixgtk_dialog_id_t dialog_ids_[] = {
+ MIXGTK_MIXVM_DIALOG,
+ MIXGTK_MAIN,
+ MIXGTK_MAIN,
+ MIXGTK_MIXAL_DIALOG,
+ MIXGTK_DEVICES_DIALOG
+};
+
static const gchar *keys_[] = {
"MIX.font", "Prompt.font", "Log.font", "MIXAL.font", "Device.font"
};
@@ -80,14 +88,17 @@ change_font_ (mixgtk_widget_id_t widget)
}
void
-mixgtk_fontsel_load_defaults (void)
+mixgtk_fontsel_load_defaults (gboolean split)
{
int i;
const gchar *font = NULL;
winfo_ = g_hash_table_new (NULL, NULL);
+ if (!split)
+ for (i - 0; i < WIDGET_NO_; ++i) dialog_ids_[i] = MIXGTK_MAIN;
for (i = 0; i < WIDGET_NO_; ++i)
{
- infos_[i].widget = mixgtk_widget_factory_get (widget_ids_[i]);
+ infos_[i].widget =
+ mixgtk_widget_factory_get (dialog_ids_[i], widget_ids_[i]);
g_assert (infos_[i].widget != NULL);
infos_[i].style = gtk_style_copy
(gtk_widget_get_style (infos_[i].widget));
@@ -96,8 +107,9 @@ mixgtk_fontsel_load_defaults (void)
{
int k;
for (k = MIXGTK_WIDGET_rA; k <= MIXGTK_WIDGET_UPTIME; ++k)
- gtk_widget_set_style (mixgtk_widget_factory_get (k),
- infos_[i].style);
+ gtk_widget_set_style
+ (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, k),
+ infos_[i].style);
}
infos_[i].key = keys_[i];
g_hash_table_insert (winfo_, GINT_TO_POINTER (widget_ids_[i]),
@@ -129,7 +141,8 @@ mixgtk_fontsel_set (mixgtk_widget_id_t widget, const gchar *font)
{
int k;
for (k = MIXGTK_WIDGET_rA; k <= MIXGTK_WIDGET_UPTIME; ++k)
- gtk_widget_draw (mixgtk_widget_factory_get (k), NULL);
+ gtk_widget_draw
+ (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, k), NULL);
}
}
mixgtk_config_update (w->key, w->font);
diff --git a/mixgtk/mixgtk_fontsel.h b/mixgtk/mixgtk_fontsel.h
index af09c15..705b369 100644
--- a/mixgtk/mixgtk_fontsel.h
+++ b/mixgtk/mixgtk_fontsel.h
@@ -30,7 +30,7 @@
/* load default (configured) fonts */
extern void
-mixgtk_fontsel_load_defaults (void);
+mixgtk_fontsel_load_defaults (gboolean split);
/* set a widget's font */
extern void
diff --git a/mixgtk/mixgtk_mixal.c b/mixgtk/mixgtk_mixal.c
index 916ef1e..73e9fc0 100644
--- a/mixgtk/mixgtk_mixal.c
+++ b/mixgtk/mixgtk_mixal.c
@@ -128,16 +128,17 @@ init_color_ (GdkColor *c, const gchar *name)
/* initialise the mixal widgets */
gboolean
-mixgtk_mixal_init (mix_vm_t *vm)
+mixgtk_mixal_init (mix_vm_t *vm, mixgtk_dialog_id_t top)
{
int i,j;
g_return_val_if_fail (vm != NULL, FALSE);
vm_ = vm;
- clist_ = GTK_CLIST (mixgtk_widget_factory_get (MIXGTK_WIDGET_MIXAL));
+ clist_ = GTK_CLIST (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_MIXAL));
g_return_val_if_fail (clist_ != NULL, FALSE);
- status_ = GTK_STATUSBAR (mixgtk_widget_factory_get (MIXGTK_WIDGET_STATUSBAR));
+ status_ = GTK_STATUSBAR
+ (mixgtk_widget_factory_get (MIXGTK_MAIN, MIXGTK_WIDGET_STATUSBAR));
g_return_val_if_fail (status_ != NULL, FALSE);
status_context_ = gtk_statusbar_get_context_id (status_, "MIXAL status");
@@ -420,3 +421,9 @@ on_notebook_switch_page (GtkNotebook *notebook)
if (p != MIXAL_TAB_POS_) gtk_statusbar_pop (status_, status_context_);
if (p == MIXAL_TAB_POS_) mixgtk_mixal_update ();
}
+
+void
+on_mixal_leave_notify_event ()
+{
+ gtk_statusbar_pop (status_, status_context_);
+}
diff --git a/mixgtk/mixgtk_mixal.h b/mixgtk/mixgtk_mixal.h
index eaf0e23..a1ab681 100644
--- a/mixgtk/mixgtk_mixal.h
+++ b/mixgtk/mixgtk_mixal.h
@@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <mixlib/mix_vm.h>
+#include "mixgtk_widgets.h"
/* the possible colorised elements */
typedef enum {
@@ -43,7 +44,7 @@ typedef enum {
/* initialise the mixal widget */
extern gboolean
-mixgtk_mixal_init (mix_vm_t *vm);
+mixgtk_mixal_init (mix_vm_t *vm, mixgtk_dialog_id_t top);
/* set the plain, location pointer and break colors */
extern void
diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c
index bee588a..2b13f18 100644
--- a/mixgtk/mixgtk_mixvm.c
+++ b/mixgtk/mixgtk_mixvm.c
@@ -109,7 +109,7 @@ on_mem_adj_change_ (GtkAdjustment *adj)
/* initialise the mixvm widgets */
gboolean
-mixgtk_mixvm_init (mix_vm_t *vm)
+mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top)
{
int k;
gchar *text[] = {"", ""};
@@ -124,34 +124,35 @@ mixgtk_mixvm_init (mix_vm_t *vm)
for (k = 0; k < REGISTER_NO_; ++k)
{
reg_entries_[k] =
- GTK_ENTRY (mixgtk_widget_factory_get (MIXGTK_WIDGET_rA + k));
+ GTK_ENTRY (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_rA + k));
g_return_val_if_fail (reg_entries_[k] != NULL, FALSE);
}
- loc_entry_ = GTK_ENTRY (mixgtk_widget_factory_get (MIXGTK_WIDGET_LOC));
+ loc_entry_ = GTK_ENTRY (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_LOC));
g_return_val_if_fail (loc_entry_ != NULL, FALSE);
- uptime_ = GTK_LABEL (mixgtk_widget_factory_get (MIXGTK_WIDGET_UPTIME));
+ uptime_ = GTK_LABEL (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_UPTIME));
g_return_val_if_fail (uptime_ != NULL, FALSE);
- progtime_ = GTK_LABEL (mixgtk_widget_factory_get (MIXGTK_WIDGET_PROGTIME));
+ progtime_ =
+ GTK_LABEL (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_PROGTIME));
g_return_val_if_fail (progtime_ != NULL, FALSE);
- laptime_ = GTK_LABEL (mixgtk_widget_factory_get (MIXGTK_WIDGET_LAPTIME));
+ laptime_ = GTK_LABEL (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_LAPTIME));
g_return_val_if_fail (laptime_ != NULL, FALSE);
over_button_ =
- GTK_TOGGLE_BUTTON (mixgtk_widget_factory_get (MIXGTK_WIDGET_OVER));
+ GTK_TOGGLE_BUTTON (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_OVER));
g_return_val_if_fail (over_button_ != NULL, FALSE);
for (k = 0; k < 3; ++k)
{
- cmp_buttons_[k] =
- GTK_TOGGLE_BUTTON (mixgtk_widget_factory_get (MIXGTK_WIDGET_CMP_L +k));
+ cmp_buttons_[k] = GTK_TOGGLE_BUTTON
+ (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_CMP_L +k));
g_return_val_if_fail (cmp_buttons_[k] != NULL, FALSE);
}
- memory_ = GTK_CLIST (mixgtk_widget_factory_get (MIXGTK_WIDGET_CELLS));
+ memory_ = GTK_CLIST (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_CELLS));
g_return_val_if_fail (memory_ != NULL, FALSE);
gtk_clist_set_column_justification (memory_, 0, GTK_JUSTIFY_CENTER);
gtk_clist_set_column_justification (memory_, 1, GTK_JUSTIFY_CENTER);
@@ -165,7 +166,7 @@ mixgtk_mixvm_init (mix_vm_t *vm)
}
gtk_clist_thaw (memory_);
- scrol = mixgtk_widget_factory_get (MIXGTK_WIDGET_CELLS_SCROLL);
+ scrol = mixgtk_widget_factory_get (top, MIXGTK_WIDGET_CELLS_SCROLL);
g_return_val_if_fail (scrol != NULL, FALSE);
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrol));
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
diff --git a/mixgtk/mixgtk_mixvm.h b/mixgtk/mixgtk_mixvm.h
index 04d210a..f74b409 100644
--- a/mixgtk/mixgtk_mixvm.h
+++ b/mixgtk/mixgtk_mixvm.h
@@ -27,10 +27,11 @@
#include <mixlib/mix_vm.h>
#include "mixgtk.h"
+#include "mixgtk_widgets.h"
/* initialise the mixvm widgets */
extern gboolean
-mixgtk_mixvm_init (mix_vm_t *vm);
+mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top);
/* update register widgets */
extern void
diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c
index d665cc6..243c6b3 100644
--- a/mixgtk/mixgtk_widgets.c
+++ b/mixgtk/mixgtk_widgets.c
@@ -31,6 +31,9 @@
/* dialog names */
static const gchar * dnames_[] = {
"main_window",
+ "mixvm_window",
+ "mixal_window",
+ "devices_window",
"word_dialog",
"about_dialog",
"goto_dialog",
@@ -42,6 +45,8 @@ static const gchar * dnames_[] = {
"symbols_dialog"
};
+const gchar *SPLIT_MAIN_NAME_ = "split_main_window";
+
#define DLG_NO_ (sizeof (dnames_) / sizeof(dnames_[0]))
/* widget names */
@@ -80,6 +85,8 @@ static const gchar *names_[] = {
#define GPL_TEXT_ "gpl_text"
#define AUTOSAVE_ITEM_ "save_on_exit"
+static gboolean split_;
+
/* the glade specs */
static GladeXML *xml_[DLG_NO_] = {NULL};
/* the about dialog */
@@ -122,10 +129,26 @@ init_about_ (void)
/* create a new factory from an xml glade file */
gboolean
-mixgtk_widget_factory_init (const char *glade_file)
+mixgtk_widget_factory_init (gboolean split)
{
+ const gchar *glade_file = GLADE_FILE;
+ const gchar *local_glade_file = LOCAL_GLADE_FILE;
+ FILE *f;
+
glade_init ();
+ split_ = split;
+
+ f = fopen (glade_file, "r");
+ if (!f) {
+ f = fopen (local_glade_file, "r");
+ if (!f) return FALSE;
+ glade_file = local_glade_file;
+ }
+ fclose (f);
file_ = g_strdup (glade_file);
+
+ if (split_) dnames_[MIXGTK_MAIN] = SPLIT_MAIN_NAME_;
+
init_xml_ (MIXGTK_MAIN);
init_autosave_ ();
return TRUE;
@@ -133,16 +156,18 @@ mixgtk_widget_factory_init (const char *glade_file)
/* get a widget */
GtkWidget *
-mixgtk_widget_factory_get (mixgtk_widget_id_t widget)
+mixgtk_widget_factory_get (mixgtk_dialog_id_t dlg, mixgtk_widget_id_t widget)
{
g_return_val_if_fail (widget < WIDGET_NO_, NULL);
- return glade_xml_get_widget (xml_[MIXGTK_MAIN], names_[widget]);
+ if (!split_ && dlg < MIXGTK_WORD_DIALOG) dlg = MIXGTK_MAIN;
+ return mixgtk_widget_factory_get_child_by_name (dlg, names_[widget]);
}
GtkWidget *
mixgtk_widget_factory_get_dialog (mixgtk_dialog_id_t dlg)
{
+ if (!split_ && dlg < MIXGTK_WORD_DIALOG) dlg = MIXGTK_MAIN;
if (!xml_[dlg]) init_xml_ (dlg);
return glade_xml_get_widget (xml_[dlg], dnames_[dlg]);
}
@@ -153,6 +178,7 @@ mixgtk_widget_factory_get_child_by_name (mixgtk_dialog_id_t dlg,
{
g_return_val_if_fail (dlg < DLG_NO_, NULL);
g_return_val_if_fail (name != NULL, NULL);
+ if (!split_ && dlg < MIXGTK_WORD_DIALOG) dlg = MIXGTK_MAIN;
if (!xml_[dlg]) init_xml_ (dlg);
return glade_xml_get_widget (xml_[dlg], name);
}
diff --git a/mixgtk/mixgtk_widgets.h b/mixgtk/mixgtk_widgets.h
index b50fa10..6e2f633 100644
--- a/mixgtk/mixgtk_widgets.h
+++ b/mixgtk/mixgtk_widgets.h
@@ -31,6 +31,9 @@
/* enumeration of gmixvm dialogs */
typedef enum {
MIXGTK_MAIN, /* main app window */
+ MIXGTK_MIXVM_DIALOG, /* mixvm dialog */
+ MIXGTK_MIXAL_DIALOG, /* mixal dialog */
+ MIXGTK_DEVICES_DIALOG, /* devices dialog */
MIXGTK_WORD_DIALOG, /* input dialog for a mix word */
MIXGTK_ABOUT_DIALOG,
MIXGTK_GOTO_DIALOG,
@@ -75,7 +78,7 @@ typedef enum {
/* create a new factory from an xml glade file */
extern gboolean
-mixgtk_widget_factory_init (const char *glade_file);
+mixgtk_widget_factory_init (gboolean split);
/* get a dialog */
extern GtkWidget *
@@ -83,7 +86,7 @@ mixgtk_widget_factory_get_dialog (mixgtk_dialog_id_t dlg);
/* get a widget */
extern GtkWidget *
-mixgtk_widget_factory_get (mixgtk_widget_id_t widget);
+mixgtk_widget_factory_get (mixgtk_dialog_id_t dlg, mixgtk_widget_id_t widget);
/* Get a widget by name */
extern GtkWidget *
diff --git a/mixgtk/mixgtk_wm.c b/mixgtk/mixgtk_wm.c
new file mode 100644
index 0000000..2666180
--- /dev/null
+++ b/mixgtk/mixgtk_wm.c
@@ -0,0 +1,139 @@
+/* -*-c-*- -------------- mixgtk_wm.c :
+ * Implementation of the functions declared in mixgtk_wm.h
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "2001-06-24 14:36:18 jao"
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "mixgtk_widgets.h"
+#include "mixgtk_config.h"
+#include "mixgtk_wm.h"
+
+typedef struct window_info_t_
+{
+ mixgtk_dialog_id_t dialog;
+ GtkWidget *widget;
+ GtkCheckMenuItem *menu;
+ const gchar *menu_name;
+ const gchar *config_key;
+ gboolean visible;
+} window_info_t_;
+
+static window_info_t_ infos_[] = {
+ {MIXGTK_MIXVM_DIALOG, NULL, NULL, "mix_view", "MIX.view"},
+ {MIXGTK_MIXAL_DIALOG, NULL, NULL, "mixal_view", "MIXAL.view"},
+ {MIXGTK_DEVICES_DIALOG, NULL, NULL, "devices_view", "Devices.view"}
+};
+
+static size_t INF_NO_ = sizeof (infos_) / sizeof (infos_[0]);
+
+static gboolean split_ = FALSE;
+static const gchar *SPLIT_MENU_NAME_ = "split_windows";
+static GtkCheckMenuItem *split_menu_ = NULL;
+
+static const gchar *VIEW_YES_ = "Yes";
+static const gchar *VIEW_NO_ = "No";
+
+gboolean
+mixgtk_wm_init (void)
+{
+ split_ = mixgtk_config_is_split ();
+ if (split_)
+ {
+ gint i;
+ const gchar *view;
+ split_menu_ = GTK_CHECK_MENU_ITEM
+ (mixgtk_widget_factory_get_child_by_name (MIXGTK_MAIN,
+ SPLIT_MENU_NAME_));
+ g_return_val_if_fail (split_menu_, FALSE);
+ gtk_check_menu_item_set_active (split_menu_, TRUE);
+ for (i = 0; i < INF_NO_; ++i)
+ {
+ infos_[i].widget =
+ mixgtk_widget_factory_get_dialog (infos_[i].dialog);
+ g_return_val_if_fail (infos_[i].widget, FALSE);
+ infos_[i].menu = GTK_CHECK_MENU_ITEM
+ (mixgtk_widget_factory_get_child_by_name
+ (MIXGTK_MAIN, infos_[i].menu_name));
+ g_return_val_if_fail (infos_[i].menu, FALSE);
+ view = mixgtk_config_get (infos_[i].config_key);
+ infos_[i].visible = !view || !strcmp (VIEW_YES_, view);
+ if (infos_[i].visible) gtk_widget_show (infos_[i].widget);
+ gtk_check_menu_item_set_active (infos_[i].menu, infos_[i].visible);
+ }
+ }
+ return TRUE;
+}
+
+void
+mixgtk_wm_show_window (mixgtk_window_id_t w)
+{
+ g_return_if_fail (w < INF_NO_);
+ if (!infos_[w].visible)
+ {
+ infos_[w].visible = TRUE;
+ gtk_check_menu_item_set_active (infos_[w].menu, TRUE);
+ mixgtk_config_update (infos_[w].config_key, VIEW_YES_);
+ gtk_widget_show (infos_[w].widget);
+ }
+}
+
+void
+mixgtk_wm_hide_window (mixgtk_window_id_t w)
+{
+ g_return_if_fail (w < INF_NO_);
+ if (infos_[w].visible)
+ {
+ infos_[w].visible = FALSE;
+ gtk_check_menu_item_set_active (infos_[w].menu, FALSE);
+ mixgtk_config_update (infos_[w].config_key, VIEW_NO_);
+ gtk_widget_hide (infos_[w].widget);
+ }
+}
+
+/* callbacks */
+void
+on_view_toggled (GtkCheckMenuItem *item)
+{
+ gint k;
+ for (k = 0; k < INF_NO_; ++k)
+ if (item == infos_[k].menu) break;
+ g_return_if_fail (k < INF_NO_);
+ if (item->active)
+ mixgtk_wm_show_window (k);
+ else
+ mixgtk_wm_hide_window (k);
+}
+
+void
+on_split_windows_toggled (GtkCheckMenuItem *item)
+{
+ mixgtk_config_set_split (item->active);
+}
+
+void
+on_window_hide (GtkWidget *w)
+{
+ gint k;
+ for (k = 0; k < INF_NO_; ++k)
+ if (w == infos_[k].widget) break;
+ g_return_if_fail (k < INF_NO_);
+ mixgtk_wm_hide_window (k);
+}
+
diff --git a/mixgtk/mixgtk_wm.h b/mixgtk/mixgtk_wm.h
new file mode 100644
index 0000000..66ef9ce
--- /dev/null
+++ b/mixgtk/mixgtk_wm.h
@@ -0,0 +1,46 @@
+/* -*-c-*- ---------------- mixgtk_wm.h :
+ * FUnctions for window management
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: <01/02/12 00:23:41 jose>
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef MIXGTK_WM_H
+#define MIXGTK_WM_H
+
+#include "mixgtk.h"
+
+typedef enum {
+ MIXGTK_MIXVM_WINDOW,
+ MIXGTK_MIXAL_WINDOW,
+ MIXGTK_DEVICES_WINDOW
+} mixgtk_window_id_t;
+
+extern gboolean
+mixgtk_wm_init (void);
+
+extern void
+mixgtk_wm_show_window (mixgtk_window_id_t w);
+
+extern void
+mixgtk_wm_hide_window (mixgtk_window_id_t w);
+
+#endif /* MIXGTK_WM_H */
+