From 27ba2db70e33c9fa436b29525b057a2dd2ea241c Mon Sep 17 00:00:00 2001 From: Leonardo Boshell Date: Wed, 7 Jul 2004 21:03:11 +0000 Subject: Patch fixes highlight syntax preferences dialog. Resolves bug #50654. --- app-editors/gedit/ChangeLog | 9 +- app-editors/gedit/Manifest | 12 +- app-editors/gedit/files/digest-gedit-2.6.1-r1 | 1 + .../gedit/files/gedit-2.4.0-fix_LC_ALL.patch | 29 ---- .../gedit/files/gedit-2.6.1-highlight_fix.patch | 179 +++++++++++++++++++++ app-editors/gedit/gedit-2.6.1-r1.ebuild | 38 +++++ 6 files changed, 233 insertions(+), 35 deletions(-) create mode 100644 app-editors/gedit/files/digest-gedit-2.6.1-r1 delete mode 100644 app-editors/gedit/files/gedit-2.4.0-fix_LC_ALL.patch create mode 100644 app-editors/gedit/files/gedit-2.6.1-highlight_fix.patch create mode 100644 app-editors/gedit/gedit-2.6.1-r1.ebuild (limited to 'app-editors') diff --git a/app-editors/gedit/ChangeLog b/app-editors/gedit/ChangeLog index 0706819f9c1f..0d70a411ade0 100644 --- a/app-editors/gedit/ChangeLog +++ b/app-editors/gedit/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-editors/gedit # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/gedit/ChangeLog,v 1.65 2004/07/03 19:20:07 kloeri Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/gedit/ChangeLog,v 1.66 2004/07/07 21:03:11 leonardop Exp $ + +*gedit-2.6.1-r1 (07 Jul 2004) + + 07 Jul 2004; L. Boshell gedit-2.6.1-r1.ebuild, + files/gedit-2.6.1-highlight_fix.patch: + Added patch from Gnome's CVS to fix broken behaviour on the highlight + syntax preferences dialog. Resolves bug #50654. 03 Jul 2004; Bryan Østergaard gedit-2.6.0.ebuild: Stable on alpha. diff --git a/app-editors/gedit/Manifest b/app-editors/gedit/Manifest index af8a646fd679..67d988a29e5d 100644 --- a/app-editors/gedit/Manifest +++ b/app-editors/gedit/Manifest @@ -1,12 +1,14 @@ -MD5 c8c3159eef4c62a9d93191924d9b316d gedit-2.6.1.ebuild 867 +MD5 affa8fd9eab4fad722a825865811a0b4 ChangeLog 8103 MD5 0d0b886c6d1f81ec1c30752210de8e70 gedit-0.9.6-r1.ebuild 903 MD5 eb67912bf9e81408c283f720c3ff1c29 gedit-2.6.0.ebuild 859 MD5 e571e4929f75c136060c2ffb2e91c9f0 gedit-2.4.1.ebuild 1204 -MD5 6d0c78d4139564c360ed6859575aad14 ChangeLog 7833 +MD5 c8c3159eef4c62a9d93191924d9b316d gedit-2.6.1.ebuild 867 +MD5 660c99bff4054f5e62a0accf906fe63b gedit-2.6.1-r1.ebuild 1015 MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 -MD5 871bd845733e2e5c91dd3b17f1103037 files/gedit-2.4.0-64bit-fix.patch 433 -MD5 f7c3aa15d4ccd75179194ddd7b8c9fdd files/gedit-2.4.0-fix_LC_ALL.patch 679 MD5 b1cd4f5d4adf64b0c6ce68ebe818a495 files/digest-gedit-0.9.6-r1 64 +MD5 871bd845733e2e5c91dd3b17f1103037 files/gedit-2.4.0-64bit-fix.patch 433 MD5 a3fb1841d3eff85ac58e00977c2c009c files/digest-gedit-2.4.1 65 -MD5 e3f41ced499666436b48a9c143e048d3 files/digest-gedit-2.6.0 65 MD5 eb7fc2623c2ebfe67125e5bc1fd3850d files/digest-gedit-2.6.1 65 +MD5 e3f41ced499666436b48a9c143e048d3 files/digest-gedit-2.6.0 65 +MD5 eb7fc2623c2ebfe67125e5bc1fd3850d files/digest-gedit-2.6.1-r1 65 +MD5 f6238e63bd76f7217d37c9993476dba5 files/gedit-2.6.1-highlight_fix.patch 6941 diff --git a/app-editors/gedit/files/digest-gedit-2.6.1-r1 b/app-editors/gedit/files/digest-gedit-2.6.1-r1 new file mode 100644 index 000000000000..0fbc24800ba4 --- /dev/null +++ b/app-editors/gedit/files/digest-gedit-2.6.1-r1 @@ -0,0 +1 @@ +MD5 4b70327b3a4c11727a4443ae6516b31c gedit-2.6.1.tar.bz2 2165844 diff --git a/app-editors/gedit/files/gedit-2.4.0-fix_LC_ALL.patch b/app-editors/gedit/files/gedit-2.4.0-fix_LC_ALL.patch deleted file mode 100644 index eb5a6aa81e49..000000000000 --- a/app-editors/gedit/files/gedit-2.4.0-fix_LC_ALL.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -NurB gedit-2.4.0-orig/gedit/gedit2.c gedit-2.4.0/gedit/gedit2.c ---- gedit-2.4.0-orig/gedit/gedit2.c 2003-08-22 05:44:01.000000000 -0500 -+++ gedit-2.4.0/gedit/gedit2.c 2003-09-14 10:26:06.000000000 -0500 -@@ -32,6 +32,10 @@ - #include - #endif - -+#ifdef HAVE_LOCALE_H -+#include -+#endif -+ - #include - - #include -@@ -347,11 +351,13 @@ - int - main (int argc, char **argv) - { -- GnomeProgram *program; -+ GnomeProgram *program; - gboolean restored = FALSE; - CORBA_Object factory; - -+#ifdef HAVE_LOCALE_H - setlocale (LC_ALL, ""); -+#endif - - bindtextdomain (GETTEXT_PACKAGE, GEDIT_LOCALEDIR); - textdomain (GETTEXT_PACKAGE); diff --git a/app-editors/gedit/files/gedit-2.6.1-highlight_fix.patch b/app-editors/gedit/files/gedit-2.6.1-highlight_fix.patch new file mode 100644 index 000000000000..55e6f630e3eb --- /dev/null +++ b/app-editors/gedit/files/gedit-2.6.1-highlight_fix.patch @@ -0,0 +1,179 @@ +diff -NurdB gedit-2.6.1-orig/gedit/dialogs/gedit-preferences-dialog.c gedit-2.6.1/gedit/dialogs/gedit-preferences-dialog.c +--- gedit-2.6.1-orig/gedit/dialogs/gedit-preferences-dialog.c 2004-07-07 15:30:17 -0500 ++++ gedit-2.6.1/gedit/dialogs/gedit-preferences-dialog.c 2004-07-07 15:30:33 -0500 +@@ -867,69 +867,6 @@ + } + + static void +-styles_cb (GtkWidget *treeview, +- GeditPreferencesDialog *dlg) +-{ +- GtkSourceTagStyle *style; +- +- style = get_selected_style (dlg); +- g_return_if_fail (style != NULL); +- +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->bold_togglebutton), +- style->bold); +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->italic_togglebutton), +- style->italic); +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->underline_togglebutton), +- style->underline); +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->strikethrough_togglebutton), +- style->strikethrough); +- +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->foreground_checkbutton), +- style->mask & GTK_SOURCE_TAG_STYLE_USE_FOREGROUND); +- +- if ((style->mask & GTK_SOURCE_TAG_STYLE_USE_FOREGROUND) == GTK_SOURCE_TAG_STYLE_USE_FOREGROUND) +- { +- gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->foreground_colorbutton), +- &style->foreground); +- } +- else +- { +- GdkColor text_color; +- +- text_color = gedit_prefs_manager_get_text_color (); +- gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->foreground_colorbutton), +- &text_color); +- } +- +- gtk_widget_set_sensitive (dlg->foreground_colorbutton, +- style->mask & GTK_SOURCE_TAG_STYLE_USE_FOREGROUND); +- +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->background_checkbutton), +- style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND); +- +- if ((style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND) == GTK_SOURCE_TAG_STYLE_USE_BACKGROUND) +- { +- gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->background_colorbutton_2), +- &style->background); +- } +- else +- { +- GdkColor background_color; +- +- background_color = gedit_prefs_manager_get_background_color (); +- gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->background_colorbutton_2), +- &background_color); +- } +- +- gtk_widget_set_sensitive (dlg->background_colorbutton_2, +- style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND); +- +- gtk_widget_set_sensitive (dlg->reset_button, !style->is_default); +- +- gtk_source_tag_style_free (style); +-} +- +-static void + style_button_toggled (GtkToggleButton *button, + GeditPreferencesDialog *dlg) + { +@@ -1037,6 +974,105 @@ + } + + static void ++styles_cb (GtkWidget *treeview, ++ GeditPreferencesDialog *dlg) ++{ ++ GtkSourceTagStyle *style; ++ ++ style = get_selected_style (dlg); ++ g_return_if_fail (style != NULL); ++ ++ /* we must block callbacks while setting the new values */ ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->bold_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->italic_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->underline_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->strikethrough_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->foreground_checkbutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->background_checkbutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->foreground_colorbutton), ++ G_CALLBACK (style_color_set), dlg); ++ g_signal_handlers_block_by_func (G_OBJECT (dlg->background_colorbutton_2), ++ G_CALLBACK (style_color_set), dlg); ++ ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->bold_togglebutton), ++ style->bold); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->italic_togglebutton), ++ style->italic); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->underline_togglebutton), ++ style->underline); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->strikethrough_togglebutton), ++ style->strikethrough); ++ ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->foreground_checkbutton), ++ style->mask & GTK_SOURCE_TAG_STYLE_USE_FOREGROUND); ++ ++ if ((style->mask & GTK_SOURCE_TAG_STYLE_USE_FOREGROUND) == GTK_SOURCE_TAG_STYLE_USE_FOREGROUND) ++ { ++ gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->foreground_colorbutton), ++ &style->foreground); ++ } ++ else ++ { ++ GdkColor text_color; ++ ++ text_color = gedit_prefs_manager_get_text_color (); ++ gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->foreground_colorbutton), ++ &text_color); ++ } ++ ++ gtk_widget_set_sensitive (dlg->foreground_colorbutton, ++ style->mask & GTK_SOURCE_TAG_STYLE_USE_FOREGROUND); ++ ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dlg->background_checkbutton), ++ style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND); ++ ++ if ((style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND) == GTK_SOURCE_TAG_STYLE_USE_BACKGROUND) ++ { ++ gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->background_colorbutton_2), ++ &style->background); ++ } ++ else ++ { ++ GdkColor background_color; ++ ++ background_color = gedit_prefs_manager_get_background_color (); ++ gtk_color_button_set_color (GTK_COLOR_BUTTON (dlg->background_colorbutton_2), ++ &background_color); ++ } ++ ++ gtk_widget_set_sensitive (dlg->background_colorbutton_2, ++ style->mask & GTK_SOURCE_TAG_STYLE_USE_BACKGROUND); ++ ++ gtk_widget_set_sensitive (dlg->reset_button, !style->is_default); ++ ++ /* reenable callbacks */ ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->bold_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->italic_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->underline_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->strikethrough_togglebutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->foreground_checkbutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->background_checkbutton), ++ G_CALLBACK (style_button_toggled), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->foreground_colorbutton), ++ G_CALLBACK (style_color_set), dlg); ++ g_signal_handlers_unblock_by_func (G_OBJECT (dlg->background_colorbutton_2), ++ G_CALLBACK (style_color_set), dlg); ++ ++ gtk_source_tag_style_free (style); ++} ++ ++static void + reset_button_clicked (GtkButton *button, + GeditPreferencesDialog *dlg) + { diff --git a/app-editors/gedit/gedit-2.6.1-r1.ebuild b/app-editors/gedit/gedit-2.6.1-r1.ebuild new file mode 100644 index 000000000000..b73fcf9276b4 --- /dev/null +++ b/app-editors/gedit/gedit-2.6.1-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/gedit/gedit-2.6.1-r1.ebuild,v 1.1 2004/07/07 21:03:11 leonardop Exp $ + +inherit eutils gnome2 + +DESCRIPTION="A text editor for the Gnome2 desktop" +HOMEPAGE="http://www.gnome.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~hppa ~amd64 ~ia64" +IUSE="spell" + +RDEPEND=">=gnome-base/libglade-2.3.6 + >=dev-libs/popt-1.5 + >=gnome-base/eel-2.6 + >=gnome-base/gconf-2 + >=gnome-base/libgnomeui-2.6 + >=gnome-base/libgnomeprintui-2.6 + >=x11-libs/gtksourceview-1 + spell? ( virtual/aspell-dict )" +# FIXME : spell autodetect only +DEPEND="${RDEPEND} + sys-devel/gettext + >=dev-util/pkgconfig-0.12.0 + >=app-text/scrollkeeper-0.3.11 + >=dev-util/intltool-0.29" + +DOCS="AUTHORS BUGS ChangeLog INSTALL NEWS README THANKS TODO" + +src_unpack() { + unpack ${A} + cd ${S} + + # Fix preferences dialog issues. See bug #50654. + epatch ${FILESDIR}/${P}-highlight_fix.patch +} -- cgit v1.2.3-65-gdbad