Search
lxdream.org :: lxdream/src/gui/interface.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 18:9a1b5d75703f
prev10:c898b37506e0
next35:21a4be098304
author nkeynes
date Thu Dec 15 13:33:14 2005 +0000 (14 years ago)
permissions -rw-r--r--
last change Implement save states
file annotate diff log raw
1.1 --- a/src/gui/interface.c Sun Dec 11 05:15:36 2005 +0000
1.2 +++ b/src/gui/interface.c Thu Dec 15 13:33:14 2005 +0000
1.3 @@ -116,6 +116,8 @@
1.4 GtkWidget *run_btn;
1.5 GtkWidget *runto_btn;
1.6 GtkWidget *break_btn;
1.7 + GtkWidget *loadstate_button;
1.8 + GtkWidget *savestate_button;
1.9 GtkWidget *vpaned1;
1.10 GtkWidget *hpaned1;
1.11 GtkWidget *vbox2;
1.12 @@ -166,50 +168,68 @@
1.13 gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
1.14 tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));
1.15
1.16 - tmp_image = gtk_image_new_from_stock ("gtk-open", tmp_toolbar_icon_size);
1.17 + tmp_image = gtk_image_new_from_stock ("gtk-cdrom", tmp_toolbar_icon_size);
1.18 gtk_widget_show (tmp_image);
1.19 - load_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Load"));
1.20 + load_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Mount"));
1.21 gtk_widget_show (load_btn);
1.22 gtk_container_add (GTK_CONTAINER (toolbar1), load_btn);
1.23 - gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (load_btn), tooltips, _("New File"), NULL);
1.24 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (load_btn), tooltips, _("Mount CD-Rom"), NULL);
1.25
1.26 tmp_image = gtk_image_new_from_stock ("gtk-refresh", tmp_toolbar_icon_size);
1.27 gtk_widget_show (tmp_image);
1.28 reset_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Reset"));
1.29 gtk_widget_show (reset_btn);
1.30 gtk_container_add (GTK_CONTAINER (toolbar1), reset_btn);
1.31 - gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (reset_btn), tooltips, _("Open File"), NULL);
1.32 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (reset_btn), tooltips, _("Reset emulator"), NULL);
1.33
1.34 tmp_image = gtk_image_new_from_stock ("gtk-stop", tmp_toolbar_icon_size);
1.35 gtk_widget_show (tmp_image);
1.36 stop_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Stop"));
1.37 gtk_widget_show (stop_btn);
1.38 gtk_container_add (GTK_CONTAINER (toolbar1), stop_btn);
1.39 - gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (stop_btn), tooltips, _("Save File"), NULL);
1.40 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (stop_btn), tooltips, _("Stop"), NULL);
1.41
1.42 tmp_image = gtk_image_new_from_stock ("gtk-redo", tmp_toolbar_icon_size);
1.43 gtk_widget_show (tmp_image);
1.44 step_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Step"));
1.45 gtk_widget_show (step_btn);
1.46 gtk_container_add (GTK_CONTAINER (toolbar1), step_btn);
1.47 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (step_btn), tooltips, _("Single step"), NULL);
1.48
1.49 tmp_image = gtk_image_new_from_stock ("gtk-go-forward", tmp_toolbar_icon_size);
1.50 gtk_widget_show (tmp_image);
1.51 run_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run"));
1.52 gtk_widget_show (run_btn);
1.53 gtk_container_add (GTK_CONTAINER (toolbar1), run_btn);
1.54 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (run_btn), tooltips, _("Run"), NULL);
1.55
1.56 tmp_image = gtk_image_new_from_stock ("gtk-goto-last", tmp_toolbar_icon_size);
1.57 gtk_widget_show (tmp_image);
1.58 runto_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run to"));
1.59 gtk_widget_show (runto_btn);
1.60 gtk_container_add (GTK_CONTAINER (toolbar1), runto_btn);
1.61 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (runto_btn), tooltips, _("Run to current selection"), NULL);
1.62
1.63 tmp_image = gtk_image_new_from_stock ("gtk-close", tmp_toolbar_icon_size);
1.64 gtk_widget_show (tmp_image);
1.65 break_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Break"));
1.66 gtk_widget_show (break_btn);
1.67 gtk_container_add (GTK_CONTAINER (toolbar1), break_btn);
1.68 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (break_btn), tooltips, _("Set breakpoint"), NULL);
1.69 +
1.70 + tmp_image = gtk_image_new_from_stock ("gtk-open", tmp_toolbar_icon_size);
1.71 + gtk_widget_show (tmp_image);
1.72 + loadstate_button = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Load"));
1.73 + gtk_widget_show (loadstate_button);
1.74 + gtk_container_add (GTK_CONTAINER (toolbar1), loadstate_button);
1.75 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (loadstate_button), tooltips, _("Load save-state file"), NULL);
1.76 +
1.77 + tmp_image = gtk_image_new_from_stock ("gtk-save", tmp_toolbar_icon_size);
1.78 + gtk_widget_show (tmp_image);
1.79 + savestate_button = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Save"));
1.80 + gtk_widget_show (savestate_button);
1.81 + gtk_container_add (GTK_CONTAINER (toolbar1), savestate_button);
1.82 + gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (savestate_button), tooltips, _("Save save-state file"), NULL);
1.83
1.84 vpaned1 = gtk_vpaned_new ();
1.85 gtk_widget_show (vpaned1);
1.86 @@ -266,7 +286,6 @@
1.87 mode_field = GTK_COMBO (mode_box)->entry;
1.88 gtk_widget_show (mode_field);
1.89 gtk_editable_set_editable (GTK_EDITABLE (mode_field), FALSE);
1.90 - gtk_entry_set_text (GTK_ENTRY (mode_field), _("SH4"));
1.91
1.92 label23 = gtk_label_new ("");
1.93 gtk_widget_show (label23);
1.94 @@ -382,6 +401,12 @@
1.95 g_signal_connect ((gpointer) break_btn, "clicked",
1.96 G_CALLBACK (on_break_btn_clicked),
1.97 NULL);
1.98 + g_signal_connect ((gpointer) loadstate_button, "clicked",
1.99 + G_CALLBACK (on_loadstate_button_clicked),
1.100 + NULL);
1.101 + g_signal_connect ((gpointer) savestate_button, "clicked",
1.102 + G_CALLBACK (on_savestate_button_clicked),
1.103 + NULL);
1.104 g_signal_connect ((gpointer) page_field, "key_press_event",
1.105 G_CALLBACK (on_page_field_key_press_event),
1.106 NULL);
1.107 @@ -429,6 +454,8 @@
1.108 GLADE_HOOKUP_OBJECT (debug_win, run_btn, "run_btn");
1.109 GLADE_HOOKUP_OBJECT (debug_win, runto_btn, "runto_btn");
1.110 GLADE_HOOKUP_OBJECT (debug_win, break_btn, "break_btn");
1.111 + GLADE_HOOKUP_OBJECT (debug_win, loadstate_button, "loadstate_button");
1.112 + GLADE_HOOKUP_OBJECT (debug_win, savestate_button, "savestate_button");
1.113 GLADE_HOOKUP_OBJECT (debug_win, vpaned1, "vpaned1");
1.114 GLADE_HOOKUP_OBJECT (debug_win, hpaned1, "hpaned1");
1.115 GLADE_HOOKUP_OBJECT (debug_win, vbox2, "vbox2");
.