SF.net SVN: geany: [1826] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Aug 25 14:16:54 UTC 2007


Revision: 1826
          http://geany.svn.sourceforge.net/geany/?rev=1826&view=rev
Author:   eht16
Date:     2007-08-25 07:16:52 -0700 (Sat, 25 Aug 2007)

Log Message:
-----------
Add version to plugin info fields and two other fields for future use.
Add option to show/hide the small crosses on each file tab (closes #1757680).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/geany.glade
    trunk/plugins/classbuilder.c
    trunk/plugins/demoplugin.c
    trunk/plugins/export.c
    trunk/plugins/htmlchars.c
    trunk/src/interface.c
    trunk/src/keyfile.c
    trunk/src/notebook.c
    trunk/src/plugindata.h
    trunk/src/prefs.c
    trunk/src/prefs.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/ChangeLog	2007-08-25 14:16:52 UTC (rev 1826)
@@ -1,3 +1,15 @@
+2007-08-25  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * geany.glade, plugins/classbuilder.c, plugins/demoplugin.c,
+   plugins/export.c, plugins/htmlchars.c, src/interface.c,
+   src/keyfile.c, src/notebook.c, src/plugindata.c, src/prefs.c,
+   src/prefs.h:
+   Add version to plugin info fields and two other fields for future
+   use.
+   Add option to show/hide the small crosses on each file tab
+   (closes #1757680).
+
+
 2007-08-24  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/dialogs.c, src/callbacks.c:

Modified: trunk/geany.glade
===================================================================
--- trunk/geany.glade	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/geany.glade	2007-08-25 14:16:52 UTC (rev 1826)
@@ -3948,35 +3948,29 @@
 		      <child>
 			<widget class="GtkTable" id="table8">
 			  <property name="visible">True</property>
-			  <property name="n_rows">4</property>
+			  <property name="n_rows">5</property>
 			  <property name="n_columns">2</property>
 			  <property name="homogeneous">False</property>
 			  <property name="row_spacing">3</property>
 			  <property name="column_spacing">25</property>
 
 			  <child>
-			    <widget class="GtkLabel" id="label161">
+			    <widget class="GtkCheckButton" id="check_show_notebook_tabs">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Sidebar:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			      <property name="width_chars">-1</property>
-			      <property name="single_line_mode">False</property>
-			      <property name="angle">0</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Show editor tabs</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
 			    </widget>
 			    <packing>
 			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
 			      <property name="x_options">fill</property>
 			      <property name="y_options"></property>
 			    </packing>
@@ -4003,17 +3997,38 @@
 			    <packing>
 			      <property name="left_attach">0</property>
 			      <property name="right_attach">1</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
+			      <property name="top_attach">4</property>
+			      <property name="bottom_attach">5</property>
 			      <property name="x_options">fill</property>
 			      <property name="y_options"></property>
 			    </packing>
 			  </child>
 
 			  <child>
-			    <widget class="GtkLabel" id="label159">
+			    <widget class="GtkComboBox" id="combo_tab_msgwin">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Editor:</property>
+			      <property name="items" translatable="yes">Left
+Right
+Top
+Bottom
+</property>
+			      <property name="add_tearoffs">False</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">4</property>
+			      <property name="bottom_attach">5</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label161">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Sidebar:</property>
 			      <property name="use_underline">False</property>
 			      <property name="use_markup">False</property>
 			      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -4031,38 +4046,16 @@
 			    <packing>
 			      <property name="left_attach">0</property>
 			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
+			      <property name="top_attach">3</property>
+			      <property name="bottom_attach">4</property>
 			      <property name="x_options">fill</property>
 			      <property name="y_options"></property>
 			    </packing>
 			  </child>
 
 			  <child>
-			    <widget class="GtkCheckButton" id="check_show_notebook_tabs">
+			    <widget class="GtkComboBox" id="combo_tab_sidebar">
 			      <property name="visible">True</property>
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Show editor tabs</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			      <property name="active">False</property>
-			      <property name="inconsistent">False</property>
-			      <property name="draw_indicator">True</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkComboBox" id="combo_tab_msgwin">
-			      <property name="visible">True</property>
 			      <property name="items" translatable="yes">Left
 Right
 Top
@@ -4082,8 +4075,36 @@
 			  </child>
 
 			  <child>
-			    <widget class="GtkComboBox" id="combo_tab_sidebar">
+			    <widget class="GtkLabel" id="label159">
 			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Editor:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">2</property>
+			      <property name="bottom_attach">3</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkComboBox" id="combo_tab_editor">
+			      <property name="visible">True</property>
 			      <property name="items" translatable="yes">Left
 Right
 Top
@@ -4103,23 +4124,24 @@
 			  </child>
 
 			  <child>
-			    <widget class="GtkComboBox" id="combo_tab_editor">
+			    <widget class="GtkCheckButton" id="check_show_tab_cross">
 			      <property name="visible">True</property>
-			      <property name="items" translatable="yes">Left
-Right
-Top
-Bottom
-</property>
-			      <property name="add_tearoffs">False</property>
-			      <property name="focus_on_click">True</property>
+			      <property name="tooltip" translatable="yes">Shows a small cross symbol in the file tabs to easily close files by clicking on it (requires restart of Geany).</property>
+			      <property name="label" translatable="yes">Show small cross symbol in the file tabs</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="left_attach">1</property>
+			      <property name="left_attach">0</property>
 			      <property name="right_attach">2</property>
 			      <property name="top_attach">1</property>
 			      <property name="bottom_attach">2</property>
 			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
+			      <property name="y_options"></property>
 			    </packing>
 			  </child>
 			</widget>
@@ -6202,7 +6224,7 @@
 		      <child>
 			<widget class="GtkTable" id="table10">
 			  <property name="visible">True</property>
-			  <property name="n_rows">2</property>
+			  <property name="n_rows">3</property>
 			  <property name="n_columns">2</property>
 			  <property name="homogeneous">False</property>
 			  <property name="row_spacing">3</property>
@@ -6237,29 +6259,6 @@
 			  </child>
 
 			  <child>
-			    <widget class="GtkSpinButton" id="spin_mru">
-			      <property name="visible">True</property>
-			      <property name="tooltip" translatable="yes">Specifies the number of files which are stored in the Recent files list.</property>
-			      <property name="can_focus">True</property>
-			      <property name="climb_rate">1</property>
-			      <property name="digits">0</property>
-			      <property name="numeric">True</property>
-			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-			      <property name="snap_to_ticks">False</property>
-			      <property name="wrap">True</property>
-			      <property name="adjustment">4 1 50 1 10 10</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
 			    <widget class="GtkHBox" id="hbox3">
 			      <property name="visible">True</property>
 			      <property name="homogeneous">False</property>
@@ -6343,6 +6342,29 @@
 			      <property name="y_options"></property>
 			    </packing>
 			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="spin_mru">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Specifies the number of files which are stored in the Recent files list.</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">0</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">True</property>
+			      <property name="adjustment">4 1 50 1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
 			</widget>
 		      </child>
 		    </widget>

Modified: trunk/plugins/classbuilder.c
===================================================================
--- trunk/plugins/classbuilder.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/plugins/classbuilder.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -46,7 +46,7 @@
 
 VERSION_CHECK(7)
 
-PLUGIN_INFO(_("Class Builder"), _("Creates source files for new class types."))
+PLUGIN_INFO(_("Class Builder"), _("Creates source files for new class types."), "0.1")
 
 
 enum

Modified: trunk/plugins/demoplugin.c
===================================================================
--- trunk/plugins/demoplugin.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/plugins/demoplugin.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -38,7 +38,7 @@
 VERSION_CHECK(7)
 
 /* All plugins must set name and description */
-PLUGIN_INFO(_("Demo"), _("Example plugin."))
+PLUGIN_INFO(_("Demo"), _("Example plugin."), "0.1")
 
 
 /* Callback when the menu item is clicked */

Modified: trunk/plugins/export.c
===================================================================
--- trunk/plugins/export.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/plugins/export.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -38,7 +38,7 @@
 GeanyData		*geany_data;
 
 VERSION_CHECK(12)
-PLUGIN_INFO(_("Export"), _("Exports the current file into different formats."))
+PLUGIN_INFO(_("Export"), _("Exports the current file into different formats."), "0.1")
 
 #define doc_array	geany_data->doc_array
 #define scintilla	geany_data->sci
@@ -78,10 +78,11 @@
 \\usepackage[utf8x]{inputenc}\n\
 \\usepackage[T1]{fontenc}\n\
 \\usepackage{color}\n\
+\\setlength{\\parindent}{0em}\n\
+\\setlength{\\parskip}{2ex plus1ex minus0.5ex}\n\
 {export_styles}\n\
 \\begin{document}\
 \n\
-\\noindent\n\
 \\ttfamily\n\
 \\setlength{\\fboxrule}{0pt}\n\
 \\setlength{\\fboxsep}{0pt}\n\

Modified: trunk/plugins/htmlchars.c
===================================================================
--- trunk/plugins/htmlchars.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/plugins/htmlchars.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -42,7 +42,7 @@
 
 VERSION_CHECK(7)
 
-PLUGIN_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."))
+PLUGIN_INFO(_("HTML Characters"), _("Inserts HTML character entities like '&'."), "0.1")
 
 
 enum

Modified: trunk/src/interface.c
===================================================================
--- trunk/src/interface.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/src/interface.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -2448,13 +2448,14 @@
   GtkWidget *frame9;
   GtkWidget *alignment12;
   GtkWidget *table8;
-  GtkWidget *label161;
+  GtkWidget *check_show_notebook_tabs;
   GtkWidget *label160;
-  GtkWidget *label159;
-  GtkWidget *check_show_notebook_tabs;
   GtkWidget *combo_tab_msgwin;
+  GtkWidget *label161;
   GtkWidget *combo_tab_sidebar;
+  GtkWidget *label159;
   GtkWidget *combo_tab_editor;
+  GtkWidget *check_show_tab_cross;
   GtkWidget *label158;
   GtkWidget *frame23;
   GtkWidget *alignment26;
@@ -2577,13 +2578,13 @@
   GtkWidget *alignment20;
   GtkWidget *table10;
   GtkWidget *label150;
-  GtkObject *spin_mru_adj;
-  GtkWidget *spin_mru;
   GtkWidget *hbox3;
   GtkWidget *radio_tab_left;
   GSList *radio_tab_left_group = NULL;
   GtkWidget *radio_tab_right;
   GtkWidget *label147;
+  GtkObject *spin_mru_adj;
+  GtkWidget *spin_mru;
   GtkWidget *label176;
   GtkWidget *label174;
   GtkWidget *vbox23;
@@ -2962,42 +2963,28 @@
   gtk_container_add (GTK_CONTAINER (frame9), alignment12);
   gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0);
 
-  table8 = gtk_table_new (4, 2, FALSE);
+  table8 = gtk_table_new (5, 2, FALSE);
   gtk_widget_show (table8);
   gtk_container_add (GTK_CONTAINER (alignment12), table8);
   gtk_table_set_row_spacings (GTK_TABLE (table8), 3);
   gtk_table_set_col_spacings (GTK_TABLE (table8), 25);
 
-  label161 = gtk_label_new (_("Sidebar:"));
-  gtk_widget_show (label161);
-  gtk_table_attach (GTK_TABLE (table8), label161, 0, 1, 2, 3,
+  check_show_notebook_tabs = gtk_check_button_new_with_mnemonic (_("Show editor tabs"));
+  gtk_widget_show (check_show_notebook_tabs);
+  gtk_table_attach (GTK_TABLE (table8), check_show_notebook_tabs, 0, 2, 0, 1,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label161), 0, 0.5);
 
   label160 = gtk_label_new (_("Message window:"));
   gtk_widget_show (label160);
-  gtk_table_attach (GTK_TABLE (table8), label160, 0, 1, 3, 4,
+  gtk_table_attach (GTK_TABLE (table8), label160, 0, 1, 4, 5,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
   gtk_misc_set_alignment (GTK_MISC (label160), 0, 0.5);
 
-  label159 = gtk_label_new (_("Editor:"));
-  gtk_widget_show (label159);
-  gtk_table_attach (GTK_TABLE (table8), label159, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label159), 0, 0.5);
-
-  check_show_notebook_tabs = gtk_check_button_new_with_mnemonic (_("Show editor tabs"));
-  gtk_widget_show (check_show_notebook_tabs);
-  gtk_table_attach (GTK_TABLE (table8), check_show_notebook_tabs, 0, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
   combo_tab_msgwin = gtk_combo_box_new_text ();
   gtk_widget_show (combo_tab_msgwin);
-  gtk_table_attach (GTK_TABLE (table8), combo_tab_msgwin, 1, 2, 3, 4,
+  gtk_table_attach (GTK_TABLE (table8), combo_tab_msgwin, 1, 2, 4, 5,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_FILL), 0, 0);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_msgwin), _("Left"));
@@ -3005,9 +2992,16 @@
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_msgwin), _("Top"));
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_msgwin), _("Bottom"));
 
