SF.net SVN: geany:[3468] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Jan 14 19:19:08 UTC 2009


Revision: 3468
          http://geany.svn.sourceforge.net/geany/?rev=3468&view=rev
Author:   eht16
Date:     2009-01-14 19:19:08 +0000 (Wed, 14 Jan 2009)

Log Message:
-----------
Add GUI pref to invert all colours for syntax highlighting.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/geany.glade
    trunk/src/highlighting.c
    trunk/src/interface.c
    trunk/src/keyfile.c
    trunk/src/plugindata.h
    trunk/src/ui_utils.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/ChangeLog	2009-01-14 19:19:08 UTC (rev 3468)
@@ -17,6 +17,9 @@
  * win32-config.h, src/makefile.win32:
    Fix Windows build: don't use GIO.
    Link against GIO anyways just to be safe with GTK 2.14.
+ * geany.glade, src/highlighting.c, src/interface.c, src/keyfile.c,
+   src/plugindata.h, src/ui_utils.h:
+   Add GUI pref to invert all colours for syntax highlighting.
 
 
 2009-01-12  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/geany.glade
===================================================================
--- trunk/geany.glade	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/geany.glade	2009-01-14 19:19:08 UTC (rev 3468)
@@ -5982,8 +5982,9 @@
 			      <property name="spacing">0</property>
 
 			      <child>
-				<widget class="GtkCheckButton" id="checkbutton1">
-				  <property name="tooltip" translatable="yes">Use white text on a black background.</property>
+				<widget class="GtkCheckButton" id="check_highlighting_invert">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Use white text on a black background and invert all colors. This option requires a restart of Geany.</property>
 				  <property name="can_focus">True</property>
 				  <property name="label" translatable="yes">Invert syntax highlighting colors</property>
 				  <property name="use_underline">True</property>

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/src/highlighting.c	2009-01-14 19:19:08 UTC (rev 3468)
@@ -35,6 +35,7 @@
 #include "utils.h"
 #include "filetypes.h"
 #include "symbols.h"
+#include "ui_utils.h"
 
 
 /* Note: Avoid using SSM in files not related to scintilla, use sciwrappers.h instead. */
@@ -427,6 +428,8 @@
 		common_style_set.styling[GCS_MARKER_TRANSLUCENCY].background = tmp_style.background;
 	}
 
+	common_style_set.invert_all = interface_prefs.highlighting_invert_all =
+		(common_style_set.invert_all || interface_prefs.highlighting_invert_all);
 	get_keyfile_wordchars(config, config_home, &common_style_set.wordchars);
 	whitespace_chars = get_keyfile_whitespace_chars(config, config_home);
 

Modified: trunk/src/interface.c
===================================================================
--- trunk/src/interface.c	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/src/interface.c	2009-01-14 19:19:08 UTC (rev 3468)
@@ -2454,7 +2454,7 @@
   GtkWidget *frame5;
   GtkWidget *alignment6;
   GtkWidget *vbox12;
-  GtkWidget *checkbutton1;
+  GtkWidget *check_highlighting_invert;
   GtkWidget *check_indent;
   GtkWidget *check_white_space;
   GtkWidget *check_line_end;
@@ -3626,9 +3626,10 @@
   gtk_widget_show (vbox12);
   gtk_container_add (GTK_CONTAINER (alignment6), vbox12);
 
-  checkbutton1 = gtk_check_button_new_with_mnemonic (_("Invert syntax highlighting colors"));
-  gtk_box_pack_start (GTK_BOX (vbox12), checkbutton1, FALSE, FALSE, 0);
-  gtk_tooltips_set_tip (tooltips, checkbutton1, _("Use white text on a black background."), NULL);
+  check_highlighting_invert = gtk_check_button_new_with_mnemonic (_("Invert syntax highlighting colors"));
+  gtk_widget_show (check_highlighting_invert);
+  gtk_box_pack_start (GTK_BOX (vbox12), check_highlighting_invert, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, check_highlighting_invert, _("Use white text on a black background and invert all colors. This option requires a restart of Geany."), NULL);
 
   check_indent = gtk_check_button_new_with_mnemonic (_("Show indentation guides"));
   gtk_widget_show (check_indent);
@@ -4695,7 +4696,7 @@
   GLADE_HOOKUP_OBJECT (prefs_dialog, frame5, "frame5");
   GLADE_HOOKUP_OBJECT (prefs_dialog, alignment6, "alignment6");
   GLADE_HOOKUP_OBJECT (prefs_dialog, vbox12, "vbox12");
-  GLADE_HOOKUP_OBJECT (prefs_dialog, checkbutton1, "checkbutton1");
+  GLADE_HOOKUP_OBJECT (prefs_dialog, check_highlighting_invert, "check_highlighting_invert");
   GLADE_HOOKUP_OBJECT (prefs_dialog, check_indent, "check_indent");
   GLADE_HOOKUP_OBJECT (prefs_dialog, check_white_space, "check_white_space");
   GLADE_HOOKUP_OBJECT (prefs_dialog, check_line_end, "check_line_end");

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/src/keyfile.c	2009-01-14 19:19:08 UTC (rev 3468)
@@ -121,6 +121,9 @@
 	stash_group_add_toggle_button(group, &interface_prefs.notebook_double_click_hides_widgets,
 		"notebook_double_click_hides_widgets", FALSE, "check_double_click_hides_widgets");
 
+	stash_group_add_toggle_button(group, &interface_prefs.highlighting_invert_all,
+		"highlighting_invert_all", FALSE, "check_highlighting_invert");
+
 	stash_group_add_toggle_button(group, &search_prefs.suppress_dialogs,
 		"pref_main_suppress_search_dialogs", FALSE, "check_ask_suppress_search_dialogs");
 	stash_group_add_toggle_button(group, &search_prefs.use_current_word,

Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/src/plugindata.h	2009-01-14 19:19:08 UTC (rev 3468)
@@ -45,7 +45,7 @@
 enum {
 	/** The Application Programming Interface (API) version, incremented
 	 * whenever any plugin data types are modified or appended to. */
-	GEANY_API_VERSION = 124,
+	GEANY_API_VERSION = 125,
 
 	/** The Application Binary Interface (ABI) version, incremented whenever
 	 * existing fields in the plugin data types have to be changed or reordered. */

Modified: trunk/src/ui_utils.h
===================================================================
--- trunk/src/ui_utils.h	2009-01-14 18:38:31 UTC (rev 3467)
+++ trunk/src/ui_utils.h	2009-01-14 19:19:08 UTC (rev 3468)
@@ -49,6 +49,7 @@
 	gboolean		statusbar_visible;
 	gboolean		show_symbol_list_expanders;
 	gboolean		notebook_double_click_hides_widgets;
+	gboolean		highlighting_invert_all;
 }
 GeanyInterfacePrefs;
 


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