lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
May 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
2 participants
32 discussions
Start a n
N
ew thread
SF.net SVN: geany: [354] trunk
by eht16@users.sourceforge.net
22 May '06
22 May '06
Revision: 354 Author: eht16 Date: 2006-05-21 17:25:19 -0700 (Sun, 21 May 2006) ViewCVS:
http://svn.sourceforge.net/geany/?rev=354&view=rev
Log Message: ----------- - do not create VTE settings in the preferences dialog if VTE is disabled at runtime - added option to preferences dialog to disable load of VTE at startup Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/callbacks.c trunk/src/dialogs.c trunk/src/geany.h trunk/src/interface.c trunk/src/keyfile.c trunk/src/main.c trunk/src/prefs.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/ChangeLog 2006-05-22 00:25:19 UTC (rev 354) @@ -6,6 +6,14 @@ added option to disable styling within preprocessor directives * src/dialogs.c, src/about.c, src/callbacks.c, configure.in: rewrote about dialog to reduce code size, added subversion revision + * src/vte.c: declared some functions static + * src/dialogs.c: do not create VTE settings in the preferences dialog + if VTE is disabled at runtime + * geany.glade, src/interface.c, src/callbacks.c, src/keyfile.c, + src/main.c, src/prefs.c: + added option to disable load of VTE at startup + * src/highlighting.c, src/utils.c: applied sanity check patch from + Pierre(posted on mailing list) 2006-05-20 Nick Treleaven <nick.treleaven(a)btinternet.com> Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/geany.glade 2006-05-22 00:25:19 UTC (rev 354) @@ -2430,6 +2430,25 @@ </child> <child> + <widget class="GtkCheckButton" id="check_vte"> + <property name="tooltip" translatable="yes">Whether the virtual terminal emulation(VTE) should be loaded at startup. Disable it if you do not need it.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Load virtual terminal emulation at startup</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> <widget class="GtkCheckButton" id="check_ask_for_quit"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Shows a confirmation dialog on exit.</property> @@ -2547,8 +2566,8 @@ </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/callbacks.c 2006-05-22 00:25:19 UTC (rev 354) @@ -40,6 +40,7 @@ #include "sci_cb.h" #include "utils.h" #include "dialogs.h" +#include "about.h" #include "msgwindow.h" #include "build.h" #include "prefs.h" @@ -111,9 +112,6 @@ templates_free_templates(); tm_workspace_free(TM_WORK_OBJECT(app->tm_workspace)); g_free(app->configdir); -#ifdef HAVE_VTE - g_free(app->lib_vte); -#endif g_free(app->search_text); g_free(app->editor_font); g_free(app->tagbar_font); @@ -146,7 +144,10 @@ gtk_widget_destroy(app->default_tag_tree); } scintilla_release_resources(); +#ifdef HAVE_VTE if (app->have_vte) vte_close(); + g_free(app->lib_vte); +#endif gtk_widget_destroy(app->window); // destroy popup menus Modified: trunk/src/dialogs.c =================================================================== --- trunk/src/dialogs.c 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/dialogs.c 2006-05-22 00:25:19 UTC (rev 354) @@ -40,7 +40,6 @@ #include "callbacks.h" #include "document.h" #include "win32.h" -#include "about.h" #include "sciwrappers.h" #include "support.h" #include "interface.h" @@ -1649,140 +1648,136 @@ app->prefs_dialog = create_prefs_dialog(); #ifdef HAVE_VTE - tooltips = GTK_TOOLTIPS(lookup_widget(app->prefs_dialog, "tooltips")); - notebook = lookup_widget(app->prefs_dialog, "notebook2"); - vbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(notebook), vbox); + if (app->have_vte) + { + tooltips = GTK_TOOLTIPS(lookup_widget(app->prefs_dialog, "tooltips")); + notebook = lookup_widget(app->prefs_dialog, "notebook2"); + vbox = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(notebook), vbox); - label = gtk_label_new(_("These are settings for the virtual terminal emulator widget (VTE). They only apply, if the VTE library could be loaded.")); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_FILL); - gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); - gtk_misc_set_alignment(GTK_MISC(label), 0.14, 0.19); - gtk_misc_set_padding(GTK_MISC(label), 0, 8); + label = gtk_label_new(_("These are settings for the virtual terminal emulator widget (VTE). They only apply, if the VTE library could be loaded.")); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_FILL); + gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); + gtk_misc_set_alignment(GTK_MISC(label), 0.14, 0.19); + gtk_misc_set_padding(GTK_MISC(label), 0, 8); - alignment = gtk_alignment_new(0.5, 0.5, 1, 1); - gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0); - gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 6); + alignment = gtk_alignment_new(0.5, 0.5, 1, 1); + gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0); + gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 6); - table = gtk_table_new(7, 2, FALSE); - gtk_container_add(GTK_CONTAINER(alignment), table); - gtk_table_set_row_spacings(GTK_TABLE(table), 3); - gtk_table_set_col_spacings(GTK_TABLE(table), 25); + table = gtk_table_new(7, 2, FALSE); + gtk_container_add(GTK_CONTAINER(alignment), table); + gtk_table_set_row_spacings(GTK_TABLE(table), 3); + gtk_table_set_col_spacings(GTK_TABLE(table), 25); - label = gtk_label_new(_("Terminal font")); - gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + label = gtk_label_new(_("Terminal font")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - font_term = gtk_font_button_new(); - gtk_table_attach(GTK_TABLE(table), font_term, 1, 2, 0, 1, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(font_term, FALSE); - gtk_tooltips_set_tip(tooltips, font_term, _("Sets the font for the terminal widget."), NULL); + font_term = gtk_font_button_new(); + gtk_table_attach(GTK_TABLE(table), font_term, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, font_term, _("Sets the font for the terminal widget."), NULL); - label = gtk_label_new(_("Foreground color")); - gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + label = gtk_label_new(_("Foreground color")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - label = gtk_label_new(_("Background color")); - gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + label = gtk_label_new(_("Background color")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - color_fore = gtk_color_button_new(); - gtk_table_attach(GTK_TABLE(table), color_fore, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(color_fore, FALSE); - gtk_tooltips_set_tip(tooltips, color_fore, _("Sets the foreground color of the text in the terminal widget."), NULL); - gtk_color_button_set_title(GTK_COLOR_BUTTON(color_fore), _("Color Chooser")); + color_fore = gtk_color_button_new(); + gtk_table_attach(GTK_TABLE(table), color_fore, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, color_fore, _("Sets the foreground color of the text in the terminal widget."), NULL); + gtk_color_button_set_title(GTK_COLOR_BUTTON(color_fore), _("Color Chooser")); - color_back = gtk_color_button_new(); - gtk_table_attach(GTK_TABLE(table), color_back, 1, 2, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(color_back, FALSE); - gtk_tooltips_set_tip(tooltips, color_back, _("Sets the background color of the text in the terminal widget."), NULL); - gtk_color_button_set_title(GTK_COLOR_BUTTON(color_back), _("Color Chooser")); + color_back = gtk_color_button_new(); + gtk_table_attach(GTK_TABLE(table), color_back, 1, 2, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, color_back, _("Sets the background color of the text in the terminal widget."), NULL); + gtk_color_button_set_title(GTK_COLOR_BUTTON(color_back), _("Color Chooser")); - label = gtk_label_new(_("Scrollback lines")); - gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + label = gtk_label_new(_("Scrollback lines")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - spin_scrollback_adj = gtk_adjustment_new(500, 0, 5000, 1, 10, 10); - spin_scrollback = gtk_spin_button_new(GTK_ADJUSTMENT(spin_scrollback_adj), 1, 0); - gtk_table_attach(GTK_TABLE(table), spin_scrollback, 1, 2, 3, 4, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(spin_scrollback, FALSE); - gtk_tooltips_set_tip(tooltips, spin_scrollback, _("Specifies the history in lines, which you can scroll back in the terminal widget."), NULL); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_scrollback), TRUE); - gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_scrollback), TRUE); + spin_scrollback_adj = gtk_adjustment_new(500, 0, 5000, 1, 10, 10); + spin_scrollback = gtk_spin_button_new(GTK_ADJUSTMENT(spin_scrollback_adj), 1, 0); + gtk_table_attach(GTK_TABLE(table), spin_scrollback, 1, 2, 3, 4, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, spin_scrollback, _("Specifies the history in lines, which you can scroll back in the terminal widget."), NULL); + gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin_scrollback), TRUE); + gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_scrollback), TRUE); - label = gtk_label_new(_("Terminal emulation")); - gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + label = gtk_label_new(_("Terminal emulation")); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); - entry_emulation = gtk_entry_new(); - gtk_table_attach(GTK_TABLE(table), entry_emulation, 1, 2, 4, 5, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(entry_emulation, FALSE); - gtk_tooltips_set_tip(tooltips, entry_emulation, _("Controls how the terminal emulator should behave. xterm is a good start."), NULL); + entry_emulation = gtk_entry_new(); + gtk_table_attach(GTK_TABLE(table), entry_emulation, 1, 2, 4, 5, + (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, entry_emulation, _("Controls how the terminal emulator should behave. xterm is a good start."), NULL); - check_scroll_key = gtk_check_button_new_with_mnemonic(_("Scroll on keystroke")); - gtk_table_attach(GTK_TABLE(table), check_scroll_key, 1, 2, 5, 6, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(check_scroll_key, FALSE); - gtk_tooltips_set_tip(tooltips, check_scroll_key, _("Whether to scroll to the bottom if a key was pressed."), NULL); - gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_key), FALSE); + check_scroll_key = gtk_check_button_new_with_mnemonic(_("Scroll on keystroke")); + gtk_table_attach(GTK_TABLE(table), check_scroll_key, 1, 2, 5, 6, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, check_scroll_key, _("Whether to scroll to the bottom if a key was pressed."), NULL); + gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_key), FALSE); - check_scroll_out = gtk_check_button_new_with_mnemonic(_("Scroll on output")); - gtk_table_attach(GTK_TABLE(table), check_scroll_out, 1, 2, 6, 7, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_widget_set_sensitive(check_scroll_out, FALSE); - gtk_tooltips_set_tip(tooltips, check_scroll_out, _("Whether to scroll to the bottom if an output was generated."), NULL); - gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_out), FALSE); + check_scroll_out = gtk_check_button_new_with_mnemonic(_("Scroll on output")); + gtk_table_attach(GTK_TABLE(table), check_scroll_out, 1, 2, 6, 7, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_tooltips_set_tip(tooltips, check_scroll_out, _("Whether to scroll to the bottom if an output was generated."), NULL); + gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_out), FALSE); - label = gtk_label_new(_("Terminal")); - gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page( - GTK_NOTEBOOK(notebook), 5), label); + label = gtk_label_new(_("Terminal")); + gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), gtk_notebook_get_nth_page( + GTK_NOTEBOOK(notebook), 5), label); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "font_term", - gtk_widget_ref(font_term), (GDestroyNotify) gtk_widget_unref); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_fore", - gtk_widget_ref(color_fore), (GDestroyNotify) gtk_widget_unref); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_back", - gtk_widget_ref(color_back), (GDestroyNotify) gtk_widget_unref); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "spin_scrollback", - gtk_widget_ref(spin_scrollback), (GDestroyNotify) gtk_widget_unref); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "entry_emulation", - gtk_widget_ref(entry_emulation), (GDestroyNotify) gtk_widget_unref); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_key", - gtk_widget_ref(check_scroll_key), (GDestroyNotify) gtk_widget_unref); - g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_out", - gtk_widget_ref(check_scroll_out), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "font_term", + gtk_widget_ref(font_term), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_fore", + gtk_widget_ref(color_fore), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "color_back", + gtk_widget_ref(color_back), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "spin_scrollback", + gtk_widget_ref(spin_scrollback), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "entry_emulation", + gtk_widget_ref(entry_emulation), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_key", + gtk_widget_ref(check_scroll_key), (GDestroyNotify) gtk_widget_unref); + g_object_set_data_full(G_OBJECT(app->prefs_dialog), "check_scroll_out", + gtk_widget_ref(check_scroll_out), (GDestroyNotify) gtk_widget_unref); - gtk_widget_show_all(vbox); + gtk_widget_show_all(vbox); - g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "font_term"), - "font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(4)); - g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_fore"), - "color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(2)); - g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_back"), - "color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(3)); + g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "font_term"), + "font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(4)); + g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_fore"), + "color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(2)); + g_signal_connect((gpointer) lookup_widget(app->prefs_dialog, "color_back"), + "color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(3)); + } #endif g_signal_connect((gpointer) app->prefs_dialog, "response", G_CALLBACK(on_prefs_button_clicked), NULL); g_signal_connect((gpointer) app->prefs_dialog, "delete_event", G_CALLBACK(on_prefs_delete_event), NULL); Modified: trunk/src/geany.h =================================================================== --- trunk/src/geany.h 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/geany.h 2006-05-22 00:25:19 UTC (rev 354) @@ -15,7 +15,7 @@ * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Id$ */ @@ -122,7 +122,6 @@ gboolean opening_session_files; // represents the state when Geany is quitting completely gboolean quitting; - gboolean have_vte; gboolean ignore_global_tags; gboolean toolbar_visible; gboolean treeview_symbol_visible; @@ -162,6 +161,8 @@ gboolean ignore_fifo; #endif #ifdef HAVE_VTE + gboolean load_vte; + gboolean have_vte; gchar *lib_vte; #endif gchar *long_line_color; Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/interface.c 2006-05-22 00:25:19 UTC (rev 354) @@ -1740,6 +1740,7 @@ GtkWidget *check_save_win_pos; GtkWidget *check_beep; GtkWidget *check_switch_pages; + GtkWidget *check_vte; GtkWidget *check_ask_for_quit; GtkWidget *hbox3; GtkWidget *label150; @@ -1927,6 +1928,11 @@ gtk_tooltips_set_tip (tooltips, check_switch_pages, _("Switch to the status message tab(in the notebook window at the bottom) if a new status message arrive."), NULL); gtk_button_set_focus_on_click (GTK_BUTTON (check_switch_pages), FALSE); + check_vte = gtk_check_button_new_with_mnemonic (_("Load virtual terminal emulation at startup")); + gtk_box_pack_start (GTK_BOX (vbox4), check_vte, FALSE, FALSE, 0); + gtk_tooltips_set_tip (tooltips, check_vte, _("Whether the virtual terminal emulation(VTE) should be loaded at startup. Disable it if you do not need it."), NULL); + gtk_button_set_focus_on_click (GTK_BUTTON (check_vte), FALSE); + check_ask_for_quit = gtk_check_button_new_with_mnemonic (_("Confirm exit")); gtk_widget_show (check_ask_for_quit); gtk_box_pack_start (GTK_BOX (vbox4), check_ask_for_quit, FALSE, FALSE, 0); @@ -1936,7 +1942,7 @@ hbox3 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox3); - gtk_box_pack_start (GTK_BOX (vbox4), hbox3, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox4), hbox3, TRUE, TRUE, 0); label150 = gtk_label_new (_("Placement of new file tabs: ")); gtk_widget_show (label150); @@ -2543,6 +2549,7 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, check_save_win_pos, "check_save_win_pos"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_beep, "check_beep"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_switch_pages, "check_switch_pages"); + GLADE_HOOKUP_OBJECT (prefs_dialog, check_vte, "check_vte"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_ask_for_quit, "check_ask_for_quit"); GLADE_HOOKUP_OBJECT (prefs_dialog, hbox3, "hbox3"); GLADE_HOOKUP_OBJECT (prefs_dialog, label150, "label150"); Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/keyfile.c 2006-05-22 00:25:19 UTC (rev 354) @@ -99,6 +99,7 @@ g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", app->pref_editor_auto_close_xml_tags); g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", app->pref_editor_auto_complete_constructs); #ifdef HAVE_VTE + g_key_file_set_boolean(config, PACKAGE, "load_vte", app->load_vte); g_key_file_set_comment(config, PACKAGE, "terminal_settings", _(" VTE settings: FONT;FOREGROUND;BACKGROUND;scrollback;type;scroll on keystroke;scroll on output"), NULL); g_key_file_set_string(config, PACKAGE, "terminal_settings", app->terminal_settings); @@ -256,11 +257,12 @@ app->pref_main_save_winpos = utils_get_setting_boolean(config, PACKAGE, "pref_main_save_winpos", TRUE); app->pref_main_show_search = utils_get_setting_boolean(config, PACKAGE, "pref_main_show_search", TRUE); app->pref_main_show_goto = utils_get_setting_boolean(config, PACKAGE, "pref_main_show_goto", TRUE); - app->pref_template_developer = utils_get_setting_string(config, PACKAGE, "pref_template_developer", g_get_real_name()); - app->pref_template_company = utils_get_setting_string(config, PACKAGE, "pref_template_company", ""); #ifdef HAVE_VTE + app->load_vte = utils_get_setting_boolean(config, PACKAGE, "load_vte", TRUE); app->terminal_settings = utils_get_setting_string(config, PACKAGE, "terminal_settings", ""); #endif + app->pref_template_developer = utils_get_setting_string(config, PACKAGE, "pref_template_developer", g_get_real_name()); + app->pref_template_company = utils_get_setting_string(config, PACKAGE, "pref_template_company", ""); tmp_string = utils_get_initials(app->pref_template_developer); app->pref_template_initial = utils_get_setting_string(config, PACKAGE, "pref_template_initial", tmp_string); g_free(tmp_string); Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/main.c 2006-05-22 00:25:19 UTC (rev 354) @@ -15,7 +15,7 @@ * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Id$ */ @@ -58,10 +58,10 @@ static gboolean debug_mode = FALSE; static gboolean ignore_global_tags = FALSE; static gboolean no_msgwin = FALSE; -static gboolean no_vte = FALSE; static gboolean show_version = FALSE; static gchar *alternate_config = NULL; #ifdef HAVE_VTE +static gboolean no_vte = FALSE; static gchar *lib_vte = NULL; #endif static GOptionEntry entries[] = @@ -73,8 +73,8 @@ #endif { "config", 'c', 0, G_OPTION_ARG_FILENAME, &alternate_config, "use an alternate configuration directory", NULL }, { "no-msgwin", 'm', 0, G_OPTION_ARG_NONE, &no_msgwin, "don't show message window at startup", NULL }, +#ifdef HAVE_VTE { "no-terminal", 't', 0, G_OPTION_ARG_NONE, &no_vte, "don't load terminal support", NULL }, -#ifdef HAVE_VTE { "vte-lib", 'l', 0, G_OPTION_ARG_FILENAME, &lib_vte, "filename of libvte.so", NULL }, #endif { "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, "show version and exit", NULL }, @@ -216,9 +216,6 @@ } else app->configdir = g_strconcat(GEANY_HOME_DIR, G_DIR_SEPARATOR_S, ".", PACKAGE, NULL); -#ifdef HAVE_VTE - app->lib_vte = lib_vte; -#endif app->window = NULL; app->search_text = NULL; app->open_fontsel = NULL; @@ -236,9 +233,7 @@ app->ignore_fifo = ignore_fifo; #endif #ifdef HAVE_VTE - app->have_vte = ! no_vte; -#else - app->have_vte = FALSE; + app->lib_vte = lib_vte; #endif app->ignore_global_tags = ignore_global_tags; app->tm_workspace = tm_get_workspace(); @@ -474,6 +469,11 @@ templates_init(); encodings_init(); document_init_doclist(); + // do this here to let cmdline options overwrite configuration settings +#ifdef HAVE_VTE + app->have_vte = app->load_vte; + if (no_vte) app->have_vte = FALSE; +#endif filetypes_init_types(); configuration_read_filetype_extensions(); Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2006-05-22 00:19:15 UTC (rev 353) +++ trunk/src/prefs.c 2006-05-22 00:25:19 UTC (rev 354) @@ -21,6 +21,8 @@ */ +#include <stdlib.h> + #include "geany.h" #include "prefs.h" @@ -213,6 +215,11 @@ #ifdef HAVE_VTE + // make VTE switch visible only when VTE is compiled in, it is hidden by default + widget = lookup_widget(app->prefs_dialog, "check_vte"); + gtk_widget_show(widget); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->load_vte); + // VTE settings if (app->have_vte) { @@ -236,14 +243,6 @@ widget = lookup_widget(app->prefs_dialog, "check_scroll_out"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->scroll_on_out); - - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "font_term"), TRUE); - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "color_fore"), TRUE); - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "color_back"), TRUE); - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "spin_scrollback"), TRUE); - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "entry_emulation"), TRUE); - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "check_scroll_key"), TRUE); - gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "check_scroll_out"), TRUE); } #endif } @@ -367,6 +366,9 @@ if (edited) keybindings_write_to_file(); #ifdef HAVE_VTE + widget = lookup_widget(app->prefs_dialog, "check_vte"); + app->load_vte = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + // VTE settings if (app->have_vte) { This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [353] trunk/src
by eht16@users.sourceforge.net
22 May '06
22 May '06
Revision: 353 Author: eht16 Date: 2006-05-21 17:19:15 -0700 (Sun, 21 May 2006) ViewCVS:
http://svn.sourceforge.net/geany/?rev=353&view=rev
Log Message: ----------- declared some functions static Modified Paths: -------------- trunk/src/vte.c trunk/src/vte.h Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2006-05-21 17:51:22 UTC (rev 352) +++ trunk/src/vte.c 2006-05-22 00:19:15 UTC (rev 353) @@ -15,7 +15,7 @@ * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * $Id$ */ @@ -47,6 +47,12 @@ #define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type()) static void vte_start(GtkWidget *widget); +static gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data); +static gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data); +static void vte_register_symbols(GModule *module); +static void vte_get_settings(void); +static void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data); +static GtkWidget *vte_create_popup_menu(void); /* taken from anjuta, thanks */ @@ -99,7 +105,7 @@ geany_debug("Disabling terminal support"); return; } - + if (app->lib_vte && strlen(app->lib_vte)) { module = g_module_open(app->lib_vte, G_MODULE_BIND_LAZY); @@ -157,10 +163,9 @@ gtk_notebook_insert_page(GTK_NOTEBOOK(msgwindow.notebook), frame, gtk_label_new(_("Terminal")), MSG_VTE); // the vte widget has to be realised before color changes take effect - //g_signal_connect_swapped(G_OBJECT(vte), "realize", G_CALLBACK(vte_apply_user_settings), NULL); - - // at least temporarily call gtk_widget_realize() otherwise the scrollbars won't be shown - gtk_widget_realize(vte); + //g_signal_connect(G_OBJECT(vte), "realize", G_CALLBACK(vte_apply_user_settings), NULL); + + //gtk_widget_realize(vte); vte_apply_user_settings(); } @@ -182,24 +187,21 @@ } -gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data) +static gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data) { - /// FIXME: GDK_KEY_PRESS doesn't seem to be called for our keys if (event->type != GDK_KEY_RELEASE) return FALSE; - if (event->keyval == GDK_c || + if ((event->keyval == GDK_c || event->keyval == GDK_d || event->keyval == GDK_C || - event->keyval == GDK_D) + event->keyval == GDK_D) && + event->state & GDK_CONTROL_MASK) { - if (event->state & GDK_CONTROL_MASK) - { - kill(pid, SIGINT); - pid = 0; - vte_start(widget); - return TRUE; - } + kill(pid, SIGINT); + pid = 0; + vte_start(widget); + return TRUE; } return FALSE; } @@ -210,7 +212,7 @@ VteTerminal *vte = VTE_TERMINAL(widget); struct passwd *pw; const gchar *shell; - const gchar *dir; + const gchar *dir = NULL; gchar **env; pw = getpwuid(getuid()); @@ -231,7 +233,7 @@ } -gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data) +static gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->button == 2) { @@ -250,7 +252,7 @@ } -void vte_register_symbols(GModule *mod) +static void vte_register_symbols(GModule *mod) { g_module_symbol(mod, "vte_terminal_new", (void*)&vf->vte_terminal_new); g_module_symbol(mod, "vte_terminal_set_size", (void*)&vf->vte_terminal_set_size); @@ -276,18 +278,19 @@ void vte_apply_user_settings(void) { - gtk_widget_queue_draw(vc->vte); //update vte widget + if (! app->msgwindow_visible) return; + //if (! GTK_WIDGET_REALIZED(vc->vte)) gtk_widget_realize(vc->vte); vf->vte_terminal_set_scrollback_lines(VTE_TERMINAL(vc->vte), vc->scrollback_lines); vf->vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(vc->vte), vc->scroll_on_key); vf->vte_terminal_set_scroll_on_output(VTE_TERMINAL(vc->vte), vc->scroll_on_out); vf->vte_terminal_set_emulation(VTE_TERMINAL(vc->vte), vc->emulation); - if (app->msgwindow_visible) vf->vte_terminal_set_font_from_string(VTE_TERMINAL(vc->vte), vc->font); + vf->vte_terminal_set_font_from_string(VTE_TERMINAL(vc->vte), vc->font); vf->vte_terminal_set_color_foreground(VTE_TERMINAL(vc->vte), vc->color_fore); vf->vte_terminal_set_color_background(VTE_TERMINAL(vc->vte), vc->color_back); } -void vte_get_settings(void) +static void vte_get_settings(void) { gchar **values = g_strsplit(app->terminal_settings, ";", 7); @@ -314,7 +317,7 @@ } -void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data) +static void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data) { switch (GPOINTER_TO_INT(user_data)) { @@ -339,7 +342,7 @@ } -GtkWidget *vte_create_popup_menu(void) +static GtkWidget *vte_create_popup_menu(void) { GtkWidget *menu, *item; Modified: trunk/src/vte.h =================================================================== --- trunk/src/vte.h 2006-05-21 17:51:22 UTC (rev 352) +++ trunk/src/vte.h 2006-05-22 00:19:15 UTC (rev 353) @@ -32,22 +32,10 @@ void vte_init(void); -gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data); - -void vte_register_symbols(GModule *module); - void vte_close(void); -gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data); - void vte_apply_user_settings(void); -void vte_get_settings(void); - -void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data); - -GtkWidget *vte_create_popup_menu(void); - /* void vte_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time); This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
← Newer
1
2
3
4
Older →
Jump to page:
1
2
3
4
Results per page:
10
25
50
100
200