+  label161 = gtk_label_new (_("Sidebar:"));
+  gtk_widget_show (label161);
+  gtk_table_attach (GTK_TABLE (table8), label161, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label161), 0, 0.5);
+
   combo_tab_sidebar = gtk_combo_box_new_text ();
   gtk_widget_show (combo_tab_sidebar);
-  gtk_table_attach (GTK_TABLE (table8), combo_tab_sidebar, 1, 2, 2, 3,
+  gtk_table_attach (GTK_TABLE (table8), combo_tab_sidebar, 1, 2, 3, 4,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_FILL), 0, 0);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_sidebar), _("Left"));
@@ -3015,9 +3009,16 @@
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_sidebar), _("Top"));
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_sidebar), _("Bottom"));
 
+  label159 = gtk_label_new (_("Editor:"));
+  gtk_widget_show (label159);
+  gtk_table_attach (GTK_TABLE (table8), label159, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label159), 0, 0.5);
+
   combo_tab_editor = gtk_combo_box_new_text ();
   gtk_widget_show (combo_tab_editor);
-  gtk_table_attach (GTK_TABLE (table8), combo_tab_editor, 1, 2, 1, 2,
+  gtk_table_attach (GTK_TABLE (table8), combo_tab_editor, 1, 2, 2, 3,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_FILL), 0, 0);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_editor), _("Left"));
@@ -3025,6 +3026,15 @@
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_editor), _("Top"));
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_tab_editor), _("Bottom"));
 
