diff options
Diffstat (limited to 'ide')
-rw-r--r-- | ide/main.nim | 400 | ||||
-rw-r--r-- | ide/nimide.glade | 399 |
2 files changed, 356 insertions, 443 deletions
diff --git a/ide/main.nim b/ide/main.nim index 76b6757a3..0e985c985 100644 --- a/ide/main.nim +++ b/ide/main.nim @@ -1,63 +1,38 @@ -import glib2, gtk2, libglade2 - -proc on_window_destroy(obj: PGtkObject, data: pointer) {.exportc, cdecl.} = +import glib2, gtk2, libglade2, dialogs + +proc on_window_destroy(obj: PGtkObject, data: pointer) {.cdecl.} = gtk_main_quit() - + const GuiTemplate = "/media/hda4/nimrod/ide/nimide.glade" - + type - TMyTextEditor = record + TTab = object of TObject + textview: PGtkTextView + filename: string + untitled: bool + + TMyTextEditor = object of TObject window: PGtkWindow statusbar: PGtkStatusBar textview: PGtkTextview statusbarContextId: int - filename: string -proc error_message(msg: string) = - var - dialog: PGtkDialog - dialog = GTK_DIALOG(gtk_message_dialog_new(nil, - GTK_DIALOG_MODAL or GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, msg)) - - gtk_window_set_title(dialog, "Error!") - gtk_dialog_run(dialog) - gtk_widget_destroy(dialog) -proc get_open_filename(e: TMyTextEditor): string = - var - chooser: PGtkDialog - chooser = gtk_file_chooser_dialog_new("Open File...", e.window, - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_OK, nil) - - if gtk_dialog_run(chooser) == GTK_RESPONSE_OK: - result = $gtk_file_chooser_get_filename(chooser) - else: - result = "" - gtk_widget_destroy(chooser) +proc on_about_menu_item_activate(menuItem: PGtkMenuItem, + e: var TMyTextEditor) {.cdecl.} = + gtk_show_about_dialog(e.window, + "comments", "A fast and leight-weight IDE for Nimrod", + "copyright", "Copyright \xc2\xa9 2008 Andreas Rumpf", + "version", "0.1", + "website", "http://nimrod.ethexor.com", + "program-name", "Nimrod IDE", + nil) - -proc get_save_filename(e: TMyTextEditor): string = - var - chooser: PGtkDialog - chooser = gtk_file_chooser_dialog_new("Save File...", e.window, - GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_OK, nil) - - if gtk_dialog_run(chooser) == GTK_RESPONSE_OK: - result = $gtk_file_chooser_get_filename(chooser) - else: - result = "" - gtk_widget_destroy(chooser) - proc load_file(e: var TMyTextEditor, filename: string) = - var + var err: ptr GError status: cstring text: cstring @@ -65,13 +40,13 @@ proc load_file(e: var TMyTextEditor, filename: string) = buffer: PGtkTextBuffer gtk_statusbar_push(e.statusbar, e.statusbar_context_id, "Loading...") while gtk_events_pending(): gtk_main_iteration() - + # get the file contents result = g_file_get_contents(filename, addr(text), nil, addr(err)) if not result: error_message("Cannot load file") g_error_free(err) - + # disable the text view while loading the buffer with the text gtk_widget_set_sensitive(e.text_view, false) buffer = gtk_text_view_get_buffer(e.text_view) @@ -79,13 +54,13 @@ proc load_file(e: var TMyTextEditor, filename: string) = gtk_text_buffer_set_modified(buffer, false) gtk_widget_set_sensitive(e.text_view, true) g_free(text) - + e.filename = filename gtk_statusbar_pop(e.statusbar, e.statusbar_context_id) reset_default_status(e) proc write_file(e: var TMyTextEditor, filename: string) = - var + var err: ptr GError status: cstring text: cstring @@ -95,7 +70,7 @@ proc write_file(e: var TMyTextEditor, filename: string) = # add Saving message to status bar and ensure GUI is current gtk_statusbar_push(e.statusbar, e.statusbar_context_id, "Saving....") while gtk_events_pending(): gtk_main_iteration() - + # disable text view and get contents of buffer gtk_widget_set_sensitive(editor->text_view, FALSE) buffer = gtk_text_view_get_buffer(e.text_view) @@ -113,48 +88,63 @@ proc write_file(e: var TMyTextEditor, filename: string) = error_message("cannot save") g_error_free(err) g_free(text) - if filename != "": + if filename != "": e.filename = filename gtk_statusbar_pop(e.statusbar, e.statusbar_context_id) reset_default_status(editor) -proc initApp(e: var TMyTextEditor) = +proc check_for_save(e: var TMyTextEditor): bool = + GtkTextBuffer *buffer; + buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); + if gtk_text_buffer_get_modified(buffer): + GtkWidget *dialog; + const gchar *msg = "Do you want to save the changes you have made?"; + dialog = gtk_message_dialog_new (nil, + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + msg); + gtk_window_set_title (GTK_WINDOW (dialog), "Save?"); + result = gtk_dialog_run(dialog) != GTK_RESPONSE_NO + gtk_widget_destroy(dialog) + +proc initApp(e: var TMyTextEditor) = var builder: PGladeXML window: PGtkWidget fontDesc: PPangoFontDescription id: int builder = glade_xml_new(GuiTemplate, nil, nil) - if builder == nil: + if builder == nil: error_message("cannot open: " & GuiTemplate) quit(1) # get the components: e.window = GTK_WINDOW(glade_xml_get_widget(builder, "window")) e.statusbar = GTK_STATUSBAR(glade_xml_get_widget(builder, "statusbar")) e.textview = GTK_TEXTVIEW(glade_xml_get_widget(builder, "textview")) - + # connect the signal handlers: - glade_xml_signal_connect(builder, "on_window_destroy", - cast[TGCallback](on_window_destroy)) - + glade_xml_signal_connect(builder, "on_window_destroy", + GCallback(on_window_destroy)) + font_desc = pango_font_description_from_string("monospace 10") gtk_widget_modify_font(e.textview, font_desc) pango_font_description_free(font_desc) gtk_window_set_default_icon_name(GTK_STOCK_EDIT) - + id = gtk_statusbar_get_context_id(e.statusbar, "Nimrod IDE") e.statusbarContextId = id reset_default_status(e) - + e.filename = "" - + proc main() = - var - editor: TMyTextEditor + var + editor: TMyTextEditor - gtk_nimrod_init() + gtk_nimrod_init() initApp(editor) gtk_widget_show(editor.window) gtk_main() @@ -162,208 +152,82 @@ proc main() = main() -proc reset_default_status(e: var TMyTextEditor) - gchar *file; - gchar *status; - - if e.filename == "": - file = g_strdup("(UNTITLED)") - else: - file = g_path_get_basename(editor->filename) - - status = g_strdup_printf("File: %s", file) - gtk_statusbar_pop(e.statusbar, - e.statusbar_context_id) - gtk_statusbar_push(e.statusbar, - e.statusbar_context_id, status) - g_free(status) - g_free(file) - - -gboolean -check_for_save(e: var TMyTextEditor) - gboolean ret = FALSE; - GtkTextBuffer *buffer; - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); - if (gtk_text_buffer_get_modified (buffer) == TRUE) + +proc on_window_delete_event(widget: PGtkWidget, event: PGdkEvent, + e: TMyTextEditor): bool {.cdecl.} = + if check_for_save(editor): + on_save_menu_item_activate(nil, editor) + result = false + +proc on_new_menu_item_activate(GtkMenuItem *menuitem, TutorialTextEditor *editor) + GtkTextBuffer *buffer; + + if check_for_save(editor): + on_save_menu_item_activate(nil, editor) + + /* clear editor for a new file */ + editor->filename = nil; + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (editor->text_view)); + gtk_text_buffer_set_text(buffer, "", -1); + gtk_text_buffer_set_modified(buffer, FALSE); + + reset_default_status(editor); + + +proc on_open_menu_item_activate(menuItem: PGtkMenuItem, + TutorialTextEditor *editor) = + gchar *filename; + + if check_for_save(editor): + on_save_menu_item_activate(nil, editor) + filename = get_open_filename(editor) + if filename != nil: load_file(editor, filename) + +proc on_save_menu_item_activate(menuItem: PGtkMenuItem, TutorialTextEditor *editor) = + gchar *filename; + if (editor->filename == nil) { - GtkWidget *dialog; - const gchar *msg = "Do you want to save the changes you have made?"; - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - msg); - gtk_window_set_title (GTK_WINDOW (dialog), "Save?"); - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_NO) - { - ret = FALSE; - } else ret = TRUE; - gtk_widget_destroy (dialog); - } - return ret; - - -/* -When the window is requested to be closed, we need to check if they have -unsaved work. We use this callback to prompt the user to save their work before -they exit the application. From the "delete-event" signal, we can choose to -effectively cancel the close based on the value we return. -*/ -gboolean -on_window_delete_event(GtkWidget *widget, GdkEvent *event, - TutorialTextEditor *editor) -{ - if (check_for_save (editor) == TRUE) - on_save_menu_item_activate (NULL, editor); - return FALSE; /* propogate event */ -} - -/* -Called when the user clicks the 'New' menu. We need to prompt for save if the -file has been modified, and then delete the buffer and clear the modified flag. -*/ -void on_new_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - GtkTextBuffer *buffer; - - if (check_for_save (editor) == TRUE) - { - on_save_menu_item_activate (NULL, editor); - } - - /* clear editor for a new file */ - editor->filename = NULL; - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); - gtk_text_buffer_set_text (buffer, "", -1); - gtk_text_buffer_set_modified (buffer, FALSE); - - reset_default_status (editor); -} - -/* -Called when the user clicks the 'Open' menu. We need to prompt for save if the -file has been modified, allow the user to choose a file to open, and then call -load_file() on that file. -*/ -void on_open_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - gchar *filename; - - if (check_for_save (editor) == TRUE) - { - on_save_menu_item_activate (NULL, editor); - } - - filename = get_open_filename (editor); - if (filename != NULL) load_file (editor, filename); -} - -/* -Called when the user clicks the 'Save' menu. We need to allow the user to choose -a file to save if it's an untitled document, and then call write_file() on that -file. -*/ -void on_save_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - gchar *filename; - - if (editor->filename == NULL) - { - filename = get_save_filename (editor); - if (filename != NULL) write_file (editor, filename); - } - else write_file (editor, NULL); - -} - -/* -Called when the user clicks the 'Save As' menu. We need to allow the user to -choose a file to save and then call write_file() on that file. -*/ -void on_save_as_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - gchar *filename; - - filename = get_save_filename (editor); - if (filename != NULL) write_file (editor, filename); -} - -/* -Called when the user clicks the 'Quit' menu. We need to prompt for save if the -file has been modified and then break out of the GTK+ main loop. -*/ -void on_quit_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - if (check_for_save (editor) == TRUE) - { - on_save_menu_item_activate (NULL, editor); - } - gtk_main_quit(); -} - -/* -Called when the user clicks the 'Cut' menu. -*/ -void on_cut_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - GtkTextBuffer *buffer; - GtkClipboard *clipboard; - - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); - gtk_text_buffer_cut_clipboard (buffer, clipboard, TRUE); -} - -/* -Called when the user clicks the 'Copy' menu. -*/ -void on_copy_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - GtkTextBuffer *buffer; - GtkClipboard *clipboard; - - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); - gtk_text_buffer_copy_clipboard (buffer, clipboard); -} - -/* -Called when the user clicks the 'Paste' menu. -*/ -void on_paste_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - GtkTextBuffer *buffer; - GtkClipboard *clipboard; - clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); - gtk_text_buffer_paste_clipboard (buffer, clipboard, NULL, TRUE); -} - -/* -Called when the user clicks the 'Delete' menu. -*/ -void on_delete_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - GtkTextBuffer *buffer; - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (editor->text_view)); - gtk_text_buffer_delete_selection (buffer, FALSE, TRUE); -} - -void on_about_menu_item_activate (GtkMenuItem *menuitem, TutorialTextEditor *editor) -{ - static const gchar * const authors[] = { - "Micah Carrick <email@micahcarrick.com>", - NULL - }; - static const gchar copyright[] = "Copyright \xc2\xa9 2008 Andreas Rumpf"; - static const gchar comments[] = "GTK+ and Glade3 GUI Programming Tutorial"; - gtk_show_about_dialog (e.window, - "authors", authors, - "comments", comments, - "copyright", copyright, - "version", "0.1", - "website", "http://www.micahcarrick.com", - "program-name", "GTK+ Text Editor", - "logo-icon-name", GTK_STOCK_EDIT, nil) -} + filename = get_save_filename(editor); + if (filename != nil) write_file(editor, filename); + } + else write_file(editor, nil); + +proc on_save_as_menu_item_activate(GtkMenuItem *menuitem, + TutorialTextEditor *editor) = + gchar *filename; + + filename = get_save_filename(editor) + if filename != nil: write_file(editor, filename) + +proc on_quit_menu_item_activate(GtkMenuItem *menuitem, TutorialTextEditor *editor) + if check_for_save(editor): + on_save_menu_item_activate(nil, editor) + gtk_main_quit() + +proc on_cut_menu_item_activate(GtkMenuItem *menuitem, TutorialTextEditor *editor) = + GtkTextBuffer *buffer; + GtkClipboard *clipboard; + + clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + buffer = gtk_text_view_get_buffer(editor->text_view) + gtk_text_buffer_cut_clipboard(buffer, clipboard, TRUE) + +proc on_copy_menu_item_activate(GtkMenuItem *menuitem, TutorialTextEditor *editor) = + GtkTextBuffer *buffer; + GtkClipboard *clipboard; + clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD) + buffer = gtk_text_view_get_buffer(editor->text_view) + gtk_text_buffer_copy_clipboard(buffer, clipboard) + + +proc on_paste_menu_item_activate(GtkMenuItem *menuitem, TutorialTextEditor *editor) + GtkTextBuffer *buffer; + GtkClipboard *clipboard; + clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD) + buffer = gtk_text_view_get_buffer(editor->text_view) + gtk_text_buffer_paste_clipboard(buffer, clipboard, nil, TRUE) + +proc on_delete_menu_item_activate(GtkMenuItem *menuitem, TutorialTextEditor *editor) + GtkTextBuffer *buffer; + buffer = gtk_text_view_get_buffer(editor->text_view); + gtk_text_buffer_delete_selection(buffer, FALSE, TRUE); diff --git a/ide/nimide.glade b/ide/nimide.glade index a902e6544..0bd5f11f1 100644 --- a/ide/nimide.glade +++ b/ide/nimide.glade @@ -1,175 +1,224 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> -<!--Generated with glade3 3.4.2 on Sat Jun 21 14:12:42 2008 --> -<glade-interface> - <widget class="GtkWindow" id="window"> - <property name="extension_events">GDK_EXTENSION_EVENTS_ALL</property> - <signal name="destroy" handler="on_window_destroy" object="destroy"/> - <child> - <widget class="GtkVBox" id="mainvbox"> - <property name="visible">True</property> - <child> - <widget class="GtkMenuBar" id="menubar"> - <property name="visible">True</property> - <child> - <widget class="GtkMenuItem" id="menuitem1"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Datei</property> - <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="menu1"> - <property name="visible">True</property> - <child> - <widget class="GtkImageMenuItem" id="new_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-new</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="open_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-open</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="save_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-save</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="save_as_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-save-as</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkSeparatorMenuItem" id="separatormenuitem1"> - <property name="visible">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="quit_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-quit</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkMenuItem" id="menuitem2"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Bearbeiten</property> - <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="menu2"> - <property name="visible">True</property> - <child> - <widget class="GtkImageMenuItem" id="cut_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-cut</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="copy_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-copy</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="paste_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-paste</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - <child> - <widget class="GtkImageMenuItem" id="delete_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-delete</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkMenuItem" id="menuitem4"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Hilfe</property> - <property name="use_underline">True</property> - <child> - <widget class="GtkMenu" id="menu3"> - <property name="visible">True</property> - <child> - <widget class="GtkImageMenuItem" id="about_menu_item"> - <property name="visible">True</property> - <property name="label" translatable="yes">gtk-about</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="expand">False</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="extension_events">GDK_EXTENSION_EVENTS_ALL</property> - <property name="border_width">1</property> - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> - <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> - <child> - <widget class="GtkTextView" id="textview"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="left_margin">2</property> - <property name="right_margin">2</property> - </widget> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkStatusbar" id="statusbar"> - <property name="visible">True</property> - <property name="spacing">2</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">2</property> - </packing> - </child> - </widget> - </child> - </widget> -</glade-interface> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window"> + <property name="extension_events">GDK_EXTENSION_EVENTS_ALL</property> + <property name="title" translatable="yes"></property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</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_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window_destroy" object="destroy"/> + + <child> + <widget class="GtkVBox" id="mainvbox"> + <property name="width_request">600</property> + <property name="height_request">400</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkMenuBar" id="menubar"> + <property name="visible">True</property> + <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property> + <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property> + + <child> + <widget class="GtkMenuItem" id="menuitem1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Datei</property> + <property name="use_underline">True</property> + + <child> + <widget class="GtkMenu" id="menu1"> + <property name="visible">True</property> + + <child> + <widget class="GtkImageMenuItem" id="new_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-new</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="open_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-open</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="save_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-save</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="save_as_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-save-as</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkSeparatorMenuItem" id="separatormenuitem1"> + <property name="visible">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="quit_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-quit</property> + <property name="use_stock">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkMenuItem" id="menuitem2"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Bearbeiten</property> + <property name="use_underline">True</property> + + <child> + <widget class="GtkMenu" id="menu2"> + <property name="visible">True</property> + + <child> + <widget class="GtkImageMenuItem" id="cut_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-cut</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="copy_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-copy</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="paste_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-paste</property> + <property name="use_stock">True</property> + </widget> + </child> + + <child> + <widget class="GtkImageMenuItem" id="delete_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-delete</property> + <property name="use_stock">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkMenuItem" id="menuitem4"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Hilfe</property> + <property name="use_underline">True</property> + + <child> + <widget class="GtkMenu" id="menu3"> + <property name="visible">True</property> + + <child> + <widget class="GtkImageMenuItem" id="about_menu_item"> + <property name="visible">True</property> + <property name="label">gtk-about</property> + <property name="use_stock">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow"> + <property name="border_width">1</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_ETCHED_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTextView" id="textview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="overwrite">False</property> + <property name="accepts_tab">True</property> + <property name="justification">GTK_JUSTIFY_LEFT</property> + <property name="wrap_mode">GTK_WRAP_NONE</property> + <property name="cursor_visible">True</property> + <property name="pixels_above_lines">0</property> + <property name="pixels_below_lines">0</property> + <property name="pixels_inside_wrap">0</property> + <property name="left_margin">2</property> + <property name="right_margin">2</property> + <property name="indent">0</property> + <property name="text" translatable="yes"></property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkStatusbar" id="statusbar"> + <property name="visible">True</property> + <property name="has_resize_grip">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> |