Skip to content

Commit

Permalink
Added a preferences dialog that allows the highlight colors and
Browse files Browse the repository at this point in the history
overall color alpha to be changed (geany#545)

* Changes are saved/loaded to/from a .conf file
* Tested on linux mint 19.1 cinnamon, geany 1.35
  with gtk2 v2.24 and gtk3 v3.22
  • Loading branch information
PatrickGMM committed Jan 5, 2020
1 parent 0bfe89d commit b55fc8a
Show file tree
Hide file tree
Showing 5 changed files with 631 additions and 11 deletions.
1 change: 1 addition & 0 deletions build/pairtaghighlighter.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ AC_DEFUN([GP_CHECK_PAIRTAGHIGHLIGHTER],
AC_CONFIG_FILES([
pairtaghighlighter/Makefile
pairtaghighlighter/src/Makefile
pairtaghighlighter/data/Makefile
])
])
2 changes: 1 addition & 1 deletion pairtaghighlighter/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include $(top_srcdir)/build/vars.auxfiles.mk

SUBDIRS = src
SUBDIRS = src data
plugin = pairtaghighlighter
4 changes: 4 additions & 0 deletions pairtaghighlighter/data/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include $(top_srcdir)/build/vars.docs.mk
plugin = pairtaghighlighter

dist_plugindata_DATA = prefs.ui
225 changes: 225 additions & 0 deletions pairtaghighlighter/data/prefs.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="alpha-adjustment">
<property name="upper">255</property>
<property name="step_increment">1</property>
<property name="page_increment">-10</property>
</object>
<object class="GtkFrame" id="prefs-frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Color to highlight matching tag pairs</property>
<property name="label" translatable="yes">Matched pair:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">matching-pair-color-button</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="matching-pair-color-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Color to highlight matching tag pairs</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Color to highlight an unmatched tag</property>
<property name="label" translatable="yes">Unmatched tag:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">nonmatching-pair-color-button</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="nonmatching-pair-color-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Color to highlight an unmatched tag</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Color to highlight an empty tag
e.g. &lt;br&gt;</property>
<property name="label" translatable="yes">Empty tag:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">empty-tag-color-button</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="empty-tag-color-button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Color to highlight an empty tag
e.g. &lt;br&gt;</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Opaqueness of the highlight colors
Higher numbers are less transparent</property>
<property name="label" translatable="yes">Color alpha:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHScale" id="alpha-scale">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Opaqueness of the highlight colors
Higher numbers are less transparent</property>
<property name="adjustment">alpha-adjustment</property>
<property name="round_digits">1</property>
<property name="digits">0</property>
<property name="value_pos">left</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">10</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="defaults-button">
<property name="label" translatable="yes">Defaults</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Return highlight color settings to the defaults</property>
<property name="focus_on_click">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Highlight Colors</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</interface>
Loading

0 comments on commit b55fc8a

Please sign in to comment.