+  check_show_tab_cross = gtk_check_button_new_with_mnemonic (_("Show small cross symbol in the file tabs"));
+  gtk_widget_show (check_show_tab_cross);
+  gtk_table_attach (GTK_TABLE (table8), check_show_tab_cross, 0, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  GTK_WIDGET_UNSET_FLAGS (check_show_tab_cross, GTK_CAN_FOCUS);
+  gtk_tooltips_set_tip (tooltips, check_show_tab_cross, _("Shows a small cross symbol in the file tabs to easily close files by clicking on it (requires restart of Geany)."), NULL);
+  gtk_button_set_focus_on_click (GTK_BUTTON (check_show_tab_cross), FALSE);
+
   label158 = gtk_label_new (_("<b>Tab placement</b>"));
   gtk_widget_show (label158);
   gtk_frame_set_label_widget (GTK_FRAME (frame9), label158);
@@ -3681,7 +3691,7 @@
   gtk_container_add (GTK_CONTAINER (frame17), alignment20);
   gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0);
 
-  table10 = gtk_table_new (2, 2, FALSE);
+  table10 = gtk_table_new (3, 2, FALSE);
   gtk_widget_show (table10);
   gtk_container_add (GTK_CONTAINER (alignment20), table10);
   gtk_table_set_row_spacings (GTK_TABLE (table10), 3);
