Revision: 3601 http://geany.svn.sourceforge.net/geany/?rev=3601&view=rev Author: eht16 Date: 2009-02-25 23:28:01 +0000 (Wed, 25 Feb 2009)
Log Message: ----------- Add 'Send Selection to Terminal' command to the Edit->Format menu (initial patch by David Gleich, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/THANKS trunk/doc/geany.html trunk/doc/geany.txt trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/editor.c trunk/src/interface.c trunk/src/keybindings.c trunk/src/keybindings.h trunk/src/main.c trunk/src/plugindata.h trunk/src/vte.c trunk/src/vte.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/ChangeLog 2009-02-25 23:28:01 UTC (rev 3601) @@ -2,6 +2,12 @@
* src/templates.c: Fix wrong Fortran 90 comment characters when inserting templates. + * doc/geany.html, doc/geany.txt, geany.glade, src/callbacks.c, + src/callbacks.h, src/editor.c, src/interface.c, src/keybindings.c, + src/keybindings.h, src/main.c, src/plugindata.h, src/vte.c, + src/vte.h, THANKS: + Add 'Send Selection to Terminal' command to the Edit->Format menu + (initial patch by David Gleich, thanks).
2009-02-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/THANKS =================================================================== --- trunk/THANKS 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/THANKS 2009-02-25 23:28:01 UTC (rev 3601) @@ -60,6 +60,7 @@ Tyler Mulligan <tyler(at)doknowevil(dot)net> - Close All toolbar icon Philipp Gildein <philipp(at)gildein(dot)com> - Ada filetype patch Thomas Martitz <thomas47(at)arcor(dot)de> - Multiple %cursor% wildcards in Snippets patch +David Gleich <dgleich(at)stanford(dot)edu> - Send Selection to Terminal patch
Translators: ------------
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/doc/geany.html 2009-02-25 23:28:01 UTC (rev 3601) @@ -6,7 +6,7 @@ <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> -<meta name="date" content="2009-02-15" /> +<meta name="date" content="$Date$" /> <style type="text/css">
/* @@ -139,7 +139,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2009-02-15</td></tr> +<td>$Date$</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.17</td></tr> </tbody> @@ -2819,6 +2819,20 @@ <td>Indents the current line or all selected lines with the same indentation as the previous line.</td> </tr> +<tr><td>Send to Custom Command 1 (2,3)</td> +<td>Ctrl-1 (2,3)</td> +<td>Passes the current selection to a configured +external command (available for the first +three configured commands, see +<a class="reference internal" href="#send-text-through-definable-commands">Send text through definable commands</a> for +details).</td> +</tr> +<tr><td>Send Selection to Verminal</td> +<td> </td> +<td>Sends the current selection or the current +line (if there is no selection) to the +embedded Terminal (VTE).</td> +</tr> <tr><td><strong>Settings</strong></td> <td> </td> <td> </td> @@ -4691,7 +4705,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference external" href="geany.txt">View document source</a>. -Generated on: 2009-02-15 14:07 UTC. +Generated on: 2009-02-25 23:11 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/doc/geany.txt 2009-02-25 23:28:01 UTC (rev 3601) @@ -2553,6 +2553,17 @@ Smart line indent Indents the current line or all selected lines with the same indentation as the previous line.
+Send to Custom Command 1 (2,3) Ctrl-1 (2,3) Passes the current selection to a configured + external command (available for the first + three configured commands, see + `Send text through definable commands`_ for + details). + +Send Selection to Verminal Sends the current selection or the current + line (if there is no selection) to the + embedded Terminal (VTE). + + **Settings**
Preferences Ctrl-Alt-P Opens preferences dialog.
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/geany.glade 2009-02-25 23:28:01 UTC (rev 3601) @@ -61,7 +61,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2756"> + <widget class="GtkImage" id="image2803"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -151,7 +151,7 @@ <signal name="activate" handler="on_save_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2757"> + <widget class="GtkImage" id="image2804"> <property name="visible">True</property> <property name="stock">gtk-save</property> <property name="icon_size">1</property> @@ -172,7 +172,7 @@ <signal name="activate" handler="on_toolbutton_reload_clicked" last_modification_time="Mon, 01 Sep 2008 16:57:06 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2758"> + <widget class="GtkImage" id="image2805"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -192,7 +192,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2759"> + <widget class="GtkImage" id="image2806"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -279,7 +279,7 @@ <signal name="activate" handler="on_close_other_documents1_activate" last_modification_time="Fri, 27 Jun 2008 15:19:28 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2760"> + <widget class="GtkImage" id="image2807"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -300,7 +300,7 @@ <signal name="activate" handler="on_close_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2761"> + <widget class="GtkImage" id="image2808"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -497,7 +497,7 @@ <signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2762"> + <widget class="GtkImage" id="image2809"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -518,7 +518,7 @@ <signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2763"> + <widget class="GtkImage" id="image2810"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -538,6 +538,15 @@ </child>
<child> + <widget class="GtkMenuItem" id="send_selection_to_vte1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Send Selection to Terminal</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_send_selection_to_vte1_activate" last_modification_time="Wed, 25 Feb 2009 17:51:35 GMT"/> + </widget> + </child> + + <child> <widget class="GtkMenuItem" id="send_selection_to2"> <property name="visible">True</property> <property name="label" translatable="yes">_Send Selection to</property> @@ -574,7 +583,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2764"> + <widget class="GtkImage" id="image2811"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -653,7 +662,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2765"> + <widget class="GtkImage" id="image2812"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -685,7 +694,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2766"> + <widget class="GtkImage" id="image2813"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -783,7 +792,7 @@ <signal name="activate" handler="on_replace1_activate" last_modification_time="Sun, 23 Oct 2005 13:22:36 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2767"> + <widget class="GtkImage" id="image2814"> <property name="visible">True</property> <property name="stock">gtk-find-and-replace</property> <property name="icon_size">1</property> @@ -858,7 +867,7 @@ <signal name="activate" handler="on_go_to_line_activate" last_modification_time="Sat, 06 Dec 2008 17:41:21 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2768"> + <widget class="GtkImage" id="image2815"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property> @@ -892,7 +901,7 @@ <signal name="activate" handler="on_change_font1_activate" last_modification_time="Fri, 22 Apr 2005 18:58:45 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2769"> + <widget class="GtkImage" id="image2816"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -1364,7 +1373,7 @@ <signal name="activate" handler="on_project_new1_activate" last_modification_time="Thu, 18 Jan 2007 22:16:24 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2770"> + <widget class="GtkImage" id="image2817"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -1385,7 +1394,7 @@ <signal name="activate" handler="on_project_open1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2771"> + <widget class="GtkImage" id="image2818"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -1406,7 +1415,7 @@ <signal name="activate" handler="on_project_close1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2772"> + <widget class="GtkImage" id="image2819"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -1463,7 +1472,7 @@ <signal name="activate" handler="on_show_color_chooser1_activate" last_modification_time="Wed, 22 Jun 2005 18:10:21 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2773"> + <widget class="GtkImage" id="image2820"> <property name="visible">True</property> <property name="stock">gtk-select-color</property> <property name="icon_size">1</property> @@ -1502,7 +1511,7 @@ <signal name="activate" handler="on_menu_reload_configuration1_activate" last_modification_time="Mon, 30 Jun 2008 16:19:40 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2774"> + <widget class="GtkImage" id="image2821"> <property name="visible">True</property> <property name="stock">gtk-refresh</property> <property name="icon_size">1</property> @@ -1536,7 +1545,7 @@ <signal name="activate" handler="on_help1_activate" last_modification_time="Sun, 24 Jul 2005 15:23:11 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2775"> + <widget class="GtkImage" id="image2822"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property> @@ -2305,7 +2314,7 @@ <signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:31:38 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2748"> + <widget class="GtkImage" id="image2823"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -2326,7 +2335,7 @@ <signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:31:38 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2749"> + <widget class="GtkImage" id="image2824"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -2346,6 +2355,15 @@ </child>
<child> + <widget class="GtkMenuItem" id="send_selection_to_vte2"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Send Selection to Terminal</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_send_selection_to_vte1_activate" last_modification_time="Wed, 25 Feb 2009 17:52:11 GMT"/> + </widget> + </child> + + <child> <widget class="GtkMenuItem" id="send_selection_to1"> <property name="visible">True</property> <property name="label" translatable="yes">_Send Selection to</property> @@ -2382,7 +2400,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2750"> + <widget class="GtkImage" id="image2825"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2461,7 +2479,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2751"> + <widget class="GtkImage" id="image2826"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2493,7 +2511,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2752"> + <widget class="GtkImage" id="image2827"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2532,7 +2550,7 @@ <signal name="activate" handler="on_find_usage1_activate" last_modification_time="Fri, 27 May 2005 21:55:12 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2753"> + <widget class="GtkImage" id="image2828"> <property name="visible">True</property> <property name="stock">gtk-find</property> <property name="icon_size">1</property> @@ -2553,7 +2571,7 @@ <signal name="activate" handler="on_find_document_usage1_activate" last_modification_time="Thu, 17 Jul 2008 13:42:25 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2754"> + <widget class="GtkImage" id="image2829"> <property name="visible">True</property> <property name="stock">gtk-find</property> <property name="icon_size">1</property> @@ -2607,7 +2625,7 @@ <signal name="activate" handler="on_go_to_line_activate" last_modification_time="Sat, 16 Jul 2005 11:20:32 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2755"> + <widget class="GtkImage" id="image2830"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/callbacks.c 2009-02-25 23:28:01 UTC (rev 3601) @@ -2219,3 +2219,14 @@ log_show_debug_messages_dialog(); }
+ +void +on_send_selection_to_vte1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ +#ifdef HAVE_VTE + if (vte_info.load_vte) + vte_send_selection_to_vte(); +#endif +} +
Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/callbacks.h 2009-02-25 23:28:01 UTC (rev 3601) @@ -598,3 +598,7 @@ on_menu_show_indentation_guides1_toggled (GtkCheckMenuItem *checkmenuitem, gpointer user_data); + +void +on_send_selection_to_vte1_activate (GtkMenuItem *menuitem, + gpointer user_data);
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/editor.c 2009-02-25 23:28:01 UTC (rev 3601) @@ -4459,4 +4459,3 @@ editor_prefs.smart_home_key ? SCI_VCHOMEWRAP : SCI_HOMEWRAP); sci_assign_cmdkey(sci, SCK_END, SCI_LINEENDWRAP); } -
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/interface.c 2009-02-25 23:28:01 UTC (rev 3601) @@ -37,7 +37,7 @@ GtkWidget *file1_menu; GtkWidget *menu_new1; GtkWidget *menu_new_with_template1; - GtkWidget *image2756; + GtkWidget *image2803; GtkWidget *menu_new_with_template1_menu; GtkWidget *invisible2; GtkWidget *separator12; @@ -48,11 +48,11 @@ GtkWidget *menu_save1; GtkWidget *menu_save_as1; GtkWidget *menu_save_all1; - GtkWidget *image2757; + GtkWidget *image2804; GtkWidget *menu_reload1; - GtkWidget *image2758; + GtkWidget *image2805; GtkWidget *menu_reload_as1; - GtkWidget *image2759; + GtkWidget *image2806; GtkWidget *menu_reload_as1_menu; GtkWidget *invisible7; GtkWidget *separator21; @@ -63,9 +63,9 @@ GtkWidget *separator14; GtkWidget *menu_close1; GtkWidget *close_other_documents1; - GtkWidget *image2760; + GtkWidget *image2807; GtkWidget *menu_close_all1; - GtkWidget *image2761; + GtkWidget *image2808; GtkWidget *menu_separatormenuitem1; GtkWidget *menu_quit1; GtkWidget *edit1; @@ -90,16 +90,17 @@ GtkWidget *menu_duplicate_line1; GtkWidget *separator29; GtkWidget *menu_increase_indent1; - GtkWidget *image2762; + GtkWidget *image2809; GtkWidget *menu_decrease_indent1; - GtkWidget *image2763; + GtkWidget *image2810; GtkWidget *separator37; + GtkWidget *send_selection_to_vte1; GtkWidget *send_selection_to2; GtkWidget *send_selection_to2_menu; GtkWidget *invisible13; GtkWidget *separator18; GtkWidget *add_comments1; - GtkWidget *image2764; + GtkWidget *image2811; GtkWidget *add_comments1_menu; GtkWidget *menu_add_changelog_entry1; GtkWidget *insert_file_header1; @@ -108,11 +109,11 @@ GtkWidget *insert_gpl_notice2; GtkWidget *insert_bsd_license_notice2; GtkWidget *insert_date1; - GtkWidget *image2765; + GtkWidget *image2812; GtkWidget *insert_date1_menu; GtkWidget *invisible8; GtkWidget *insert_include2; - GtkWidget *image2766; + GtkWidget *image2813; GtkWidget *insert_include2_menu; GtkWidget *invisible4; GtkWidget *separator9; @@ -124,7 +125,7 @@ GtkWidget *find_previous1; GtkWidget *find_in_files1; GtkWidget *replace1; - GtkWidget *image2767; + GtkWidget *image2814; GtkWidget *separator33; GtkWidget *find_nextsel1; GtkWidget *find_prevsel1; @@ -133,11 +134,11 @@ GtkWidget *previous_message1; GtkWidget *separator32; GtkWidget *go_to_line1; - GtkWidget *image2768; + GtkWidget *image2815; GtkWidget *menu_view1; GtkWidget *menu_view1_menu; GtkWidget *menu_change_font1; - GtkWidget *image2769; + GtkWidget *image2816; GtkWidget *menu_separator4; GtkWidget *menu_toggle_all_additional_widgets1; GtkWidget *menu_fullscreen1; @@ -195,26 +196,26 @@ GtkWidget *menu_project1; GtkWidget *menu_project1_menu; GtkWidget *project_new1; - GtkWidget *image2770; + GtkWidget *image2817; GtkWidget *project_open1; - GtkWidget *image2771; + GtkWidget *image2818; GtkWidget *project_close1; - GtkWidget *image2772; + GtkWidget *image2819; GtkWidget *separator34; GtkWidget *project_properties1; GtkWidget *menu_build1; GtkWidget *tools1; GtkWidget *tools1_menu; GtkWidget *menu_choose_color1; - GtkWidget *image2773; + GtkWidget *image2820; GtkWidget *menu_count_words1; GtkWidget *load_tags1; GtkWidget *menu_reload_configuration1; - GtkWidget *image2774; + GtkWidget *image2821; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *help1; - GtkWidget *image2775; + GtkWidget *image2822; GtkWidget *website1; GtkWidget *keyboard_shortcuts1; GtkWidget *debug_messages1; @@ -280,9 +281,9 @@ gtk_widget_show (menu_new_with_template1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1);
- image2756 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2756); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2756); + image2803 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2803); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2803);
menu_new_with_template1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_new_with_template1), menu_new_with_template1_menu); @@ -325,25 +326,25 @@ gtk_widget_show (menu_save_all1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1);
- image2757 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2757); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2757); + image2804 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2804); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2804);
menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload")); gtk_widget_show (menu_reload1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1);
- image2758 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2758); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2758); + image2805 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2805); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2805);
menu_reload_as1 = gtk_image_menu_item_new_with_mnemonic (_("R_eload As")); gtk_widget_show (menu_reload_as1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload_as1);
- image2759 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2759); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2759); + image2806 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2806); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2806);
menu_reload_as1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu); @@ -386,17 +387,17 @@ gtk_widget_show (close_other_documents1); gtk_container_add (GTK_CONTAINER (file1_menu), close_other_documents1);
- image2760 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2760); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image2760); + image2807 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2807); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image2807);
menu_close_all1 = gtk_image_menu_item_new_with_mnemonic (_("C_lose All")); gtk_widget_show (menu_close_all1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_close_all1);
- image2761 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2761); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2761); + image2808 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2808); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2808);
menu_separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separatormenuitem1); @@ -498,23 +499,27 @@ gtk_widget_show (menu_increase_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
- image2762 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2762); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2762); + image2809 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2809); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2809);
menu_decrease_indent1 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent")); gtk_widget_show (menu_decrease_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_decrease_indent1);
- image2763 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2763); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2763); + image2810 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2810); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2810);
separator37 = gtk_separator_menu_item_new (); gtk_widget_show (separator37); gtk_container_add (GTK_CONTAINER (menu_format1_menu), separator37); gtk_widget_set_sensitive (separator37, FALSE);
+ send_selection_to_vte1 = gtk_menu_item_new_with_mnemonic (_("_Send Selection to Terminal")); + gtk_widget_show (send_selection_to_vte1); + gtk_container_add (GTK_CONTAINER (menu_format1_menu), send_selection_to_vte1); + send_selection_to2 = gtk_menu_item_new_with_mnemonic (_("_Send Selection to")); gtk_widget_show (send_selection_to2); gtk_container_add (GTK_CONTAINER (menu_format1_menu), send_selection_to2); @@ -534,9 +539,9 @@ gtk_widget_show (add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
- image2764 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2764); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2764); + image2811 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2811); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2811);
add_comments1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); @@ -569,9 +574,9 @@ gtk_widget_show (insert_date1); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1);
- image2765 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2765); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2765); + image2812 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2812); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2812);
insert_date1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu); @@ -583,9 +588,9 @@ gtk_widget_show (insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
- image2766 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2766); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2766); + image2813 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2813); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2813);
insert_include2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); @@ -629,9 +634,9 @@ gtk_widget_show (replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
- image2767 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2767); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2767); + image2814 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2814); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2814);
separator33 = gtk_separator_menu_item_new (); gtk_widget_show (separator33); @@ -668,9 +673,9 @@ gtk_widget_show (go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
- image2768 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2768); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2768); + image2815 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2815); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2815);
menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_widget_show (menu_view1); @@ -683,9 +688,9 @@ gtk_widget_show (menu_change_font1); gtk_container_add (GTK_CONTAINER (menu_view1_menu), menu_change_font1);
- image2769 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2769); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2769); + image2816 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2816); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2816);
menu_separator4 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separator4); @@ -924,25 +929,25 @@ gtk_widget_show (project_new1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1);
- image2770 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2770); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2770); + image2817 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2817); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2817);
project_open1 = gtk_image_menu_item_new_with_mnemonic (_("_Open")); gtk_widget_show (project_open1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_open1);
- image2771 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2771); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2771); + image2818 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2818); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2818);
project_close1 = gtk_image_menu_item_new_with_mnemonic (_("_Close")); gtk_widget_show (project_close1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_close1);
- image2772 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2772); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2772); + image2819 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2819); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2819);
separator34 = gtk_separator_menu_item_new (); gtk_widget_show (separator34); @@ -968,9 +973,9 @@ gtk_widget_show (menu_choose_color1); gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1);
- image2773 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2773); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2773); + image2820 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2820); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2820);
menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count")); gtk_widget_show (menu_count_words1); @@ -984,9 +989,9 @@ gtk_widget_show (menu_reload_configuration1); gtk_container_add (GTK_CONTAINER (tools1_menu), menu_reload_configuration1);
- image2774 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2774); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image2774); + image2821 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2821); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image2821);
menu_help1 = gtk_menu_item_new_with_mnemonic (_("_Help")); gtk_widget_show (menu_help1); @@ -999,9 +1004,9 @@ gtk_widget_show (help1); gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1);
- image2775 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2775); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2775); + image2822 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2822); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2822);
website1 = gtk_menu_item_new_with_mnemonic (_("_Website")); gtk_widget_show (website1); @@ -1245,6 +1250,9 @@ g_signal_connect ((gpointer) menu_decrease_indent1, "activate", G_CALLBACK (on_menu_decrease_indent1_activate), NULL); + g_signal_connect ((gpointer) send_selection_to_vte1, "activate", + G_CALLBACK (on_send_selection_to_vte1_activate), + NULL); g_signal_connect ((gpointer) menu_add_changelog_entry1, "activate", G_CALLBACK (on_comments_changelog_activate), NULL); @@ -1462,7 +1470,7 @@ GLADE_HOOKUP_OBJECT (window1, file1_menu, "file1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_new1, "menu_new1"); GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1, "menu_new_with_template1"); - GLADE_HOOKUP_OBJECT (window1, image2756, "image2756"); + GLADE_HOOKUP_OBJECT (window1, image2803, "image2803"); GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1_menu, "menu_new_with_template1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible2, "invisible2"); GLADE_HOOKUP_OBJECT (window1, separator12, "separator12"); @@ -1473,11 +1481,11 @@ GLADE_HOOKUP_OBJECT (window1, menu_save1, "menu_save1"); GLADE_HOOKUP_OBJECT (window1, menu_save_as1, "menu_save_as1"); GLADE_HOOKUP_OBJECT (window1, menu_save_all1, "menu_save_all1"); - GLADE_HOOKUP_OBJECT (window1, image2757, "image2757"); + GLADE_HOOKUP_OBJECT (window1, image2804, "image2804"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); - GLADE_HOOKUP_OBJECT (window1, image2758, "image2758"); + GLADE_HOOKUP_OBJECT (window1, image2805, "image2805"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); - GLADE_HOOKUP_OBJECT (window1, image2759, "image2759"); + GLADE_HOOKUP_OBJECT (window1, image2806, "image2806"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); @@ -1488,9 +1496,9 @@ GLADE_HOOKUP_OBJECT (window1, separator14, "separator14"); GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1"); GLADE_HOOKUP_OBJECT (window1, close_other_documents1, "close_other_documents1"); - GLADE_HOOKUP_OBJECT (window1, image2760, "image2760"); + GLADE_HOOKUP_OBJECT (window1, image2807, "image2807"); GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1"); - GLADE_HOOKUP_OBJECT (window1, image2761, "image2761"); + GLADE_HOOKUP_OBJECT (window1, image2808, "image2808"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); @@ -1515,16 +1523,17 @@ GLADE_HOOKUP_OBJECT (window1, menu_duplicate_line1, "menu_duplicate_line1"); GLADE_HOOKUP_OBJECT (window1, separator29, "separator29"); GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1"); - GLADE_HOOKUP_OBJECT (window1, image2762, "image2762"); + GLADE_HOOKUP_OBJECT (window1, image2809, "image2809"); GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1"); - GLADE_HOOKUP_OBJECT (window1, image2763, "image2763"); + GLADE_HOOKUP_OBJECT (window1, image2810, "image2810"); GLADE_HOOKUP_OBJECT (window1, separator37, "separator37"); + GLADE_HOOKUP_OBJECT (window1, send_selection_to_vte1, "send_selection_to_vte1"); GLADE_HOOKUP_OBJECT (window1, send_selection_to2, "send_selection_to2"); GLADE_HOOKUP_OBJECT (window1, send_selection_to2_menu, "send_selection_to2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible13, "invisible13"); GLADE_HOOKUP_OBJECT (window1, separator18, "separator18"); GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1"); - GLADE_HOOKUP_OBJECT (window1, image2764, "image2764"); + GLADE_HOOKUP_OBJECT (window1, image2811, "image2811"); GLADE_HOOKUP_OBJECT (window1, add_comments1_menu, "add_comments1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_add_changelog_entry1, "menu_add_changelog_entry1"); GLADE_HOOKUP_OBJECT (window1, insert_file_header1, "insert_file_header1"); @@ -1533,11 +1542,11 @@ GLADE_HOOKUP_OBJECT (window1, insert_gpl_notice2, "insert_gpl_notice2"); GLADE_HOOKUP_OBJECT (window1, insert_bsd_license_notice2, "insert_bsd_license_notice2"); GLADE_HOOKUP_OBJECT (window1, insert_date1, "insert_date1"); - GLADE_HOOKUP_OBJECT (window1, image2765, "image2765"); + GLADE_HOOKUP_OBJECT (window1, image2812, "image2812"); GLADE_HOOKUP_OBJECT (window1, insert_date1_menu, "insert_date1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible8, "invisible8"); GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2"); - GLADE_HOOKUP_OBJECT (window1, image2766, "image2766"); + GLADE_HOOKUP_OBJECT (window1, image2813, "image2813"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, separator9, "separator9"); @@ -1549,7 +1558,7 @@ GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1"); GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1"); GLADE_HOOKUP_OBJECT (window1, replace1, "replace1"); - GLADE_HOOKUP_OBJECT (window1, image2767, "image2767"); + GLADE_HOOKUP_OBJECT (window1, image2814, "image2814"); GLADE_HOOKUP_OBJECT (window1, separator33, "separator33"); GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1"); GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1"); @@ -1558,11 +1567,11 @@ GLADE_HOOKUP_OBJECT (window1, previous_message1, "previous_message1"); GLADE_HOOKUP_OBJECT (window1, separator32, "separator32"); GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1"); - GLADE_HOOKUP_OBJECT (window1, image2768, "image2768"); + GLADE_HOOKUP_OBJECT (window1, image2815, "image2815"); GLADE_HOOKUP_OBJECT (window1, menu_view1, "menu_view1"); GLADE_HOOKUP_OBJECT (window1, menu_view1_menu, "menu_view1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1"); - GLADE_HOOKUP_OBJECT (window1, image2769, "image2769"); + GLADE_HOOKUP_OBJECT (window1, image2816, "image2816"); GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4"); GLADE_HOOKUP_OBJECT (window1, menu_toggle_all_additional_widgets1, "menu_toggle_all_additional_widgets1"); GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1"); @@ -1618,26 +1627,26 @@ GLADE_HOOKUP_OBJECT (window1, menu_project1, "menu_project1"); GLADE_HOOKUP_OBJECT (window1, menu_project1_menu, "menu_project1_menu"); GLADE_HOOKUP_OBJECT (window1, project_new1, "project_new1"); - GLADE_HOOKUP_OBJECT (window1, image2770, "image2770"); + GLADE_HOOKUP_OBJECT (window1, image2817, "image2817"); GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1"); - GLADE_HOOKUP_OBJECT (window1, image2771, "image2771"); + GLADE_HOOKUP_OBJECT (window1, image2818, "image2818"); GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1"); - GLADE_HOOKUP_OBJECT (window1, image2772, "image2772"); + GLADE_HOOKUP_OBJECT (window1, image2819, "image2819"); GLADE_HOOKUP_OBJECT (window1, separator34, "separator34"); GLADE_HOOKUP_OBJECT (window1, project_properties1, "project_properties1"); GLADE_HOOKUP_OBJECT (window1, menu_build1, "menu_build1"); GLADE_HOOKUP_OBJECT (window1, tools1, "tools1"); GLADE_HOOKUP_OBJECT (window1, tools1_menu, "tools1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1"); - GLADE_HOOKUP_OBJECT (window1, image2773, "image2773"); + GLADE_HOOKUP_OBJECT (window1, image2820, "image2820"); GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1"); GLADE_HOOKUP_OBJECT (window1, load_tags1, "load_tags1"); GLADE_HOOKUP_OBJECT (window1, menu_reload_configuration1, "menu_reload_configuration1"); - GLADE_HOOKUP_OBJECT (window1, image2774, "image2774"); + GLADE_HOOKUP_OBJECT (window1, image2821, "image2821"); GLADE_HOOKUP_OBJECT (window1, menu_help1, "menu_help1"); GLADE_HOOKUP_OBJECT (window1, menu_help1_menu, "menu_help1_menu"); GLADE_HOOKUP_OBJECT (window1, help1, "help1"); - GLADE_HOOKUP_OBJECT (window1, image2775, "image2775"); + GLADE_HOOKUP_OBJECT (window1, image2822, "image2822"); GLADE_HOOKUP_OBJECT (window1, website1, "website1"); GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1"); GLADE_HOOKUP_OBJECT (window1, debug_messages1, "debug_messages1"); @@ -1801,16 +1810,17 @@ GtkWidget *menu_duplicate_line2; GtkWidget *separator31; GtkWidget *menu_increase_indent2; - GtkWidget *image2748; + GtkWidget *image2823; GtkWidget *menu_decrease_indent2; - GtkWidget *image2749; + GtkWidget *image2824; GtkWidget *separator38; + GtkWidget *send_selection_to_vte2; GtkWidget *send_selection_to1; GtkWidget *send_selection_to1_menu; GtkWidget *invisible12; GtkWidget *separator17; GtkWidget *comments; - GtkWidget *image2750; + GtkWidget *image2825; GtkWidget *comments_menu; GtkWidget *add_changelog_entry2; GtkWidget *insert_file_header2; @@ -1819,24 +1829,24 @@ GtkWidget *insert_gpl_notice1; GtkWidget *insert_bsd_license_notice1; GtkWidget *insert_date2; - GtkWidget *image2751; + GtkWidget *image2826; GtkWidget *insert_date2_menu; GtkWidget *invisible10; GtkWidget *insert_include1; - GtkWidget *image2752; + GtkWidget *image2827; GtkWidget *insert_include1_menu; GtkWidget *invisible3; GtkWidget *separator7; GtkWidget *find_usage1; - GtkWidget *image2753; + GtkWidget *image2828; GtkWidget *find_document_usage1; - GtkWidget *image2754; + GtkWidget *image2829; GtkWidget *goto_tag_definition1; GtkWidget *goto_tag_declaration1; GtkWidget *context_action1; GtkWidget *separator15; GtkWidget *go_to_line; - GtkWidget *image2755; + GtkWidget *image2830; GtkAccelGroup *accel_group;
accel_group = gtk_accel_group_new (); @@ -1936,23 +1946,27 @@ gtk_widget_show (menu_increase_indent2); gtk_container_add (GTK_CONTAINER (menu_format2_menu), menu_increase_indent2);
- image2748 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2748); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent2), image2748); + image2823 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2823); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent2), image2823);
menu_decrease_indent2 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent")); gtk_widget_show (menu_decrease_indent2); gtk_container_add (GTK_CONTAINER (menu_format2_menu), menu_decrease_indent2);
- image2749 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2749); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent2), image2749); + image2824 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2824); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent2), image2824);
separator38 = gtk_separator_menu_item_new (); gtk_widget_show (separator38); gtk_container_add (GTK_CONTAINER (menu_format2_menu), separator38); gtk_widget_set_sensitive (separator38, FALSE);
+ send_selection_to_vte2 = gtk_menu_item_new_with_mnemonic (_("_Send Selection to Terminal")); + gtk_widget_show (send_selection_to_vte2); + gtk_container_add (GTK_CONTAINER (menu_format2_menu), send_selection_to_vte2); + send_selection_to1 = gtk_menu_item_new_with_mnemonic (_("_Send Selection to")); gtk_widget_show (send_selection_to1); gtk_container_add (GTK_CONTAINER (menu_format2_menu), send_selection_to1); @@ -1972,9 +1986,9 @@ gtk_widget_show (comments); gtk_container_add (GTK_CONTAINER (edit_menu1), comments);
- image2750 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2750); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (comments), image2750); + image2825 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2825); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (comments), image2825);
comments_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (comments), comments_menu); @@ -2007,9 +2021,9 @@ gtk_widget_show (insert_date2); gtk_container_add (GTK_CONTAINER (edit_menu1), insert_date2);
- image2751 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2751); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date2), image2751); + image2826 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2826); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date2), image2826);
insert_date2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date2), insert_date2_menu); @@ -2021,9 +2035,9 @@ gtk_widget_show (insert_include1); gtk_container_add (GTK_CONTAINER (edit_menu1), insert_include1);
- image2752 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2752); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include1), image2752); + image2827 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2827); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include1), image2827);
insert_include1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include1), insert_include1_menu); @@ -2040,17 +2054,17 @@ gtk_widget_show (find_usage1); gtk_container_add (GTK_CONTAINER (edit_menu1), find_usage1);
- image2753 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2753); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_usage1), image2753); + image2828 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2828); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_usage1), image2828);
find_document_usage1 = gtk_image_menu_item_new_with_mnemonic (_("Find _Document Usage")); gtk_widget_show (find_document_usage1); gtk_container_add (GTK_CONTAINER (edit_menu1), find_document_usage1);
- image2754 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2754); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_document_usage1), image2754); + image2829 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2829); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_document_usage1), image2829);
goto_tag_definition1 = gtk_menu_item_new_with_mnemonic (_("Go to _Tag Definition")); gtk_widget_show (goto_tag_definition1); @@ -2073,9 +2087,9 @@ gtk_widget_show (go_to_line); gtk_container_add (GTK_CONTAINER (edit_menu1), go_to_line);
- image2755 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2755); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line), image2755); + image2830 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2830); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line), image2830);
g_signal_connect ((gpointer) undo1, "activate", G_CALLBACK (on_undo1_activate), @@ -2122,6 +2136,9 @@ g_signal_connect ((gpointer) menu_decrease_indent2, "activate", G_CALLBACK (on_menu_decrease_indent1_activate), NULL); + g_signal_connect ((gpointer) send_selection_to_vte2, "activate", + G_CALLBACK (on_send_selection_to_vte1_activate), + NULL); g_signal_connect ((gpointer) add_changelog_entry2, "activate", G_CALLBACK (on_comments_changelog_activate), NULL); @@ -2183,16 +2200,17 @@ GLADE_HOOKUP_OBJECT (edit_menu1, menu_duplicate_line2, "menu_duplicate_line2"); GLADE_HOOKUP_OBJECT (edit_menu1, separator31, "separator31"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_increase_indent2, "menu_increase_indent2"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2748, "image2748"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2823, "image2823"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_decrease_indent2, "menu_decrease_indent2"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2749, "image2749"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2824, "image2824"); GLADE_HOOKUP_OBJECT (edit_menu1, separator38, "separator38"); + GLADE_HOOKUP_OBJECT (edit_menu1, send_selection_to_vte2, "send_selection_to_vte2"); GLADE_HOOKUP_OBJECT (edit_menu1, send_selection_to1, "send_selection_to1"); GLADE_HOOKUP_OBJECT (edit_menu1, send_selection_to1_menu, "send_selection_to1_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, invisible12, "invisible12"); GLADE_HOOKUP_OBJECT (edit_menu1, separator17, "separator17"); GLADE_HOOKUP_OBJECT (edit_menu1, comments, "comments"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2750, "image2750"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2825, "image2825"); GLADE_HOOKUP_OBJECT (edit_menu1, comments_menu, "comments_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, add_changelog_entry2, "add_changelog_entry2"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_file_header2, "insert_file_header2"); @@ -2201,24 +2219,24 @@ GLADE_HOOKUP_OBJECT (edit_menu1, insert_gpl_notice1, "insert_gpl_notice1"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_bsd_license_notice1, "insert_bsd_license_notice1"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_date2, "insert_date2"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2751, "image2751"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2826, "image2826"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_date2_menu, "insert_date2_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, invisible10, "invisible10"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_include1, "insert_include1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2752, "image2752"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2827, "image2827"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_include1_menu, "insert_include1_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, invisible3, "invisible3"); GLADE_HOOKUP_OBJECT (edit_menu1, separator7, "separator7"); GLADE_HOOKUP_OBJECT (edit_menu1, find_usage1, "find_usage1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2753, "image2753"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2828, "image2828"); GLADE_HOOKUP_OBJECT (edit_menu1, find_document_usage1, "find_document_usage1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2754, "image2754"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2829, "image2829"); GLADE_HOOKUP_OBJECT (edit_menu1, goto_tag_definition1, "goto_tag_definition1"); GLADE_HOOKUP_OBJECT (edit_menu1, goto_tag_declaration1, "goto_tag_declaration1"); GLADE_HOOKUP_OBJECT (edit_menu1, context_action1, "context_action1"); GLADE_HOOKUP_OBJECT (edit_menu1, separator15, "separator15"); GLADE_HOOKUP_OBJECT (edit_menu1, go_to_line, "go_to_line"); - GLADE_HOOKUP_OBJECT (edit_menu1, image2755, "image2755"); + GLADE_HOOKUP_OBJECT (edit_menu1, image2830, "image2830");
gtk_menu_set_accel_group (GTK_MENU (edit_menu1), accel_group);
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/keybindings.c 2009-02-25 23:28:01 UTC (rev 3601) @@ -312,6 +312,8 @@ GDK_2, GDK_CONTROL_MASK, "edit_sendtocmd2", _("Send to Custom Command 2"), NULL); keybindings_set_item(group, GEANY_KEYS_FORMAT_SENDTOCMD3, cb_func_format_action, GDK_3, GDK_CONTROL_MASK, "edit_sendtocmd3", _("Send to Custom Command 3"), NULL); + keybindings_set_item(group, GEANY_KEYS_FORMAT_SENDTOVTE, cb_func_format_action, + 0, 0, "edit_sendtovte", _("Send Selection to Terminal"), LW(send_selection_to_vte1));
group = ADD_KB_GROUP(INSERT, _("Insert"));
@@ -676,6 +678,7 @@ GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_FORMAT_COMMENTLINETOGGLE, menu_toggle_line_commentation2); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_FORMAT_INCREASEINDENT, menu_increase_indent2); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_FORMAT_DECREASEINDENT, menu_decrease_indent2); + GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_FORMAT_SENDTOVTE, send_selection_to_vte2);
/* the build menu items are set if the build menus are created */
@@ -1910,6 +1913,9 @@ if (ui_prefs.custom_commands && g_strv_length(ui_prefs.custom_commands) > 2) tools_execute_custom_command(doc, ui_prefs.custom_commands[2]); break; + case GEANY_KEYS_FORMAT_SENDTOVTE: + on_send_selection_to_vte1_activate(NULL, NULL); + break; } }
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/keybindings.h 2009-02-25 23:28:01 UTC (rev 3601) @@ -180,6 +180,7 @@ GEANY_KEYS_FORMAT_SENDTOCMD1, GEANY_KEYS_FORMAT_SENDTOCMD2, GEANY_KEYS_FORMAT_SENDTOCMD3, + GEANY_KEYS_FORMAT_SENDTOVTE, GEANY_KEYS_FORMAT_COUNT };
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/main.c 2009-02-25 23:28:01 UTC (rev 3601) @@ -236,6 +236,17 @@
/* whether to show notebook tabs or not */ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(main_widgets.notebook), interface_prefs.show_notebook_tabs); + +#ifdef HAVE_VTE + if (! vte_info.load_vte) + { + gtk_widget_hide(ui_lookup_widget(main_widgets.window, "send_selection_to_vte1")); + gtk_widget_hide(ui_lookup_widget(main_widgets.editor_menu, "send_selection_to_vte2")); + } +#else + gtk_widget_hide(ui_lookup_widget(main_widgets.window, "send_selection_to_vte1")); + gtk_widget_hide(ui_lookup_widget(main_widgets.editor_menu, "send_selection_to_vte2")); +#endif }
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/plugindata.h 2009-02-25 23:28:01 UTC (rev 3601) @@ -45,7 +45,7 @@ enum { /** The Application Programming Interface (API) version, incremented * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 132, + GEANY_API_VERSION = 133,
/** The Application Binary Interface (ABI) version, incremented whenever * existing fields in the plugin data types have to be changed or reordered. */
Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/vte.c 2009-02-25 23:28:01 UTC (rev 3601) @@ -49,6 +49,8 @@ #include "msgwindow.h" #include "callbacks.h" #include "geanywraplabel.h" +#include "editor.h" +#include "sciwrappers.h"
VteInfo vte_info; @@ -897,4 +899,41 @@ }
+void vte_send_selection_to_vte(void) +{ + GeanyDocument *doc; + gchar *text; + gsize len; + + doc = document_get_current(); + if (doc == NULL) + return; + + if (sci_has_selection(doc->editor->sci)) + { + text = g_malloc0(sci_get_selected_text_length(doc->editor->sci) + 1); + sci_get_selected_text(doc->editor->sci, text); + } + else + { /* Get the current line */ + gint line_num = sci_get_current_line(doc->editor->sci); + text = sci_get_line(doc->editor->sci, line_num); + } + + len = strlen(text); + + /* Make sure there is no newline character at the end to prevent unwanted execution */ + if (text[len-1] == '\n' || text[len-1] == '\r') + text[len-1] = '\0'; + + vf->vte_terminal_feed_child(VTE_TERMINAL(vc->vte), text, len); + + /* show the VTE */ + gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_VTE); + gtk_widget_grab_focus(vc->vte); + msgwin_show_hide(TRUE); + + g_free(text); +} + #endif
Modified: trunk/src/vte.h =================================================================== --- trunk/src/vte.h 2009-02-25 23:25:06 UTC (rev 3600) +++ trunk/src/vte.h 2009-02-25 23:28:01 UTC (rev 3601) @@ -76,6 +76,7 @@
void vte_append_preferences_tab(void);
+void vte_send_selection_to_vte(void);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.