Search
lxdream.org :: lxdream/src/gui/interface.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 10:c898b37506e0
prev2:42349f6ea216
next18:9a1b5d75703f
author nkeynes
date Sun Dec 11 05:15:36 2005 +0000 (16 years ago)
permissions -rw-r--r--
last change Add CPU disasembly options to mode dropdown
Split sh4/mem.c into core mem.c and sh4/mem.c
Start adding copyright comments to file headers
file annotate diff log raw
1.1 --- a/src/gui/interface.c Sat Aug 21 06:15:49 2004 +0000
1.2 +++ b/src/gui/interface.c Sun Dec 11 05:15:36 2005 +0000
1.3 @@ -107,7 +107,8 @@
1.4 GtkWidget *debug_win;
1.5 GtkWidget *dock1;
1.6 GtkWidget *toolbar1;
1.7 - GtkWidget *tmp_toolbar_icon;
1.8 + GtkIconSize tmp_toolbar_icon_size;
1.9 + GtkWidget *tmp_image;
1.10 GtkWidget *load_btn;
1.11 GtkWidget *reset_btn;
1.12 GtkWidget *stop_btn;
1.13 @@ -144,8 +145,11 @@
1.14 GtkWidget *label31;
1.15 GtkWidget *label32;
1.16 GtkWidget *debug_appbar;
1.17 + GtkTooltips *tooltips;
1.18
1.19 - debug_win = gnome_app_new ("Dream2", _("DreamOn! Debugger"));
1.20 + tooltips = gtk_tooltips_new ();
1.21 +
1.22 + debug_win = gnome_app_new ("Dream", _("DreamOn! Debugger"));
1.23 gtk_window_set_default_size (GTK_WINDOW (debug_win), 1000, 700);
1.24
1.25 dock1 = GNOME_APP (debug_win)->dock;
1.26 @@ -160,76 +164,52 @@
1.27 BONOBO_DOCK_TOP, 1, 0, 0);
1.28 gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1);
1.29 gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
1.30 + tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));
1.31
1.32 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-open", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.33 - load_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.34 - GTK_TOOLBAR_CHILD_BUTTON,
1.35 - NULL,
1.36 - _("Load"),
1.37 - _("New File"), NULL,
1.38 - tmp_toolbar_icon, NULL, NULL);
1.39 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.40 + tmp_image = gtk_image_new_from_stock ("gtk-open", tmp_toolbar_icon_size);
1.41 + gtk_widget_show (tmp_image);
1.42 + load_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Load"));
1.43 gtk_widget_show (load_btn);
1.44 + gtk_container_add (GTK_CONTAINER (toolbar1), load_btn);
1.45 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (load_btn), tooltips, _("New File"), NULL);
1.46
1.47 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-refresh", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.48 - reset_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.49 - GTK_TOOLBAR_CHILD_BUTTON,
1.50 - NULL,
1.51 - _("Reset"),
1.52 - _("Open File"), NULL,
1.53 - tmp_toolbar_icon, NULL, NULL);
1.54 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.55 + tmp_image = gtk_image_new_from_stock ("gtk-refresh", tmp_toolbar_icon_size);
1.56 + gtk_widget_show (tmp_image);
1.57 + reset_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Reset"));
1.58 gtk_widget_show (reset_btn);
1.59 + gtk_container_add (GTK_CONTAINER (toolbar1), reset_btn);
1.60 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (reset_btn), tooltips, _("Open File"), NULL);
1.61
1.62 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-stop", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.63 - stop_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.64 - GTK_TOOLBAR_CHILD_BUTTON,
1.65 - NULL,
1.66 - _("Stop"),
1.67 - _("Save File"), NULL,
1.68 - tmp_toolbar_icon, NULL, NULL);
1.69 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.70 + tmp_image = gtk_image_new_from_stock ("gtk-stop", tmp_toolbar_icon_size);
1.71 + gtk_widget_show (tmp_image);
1.72 + stop_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Stop"));
1.73 gtk_widget_show (stop_btn);
1.74 + gtk_container_add (GTK_CONTAINER (toolbar1), stop_btn);
1.75 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (stop_btn), tooltips, _("Save File"), NULL);
1.76
1.77 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-redo", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.78 - step_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.79 - GTK_TOOLBAR_CHILD_BUTTON,
1.80 - NULL,
1.81 - _("Step"),
1.82 - NULL, NULL,
1.83 - tmp_toolbar_icon, NULL, NULL);
1.84 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.85 + tmp_image = gtk_image_new_from_stock ("gtk-redo", tmp_toolbar_icon_size);
1.86 + gtk_widget_show (tmp_image);
1.87 + step_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Step"));
1.88 gtk_widget_show (step_btn);
1.89 + gtk_container_add (GTK_CONTAINER (toolbar1), step_btn);
1.90
1.91 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-go-forward", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.92 - run_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.93 - GTK_TOOLBAR_CHILD_BUTTON,
1.94 - NULL,
1.95 - _("Run"),
1.96 - NULL, NULL,
1.97 - tmp_toolbar_icon, NULL, NULL);
1.98 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.99 + tmp_image = gtk_image_new_from_stock ("gtk-go-forward", tmp_toolbar_icon_size);
1.100 + gtk_widget_show (tmp_image);
1.101 + run_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run"));
1.102 gtk_widget_show (run_btn);
1.103 + gtk_container_add (GTK_CONTAINER (toolbar1), run_btn);
1.104
1.105 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-goto-last", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.106 - runto_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.107 - GTK_TOOLBAR_CHILD_BUTTON,
1.108 - NULL,
1.109 - _("Run to"),
1.110 - NULL, NULL,
1.111 - tmp_toolbar_icon, NULL, NULL);
1.112 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.113 + tmp_image = gtk_image_new_from_stock ("gtk-goto-last", tmp_toolbar_icon_size);
1.114 + gtk_widget_show (tmp_image);
1.115 + runto_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run to"));
1.116 gtk_widget_show (runto_btn);
1.117 + gtk_container_add (GTK_CONTAINER (toolbar1), runto_btn);
1.118
1.119 - tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-close", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
1.120 - break_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
1.121 - GTK_TOOLBAR_CHILD_BUTTON,
1.122 - NULL,
1.123 - _("Break"),
1.124 - NULL, NULL,
1.125 - tmp_toolbar_icon, NULL, NULL);
1.126 - gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
1.127 + tmp_image = gtk_image_new_from_stock ("gtk-close", tmp_toolbar_icon_size);
1.128 + gtk_widget_show (tmp_image);
1.129 + break_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Break"));
1.130 gtk_widget_show (break_btn);
1.131 + gtk_container_add (GTK_CONTAINER (toolbar1), break_btn);
1.132
1.133 vpaned1 = gtk_vpaned_new ();
1.134 gtk_widget_show (vpaned1);
1.135 @@ -277,12 +257,16 @@
1.136 "GladeParentKey", mode_box);
1.137 gtk_widget_show (mode_box);
1.138 gtk_box_pack_start (GTK_BOX (hbox1), mode_box, FALSE, FALSE, 0);
1.139 - mode_box_items = g_list_append (mode_box_items, (gpointer) "");
1.140 + mode_box_items = g_list_append (mode_box_items, (gpointer) _("SH4"));
1.141 + mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7"));
1.142 + mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7T"));
1.143 gtk_combo_set_popdown_strings (GTK_COMBO (mode_box), mode_box_items);
1.144 g_list_free (mode_box_items);
1.145
1.146 mode_field = GTK_COMBO (mode_box)->entry;
1.147 gtk_widget_show (mode_field);
1.148 + gtk_editable_set_editable (GTK_EDITABLE (mode_field), FALSE);
1.149 + gtk_entry_set_text (GTK_ENTRY (mode_field), _("SH4"));
1.150
1.151 label23 = gtk_label_new ("");
1.152 gtk_widget_show (label23);
1.153 @@ -473,6 +457,7 @@
1.154 GLADE_HOOKUP_OBJECT (debug_win, label31, "label31");
1.155 GLADE_HOOKUP_OBJECT (debug_win, label32, "label32");
1.156 GLADE_HOOKUP_OBJECT (debug_win, debug_appbar, "debug_appbar");
1.157 + GLADE_HOOKUP_OBJECT_NO_REF (debug_win, tooltips, "tooltips");
1.158
1.159 return debug_win;
1.160 }
1.161 @@ -554,7 +539,7 @@
1.162 if (!strcmp (translators, "translator_credits"))
1.163 translators = NULL;
1.164 about_win_logo_pixbuf = create_pixbuf ("dream/dcemu.gif");
1.165 - about_win = gnome_about_new ("Dream2", VERSION,
1.166 + about_win = gnome_about_new ("Dream", VERSION,
1.167 _("Copyright(c) 2002 Nathan Keynes"),
1.168 "",
1.169 authors,
1.170 @@ -562,6 +547,7 @@
1.171 translators,
1.172 about_win_logo_pixbuf);
1.173 gtk_container_set_border_width (GTK_CONTAINER (about_win), 1);
1.174 + gtk_window_set_type_hint (GTK_WINDOW (about_win), GDK_WINDOW_TYPE_HINT_DIALOG);
1.175
1.176 /* Store pointers to all widgets, for use by lookup_widget(). */
1.177 GLADE_HOOKUP_OBJECT_NO_REF (about_win, about_win, "about_win");
.