@@ -3694,16 +3704,6 @@
                     (GtkAttachOptions) (0), 0, 0);
   gtk_misc_set_alignment (GTK_MISC (label150), 0, 0.5);
 
-  spin_mru_adj = gtk_adjustment_new (4, 1, 50, 1, 10, 10);
-  spin_mru = gtk_spin_button_new (GTK_ADJUSTMENT (spin_mru_adj), 1, 0);
-  gtk_widget_show (spin_mru);
-  gtk_table_attach (GTK_TABLE (table10), spin_mru, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_tooltips_set_tip (tooltips, spin_mru, _("Specifies the number of files which are stored in the Recent files list."), NULL);
-  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_mru), TRUE);
-  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin_mru), TRUE);
-
   hbox3 = gtk_hbox_new (FALSE, 12);
   gtk_widget_show (hbox3);
   gtk_table_attach (GTK_TABLE (table10), hbox3, 1, 2, 0, 1,
@@ -3733,6 +3733,16 @@
   gtk_misc_set_alignment (GTK_MISC (label147), 0, 0.5);
   gtk_misc_set_padding (GTK_MISC (label147), 0, 7);
 
+  spin_mru_adj = gtk_adjustment_new (4, 1, 50, 1, 10, 10);
+  spin_mru = gtk_spin_button_new (GTK_ADJUSTMENT (spin_mru_adj), 1, 0);
+  gtk_widget_show (spin_mru);
+  gtk_table_attach (GTK_TABLE (table10), spin_mru, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_tooltips_set_tip (tooltips, spin_mru, _("Specifies the number of files which are stored in the Recent files list."), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin_mru), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin_mru), TRUE);
+
   label176 = gtk_label_new (_("<b>Misc.</b>"));
   gtk_widget_show (label176);
   gtk_frame_set_label_widget (GTK_FRAME (frame17), label176);
