diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-24 01:40:46 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-24 01:40:46 +0000 |
commit | e65ad854a2548723e7f0904992f4529cdfb9de1c (patch) | |
tree | 6e56f9f46c404e9e466e784847d4a94967f50e4d /mixgtk | |
parent | beaafc5e333a95b002d1e35d2138a68457866c02 (diff) | |
download | mdk-e65ad854a2548723e7f0904992f4529cdfb9de1c.tar.gz mdk-e65ad854a2548723e7f0904992f4529cdfb9de1c.tar.bz2 |
almost complete (barring bugs) reimplementation of all gmixvm functionality in non-split mode for gtk 2.0.
Diffstat (limited to 'mixgtk')
-rw-r--r-- | mixgtk/mixgtk.c | 10 | ||||
-rw-r--r-- | mixgtk/mixgtk.glade | 1616 | ||||
-rw-r--r-- | mixgtk/mixgtk_cmd_dispatcher.c | 20 | ||||
-rw-r--r-- | mixgtk/mixgtk_device.c | 279 | ||||
-rw-r--r-- | mixgtk/mixgtk_device.h | 12 | ||||
-rw-r--r-- | mixgtk/mixgtk_fontsel.c | 240 | ||||
-rw-r--r-- | mixgtk/mixgtk_fontsel.h | 32 | ||||
-rw-r--r-- | mixgtk/mixgtk_mixal.c | 16 | ||||
-rw-r--r-- | mixgtk/mixgtk_mixvm.c | 22 | ||||
-rw-r--r-- | mixgtk/mixgtk_widgets.c | 2 | ||||
-rw-r--r-- | mixgtk/mixgtk_widgets.h | 2 |
11 files changed, 562 insertions, 1689 deletions
diff --git a/mixgtk/mixgtk.c b/mixgtk/mixgtk.c index 3b926b4..97f6a16 100644 --- a/mixgtk/mixgtk.c +++ b/mixgtk/mixgtk.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk.c : * Main functions of the mix gtk front-end * ------------------------------------------------------------------ - * $Id: mixgtk.c,v 1.16 2004/06/23 10:50:10 jao Exp $ + * $Id: mixgtk.c,v 1.17 2004/06/24 01:40:48 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -36,7 +36,7 @@ #include "mixgtk.h" static const gchar *SPLIT_ARG_ = "-s"; -static const gchar *SPLIT_LONG_ARG_ = "--s"; +static const gchar *SPLIT_LONG_ARG_ = "--split"; gboolean mixgtk_restart (void) @@ -49,8 +49,6 @@ mixgtk_restart (void) return FALSE; } - mixgtk_fontsel_load_defaults (); - if (!mixgtk_cmd_dispatcher_init (MIXGTK_MAIN)) { g_error (_("Unable to initialise application (command dispatcher)\n")); @@ -71,9 +69,9 @@ mixgtk_restart (void) return FALSE; } - if (!mixgtk_device_init (GTK_NOTEBOOK + if (!mixgtk_device_init (GTK_CONTAINER (mixgtk_widget_factory_get - (MIXGTK_DEVICES_DIALOG, MIXGTK_WIDGET_DEVICE)), + (MIXGTK_DEVICES_DIALOG, MIXGTK_WIDGET_DEVICES)), vm)) { g_error (_("Unable to initialise application (devices)\n")); diff --git a/mixgtk/mixgtk.glade b/mixgtk/mixgtk.glade index b246fff..a73dfc6 100644 --- a/mixgtk/mixgtk.glade +++ b/mixgtk/mixgtk.glade @@ -49,7 +49,7 @@ <accelerator key="F3" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image80"> + <widget class="GtkImage" id="image91"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -72,7 +72,7 @@ <accelerator key="F4" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image81"> + <widget class="GtkImage" id="image92"> <property name="visible">True</property> <property name="stock">gtk-justify-fill</property> <property name="icon_size">1</property> @@ -95,7 +95,7 @@ <accelerator key="F5" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image82"> + <widget class="GtkImage" id="image93"> <property name="visible">True</property> <property name="stock">gtk-execute</property> <property name="icon_size">1</property> @@ -124,7 +124,7 @@ <accelerator key="Q" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image83"> + <widget class="GtkImage" id="image94"> <property name="visible">True</property> <property name="stock">gtk-quit</property> <property name="icon_size">1</property> @@ -199,7 +199,7 @@ <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image84"> + <widget class="GtkImage" id="image95"> <property name="visible">True</property> <property name="stock">gtk-go-forward</property> <property name="icon_size">1</property> @@ -222,7 +222,7 @@ <accelerator key="N" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image85"> + <widget class="GtkImage" id="image96"> <property name="visible">True</property> <property name="stock">gtk-goto-last</property> <property name="icon_size">1</property> @@ -245,7 +245,7 @@ <accelerator key="C" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image86"> + <widget class="GtkImage" id="image97"> <property name="visible">True</property> <property name="stock">gtk-clear</property> <property name="icon_size">1</property> @@ -268,7 +268,7 @@ <accelerator key="Y" modifiers="GDK_MOD1_MASK" signal="activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image87"> + <widget class="GtkImage" id="image98"> <property name="visible">True</property> <property name="stock">gtk-index</property> <property name="icon_size">1</property> @@ -301,7 +301,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image88"> + <widget class="GtkImage" id="image99"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -365,12 +365,24 @@ </child> <child> - <widget class="GtkMenuItem" id="device_output1"> + <widget class="GtkImageMenuItem" id="device_output1"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Change format of binary devices output</property> <property name="label" translatable="yes">_Device output...</property> <property name="use_underline">True</property> <signal name="activate" handler="on_devform_activate"/> + + <child internal-child="image"> + <widget class="GtkImage" id="image100"> + <property name="visible">True</property> + <property name="stock">gtk-zoom-100</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> </widget> </child> @@ -382,7 +394,7 @@ <signal name="activate" handler="on_devdir_activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image89"> + <widget class="GtkImage" id="image101"> <property name="visible">True</property> <property name="stock">gtk-home</property> <property name="icon_size">1</property> @@ -403,7 +415,7 @@ <signal name="activate" handler="on_external_programs_activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image90"> + <widget class="GtkImage" id="image102"> <property name="visible">True</property> <property name="stock">gtk-preferences</property> <property name="icon_size">1</property> @@ -431,7 +443,7 @@ <signal name="activate" handler="on_save_activate"/> <child internal-child="image"> - <widget class="GtkImage" id="image91"> + <widget class="GtkImage" id="image103"> <property name="visible">True</property> <property name="stock">gtk-save</property> <property name="icon_size">1</property> @@ -532,7 +544,7 @@ <widget class="GtkToolButton" id="edit_button"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Edit MIXAL source</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Edit</property> <property name="use_underline">True</property> <property name="stock_id">gtk-justify-fill</property> <property name="visible_horizontal">True</property> @@ -550,7 +562,7 @@ <widget class="GtkToolButton" id="run_button"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Run</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Run</property> <property name="use_underline">True</property> <property name="stock_id">gtk-go-forward</property> <property name="visible_horizontal">True</property> @@ -568,7 +580,7 @@ <widget class="GtkToolButton" id="step_button"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Next</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Next</property> <property name="use_underline">True</property> <property name="stock_id">gtk-goto-last</property> <property name="visible_horizontal">True</property> @@ -586,7 +598,7 @@ <widget class="GtkToolButton" id="clear_button"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Clear breakpoints</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Clear</property> <property name="use_underline">True</property> <property name="stock_id">gtk-clear</property> <property name="visible_horizontal">True</property> @@ -604,7 +616,7 @@ <widget class="GtkToolButton" id="symbols_button"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Symbol table</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Symbols</property> <property name="use_underline">True</property> <property name="stock_id">gtk-index</property> <property name="visible_horizontal">True</property> @@ -635,7 +647,7 @@ <widget class="GtkToolButton" id="button28"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Device directory</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Devdir</property> <property name="use_underline">True</property> <property name="stock_id">gtk-home</property> <property name="visible_horizontal">True</property> @@ -653,9 +665,9 @@ <widget class="GtkToolButton" id="button30"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Output format</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Format</property> <property name="use_underline">True</property> - <property name="stock_id">gtk-find-and-replace</property> + <property name="stock_id">gtk-zoom-100</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -671,7 +683,7 @@ <widget class="GtkToolButton" id="button31"> <property name="visible">True</property> <property name="tooltip" translatable="yes">External programs</property> - <property name="label" translatable="yes"></property> + <property name="label" translatable="yes">Programs</property> <property name="use_underline">True</property> <property name="stock_id">gtk-properties</property> <property name="visible_horizontal">True</property> @@ -738,7 +750,7 @@ <property name="show_border">True</property> <property name="tab_pos">GTK_POS_TOP</property> <property name="scrollable">False</property> - <property name="enable_popup">False</property> + <property name="enable_popup">True</property> <signal name="switch_page" handler="on_notebook_switch_page"/> <child> @@ -1863,36 +1875,23 @@ </child> <child> - <widget class="GtkNotebook" id="devices_notebook"> + <widget class="GtkScrolledWindow" id="scrolledwindow37"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_RIGHT</property> - <property name="scrollable">True</property> - <property name="enable_popup">False</property> - - <child> - <placeholder/> - </child> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> - <widget class="GtkLabel" id="label1436"> + <widget class="GtkViewport" id="devices_container"> <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <placeholder/> + </child> </widget> - <packing> - <property name="type">tab</property> - </packing> </child> </widget> <packing> @@ -3335,7 +3334,7 @@ Free Software Foundation, Inc.</property> <property name="title" translatable="yes">Select Font</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> - <property name="modal">False</property> + <property name="modal">True</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> @@ -3354,7 +3353,6 @@ Free Software Foundation, Inc.</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_fontsel_cancel_clicked"/> </widget> </child> @@ -3365,7 +3363,6 @@ Free Software Foundation, Inc.</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_fontsel_apply_clicked"/> </widget> </child> @@ -3376,7 +3373,6 @@ Free Software Foundation, Inc.</property> <property name="can_focus">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_fontsel_ok_clicked"/> </widget> </child> @@ -3399,6 +3395,8 @@ Free Software Foundation, Inc.</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">True</property> + <property name="default_width">320</property> + <property name="default_height">140</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> @@ -3423,169 +3421,55 @@ Free Software Foundation, Inc.</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> - <widget class="GtkHButtonBox" id="hbuttonbox8"> + <widget class="GtkButton" id="button37"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property> - <property name="spacing">30</property> - - <child> - <widget class="GtkButton" id="devok_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-ok</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_devok_button_clicked"/> - </widget> - </child> - - <child> - <widget class="GtkButton" id="devapp_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-apply</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_devapp_button_clicked"/> - </widget> - </child> - - <child> - <widget class="GtkButton" id="devcancel_button"> - <property name="visible">True</property> - <property name="can_default">True</property> - <property name="can_focus">True</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_devcancel_button_clicked"/> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkFixed" id="fixed2"> - <property name="visible">True</property> - - <child> - <widget class="GtkCombo" id="dev_combo"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="value_in_list">True</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry1"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Choose a device</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <signal name="changed" handler="on_deventry_changed"/> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget11"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - - <child> - <widget class="GtkListItem" id="convertwidget12"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-cancel</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-6</property> </widget> - <packing> - <property name="x">135</property> - <property name="y">46</property> - </packing> </child> <child> - <widget class="GtkRadioButton" id="wordradio"> - <property name="width_request">0</property> - <property name="height_request">0</property> + <widget class="GtkButton" id="button38"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Show output as MIX words</property> + <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Word</property> - <property name="use_underline">True</property> + <property name="label">gtk-apply</property> + <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <property name="response_id">-10</property> </widget> - <packing> - <property name="x">104</property> - <property name="y">96</property> - </packing> </child> <child> - <widget class="GtkRadioButton" id="decradio"> - <property name="width_request">0</property> - <property name="height_request">0</property> + <widget class="GtkButton" id="button39"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Show output as decimal numbers</property> + <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Dec</property> - <property name="use_underline">True</property> + <property name="label">gtk-ok</property> + <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">wordradio</property> - <signal name="toggled" handler="on_decradio_toggled"/> + <property name="response_id">-5</property> </widget> - <packing> - <property name="x">176</property> - <property name="y">96</property> - </packing> </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed2"> + <property name="visible">True</property> <child> <widget class="GtkButton" id="devset_button"> @@ -3601,17 +3485,17 @@ Free Software Foundation, Inc.</property> <signal name="clicked" handler="on_devset_button_clicked"/> </widget> <packing> - <property name="x">16</property> - <property name="y">112</property> + <property name="x">233</property> + <property name="y">31</property> </packing> </child> <child> - <widget class="GtkLabel" id="label233"> + <widget class="GtkLabel" id="label232"> <property name="width_request">0</property> <property name="height_request">0</property> <property name="visible">True</property> - <property name="label" translatable="yes">Format</property> + <property name="label" translatable="yes">Device</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_CENTER</property> @@ -3623,17 +3507,17 @@ Free Software Foundation, Inc.</property> <property name="ypad">0</property> </widget> <packing> - <property name="x">48</property> - <property name="y">80</property> + <property name="x">24</property> + <property name="y">10</property> </packing> </child> <child> - <widget class="GtkLabel" id="label232"> + <widget class="GtkLabel" id="label233"> <property name="width_request">0</property> <property name="height_request">0</property> <property name="visible">True</property> - <property name="label" translatable="yes">Device</property> + <property name="label" translatable="yes">Format</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_CENTER</property> @@ -3646,14 +3530,88 @@ Free Software Foundation, Inc.</property> </widget> <packing> <property name="x">24</property> - <property name="y">8</property> + <property name="y">38</property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="dev_combo"> + <property name="width_request">183</property> + <property name="height_request">25</property> + <property name="visible">True</property> + <property name="items" translatable="yes">tape0 +tape1 +tape2 +tape3 +tape4 +tape5 +tape6 +tape7 +disk0 +disk1 +disk2 +disk3 +disk4 +disk5 +disk6 +disk7</property> + <signal name="changed" handler="on_dev_combo_changed" last_modification_time="Wed, 23 Jun 2004 11:34:16 GMT"/> + </widget> + <packing> + <property name="x">90</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="wordradio"> + <property name="width_request">0</property> + <property name="height_request">0</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Show output as MIX words</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Word</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="x">89</property> + <property name="y">34</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="decradio"> + <property name="width_request">0</property> + <property name="height_request">0</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Show output as decimal numbers</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Decimal</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">wordradio</property> + <signal name="toggled" handler="on_decradio_toggled"/> + </widget> + <packing> + <property name="x">154</property> + <property name="y">34</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">True</property> - <property name="fill">True</property> + <property name="fill">False</property> + <property name="pack_type">GTK_PACK_END</property> </packing> </child> </widget> @@ -4049,7 +4007,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Run</property> <property name="label" translatable="yes">Run</property> <property name="use_underline">True</property> - <property name="icon">run.xpm</property> + <property name="stock_id">gtk-go-forward</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4067,7 +4025,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Next</property> <property name="label" translatable="yes">Step</property> <property name="use_underline">True</property> - <property name="icon">next.xpm</property> + <property name="stock_id">gtk-goto-last</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4085,7 +4043,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Clear breakpoints</property> <property name="label" translatable="yes">Clear</property> <property name="use_underline">True</property> - <property name="icon">clear.xpm</property> + <property name="stock_id">gtk-clear</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4103,7 +4061,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Symbol table</property> <property name="label" translatable="yes">Symbols</property> <property name="use_underline">True</property> - <property name="icon">symbols.xpm</property> + <property name="stock_id">gtk-index</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4134,7 +4092,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Source code font</property> <property name="label" translatable="yes">Font</property> <property name="use_underline">True</property> - <property name="icon">font.xpm</property> + <property name="stock_id">gtk-select-font</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4145,24 +4103,6 @@ Free Software Foundation, Inc.</property> <property name="homogeneous">True</property> </packing> </child> - - <child> - <widget class="GtkToolButton" id="button23"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Colors</property> - <property name="label" translatable="yes">Colors</property> - <property name="use_underline">True</property> - <property name="icon">colors.xpm</property> - <property name="visible_horizontal">True</property> - <property name="visible_vertical">True</property> - <property name="is_important">False</property> - <signal name="clicked" handler="on_colors_activate"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="homogeneous">True</property> - </packing> - </child> </widget> <packing> <property name="padding">0</property> @@ -4254,12 +4194,12 @@ Free Software Foundation, Inc.</property> <widget class="GtkToolButton" id="devdir_button"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Device directory</property> - <property name="label" translatable="yes">Device dir</property> + <property name="label" translatable="yes">Directory</property> <property name="use_underline">True</property> - <property name="icon">devdir.xpm</property> + <property name="stock_id">gtk-home</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> - <property name="is_important">False</property> + <property name="is_important">True</property> <signal name="clicked" handler="on_devdir_activate"/> </widget> <packing> @@ -4274,7 +4214,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Output format</property> <property name="label" translatable="yes">Output</property> <property name="use_underline">True</property> - <property name="icon">output.xpm</property> + <property name="stock_id">gtk-find-and-replace</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4292,7 +4232,7 @@ Free Software Foundation, Inc.</property> <property name="tooltip" translatable="yes">Output font</property> <property name="label" translatable="yes">Font</property> <property name="use_underline">True</property> - <property name="icon">font.xpm</property> + <property name="stock_id">gtk-select-font</property> <property name="visible_horizontal">True</property> <property name="visible_vertical">True</property> <property name="is_important">False</property> @@ -4312,37 +4252,17 @@ Free Software Foundation, Inc.</property> </child> <child> - <widget class="GtkNotebook" id="devices_notebook"> + <widget class="GtkScrolledWindow" id="devices_container"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="show_tabs">True</property> - <property name="show_border">True</property> - <property name="tab_pos">GTK_POS_TOP</property> - <property name="scrollable">True</property> - <property name="enable_popup">False</property> + <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> <child> <placeholder/> </child> - - <child> - <widget class="GtkLabel" id="label"> - <property name="visible">True</property> - <property name="label" translatable="yes">label</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> </widget> <packing> <property name="padding">0</property> @@ -4520,1103 +4440,133 @@ Free Software Foundation, Inc.</property> <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> - <widget class="GtkHBox" id="hbox29"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkVBox" id="vbox7"> - <property name="border_width">1</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">1</property> - - <child> - <widget class="GtkFrame" id="frame24"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkTable" id="table2"> - <property name="border_width">8</property> - <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">6</property> - <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">11</property> - - <child> - <widget class="GtkLabel" id="label1415"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">A</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1416"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">I1</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1417"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">I2</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry52"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">19</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry53"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry54"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes">+ 00 00</property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1418"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">X</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1419"> - <property name="width_request">16</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="label" translatable="yes">I3</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1420"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">I4</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1421"> - <property name="width_request">16</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="label" translatable="yes">I5</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1422"> - <property name="width_request">16</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="label" translatable="yes">I6</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">4</property> - <property name="right_attach">5</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1423"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">J</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry55"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes">+ 00 00 00 00 00</property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">19</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry56"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">5</property> - <property name="right_attach">6</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry57"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">5</property> - <property name="right_attach">6</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry58"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">5</property> - <property name="right_attach">6</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkEntry" id="entry59"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox30"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkEntry" id="entry60"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">9</property> - <signal name="button_press_event" handler="on_register_click"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1424"> - <property name="visible">True</property> - <property name="label" translatable="yes">Registers </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">5</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox31"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkFrame" id="frame25"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkHBox" id="hbox32"> - <property name="border_width">1</property> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">5</property> - - <child> - <widget class="GtkRadioButton" id="radiobutton11"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Greater</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">G</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_cmp_g_toggled"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton12"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Equal</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">E</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_cmp_e_toggled"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkRadioButton" id="radiobutton13"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Lesser</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">L</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_cmp_l_toggled"/> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1425"> - <property name="visible">True</property> - <property name="label" translatable="yes">Comparison flag </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame26"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkHBox" id="hbox33"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="homogeneous">True</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkCheckButton" id="checkbutton1"> - <property name="border_width">3</property> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Click to toggle</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Off</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_overflow_toggled"/> - </widget> - <packing> - <property name="padding">5</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1426"> - <property name="visible">True</property> - <property name="label" translatable="yes">Overflow toggle</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">15</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame27"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkHBox" id="hbox34"> - <property name="border_width">4</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">1</property> - - <child> - <widget class="GtkEntry" id="entry61"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">4</property> - <property name="text" translatable="yes">0</property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - <property name="width_chars">6</property> - </widget> - <packing> - <property name="padding">5</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button34"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">View loc address</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_loc_arrow_clicked"/> - - <child> - <widget class="GtkImage" id="image5"> - <property name="visible">True</property> - <property name="stock">gtk-jump-to</property> - <property name="icon_size">4</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - </child> - </widget> - <packing> - <property name="padding">1</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1427"> - <property name="visible">True</property> - <property name="label" translatable="yes">Location </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">5</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame28"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkHBox" id="hbox35"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">5</property> + <placeholder/> + </child> - <child> - <widget class="GtkLabel" id="label1428"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Up:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label1414"> + <property name="visible">True</property> + <property name="label" translatable="yes">MIX Virtual Machine </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">2</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + </child> +</widget> - <child> - <widget class="GtkLabel" id="label1429"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">00000000</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">5</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> +<widget class="GtkDialog" id="input_dialog"> + <property name="visible">True</property> + <property name="title" translatable="yes">MIX Console input</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">True</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="has_separator">True</property> + <signal name="destroy_event" handler="gtk_widget_hide" last_modification_time="Wed, 23 Jun 2004 20:54:59 GMT"/> + <signal name="close" handler="gtk_widget_hide" last_modification_time="Wed, 23 Jun 2004 20:55:16 GMT"/> - <child> - <widget class="GtkLabel" id="label1430"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Lap:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">3</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox12"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkLabel" id="label1431"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">000000</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">5</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area12"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> - <child> - <widget class="GtkLabel" id="label1432"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Program:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">2</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkButton" id="okbutton1"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-ok</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-5</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> - <child> - <widget class="GtkLabel" id="label1433"> - <property name="width_request">0</property> - <property name="height_request">0</property> - <property name="visible">True</property> - <property name="label" translatable="yes">000000</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">5</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> + <child> + <widget class="GtkVBox" id="vbox7"> + <property name="border_width">3</property> + <property name="visible">True</property> + <property name="homogeneous">True</property> + <property name="spacing">0</property> - <child> - <widget class="GtkLabel" id="label1434"> - <property name="visible">True</property> - <property name="label" translatable="yes">Times </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">5</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> + <child> + <widget class="GtkLabel" id="label1438"> + <property name="visible">True</property> + <property name="label" translatable="yes">Enter up to 70 characters</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> </widget> <packing> - <property name="padding">2</property> + <property name="padding">0</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame29"> - <property name="border_width">7</property> + <widget class="GtkEntry" id="input_entry"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow32"> - <property name="border_width">5</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="shadow_type">GTK_SHADOW_IN</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <widget class="GtkTreeView" id="treeview2"> - <property name="border_width">1</property> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Click cell to change value</property> - <property name="can_focus">True</property> - <property name="headers_visible">True</property> - <property name="rules_hint">True</property> - <property name="reorderable">False</property> - <property name="enable_search">True</property> - <signal name="select_row" handler="on_memory_cells_select_row" after="yes"/> - <signal name="click_column" handler="on_memory_cells_click_column"/> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1435"> - <property name="visible">True</property> - <property name="label" translatable="yes">Memory </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">70</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char" translatable="yes">*</property> + <property name="activates_default">True</property> + <property name="width_chars">70</property> </widget> <packing> - <property name="padding">3</property> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="pack_type">GTK_PACK_END</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1414"> - <property name="visible">True</property> - <property name="label" translatable="yes">MIX Virtual Machine </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">2</property> - <property name="ypad">0</property> - </widget> <packing> - <property name="type">label_item</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget> diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c index f237a1a..98782ce 100644 --- a/mixgtk/mixgtk_cmd_dispatcher.c +++ b/mixgtk/mixgtk_cmd_dispatcher.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_cmd_dispatcher.c : * Implementation of the functions declared in mixgtk_cmd_dispatcher.h * ------------------------------------------------------------------ - * $Id: mixgtk_cmd_dispatcher.c,v 1.16 2004/06/23 10:50:10 jao Exp $ + * $Id: mixgtk_cmd_dispatcher.c,v 1.17 2004/06/24 01:40:47 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -43,6 +43,7 @@ #include <mixlib/mix_vm_command.h> #include "mixgtk_mixvm.h" #include "mixgtk_mixal.h" +#include "mixgtk_fontsel.h" #include "mixgtk_config.h" #include "mixgtk_cmd_dispatcher.h" @@ -361,6 +362,9 @@ mixgtk_cmd_dispatcher_init (mixgtk_dialog_id_t top) (GTK_WINDOW (mixgtk_widget_factory_get_dialog (MIXGTK_MAIN)), dis_data_.last_file); + mixgtk_fontsel_set_font (MIX_FONT_LOG, dis_data_.log); + mixgtk_fontsel_set_font (MIX_FONT_PROMPT, dis_data_.prompt); + restart = TRUE; return TRUE; } @@ -514,3 +518,17 @@ on_command_prompt_activate (GtkEntry *prompt, gpointer data) } g_free (text); } + +void +on_log_font_activate () +{ + GtkWidget *w[] = { dis_data_.log }; + mixgtk_fontsel_query_font (MIX_FONT_LOG, w, 1); +} + +void +on_prompt_font_activate () +{ + GtkWidget *w[] = { dis_data_.prompt }; + mixgtk_fontsel_query_font (MIX_FONT_PROMPT, w, 1); +} diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c index 69faa02..e701728 100644 --- a/mixgtk/mixgtk_device.c +++ b/mixgtk/mixgtk_device.c @@ -1,7 +1,7 @@ /* -*-c-*- ---------------- mixgtk_device.c : * actual types for mixgtk devices * ------------------------------------------------------------------ - * $Id: mixgtk_device.c,v 1.21 2004/06/23 10:50:10 jao Exp $ + * $Id: mixgtk_device.c,v 1.22 2004/06/24 01:40:47 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -32,6 +32,7 @@ #include "mixgtk.h" #include "mixgtk_gen_handlers.h" #include "mixgtk_widgets.h" +#include "mixgtk_fontsel.h" #include "mixgtk_config.h" #include "mixgtk_cmd_dispatcher.h" #include "mixgtk_device.h" @@ -41,7 +42,8 @@ static const gchar *DEV_FORMAT_KEY_ = "Device.format"; /* device container */ -static GtkNotebook *container_ = NULL; +static GtkContainer *container_ = NULL; +static GtkNotebook *dev_nb_ = NULL; /* devdir dialog */ static GtkWidget *devdir_dlg_ = NULL; static GtkEntry *devdir_entry_ = NULL; @@ -136,12 +138,15 @@ write_bin_ (struct mixgtk_bin_device_t *dev, const mix_word_t *block) dec = IS_DEC(decs_, dev->gtk_device.device.type); - for (k = 0, len = SIZES_[dev->gtk_device.device.type]; k < len; k += 5) + for (k = 0, len = SIZES_[dev->gtk_device.device.type]; + k < len; k += BIN_DEV_COL_) { gtk_list_store_append (store, &iter); - for (col = 0; col < 5; ++col) + for (col = 0; col < BIN_DEV_COL_; ++col) gtk_list_store_set (store, &iter, - col, get_word_string_ (block[k + col], dec), -1); + col, get_word_string_ (block[k + col], dec), + col + BIN_DEV_COL_, (guint)block[k + col], + -1); dev->last_insert++; } } @@ -157,8 +162,8 @@ write_ (mix_device_t *dev, const mix_word_t *block) if (MODES_[dev->type] == mix_dev_CHAR) write_char_ (gtkdev, block); else write_bin_ ((struct mixgtk_bin_device_t *)gtkdev, block); - gtk_notebook_set_current_page (container_, - gtk_notebook_page_num (container_, + gtk_notebook_set_current_page (dev_nb_, + gtk_notebook_page_num (dev_nb_, gtkdev->scroll)); return TRUE; @@ -179,8 +184,9 @@ read_cons_ (mix_word_t *block) g_assert (input_dlg_entry_); } - gtk_widget_show (input_dlg_); - gtk_main (); /* wait until dialog closes */ + gtk_entry_set_text (input_dlg_entry_, ""); + gtk_dialog_run (GTK_DIALOG (input_dlg_)); + gtk_widget_hide (input_dlg_); text = g_strdup_printf ("%-70s", gtk_entry_get_text (input_dlg_entry_)); for (i = 0; i < 70; ++i) for (j = 0; j < 5; ++j) @@ -204,8 +210,8 @@ read_ (mix_device_t *dev, mix_word_t *block) if (MODES_[dev->type] == mix_dev_CHAR) write_char_ (gtkdev, block); else write_bin_ ((struct mixgtk_bin_device_t *)gtkdev, block); - gtk_notebook_set_current_page (container_, - gtk_notebook_page_num (container_, + gtk_notebook_set_current_page (dev_nb_, + gtk_notebook_page_num (dev_nb_, gtkdev->scroll)); return TRUE; } @@ -232,8 +238,8 @@ destroy_ (mix_device_t *dev) g_object_unref ((gpointer)bdev->store); } (DEF_DEV_VTABLE_->destroy) (dev); - gtk_notebook_remove_page (container_, - gtk_notebook_page_num (container_, + gtk_notebook_remove_page (dev_nb_, + gtk_notebook_page_num (dev_nb_, gtkdev->scroll)); } @@ -263,15 +269,17 @@ mixgtk_device_construct_gui_ (struct mixgtk_device_t *dev) { gint k; struct mixgtk_bin_device_t *bindev = (struct mixgtk_bin_device_t *)dev; - GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GType *types = g_new (GType, BIN_DEV_COL_ * 2); + + for (k = 0; k < BIN_DEV_COL_; ++k) + { + types[k] = G_TYPE_STRING; + types[k + BIN_DEV_COL_] = G_TYPE_UINT; + } + + bindev->store = gtk_list_store_newv (BIN_DEV_COL_ * 2, types); - bindev->store = gtk_list_store_new (5, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING, - G_TYPE_STRING); dev->widget = gtk_tree_view_new_with_model (GTK_TREE_MODEL (bindev->store)); @@ -284,18 +292,54 @@ mixgtk_device_construct_gui_ (struct mixgtk_device_t *dev) gtk_tree_view_column_new_with_attributes ("", renderer, "text", k, NULL)); } + + g_free (types); } g_assert (dev->widget); gtk_container_add (GTK_CONTAINER (dev->scroll), dev->widget); - gtk_notebook_append_page (container_, dev->scroll, label); + gtk_notebook_append_page (dev_nb_, dev->scroll, label); gtk_widget_set_style (dev->widget, - gtk_widget_get_style (GTK_WIDGET (container_))); + gtk_widget_get_style (GTK_WIDGET (dev_nb_))); gtk_widget_show (label); gtk_widget_show (dev->scroll); gtk_widget_show (dev->widget); } +static void +redraw_bin_device_ (struct mixgtk_bin_device_t *dev) +{ + if (dev != NULL) + { + GtkTreeModel *store = GTK_TREE_MODEL (dev->store); + GtkTreeIter iter; + gboolean valid; + + g_assert (store); + + valid = + gtk_tree_model_get_iter_first (store, &iter); + + while (valid) + { + gint k; + guint word; + + for (k = 0; k < BIN_DEV_COL_; ++k) + { + gtk_tree_model_get (store, &iter, k + BIN_DEV_COL_, &word, -1); + gtk_list_store_set (GTK_LIST_STORE (store), &iter, + k, get_word_string_ ((mix_word_t)word, + dev->dec), + -1); + } + valid = gtk_tree_model_iter_next (store, &iter); + } + gtk_widget_queue_draw (((struct mixgtk_device_t *)dev)->widget); + } +} + + /* create a new mixgtk device */ static mix_device_t * mixgtk_device_new_ (mix_device_type_t type) @@ -323,42 +367,12 @@ mixgtk_device_new_ (mix_device_type_t type) return (mix_device_t *)dev; } -static mix_device_t * -mixgtk_device_copy_ (const struct mixgtk_device_t *from) -{ - struct mixgtk_device_t *result = - (struct mixgtk_device_t *)mixgtk_device_new_ (from->device.type); - g_return_val_if_fail (result != NULL, NULL); - if (MODES_[from->device.type] == mix_dev_CHAR) - { - gchar *text = gtk_editable_get_chars (GTK_EDITABLE (from->widget), - 0, -1); - gtk_text_buffer_insert_at_cursor - (gtk_text_view_get_buffer (GTK_TEXT_VIEW (result->widget)), text, -1); - g_free (text); - } - else - { - struct mixgtk_bin_device_t *to = (struct mixgtk_bin_device_t *) result; - struct mixgtk_bin_device_t *fr = (struct mixgtk_bin_device_t *) from; - to->last_insert = fr->last_insert; - to->dec = fr->dec; - gtk_tree_view_set_model (GTK_TREE_VIEW (result->widget), - GTK_TREE_MODEL (fr->store)); - to->store = fr->store; - } - return (mix_device_t *)result; -} - /* init default devices */ gboolean -mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm) +mixgtk_device_init (GtkContainer *container, mix_vm_t *vm) { - gint k = 0; - g_return_val_if_fail (container != NULL, FALSE); g_return_val_if_fail (vm != NULL, FALSE); - container_ = container; vm_ = vm; devdlg_ = NULL; devdir_dlg_ = NULL; @@ -368,27 +382,31 @@ mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm) wtoggle_ = NULL; combo_ = NULL; - /* remove dummy page from container */ - gtk_notebook_remove_page (container_, 0); - - mix_vm_set_device_factory (vm, mixgtk_device_new_); + if (dev_nb_ == NULL) + { + mix_vm_set_device_factory (vm, mixgtk_device_new_); - /* read format configuration */ - if (mixgtk_config_get (DEV_FORMAT_KEY_)) - decs_ = atoi (mixgtk_config_get (DEV_FORMAT_KEY_)); + /* read format configuration */ + if (mixgtk_config_get (DEV_FORMAT_KEY_)) + decs_ = atoi (mixgtk_config_get (DEV_FORMAT_KEY_)); - /* re-create existing devices */ - for (k = 0; k < mix_dev_INVALID; ++k) + dev_nb_ = GTK_NOTEBOOK (gtk_notebook_new ()); + gtk_notebook_set_tab_pos (dev_nb_, GTK_POS_RIGHT); + gtk_notebook_set_scrollable (dev_nb_, TRUE); + gtk_container_add (container, GTK_WIDGET (dev_nb_)); + } + else if (container_) { - mix_device_t *dev = mix_vm_get_device (vm, k); - if (dev != NULL) - { - mix_device_t *newdev = - mixgtk_device_copy_ ((struct mixgtk_device_t *)dev); - mix_vm_connect_device (vm, newdev); - } + gtk_widget_reparent (GTK_WIDGET (dev_nb_), GTK_WIDGET (container)); } + container_ = container; + + gtk_widget_show (GTK_WIDGET (dev_nb_)); + gtk_widget_show (GTK_WIDGET (container_)); + + mixgtk_fontsel_set_font (MIX_FONT_DEVICES, GTK_WIDGET (dev_nb_)); + return TRUE; } @@ -403,34 +421,32 @@ mixgtk_device_set_format (mix_device_type_t dev, gboolean dec) if (changed && (MODES_[dev] == mix_dev_BIN)) { - if (dec) SET_DEC (decs_, dev); - else CLEAR_DEC (decs_, dev); -/* redraw_bin_device_ ((struct mixgtk_bin_device_t *) */ -/* mix_vm_get_device (vm_, dev)); */ + struct mixgtk_bin_device_t *gdev = + (struct mixgtk_bin_device_t *) mix_vm_get_device (vm_, dev); + + if (gdev != NULL) + { + if (dec) SET_DEC (decs_, dev); else CLEAR_DEC (decs_, dev); + gdev->dec = !(gdev->dec); + redraw_bin_device_ (gdev); + } } - } static mix_device_type_t get_device_idx_ (void) { -/* const gchar *name = gtk_entry_get_text */ -/* (GTK_ENTRY (GTK_COMBO (combo_)->entry)); */ -/* /\* inefficient, but the list is short *\/ */ -/* int k; */ -/* for (k = 0; k <= LAST_BIN_DEV_; ++k) */ -/* if (!strcmp (name, DEF_NAMES_[k])) return k; */ -/* g_assert_not_reached (); */ - return 0; + int k; + const gchar *name = gtk_entry_get_text (GTK_ENTRY (GTK_BIN (combo_)->child)); + for (k = 0; k <= LAST_BIN_DEV_; ++k) + if (!strcmp (name, DEF_NAMES_[k])) break; + return k; } static void init_devform_ (void) { - GList *names = NULL; - int k; - devdlg_ = mixgtk_widget_factory_get_dialog (MIXGTK_DEVFORM_DIALOG); g_assert (devdlg_); dtoggle_ = mixgtk_widget_factory_get_child_by_name @@ -442,29 +458,47 @@ init_devform_ (void) combo_ = mixgtk_widget_factory_get_child_by_name (MIXGTK_DEVFORM_DIALOG, "dev_combo"); g_assert (combo_); - - for (k = 0; k <= LAST_BIN_DEV_; ++k) - names = g_list_append (names, (gchar *)DEF_NAMES_[k]); -/* gtk_combo_set_popdown_strings (GTK_COMBO (combo_), names); */ + gtk_editable_set_editable (GTK_EDITABLE (GTK_BIN (combo_)->child), FALSE); } void -on_deventry_changed () +on_dev_combo_changed () { mix_device_type_t dev = get_device_idx_ (); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dtoggle_), - IS_DEC (new_decs_, dev)); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle_), - !IS_DEC (new_decs_, dev)); + if (dev <= LAST_BIN_DEV_) + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dtoggle_), + IS_DEC (new_decs_, dev)); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle_), + !IS_DEC (new_decs_, dev)); + } } void on_devform_activate () { + gint result = GTK_RESPONSE_APPLY; + if (!devdlg_) init_devform_ (); new_decs_ = decs_; - gtk_widget_show (devdlg_); - on_deventry_changed (); + + while (result == GTK_RESPONSE_APPLY) + { + //on_dev_combo_changed (); + result = gtk_dialog_run (GTK_DIALOG (devdlg_)); + if (result != GTK_RESPONSE_CANCEL) + { + int k; + gchar value[20]; + for (k = 0; k <= LAST_BIN_DEV_; ++k) + mixgtk_device_set_format (k, IS_DEC (new_decs_, k)); + decs_ = new_decs_; + g_snprintf (value, 20, "%d", decs_); + mixgtk_config_update (DEV_FORMAT_KEY_, value); + } + } + + gtk_widget_hide (devdlg_); } void @@ -477,31 +511,6 @@ on_decradio_toggled (GtkToggleButton *button) } void -on_devapp_button_clicked () -{ - int k; - gchar value[20]; - for (k = 0; k <= LAST_BIN_DEV_; ++k) - mixgtk_device_set_format (k, IS_DEC (new_decs_, k)); - decs_ = new_decs_; - g_snprintf (value, 20, "%d", decs_); - mixgtk_config_update (DEV_FORMAT_KEY_, value); -} - -void -on_devok_button_clicked () -{ - on_devapp_button_clicked (); - gtk_widget_hide (devdlg_); -} - -void -on_devcancel_button_clicked () -{ - gtk_widget_hide (devdlg_); -} - -void on_devset_button_clicked () { static gint32 ON = 0xffff, OFF = 0; @@ -572,20 +581,22 @@ on_devdir_ok_clicked () } void -on_input_ok_clicked () +on_devices_font_activate () { - gtk_widget_hide (input_dlg_); - gtk_main_quit (); -} + gint no = gtk_notebook_get_n_pages (dev_nb_); + GtkWidget **w = g_new (GtkWidget *, 2 * no + 1); + gint k; -void -on_input_clear_clicked () -{ - gtk_entry_set_text (input_dlg_entry_, ""); -} + w[2 * no] = GTK_WIDGET (dev_nb_); + for (k = 0; k < no; ++k) + { + w[k] = gtk_notebook_get_nth_page (dev_nb_, k); + w[k + no] = gtk_bin_get_child (GTK_BIN (w[k])); + g_assert (w[k]); + g_assert (w[k + no]); + } -void -on_input_entry_activate () -{ - on_input_ok_clicked (); + mixgtk_fontsel_query_font (MIX_FONT_DEVICES, w, 2 * no + 1); + + g_free (w); } diff --git a/mixgtk/mixgtk_device.h b/mixgtk/mixgtk_device.h index cdfec66..dde8a5c 100644 --- a/mixgtk/mixgtk_device.h +++ b/mixgtk/mixgtk_device.h @@ -3,22 +3,22 @@ * ------------------------------------------------------------------ * Last change: Time-stamp: <01/03/04 23:43:59 jose> * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2004 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. - * + * */ @@ -31,7 +31,7 @@ /* init default devices */ extern gboolean -mixgtk_device_init (GtkNotebook *container, mix_vm_t *vm); +mixgtk_device_init (GtkContainer *container, mix_vm_t *vm); /* change the output format of a device */ extern void diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c index 50bcceb..59849b1 100644 --- a/mixgtk/mixgtk_fontsel.c +++ b/mixgtk/mixgtk_fontsel.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_fontsel.c : * Implementation of the functions declared in mixgtk_fontsel.h * ------------------------------------------------------------------ - * $Id: mixgtk_fontsel.c,v 1.15 2004/06/23 10:50:10 jao Exp $ + * $Id: mixgtk_fontsel.c,v 1.16 2004/06/24 01:40:47 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2004 Free Software Foundation, Inc. * @@ -26,223 +26,81 @@ #include "mixgtk_config.h" #include "mixgtk_fontsel.h" -static GtkWidget *fontsel_dialog_ = NULL; -static mixgtk_widget_id_t widget_; -static GHashTable *winfo_ = NULL; +static GtkFontSelectionDialog *fontsel_dialog_ = NULL; -typedef struct winfo -{ - GtkWidget *widget; - const gchar *font; - const gchar *key; -} winfo; - -static mixgtk_widget_id_t widget_ids_[] = { - MIXGTK_WIDGET_MIXVM, - MIXGTK_WIDGET_PROMPT, - MIXGTK_WIDGET_LOG, - MIXGTK_WIDGET_MIXAL, - MIXGTK_WIDGET_DEVICE -}; - -static mixgtk_dialog_id_t dialog_ids_no_split_[] = { - MIXGTK_MAIN, - MIXGTK_MAIN, - MIXGTK_MAIN, - MIXGTK_MAIN, - MIXGTK_MAIN, -}; - -static mixgtk_dialog_id_t dialog_ids_split_[] = { - MIXGTK_MIXVM_DIALOG, - MIXGTK_MAIN, - MIXGTK_MAIN, - MIXGTK_MIXAL_DIALOG, - MIXGTK_DEVICES_DIALOG -}; - -static mixgtk_widget_id_t mixvm_children_[] = { - MIXGTK_WIDGET_rA, - MIXGTK_WIDGET_rX, - MIXGTK_WIDGET_rJ, - MIXGTK_WIDGET_rI1, - MIXGTK_WIDGET_rI2, - MIXGTK_WIDGET_rI3, - MIXGTK_WIDGET_rI4, - MIXGTK_WIDGET_rI5, - MIXGTK_WIDGET_rI6, - MIXGTK_WIDGET_CMP_L, - MIXGTK_WIDGET_CMP_E, - MIXGTK_WIDGET_CMP_G, - MIXGTK_WIDGET_OVER, - MIXGTK_WIDGET_CELLS, - MIXGTK_WIDGET_LAPTIME, - MIXGTK_WIDGET_PROGTIME, - MIXGTK_WIDGET_UPTIME, - MIXGTK_WIDGET_LOC +static const gchar *keys_[MIX_FONT_NO] = { + "MIX.font", "Prompt.font", "Log.font", "MIXAL.font", "Devices.font" }; -static const int CHILDREN_NO_ = -(sizeof (mixvm_children_) / sizeof (mixvm_children_[0])); - -static mixgtk_dialog_id_t *dialog_ids_ = NULL; - -static const gchar *keys_[] = { - "MIX.font", "Prompt.font", "Log.font", "MIXAL.font", "Device.font" -}; - - - -#define WIDGET_NO_ (sizeof (widget_ids_) / sizeof (widget_ids_[0])) - -static winfo infos_[WIDGET_NO_]; /* initialise the font selection dialog */ static void init_fontsel_ (void) { - fontsel_dialog_ = mixgtk_widget_factory_get_dialog (MIXGTK_FONTSEL_DIALOG); + fontsel_dialog_ = + GTK_FONT_SELECTION_DIALOG + (mixgtk_widget_factory_get_dialog (MIXGTK_FONTSEL_DIALOG)); g_assert (fontsel_dialog_ != NULL); } void -change_font_ (mixgtk_widget_id_t widget) +mixgtk_fontsel_set_font (mixgtk_font_t f, GtkWidget *w) { - winfo *info; - if (!fontsel_dialog_) init_fontsel_ (); - info = (winfo *) g_hash_table_lookup (winfo_, GINT_TO_POINTER (widget)); - g_assert (info); - widget_ = widget; - if (info->font) - gtk_font_selection_dialog_set_font_name - (GTK_FONT_SELECTION_DIALOG (fontsel_dialog_), info->font); - - gtk_widget_show (fontsel_dialog_); - -} - -void -mixgtk_fontsel_load_defaults (void) -{ - - int i; const gchar *font; - gboolean split = mixgtk_config_is_split (); + PangoFontDescription *font_desc; - fontsel_dialog_ = NULL; + if (f >= MIX_FONT_NO || w == NULL) return; - if (winfo_) g_hash_table_destroy (winfo_); - winfo_ = g_hash_table_new (NULL, NULL); - dialog_ids_ = split? dialog_ids_split_ : dialog_ids_no_split_; - for (i = 0; i < WIDGET_NO_; ++i) + font = mixgtk_config_get (keys_[f]); + if (!font) { - infos_[i].widget = - mixgtk_widget_factory_get (dialog_ids_[i], widget_ids_[i]); - g_assert (infos_[i].widget != NULL); - infos_[i].key = keys_[i]; - g_hash_table_insert (winfo_, GINT_TO_POINTER (widget_ids_[i]), - (gpointer)(infos_ + i)); - - infos_[i].font = NULL; - font = mixgtk_config_get (keys_[i]); - mixgtk_fontsel_set (widget_ids_[i], font? font : "Monospace"); + mixgtk_config_update (keys_[f], "Monospace"); + font = mixgtk_config_get (keys_[f]); + g_assert (font); } -} -void -mixgtk_fontsel_set (mixgtk_widget_id_t widget, const gchar *font) -{ - winfo *w = (winfo *) - g_hash_table_lookup (winfo_, GINT_TO_POINTER (widget)); - if (w != NULL && font != NULL) + font_desc = pango_font_description_from_string (font); + + if (font_desc) { - PangoFontDescription *font_desc = - pango_font_description_from_string (font); - if (font_desc != NULL) - { - gtk_widget_modify_font (w->widget, font_desc); - - if (widget == MIXGTK_WIDGET_MIXVM) - { - int k; - for (k = 0; k < CHILDREN_NO_; ++k) - { - GtkWidget *child = - mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, - mixvm_children_[k]); - gtk_widget_modify_font (child, font_desc); - } - } - w->font = font; - mixgtk_config_update (w->key, w->font); - pango_font_description_free (font_desc); - } - else - mixgtk_config_remove (w->key); + gtk_widget_modify_font (w, font_desc); + gtk_widget_queue_draw (w); + pango_font_description_free (font_desc); } -} + else + mixgtk_config_remove (keys_[f]); -const gchar * -mixgtk_fontsel_get (mixgtk_widget_id_t widget) -{ - const gchar *result = NULL; - winfo *w = (winfo *) - g_hash_table_lookup (winfo_, GINT_TO_POINTER (widget)); - if (w != NULL) result = w->font; - return result; } -/* callbacks */ -void -on_log_font_activate (void) +extern gboolean +mixgtk_fontsel_query_font (mixgtk_font_t f, GtkWidget **w, size_t no) { - change_font_ (MIXGTK_WIDGET_LOG); -} - -void -on_mixal_font_activate (void) -{ - change_font_ (MIXGTK_WIDGET_MIXAL); -} + gint result = GTK_RESPONSE_APPLY; + const gchar *current; + gboolean ret = FALSE; -void -on_prompt_font_activate (void) -{ - change_font_ (MIXGTK_WIDGET_PROMPT); -} - -void -on_mix_font_activate (void) -{ - change_font_ (MIXGTK_WIDGET_MIXVM); -} - -void -on_devices_font_activate (void) -{ - change_font_ (MIXGTK_WIDGET_DEVICE); -} - -void -on_fontsel_apply_clicked (void) -{ - gchar * name = gtk_font_selection_dialog_get_font_name - (GTK_FONT_SELECTION_DIALOG (fontsel_dialog_)); - mixgtk_fontsel_set (widget_, name); - g_free (name); -} + if (f >= MIX_FONT_NO) return FALSE; + if (!fontsel_dialog_) init_fontsel_ (); -void -on_fontsel_ok_clicked (void) -{ - on_fontsel_apply_clicked (); - gtk_widget_hide (fontsel_dialog_); -} + current = mixgtk_config_get (keys_[f]); + gtk_font_selection_dialog_set_font_name (fontsel_dialog_, + current? current : "Monospace"); -void -on_fontsel_cancel_clicked (void) -{ - gtk_widget_hide (fontsel_dialog_); + while (result == GTK_RESPONSE_APPLY) + { + result = gtk_dialog_run (GTK_DIALOG (fontsel_dialog_)); + if (result != GTK_RESPONSE_CANCEL) + { + gint k; + mixgtk_config_update + (keys_[f], + gtk_font_selection_dialog_get_font_name (fontsel_dialog_)); + for (k = 0; k < no; ++k) + mixgtk_fontsel_set_font (f, w[k]); + ret = TRUE; + } + } + gtk_widget_hide (GTK_WIDGET (fontsel_dialog_)); + return ret; } - diff --git a/mixgtk/mixgtk_fontsel.h b/mixgtk/mixgtk_fontsel.h index af09c15..0b288d4 100644 --- a/mixgtk/mixgtk_fontsel.h +++ b/mixgtk/mixgtk_fontsel.h @@ -1,24 +1,24 @@ /* -*-c-*- ---------------- mixgtk_fontsel.h : * Functions for handling font selection. * ------------------------------------------------------------------ - * Last change: Time-stamp: <2001-04-28 00:42:39 jao> + * $Id: mixgtk_fontsel.h,v 1.5 2004/06/24 01:40:47 jao Exp $ * ------------------------------------------------------------------ - * Copyright (C) 2001 Free Software Foundation, Inc. - * + * Copyright (C) 2001, 2004 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. - * + * */ @@ -28,17 +28,21 @@ #include <glib.h> #include "mixgtk_widgets.h" -/* load default (configured) fonts */ -extern void -mixgtk_fontsel_load_defaults (void); +typedef enum { + MIX_FONT_MIXVM, + MIX_FONT_LOG, + MIX_FONT_PROMPT, + MIX_FONT_MIXAL, + MIX_FONT_DEVICES, + MIX_FONT_NO +} mixgtk_font_t; -/* set a widget's font */ +/* configured fonts */ extern void -mixgtk_fontsel_set (mixgtk_widget_id_t widget, const gchar *font); +mixgtk_fontsel_set_font (mixgtk_font_t f, GtkWidget *w); -/* get a widget's font */ -extern const gchar * -mixgtk_fontsel_get (mixgtk_widget_id_t widget); +extern gboolean +mixgtk_fontsel_query_font (mixgtk_font_t f, GtkWidget **ws, size_t no); #endif /* MIXGTK_FONTSEL_H */ diff --git a/mixgtk/mixgtk_mixal.c b/mixgtk/mixgtk_mixal.c index b805c30..17f726f 100644 --- a/mixgtk/mixgtk_mixal.c +++ b/mixgtk/mixgtk_mixal.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_mixal.c : * Implementation of the functions declared in mixgtk_mixal.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixal.c,v 1.17 2004/06/23 10:50:10 jao Exp $ + * $Id: mixgtk_mixal.c,v 1.18 2004/06/24 01:40:47 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -27,6 +27,7 @@ #include "mixgtk_widgets.h" #include "mixgtk_config.h" +#include "mixgtk_fontsel.h" #include "mixgtk_mixal.h" @@ -236,9 +237,12 @@ mixgtk_mixal_init (mix_vm_t *vm, mixgtk_dialog_id_t top) g_signal_connect (G_OBJECT (clist_), "event", G_CALLBACK (mixal_event_), NULL); + mixgtk_fontsel_set_font (MIX_FONT_MIXAL, GTK_WIDGET (clist_)); + if (restart) mixgtk_mixal_load_file (); else restart = TRUE; + return TRUE; } @@ -555,3 +559,13 @@ on_mixal_leave_notify_event () { gtk_statusbar_pop (status_, status_context_); } + +void +on_mixal_font_activate () +{ + GtkWidget *w[] = { GTK_WIDGET (clist_) }; + mixgtk_fontsel_query_font (MIX_FONT_MIXAL, w, 1); +} + + + diff --git a/mixgtk/mixgtk_mixvm.c b/mixgtk/mixgtk_mixvm.c index 57fbb90..ca4b482 100644 --- a/mixgtk/mixgtk_mixvm.c +++ b/mixgtk/mixgtk_mixvm.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_mixvm.c : * Implementation of the functions declared in mixgtk_mixvm.h * ------------------------------------------------------------------ - * $Id: mixgtk_mixvm.c,v 1.11 2004/06/23 10:50:10 jao Exp $ + * $Id: mixgtk_mixvm.c,v 1.12 2004/06/24 01:40:47 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -24,6 +24,7 @@ #include <stdlib.h> #include <mixlib/xmix_vm.h> #include "mixgtk_widgets.h" +#include "mixgtk_fontsel.h" #include "mixgtk_mixvm.h" #include "mixgtk_cmd_dispatcher.h" #include "mixgtk_input.h" @@ -79,10 +80,12 @@ mixgtk_mixvm_init (mix_vm_t *vm, mixgtk_dialog_id_t top) reg_entries_[k] = GTK_ENTRY (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_rA + k)); g_return_val_if_fail (reg_entries_[k] != NULL, FALSE); + mixgtk_fontsel_set_font (MIX_FONT_MIXVM, GTK_WIDGET (reg_entries_[k])); } loc_entry_ = GTK_ENTRY (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_LOC)); g_return_val_if_fail (loc_entry_ != NULL, FALSE); + mixgtk_fontsel_set_font (MIX_FONT_MIXVM, GTK_WIDGET (loc_entry_)); uptime_ = GTK_LABEL (mixgtk_widget_factory_get (top, MIXGTK_WIDGET_UPTIME)); g_return_val_if_fail (uptime_ != NULL, FALSE); @@ -332,6 +335,21 @@ on_goto_ok_clicked (GtkWidget *w, gpointer data) } } +void +on_mix_font_activate (void) +{ + GtkWidget *w[REGISTER_NO_ + 2] = { + GTK_WIDGET (loc_entry_), GTK_WIDGET (memory_) + }; + + gint k; + + for (k = 0; k < REGISTER_NO_; ++k) w[k + 2] = GTK_WIDGET (reg_entries_[k]); + + mixgtk_fontsel_query_font (MIX_FONT_MIXVM, w, REGISTER_NO_ + 2); + +} + /* static functions */ @@ -485,6 +503,8 @@ init_mem_ (mixgtk_dialog_id_t top) g_signal_connect (G_OBJECT (memory_), "event-after", G_CALLBACK (cont_clicked_), NULL); + mixgtk_fontsel_set_font (MIX_FONT_MIXVM, GTK_WIDGET (memory_)); + return TRUE; } diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c index 8a5e91f..6ffff1e 100644 --- a/mixgtk/mixgtk_widgets.c +++ b/mixgtk/mixgtk_widgets.c @@ -77,7 +77,7 @@ static const gchar *names_[] = { "program_label", "uptime_label", "memory_scroll", - "devices_notebook", + "devices_container", "loc_entry", NULL }; diff --git a/mixgtk/mixgtk_widgets.h b/mixgtk/mixgtk_widgets.h index 6d84fc5..5be3fb6 100644 --- a/mixgtk/mixgtk_widgets.h +++ b/mixgtk/mixgtk_widgets.h @@ -72,7 +72,7 @@ typedef enum { MIXGTK_WIDGET_PROGTIME, MIXGTK_WIDGET_UPTIME, MIXGTK_WIDGET_CELLS_SCROLL, - MIXGTK_WIDGET_DEVICE, + MIXGTK_WIDGET_DEVICES, MIXGTK_WIDGET_LOC, MIXGTK_WIDGET_NONE } mixgtk_widget_id_t; |