diff options
Diffstat (limited to 'src/editor.c')
-rw-r--r-- | src/editor.c | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/src/editor.c b/src/editor.c index 4e0b8c2..c975da6 100644 --- a/src/editor.c +++ b/src/editor.c @@ -137,6 +137,10 @@ void update_debug_menu_items(GObject *, gboolean); +void open_last_file(GObject *ref); + + + /****************************************************************************** * * * Paramètres : argc = nombre d'arguments dans la ligne de commande. * @@ -188,6 +192,8 @@ int main(int argc, char **argv) init_all_plugins(G_OBJECT(editor)); + open_last_file(G_OBJECT(editor)); + gdk_threads_enter(); gtk_main(); gdk_threads_leave(); @@ -209,8 +215,6 @@ int main(int argc, char **argv) -GtkWidget *mywid; - /****************************************************************************** @@ -269,8 +273,6 @@ GtkWidget *create_editor(void) #endif - openida_binary *binary; - result = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request(result, 800, 600); @@ -282,8 +284,6 @@ GtkWidget *create_editor(void) ref = G_OBJECT(result); - mywid = result; - vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox1); @@ -467,6 +467,7 @@ GtkWidget *create_editor(void) snippet = gtk_snippet_new(); + g_object_set_data(G_OBJECT(result), "snippet", snippet); gtk_widget_show(binview); /* snippet = gtk_text_view_new (); @@ -583,15 +584,6 @@ GtkWidget *create_editor(void) - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - - binary = load_binary_file("/tmp/hello"); - gtk_snippet_set_rendering_lines(snippet, get_openida_binary_lines(binary)); - - - g_object_set_data(G_OBJECT(result), "current_binary", binary); - - return result; } @@ -1205,3 +1197,30 @@ void update_debug_menu_items(GObject *ref, gboolean stopped) gtk_widget_set_sensitive(submenuitem, stopped); } + + + + + + + + + +void open_last_file(GObject *ref) +{ + + openida_binary *binary; + + + + binary = load_binary_file("/tmp/hello"); + gtk_snippet_set_rendering_lines(GTK_SNIPPET(g_object_get_data(ref, "snippet")), get_openida_binary_lines(binary)); + + + g_object_set_data(ref, "current_binary", binary); + + + + + +} |