@@ -4183,13 +4193,14 @@
   GLADE_HOOKUP_OBJECT (prefs_dialog, frame9, "frame9");
   GLADE_HOOKUP_OBJECT (prefs_dialog, alignment12, "alignment12");
   GLADE_HOOKUP_OBJECT (prefs_dialog, table8, "table8");
-  GLADE_HOOKUP_OBJECT (prefs_dialog, label161, "label161");
+  GLADE_HOOKUP_OBJECT (prefs_dialog, check_show_notebook_tabs, "check_show_notebook_tabs");
   GLADE_HOOKUP_OBJECT (prefs_dialog, label160, "label160");
-  GLADE_HOOKUP_OBJECT (prefs_dialog, label159, "label159");
-  GLADE_HOOKUP_OBJECT (prefs_dialog, check_show_notebook_tabs, "check_show_notebook_tabs");
   GLADE_HOOKUP_OBJECT (prefs_dialog, combo_tab_msgwin, "combo_tab_msgwin");
+  GLADE_HOOKUP_OBJECT (prefs_dialog, label161, "label161");
   GLADE_HOOKUP_OBJECT (prefs_dialog, combo_tab_sidebar, "combo_tab_sidebar");
+  GLADE_HOOKUP_OBJECT (prefs_dialog, label159, "label159");
   GLADE_HOOKUP_OBJECT (prefs_dialog, combo_tab_editor, "combo_tab_editor");
+  GLADE_HOOKUP_OBJECT (prefs_dialog, check_show_tab_cross, "check_show_tab_cross");
   GLADE_HOOKUP_OBJECT (prefs_dialog, label158, "label158");
   GLADE_HOOKUP_OBJECT (prefs_dialog, frame23, "frame23");
   GLADE_HOOKUP_OBJECT (prefs_dialog, alignment26, "alignment26");
@@ -4306,11 +4317,11 @@
   GLADE_HOOKUP_OBJECT (prefs_dialog, alignment20, "alignment20");
   GLADE_HOOKUP_OBJECT (prefs_dialog, table10, "table10");
   GLADE_HOOKUP_OBJECT (prefs_dialog, label150, "label150");
