Move geany_debug() into log.c.
Use GLib log/print handlers to log messages/warnings into a string for later usage. Add a debug messages window, accessible through the help menu to easily view debug messages/warnings. This might replace the extra console window on Windows. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2876 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
6c6934d839
commit
459ba625ed
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2008-08-11 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
|
||||
* geany.glade, wscript, src/Makefile.am, src/makefile.win32,
|
||||
src/callbacks.c, src/callbacks.h, src/interface.c, src/log.c,
|
||||
src/log.h, src/main.c:
|
||||
Move geany_debug() into log.c.
|
||||
Use GLib log/print handlers to log messages/warnings into a
|
||||
string for later usage.
|
||||
Add a debug messages window, accessable through the help menu to
|
||||
easily view debug messages/warnings.
|
||||
This might replace the extra console window on Windows.
|
||||
|
||||
|
||||
2008-08-11 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
* src/editor.c:
|
||||
|
51
geany.glade
51
geany.glade
@ -58,7 +58,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2576">
|
||||
<widget class="GtkImage" id="image2595">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-new</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -148,7 +148,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="image2577">
|
||||
<widget class="GtkImage" id="image2596">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -169,7 +169,7 @@
|
||||
<signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Mon, 24 Jul 2006 19:26:04 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2578">
|
||||
<widget class="GtkImage" id="image2597">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-revert-to-saved</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -189,7 +189,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2579">
|
||||
<widget class="GtkImage" id="image2598">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-revert-to-saved</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -277,7 +277,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="image2580">
|
||||
<widget class="GtkImage" id="image2599">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-close</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -299,7 +299,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="image2581">
|
||||
<widget class="GtkImage" id="image2600">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-close</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -498,7 +498,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="image2582">
|
||||
<widget class="GtkImage" id="image2601">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-indent</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -519,7 +519,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="image2583">
|
||||
<widget class="GtkImage" id="image2602">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-unindent</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -575,7 +575,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2584">
|
||||
<widget class="GtkImage" id="image2603">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -660,7 +660,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2585">
|
||||
<widget class="GtkImage" id="image2604">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -692,7 +692,7 @@
|
||||
<property name="use_underline">True</property>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2586">
|
||||
<widget class="GtkImage" id="image2605">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -790,7 +790,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="image2587">
|
||||
<widget class="GtkImage" id="image2606">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-find-and-replace</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -865,7 +865,7 @@
|
||||
<signal name="activate" handler="on_go_to_line1_activate" last_modification_time="Tue, 23 May 2006 17:10:49 GMT"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image2588">
|
||||
<widget class="GtkImage" id="image2607">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-jump-to</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -900,7 +900,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="image2589">
|
||||
<widget class="GtkImage" id="image2608">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-select-font</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1104,7 +1104,7 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">T_abs and Spaces</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="active">True</property>
|
||||
<property name="group">tabs1</property>
|
||||
<signal name="activate" handler="on_tabs_and_spaces1_activate" last_modification_time="Thu, 31 Jul 2008 14:23:06 GMT"/>
|
||||
</widget>
|
||||
@ -1340,7 +1340,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="image2590">
|
||||
<widget class="GtkImage" id="image2609">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-new</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1361,7 +1361,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="image2591">
|
||||
<widget class="GtkImage" id="image2610">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-open</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1382,7 +1382,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="image2592">
|
||||
<widget class="GtkImage" id="image2611">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-close</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1441,7 +1441,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="image2593">
|
||||
<widget class="GtkImage" id="image2612">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-select-color</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1483,7 +1483,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="image2594">
|
||||
<widget class="GtkImage" id="image2613">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1517,7 +1517,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="image2595">
|
||||
<widget class="GtkImage" id="image2614">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-help</property>
|
||||
<property name="icon_size">1</property>
|
||||
@ -1549,6 +1549,15 @@
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="debug_messages1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Debug Messages</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_debug_messages1_activate" last_modification_time="Mon, 11 Aug 2008 16:04:45 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separator16">
|
||||
<property name="visible">True</property>
|
||||
|
@ -22,6 +22,7 @@ SRCS = \
|
||||
interface.c interface.h \
|
||||
keybindings.c keybindings.h \
|
||||
keyfile.c keyfile.h \
|
||||
log.c log.h \
|
||||
main.c main.h geany.h \
|
||||
msgwindow.c msgwindow.h \
|
||||
navqueue.c navqueue.h \
|
||||
|
@ -64,6 +64,7 @@
|
||||
#include "navqueue.h"
|
||||
#include "printing.h"
|
||||
#include "plugins.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "geanyobject.h"
|
||||
|
||||
@ -2212,3 +2213,11 @@ on_radio_indent_both_toggled (GtkToggleButton *togglebutton,
|
||||
gtk_widget_set_sensitive(check, !active);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
on_debug_messages1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
log_show_debug_messages_dialog();
|
||||
}
|
||||
|
||||
|
@ -634,3 +634,7 @@ on_tabs_and_spaces1_activate (GtkMenuItem *menuitem,
|
||||
void
|
||||
on_radio_indent_both_toggled (GtkToggleButton *togglebutton,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_debug_messages1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
210
src/interface.c
210
src/interface.c
@ -37,7 +37,7 @@ create_window1 (void)
|
||||
GtkWidget *file1_menu;
|
||||
GtkWidget *menu_new1;
|
||||
GtkWidget *menu_new_with_template1;
|
||||
GtkWidget *image2576;
|
||||
GtkWidget *image2595;
|
||||
GtkWidget *menu_new_with_template1_menu;
|
||||
GtkWidget *invisible2;
|
||||
GtkWidget *separator12;
|
||||
@ -48,11 +48,11 @@ create_window1 (void)
|
||||
GtkWidget *menu_save1;
|
||||
GtkWidget *menu_save_as1;
|
||||
GtkWidget *menu_save_all1;
|
||||
GtkWidget *image2577;
|
||||
GtkWidget *image2596;
|
||||
GtkWidget *menu_reload1;
|
||||
GtkWidget *image2578;
|
||||
GtkWidget *image2597;
|
||||
GtkWidget *menu_reload_as1;
|
||||
GtkWidget *image2579;
|
||||
GtkWidget *image2598;
|
||||
GtkWidget *menu_reload_as1_menu;
|
||||
GtkWidget *invisible7;
|
||||
GtkWidget *separator21;
|
||||
@ -63,9 +63,9 @@ create_window1 (void)
|
||||
GtkWidget *separator14;
|
||||
GtkWidget *menu_close1;
|
||||
GtkWidget *close_other_documents1;
|
||||
GtkWidget *image2580;
|
||||
GtkWidget *image2599;
|
||||
GtkWidget *menu_close_all1;
|
||||
GtkWidget *image2581;
|
||||
GtkWidget *image2600;
|
||||
GtkWidget *menu_separatormenuitem1;
|
||||
GtkWidget *menu_quit1;
|
||||
GtkWidget *edit1;
|
||||
@ -90,16 +90,16 @@ create_window1 (void)
|
||||
GtkWidget *menu_duplicate_line1;
|
||||
GtkWidget *separator29;
|
||||
GtkWidget *menu_increase_indent1;
|
||||
GtkWidget *image2582;
|
||||
GtkWidget *image2601;
|
||||
GtkWidget *menu_decrease_indent1;
|
||||
GtkWidget *image2583;
|
||||
GtkWidget *image2602;
|
||||
GtkWidget *separator37;
|
||||
GtkWidget *send_selection_to2;
|
||||
GtkWidget *send_selection_to2_menu;
|
||||
GtkWidget *invisible13;
|
||||
GtkWidget *separator18;
|
||||
GtkWidget *add_comments1;
|
||||
GtkWidget *image2584;
|
||||
GtkWidget *image2603;
|
||||
GtkWidget *add_comments1_menu;
|
||||
GtkWidget *menu_add_changelog_entry1;
|
||||
GtkWidget *insert_file_header1;
|
||||
@ -108,11 +108,11 @@ create_window1 (void)
|
||||
GtkWidget *insert_gpl_notice2;
|
||||
GtkWidget *insert_bsd_license_notice2;
|
||||
GtkWidget *insert_date1;
|
||||
GtkWidget *image2585;
|
||||
GtkWidget *image2604;
|
||||
GtkWidget *insert_date1_menu;
|
||||
GtkWidget *invisible8;
|
||||
GtkWidget *insert_include2;
|
||||
GtkWidget *image2586;
|
||||
GtkWidget *image2605;
|
||||
GtkWidget *insert_include2_menu;
|
||||
GtkWidget *invisible4;
|
||||
GtkWidget *separator9;
|
||||
@ -124,7 +124,7 @@ create_window1 (void)
|
||||
GtkWidget *find_previous1;
|
||||
GtkWidget *find_in_files1;
|
||||
GtkWidget *replace1;
|
||||
GtkWidget *image2587;
|
||||
GtkWidget *image2606;
|
||||
GtkWidget *separator33;
|
||||
GtkWidget *find_nextsel1;
|
||||
GtkWidget *find_prevsel1;
|
||||
@ -133,11 +133,11 @@ create_window1 (void)
|
||||
GtkWidget *previous_message1;
|
||||
GtkWidget *separator32;
|
||||
GtkWidget *go_to_line1;
|
||||
GtkWidget *image2588;
|
||||
GtkWidget *image2607;
|
||||
GtkWidget *menu_view1;
|
||||
GtkWidget *menu_view1_menu;
|
||||
GtkWidget *menu_change_font1;
|
||||
GtkWidget *image2589;
|
||||
GtkWidget *image2608;
|
||||
GtkWidget *menu_separator4;
|
||||
GtkWidget *menu_toggle_all_additional_widgets1;
|
||||
GtkWidget *menu_fullscreen1;
|
||||
@ -190,28 +190,29 @@ create_window1 (void)
|
||||
GtkWidget *menu_project1;
|
||||
GtkWidget *menu_project1_menu;
|
||||
GtkWidget *project_new1;
|
||||
GtkWidget *image2590;
|
||||
GtkWidget *image2609;
|
||||
GtkWidget *project_open1;
|
||||
GtkWidget *image2591;
|
||||
GtkWidget *image2610;
|
||||
GtkWidget *project_close1;
|
||||
GtkWidget *image2592;
|
||||
GtkWidget *image2611;
|
||||
GtkWidget *separator34;
|
||||
GtkWidget *project_properties1;
|
||||
GtkWidget *menu_build1;
|
||||
GtkWidget *tools1;
|
||||
GtkWidget *tools1_menu;
|
||||
GtkWidget *menu_choose_color1;
|
||||
GtkWidget *image2593;
|
||||
GtkWidget *image2612;
|
||||
GtkWidget *menu_count_words1;
|
||||
GtkWidget *load_tags1;
|
||||
GtkWidget *menu_reload_configuration1;
|
||||
GtkWidget *image2594;
|
||||
GtkWidget *image2613;
|
||||
GtkWidget *menu_help1;
|
||||
GtkWidget *menu_help1_menu;
|
||||
GtkWidget *help1;
|
||||
GtkWidget *image2595;
|
||||
GtkWidget *image2614;
|
||||
GtkWidget *keyboard_shortcuts1;
|
||||
GtkWidget *website1;
|
||||
GtkWidget *debug_messages1;
|
||||
GtkWidget *separator16;
|
||||
GtkWidget *menu_info1;
|
||||
GtkWidget *toolbar1;
|
||||
@ -312,9 +313,9 @@ create_window1 (void)
|
||||
gtk_widget_show (menu_new_with_template1);
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1);
|
||||
|
||||
image2576 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2576);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2576);
|
||||
image2595 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2595);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2595);
|
||||
|
||||
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);
|
||||
@ -357,25 +358,25 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL);
|
||||
|
||||
image2577 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2577);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2577);
|
||||
image2596 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2596);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2596);
|
||||
|
||||
menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload"));
|
||||
gtk_widget_show (menu_reload1);
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1);
|
||||
|
||||
image2578 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2578);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2578);
|
||||
image2597 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2597);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2597);
|
||||
|
||||
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);
|
||||
|
||||
image2579 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2579);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2579);
|
||||
image2598 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2598);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2598);
|
||||
|
||||
menu_reload_as1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu);
|
||||
@ -419,18 +420,18 @@ create_window1 (void)
|
||||
gtk_widget_show (close_other_documents1);
|
||||
gtk_container_add (GTK_CONTAINER (file1_menu), close_other_documents1);
|
||||
|
||||
image2580 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2580);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image2580);
|
||||
image2599 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2599);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image2599);
|
||||
|
||||
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);
|
||||
gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL);
|
||||
|
||||
image2581 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2581);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2581);
|
||||
image2600 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2600);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2600);
|
||||
|
||||
menu_separatormenuitem1 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (menu_separatormenuitem1);
|
||||
@ -534,17 +535,17 @@ create_window1 (void)
|
||||
gtk_widget_show (menu_increase_indent1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
|
||||
|
||||
image2582 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2582);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2582);
|
||||
image2601 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2601);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2601);
|
||||
|
||||
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);
|
||||
|
||||
image2583 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2583);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2583);
|
||||
image2602 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2602);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2602);
|
||||
|
||||
separator37 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator37);
|
||||
@ -570,9 +571,9 @@ create_window1 (void)
|
||||
gtk_widget_show (add_comments1);
|
||||
gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
|
||||
|
||||
image2584 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2584);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2584);
|
||||
image2603 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2603);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2603);
|
||||
|
||||
add_comments1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu);
|
||||
@ -611,9 +612,9 @@ create_window1 (void)
|
||||
gtk_widget_show (insert_date1);
|
||||
gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1);
|
||||
|
||||
image2585 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2585);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2585);
|
||||
image2604 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2604);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2604);
|
||||
|
||||
insert_date1_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu);
|
||||
@ -625,9 +626,9 @@ create_window1 (void)
|
||||
gtk_widget_show (insert_include2);
|
||||
gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
|
||||
|
||||
image2586 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2586);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2586);
|
||||
image2605 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2605);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2605);
|
||||
|
||||
insert_include2_menu = gtk_menu_new ();
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu);
|
||||
@ -671,9 +672,9 @@ create_window1 (void)
|
||||
gtk_widget_show (replace1);
|
||||
gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
|
||||
|
||||
image2587 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2587);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2587);
|
||||
image2606 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2606);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2606);
|
||||
|
||||
separator33 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator33);
|
||||
@ -710,9 +711,9 @@ create_window1 (void)
|
||||
gtk_widget_show (go_to_line1);
|
||||
gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
|
||||
|
||||
image2588 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2588);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2588);
|
||||
image2607 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2607);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2607);
|
||||
|
||||
menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View"));
|
||||
gtk_widget_show (menu_view1);
|
||||
@ -726,9 +727,9 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (menu_view1_menu), menu_change_font1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_change_font1, _("Change the default font"), NULL);
|
||||
|
||||
image2589 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2589);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2589);
|
||||
image2608 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2608);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2608);
|
||||
|
||||
menu_separator4 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (menu_separator4);
|
||||
@ -834,6 +835,7 @@ create_window1 (void)
|
||||
tabs1_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (tabs_and_spaces1));
|
||||
gtk_widget_show (tabs_and_spaces1);
|
||||
gtk_container_add (GTK_CONTAINER (indent_type1_menu), tabs_and_spaces1);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (tabs_and_spaces1), TRUE);
|
||||
|
||||
separator45 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator45);
|
||||
@ -958,25 +960,25 @@ create_window1 (void)
|
||||
gtk_widget_show (project_new1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1);
|
||||
|
||||
image2590 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2590);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2590);
|
||||
image2609 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2609);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2609);
|
||||
|
||||
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);
|
||||
|
||||
image2591 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2591);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2591);
|
||||
image2610 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2610);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2610);
|
||||
|
||||
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);
|
||||
|
||||
image2592 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2592);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2592);
|
||||
image2611 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2611);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2611);
|
||||
|
||||
separator34 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator34);
|
||||
@ -1003,9 +1005,9 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_choose_color1, _("Open a color chooser dialog, to interactively pick colors from a palette."), NULL);
|
||||
|
||||
image2593 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2593);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2593);
|
||||
image2612 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2612);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2612);
|
||||
|
||||
menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count"));
|
||||
gtk_widget_show (menu_count_words1);
|
||||
@ -1022,9 +1024,9 @@ create_window1 (void)
|
||||
gtk_container_add (GTK_CONTAINER (tools1_menu), menu_reload_configuration1);
|
||||
gtk_tooltips_set_tip (tooltips, menu_reload_configuration1, _("Reload configuration data like snippets, templates and filetype extensions."), NULL);
|
||||
|
||||
image2594 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2594);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image2594);
|
||||
image2613 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2613);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image2613);
|
||||
|
||||
menu_help1 = gtk_menu_item_new_with_mnemonic (_("_Help"));
|
||||
gtk_widget_show (menu_help1);
|
||||
@ -1037,9 +1039,9 @@ create_window1 (void)
|
||||
gtk_widget_show (help1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1);
|
||||
|
||||
image2595 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2595);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2595);
|
||||
image2614 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU);
|
||||
gtk_widget_show (image2614);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2614);
|
||||
|
||||
keyboard_shortcuts1 = gtk_menu_item_new_with_mnemonic (_("_Keyboard Shortcuts"));
|
||||
gtk_widget_show (keyboard_shortcuts1);
|
||||
@ -1050,6 +1052,10 @@ create_window1 (void)
|
||||
gtk_widget_show (website1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), website1);
|
||||
|
||||
debug_messages1 = gtk_menu_item_new_with_mnemonic (_("_Debug Messages"));
|
||||
gtk_widget_show (debug_messages1);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), debug_messages1);
|
||||
|
||||
separator16 = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (separator16);
|
||||
gtk_container_add (GTK_CONTAINER (menu_help1_menu), separator16);
|
||||
@ -1640,6 +1646,9 @@ create_window1 (void)
|
||||
g_signal_connect ((gpointer) website1, "activate",
|
||||
G_CALLBACK (on_website1_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) debug_messages1, "activate",
|
||||
G_CALLBACK (on_debug_messages1_activate),
|
||||
NULL);
|
||||
g_signal_connect ((gpointer) menu_info1, "activate",
|
||||
G_CALLBACK (on_info1_activate),
|
||||
NULL);
|
||||
@ -1743,7 +1752,7 @@ create_window1 (void)
|
||||
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, image2576, "image2576");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2595, "image2595");
|
||||
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");
|
||||
@ -1754,11 +1763,11 @@ create_window1 (void)
|
||||
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, image2577, "image2577");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2596, "image2596");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2578, "image2578");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2597, "image2597");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2579, "image2579");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2598, "image2598");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator21, "separator21");
|
||||
@ -1769,9 +1778,9 @@ create_window1 (void)
|
||||
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, image2580, "image2580");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2599, "image2599");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2581, "image2581");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2600, "image2600");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1");
|
||||
GLADE_HOOKUP_OBJECT (window1, edit1, "edit1");
|
||||
@ -1796,16 +1805,16 @@ create_window1 (void)
|
||||
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, image2582, "image2582");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2601, "image2601");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2583, "image2583");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2602, "image2602");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator37, "separator37");
|
||||
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, image2584, "image2584");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2603, "image2603");
|
||||
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");
|
||||
@ -1814,11 +1823,11 @@ create_window1 (void)
|
||||
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, image2585, "image2585");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2604, "image2604");
|
||||
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, image2586, "image2586");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2605, "image2605");
|
||||
GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu");
|
||||
GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator9, "separator9");
|
||||
@ -1830,7 +1839,7 @@ create_window1 (void)
|
||||
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, image2587, "image2587");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2606, "image2606");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator33, "separator33");
|
||||
GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1");
|
||||
GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1");
|
||||
@ -1839,11 +1848,11 @@ create_window1 (void)
|
||||
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, image2588, "image2588");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2607, "image2607");
|
||||
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, image2589, "image2589");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2608, "image2608");
|
||||
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");
|
||||
@ -1894,28 +1903,29 @@ create_window1 (void)
|
||||
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, image2590, "image2590");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2609, "image2609");
|
||||
GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2591, "image2591");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2610, "image2610");
|
||||
GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2592, "image2592");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2611, "image2611");
|
||||
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, image2593, "image2593");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2612, "image2612");
|
||||
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, image2594, "image2594");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2613, "image2613");
|
||||
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, image2595, "image2595");
|
||||
GLADE_HOOKUP_OBJECT (window1, image2614, "image2614");
|
||||
GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1");
|
||||
GLADE_HOOKUP_OBJECT (window1, website1, "website1");
|
||||
GLADE_HOOKUP_OBJECT (window1, debug_messages1, "debug_messages1");
|
||||
GLADE_HOOKUP_OBJECT (window1, separator16, "separator16");
|
||||
GLADE_HOOKUP_OBJECT (window1, menu_info1, "menu_info1");
|
||||
GLADE_HOOKUP_OBJECT (window1, toolbar1, "toolbar1");
|
||||
|
176
src/log.c
Normal file
176
src/log.c
Normal file
@ -0,0 +1,176 @@
|
||||
/*
|
||||
* log.c - this file is part of Geany, a fast and lightweight IDE
|
||||
*
|
||||
* Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
* Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Logging functions and the debug messages window.
|
||||
*/
|
||||
|
||||
#include "geany.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#include "log.h"
|
||||
#include "support.h"
|
||||
#include "utils.h"
|
||||
#include "ui_utils.h"
|
||||
|
||||
|
||||
static GString *log_buffer = NULL;
|
||||
|
||||
enum
|
||||
{
|
||||
DIALOG_RESPONSE_CLEAR = 1
|
||||
};
|
||||
|
||||
|
||||
/* Geany's main debug/log function, declared in geany.h */
|
||||
void geany_debug(gchar const *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
|
||||
static void handler_print(const gchar *msg)
|
||||
{
|
||||
printf("%s\n", msg);
|
||||
g_string_append_printf(log_buffer, "%s\n", msg);
|
||||
}
|
||||
|
||||
|
||||
static void handler_printerr(const gchar *msg)
|
||||
{
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
g_string_append_printf(log_buffer, "%s\n", msg);
|
||||
}
|
||||
|
||||
|
||||
static const gchar *get_log_prefix(GLogLevelFlags log_level)
|
||||
{
|
||||
switch (log_level & G_LOG_LEVEL_MASK)
|
||||
{
|
||||
case G_LOG_LEVEL_ERROR:
|
||||
return "ERROR\t\t";
|
||||
case G_LOG_LEVEL_CRITICAL:
|
||||
return "CRITICAL\t";
|
||||
case G_LOG_LEVEL_WARNING:
|
||||
return "WARNING\t";
|
||||
case G_LOG_LEVEL_MESSAGE:
|
||||
return "MESSAGE\t";
|
||||
case G_LOG_LEVEL_INFO:
|
||||
return "INFO\t\t";
|
||||
case G_LOG_LEVEL_DEBUG:
|
||||
return "DEBUG\t";
|
||||
}
|
||||
return "LOG";
|
||||
}
|
||||
|
||||
|
||||
static void handler_log(const gchar *domain, GLogLevelFlags level, const gchar *msg, gpointer data)
|
||||
{
|
||||
gchar *time_str;
|
||||
|
||||
#ifndef GEANY_DEBUG
|
||||
if (app != NULL && app->debug_mode)
|
||||
#endif
|
||||
{ /* print the message as usual on stdout/stderr */
|
||||
g_log_default_handler(domain, level, msg, data);
|
||||
}
|
||||
|
||||
time_str = utils_get_current_time_string();
|
||||
|
||||
g_string_append_printf(log_buffer, "%s: %s: %s\n", time_str, get_log_prefix(level), msg);
|
||||
|
||||
g_free(time_str);
|
||||
}
|
||||
|
||||
|
||||
void log_handlers_init(void)
|
||||
{
|
||||
log_buffer = g_string_sized_new(2048);
|
||||
|
||||
g_set_print_handler(handler_print);
|
||||
g_set_printerr_handler(handler_printerr);
|
||||
g_log_set_default_handler(handler_log, NULL);
|
||||
}
|
||||
|
||||
|
||||
static void on_dialog_response(GtkWidget *dialog, gint response, gpointer user_data)
|
||||
{
|
||||
if (response == DIALOG_RESPONSE_CLEAR)
|
||||
{
|
||||
GtkTextIter start_iter, end_iter;
|
||||
GtkTextBuffer *tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(user_data));
|
||||
|
||||
gtk_text_buffer_get_start_iter(tb, &start_iter);
|
||||
gtk_text_buffer_get_end_iter(tb, &end_iter);
|
||||
gtk_text_buffer_delete(tb, &start_iter, &end_iter);
|
||||
|
||||
g_string_erase(log_buffer, 0, -1);
|
||||
}
|
||||
else
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
|
||||
|
||||
void log_show_debug_messages_dialog(void)
|
||||
{
|
||||
GtkWidget *dialog, *textview, *vbox, *swin;
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons(_("Debug Messages"), GTK_WINDOW(main_widgets.window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_STOCK_CLEAR, DIALOG_RESPONSE_CLEAR,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
|
||||
vbox = ui_dialog_vbox_new(GTK_DIALOG(dialog));
|
||||
gtk_box_set_spacing(GTK_BOX(vbox), 6);
|
||||
gtk_widget_set_name(dialog, "GeanyDialog");
|
||||
|
||||
gtk_window_set_default_size(GTK_WINDOW(dialog), 450, 250);
|
||||
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL);
|
||||
|
||||
textview = gtk_text_view_new();
|
||||
gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), FALSE);
|
||||
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(textview), FALSE);
|
||||
gtk_text_buffer_set_text(gtk_text_view_get_buffer(
|
||||
GTK_TEXT_VIEW(textview)), log_buffer->str, log_buffer->len);
|
||||
|
||||
swin = gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(swin), textview);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(vbox), swin, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect(dialog, "response", G_CALLBACK(on_dialog_response), textview);
|
||||
gtk_widget_show_all(dialog);
|
||||
}
|
||||
|
||||
|
||||
void log_finalize(void)
|
||||
{
|
||||
g_string_free(log_buffer, TRUE);
|
||||
}
|
34
src/log.h
Normal file
34
src/log.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* log.h - this file is part of Geany, a fast and lightweight IDE
|
||||
*
|
||||
* Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||
* Copyright 2008 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GEANY_LOG_H
|
||||
#define GEANY_LOG_H
|
||||
|
||||
void log_handlers_init(void);
|
||||
|
||||
void log_finalize(void);
|
||||
|
||||
void log_show_debug_messages_dialog(void);
|
||||
|
||||
#endif
|
20
src/main.c
20
src/main.c
@ -47,7 +47,7 @@
|
||||
#include "interface.h"
|
||||
#include "support.h"
|
||||
#include "callbacks.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "ui_utils.h"
|
||||
#include "utils.h"
|
||||
#include "document.h"
|
||||
@ -149,21 +149,6 @@ static GOptionEntry entries[] =
|
||||
|
||||
|
||||
|
||||
/* Geany main debug function */
|
||||
void geany_debug(gchar const *format, ...)
|
||||
{
|
||||
#ifndef GEANY_DEBUG
|
||||
if (app != NULL && app->debug_mode)
|
||||
#endif
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* special things for the initial setup of the checkboxes and related stuff
|
||||
* an action on a setting is only performed if the setting is not equal to the program default
|
||||
* (all the following code is not perfect but it works for the moment) */
|
||||
@ -727,6 +712,8 @@ gint main(gint argc, gchar **argv)
|
||||
gint config_dir_result;
|
||||
gboolean load_project_from_cl = FALSE;
|
||||
|
||||
log_handlers_init();
|
||||
|
||||
app = g_new0(GeanyApp, 1);
|
||||
memset(&main_status, 0, sizeof(GeanyStatus));
|
||||
memset(&prefs, 0, sizeof(GeanyPrefs));
|
||||
@ -936,6 +923,7 @@ void main_quit()
|
||||
editor_finalize();
|
||||
editor_snippets_free();
|
||||
encodings_finalize();
|
||||
log_finalize();
|
||||
|
||||
tm_workspace_free(TM_WORK_OBJECT(app->tm_workspace));
|
||||
g_free(app->configdir);
|
||||
|
@ -62,7 +62,7 @@ endif
|
||||
|
||||
OBJS = about.o build.o callbacks.o dialogs.o document.o editor.o encodings.o filetypes.o \
|
||||
geanyobject.o geanywraplabel.o highlighting.o interface.o keybindings.o keyfile.o \
|
||||
main.o msgwindow.o navqueue.o notebook.o plugins.o prefs.o printing.o project.o \
|
||||
log.o main.o msgwindow.o navqueue.o notebook.o plugins.o prefs.o printing.o project.o \
|
||||
sciwrappers.o search.o socket.o support.o symbols.o templates.o treeviews.o tools.o \
|
||||
ui_utils.o utils.o win32.o
|
||||
|
||||
|
2
wscript
2
wscript
@ -86,7 +86,7 @@ geany_sources = [
|
||||
'src/about.c', 'src/build.c', 'src/callbacks.c', 'src/dialogs.c', 'src/document.c',
|
||||
'src/editor.c', 'src/encodings.c', 'src/filetypes.c', 'src/geanyobject.c',
|
||||
'src/geanywraplabel.c', 'src/highlighting.c', 'src/interface.c', 'src/keybindings.c',
|
||||
'src/keyfile.c', 'src/main.c', 'src/msgwindow.c', 'src/navqueue.c', 'src/notebook.c',
|
||||
'src/keyfile.c', 'src/log.c', 'src/main.c', 'src/msgwindow.c', 'src/navqueue.c', 'src/notebook.c',
|
||||
'src/plugins.c', 'src/prefix.c', 'src/prefs.c', 'src/printing.c', 'src/project.c',
|
||||
'src/sciwrappers.c', 'src/search.c', 'src/socket.c', 'src/support.c', 'src/symbols.c',
|
||||
'src/templates.c', 'src/tools.c', 'src/treeviews.c', 'src/ui_utils.c', 'src/utils.c' ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user