-  GLADE_HOOKUP_OBJECT (prefs_dialog, spin_mru, "spin_mru");
   GLADE_HOOKUP_OBJECT (prefs_dialog, hbox3, "hbox3");
   GLADE_HOOKUP_OBJECT (prefs_dialog, radio_tab_left, "radio_tab_left");
   GLADE_HOOKUP_OBJECT (prefs_dialog, radio_tab_right, "radio_tab_right");
   GLADE_HOOKUP_OBJECT (prefs_dialog, label147, "label147");
+  GLADE_HOOKUP_OBJECT (prefs_dialog, spin_mru, "spin_mru");
   GLADE_HOOKUP_OBJECT (prefs_dialog, label176, "label176");
   GLADE_HOOKUP_OBJECT (prefs_dialog, label174, "label174");
   GLADE_HOOKUP_OBJECT (prefs_dialog, vbox23, "vbox23");

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/src/keyfile.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -181,6 +181,7 @@
 	g_key_file_set_boolean(config, PACKAGE, "show_linenumber_margin", editor_prefs.show_linenumber_margin);
 	g_key_file_set_boolean(config, PACKAGE, "line_breaking", editor_prefs.line_wrapping);
 	g_key_file_set_boolean(config, PACKAGE, "show_line_endings", editor_prefs.show_line_endings);
+	g_key_file_set_boolean(config, PACKAGE, "show_tab_cross", prefs.show_tab_cross);
 	g_key_file_set_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
 	g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", editor_prefs.auto_close_xml_tags);
 	g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", editor_prefs.auto_complete_constructs);
@@ -444,6 +445,7 @@
 	ui_prefs.fullscreen = utils_get_setting_boolean(config, PACKAGE, "fullscreen", FALSE);
 	prefs.tab_order_ltr = utils_get_setting_boolean(config, PACKAGE, "tab_order_ltr", TRUE);
 	prefs.show_notebook_tabs = utils_get_setting_boolean(config, PACKAGE, "show_notebook_tabs", TRUE);
+	prefs.show_tab_cross = utils_get_setting_boolean(config, PACKAGE, "show_tab_cross", TRUE);
 	editor_prefs.brace_match_ltgt = utils_get_setting_boolean(config, PACKAGE, "brace_match_ltgt", FALSE);
 	prefs.switch_msgwin_pages = utils_get_setting_boolean(config, PACKAGE, "switch_msgwin_pages", FALSE);
 	prefs.auto_focus = utils_get_setting_boolean(config, PACKAGE, "auto_focus", FALSE);

Modified: trunk/src/notebook.c
===================================================================
--- trunk/src/notebook.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/src/notebook.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -319,18 +319,28 @@
 	this->tab_label = gtk_label_new(title);
 
 	hbox = gtk_hbox_new(FALSE, 0);
-	but = gtk_button_new();
-	gtk_container_add(GTK_CONTAINER(but),
-		ui_new_image_from_inline(GEANY_IMAGE_SMALL_CROSS, FALSE));
-	gtk_container_set_border_width(GTK_CONTAINER(but), 0);
-	gtk_widget_set_size_request(but, 19, 18);
+	gtk_box_pack_start(GTK_BOX(hbox), this->tab_label, FALSE, FALSE, 0);
 
-	align = gtk_alignment_new(1.0, 0.0, 0.0, 0.0);
-	gtk_container_add(GTK_CONTAINER(align), but);
+	if (prefs.show_tab_cross)
+	{
+		but = gtk_button_new();
+		gtk_container_add(GTK_CONTAINER(but),
+			ui_new_image_from_inline(GEANY_IMAGE_SMALL_CROSS, FALSE));
+		gtk_container_set_border_width(GTK_CONTAINER(but), 0);
+		gtk_widget_set_size_request(but, 19, 18);
 
-	gtk_button_set_relief(GTK_BUTTON(but), GTK_RELIEF_NONE);
-	gtk_box_pack_start(GTK_BOX(hbox), this->tab_label, FALSE, FALSE, 0);
-	gtk_box_pack_start(GTK_BOX(hbox), align, TRUE, TRUE, 0);
+		align = gtk_alignment_new(1.0, 0.0, 0.0, 0.0);
+		gtk_container_add(GTK_CONTAINER(align), but);
+
+		gtk_button_set_relief(GTK_BUTTON(but), GTK_RELIEF_NONE);
+		gtk_box_pack_start(GTK_BOX(hbox), align, TRUE, TRUE, 0);
+
+		g_signal_connect(G_OBJECT(but), "clicked",
+			G_CALLBACK(notebook_tab_close_clicked_cb), page);
+	}
+	else
+		gtk_widget_set_size_request(hbox, -1, 18); // keep the familiar tab height
+
 	gtk_widget_show_all(hbox);
 
 	this->tabmenu_label = gtk_label_new(title);
@@ -345,10 +355,6 @@
 
 	tab_count_changed();
 
-	// signal for clicking the tab-close button
-	g_signal_connect(G_OBJECT(but), "clicked",
-		G_CALLBACK(notebook_tab_close_clicked_cb), page);
-
 	// This is where tab DnD is enabled for GTK 2.10 and higher
 #if GTK_CHECK_VERSION(2, 10, 0)
 	if (gtk_check_version(2, 10, 0) == NULL) // null means version ok

Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/src/plugindata.h	2007-08-25 14:16:52 UTC (rev 1826)
@@ -71,12 +71,12 @@
 
 /* The API version should be incremented whenever any plugin data types below are
  * modified. */
-static const gint api_version = 14;
+static const gint api_version = 15;
 
 /* The ABI version should be incremented whenever existing fields in the plugin
  * data types below have to be changed or reordered. It should stay the same if fields
  * are only appended, as this doesn't affect existing fields. */
-static const gint abi_version = 5;
+static const gint abi_version = 6;
 
 /* This performs runtime checks that try to ensure:
  * 1. Geany ABI data types are compatible with this plugin.
@@ -97,17 +97,21 @@
 {
 	gchar	*name;			// name of plugin
 	gchar	*description;	// description of plugin
+	gchar	*version;		// version of plugin
+	gpointer reserved1;		// reserved for later use
+	gpointer reserved2;		// reserved for later use
 }
 PluginInfo;
 
 /* Sets the plugin name and a brief description of what it is. */
-#define PLUGIN_INFO(p_name, p_description) \
+#define PLUGIN_INFO(p_name, p_description, p_version) \
 	PluginInfo *info() \
 	{ \
 		static PluginInfo p_info; \
 		 \
 		p_info.name = (p_name); \
 		p_info.description = (p_description); \
+		p_info.version = (p_version); \
 		return &p_info; \
 	}
 

Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/src/prefs.c	2007-08-25 14:16:52 UTC (rev 1826)
@@ -165,6 +165,9 @@
 	on_show_notebook_tabs_toggled(GTK_TOGGLE_BUTTON(
 					lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs")), NULL);
 
+	widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross");
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.show_tab_cross);
+
 	widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor");
 	gtk_combo_box_set_active(GTK_COMBO_BOX(widget), prefs.tab_pos_editor);
 
@@ -541,6 +544,9 @@
 		widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_notebook_tabs");
 		prefs.show_notebook_tabs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
 
+		widget = lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross");
+		prefs.show_tab_cross = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+
 		widget = lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor");
 		prefs.tab_pos_editor = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
 
@@ -1085,6 +1091,7 @@
 
 	// tab placement only enabled when tabs are visible
 	gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "combo_tab_editor"), sens);
+	gtk_widget_set_sensitive(lookup_widget(ui_widgets.prefs_dialog, "check_show_tab_cross"), sens);
 }
 
 

Modified: trunk/src/prefs.h
===================================================================
--- trunk/src/prefs.h	2007-08-25 13:39:00 UTC (rev 1825)
+++ trunk/src/prefs.h	2007-08-25 14:16:52 UTC (rev 1826)
@@ -74,6 +74,7 @@
 	gboolean		strip_trailing_spaces;
 	gboolean		replace_tabs;
 	gboolean		tab_order_ltr;
+	gboolean		show_tab_cross;
 	guint			mru_length;
 
 	/* tools */


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list