diff options
author | Pacho Ramos <pacho@gentoo.org> | 2010-06-18 13:10:29 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2010-06-18 13:10:29 +0000 |
commit | 7effbfde21d8f075174c937ce4792027a9602d42 (patch) | |
tree | e08acad25bc7932c4896d436eaa983d44055e959 /app-editors/gedit-plugins | |
parent | Remove entry for zen-sources rc ebuilds (diff) | |
download | gentoo-2-7effbfde21d8f075174c937ce4792027a9602d42.tar.gz gentoo-2-7effbfde21d8f075174c937ce4792027a9602d42.tar.bz2 gentoo-2-7effbfde21d8f075174c937ce4792027a9602d42.zip |
Version bump for Gnome 2.30
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'app-editors/gedit-plugins')
9 files changed, 643 insertions, 1 deletions
diff --git a/app-editors/gedit-plugins/ChangeLog b/app-editors/gedit-plugins/ChangeLog index df11a47ba895..5617446585fe 100644 --- a/app-editors/gedit-plugins/ChangeLog +++ b/app-editors/gedit-plugins/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for app-editors/gedit-plugins # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/gedit-plugins/ChangeLog,v 1.7 2010/03/08 23:44:07 eva Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/gedit-plugins/ChangeLog,v 1.8 2010/06/18 13:10:29 pacho Exp $ + +*gedit-plugins-2.30.0 (18 Jun 2010) + + 18 Jun 2010; Pacho Ramos <pacho@gentoo.org> +gedit-plugins-2.30.0.ebuild, + +files/gedit-plugins-2.30.0-background-color.patch, + +files/gedit-plugins-2.30.0-commander-menu.patch, + +files/gedit-plugins-2.30.0-copy-paste.patch, + +files/gedit-plugins-2.30.0-edit-menu.patch, + +files/gedit-plugins-2.30.0-find-replace.patch, + +files/gedit-plugins-2.30.0-keybinding-toggle.patch, + +files/gedit-plugins-2.30.0-replace-all.patch: + Version bump for Gnome 2.30 08 Mar 2010; Gilles Dartiguelongue <eva@gentoo.org> gedit-plugins-2.28.0.ebuild: diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-background-color.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-background-color.patch new file mode 100644 index 000000000000..6965b85c6c1d --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-background-color.patch @@ -0,0 +1,48 @@ +From 37a1648c30cbc23d5425c34f6db29aeebf330800 Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse.vandenkieboom@epfl.ch> +Date: Mon, 03 May 2010 11:43:40 +0000 +Subject: Fix background color of the commander entry + +--- +diff --git a/plugins/commander/commander/entry.py b/plugins/commander/commander/entry.py +index 4e864d7..36ed4e1 100644 +--- a/plugins/commander/commander/entry.py ++++ b/plugins/commander/commander/entry.py +@@ -98,8 +98,9 @@ class Entry(gtk.EventBox): + ct.rectangle(evnt.area.x, evnt.area.y, evnt.area.width, evnt.area.height) + + bg = self.background_color() +- ct.set_source_rgb(bg[0], bg[1], bg[1]) ++ ct.set_source_rgb(bg[0], bg[1], bg[2]) + ct.fill() ++ + return False + + def on_expose(self, widget, evnt): +@@ -143,8 +144,22 @@ class Entry(gtk.EventBox): + + def background_color(self): + bg = self._view.get_style().base[self._view.state] +- +- return [bg.red / 65535.0 * 1.1, bg.green / 65535.0 * 1.1, bg.blue / 65535.0 * 0.9, 0.8] ++ ++ vals = [bg.red, bg.green, bg.blue, 1] ++ ++ for i in range(3): ++ val = vals[i] / 65535.0 ++ ++ if val < 0.0001: ++ vals[i] = 0.1 ++ elif val > 0.9999: ++ vals[i] = 0.9 ++ elif val < 0.1: ++ vals[i] = val * 1.2 ++ else: ++ vals[i] = val * 0.8 ++ ++ return vals + + def on_entry_focus_out(self, widget, evnt): + if self._entry.flags() & gtk.SENSITIVE: +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-commander-menu.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-commander-menu.patch new file mode 100644 index 000000000000..588653221062 --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-commander-menu.patch @@ -0,0 +1,107 @@ +From ad60cf271784d10aa6fadf9bef6254f8f1df82ad Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse.vandenkieboom@epfl.ch> +Date: Mon, 03 May 2010 11:46:58 +0000 +Subject: Added commander toggle menu item + +--- +diff --git a/plugins/commander/commander/windowhelper.py b/plugins/commander/commander/windowhelper.py +index 15dc787..9c71f28 100644 +--- a/plugins/commander/commander/windowhelper.py ++++ b/plugins/commander/commander/windowhelper.py +@@ -2,43 +2,79 @@ import gedit + import gtk + from entry import Entry + from info import Info ++from gpdefs import * ++ ++try: ++ gettext.bindtextdomain(GETTEXT_PACKAGE, GP_LOCALEDIR) ++ _ = lambda s: gettext.dgettext(GETTEXT_PACKAGE, s); ++except: ++ _ = lambda s: s ++ ++ui_str = """ ++<ui> ++ <menubar name="MenuBar"> ++ <menu name="EditMenu" action="Edit"> ++ <placeholder name="EditOps_5"> ++ <menuitem name="CommanderEditMode" action="CommanderModeAction"/> ++ </placeholder> ++ </menu> ++ </menubar> ++</ui> ++""" + + class WindowHelper: + def __init__(self, plugin, window): + self._window = window + self._plugin = plugin + self._entry = None +- accel_path = '<gedit>/plugins/commander/activate' ++ self._view = None + +- accel = gtk.accel_map_lookup_entry(accel_path) ++ self.install_ui() + +- if accel == None: +- gtk.accel_map_add_entry(accel_path, gtk.keysyms.period, gtk.gdk.CONTROL_MASK) ++ def install_ui(self): ++ manager = self._window.get_ui_manager() ++ ++ self._action_group = gtk.ActionGroup("GeditCommanderPluginActions") ++ self._action_group.add_toggle_actions([('CommanderModeAction', None, _('Commander Mode'), '<Ctrl>period', _('Start commander mode'), self.on_commander_mode)]) ++ ++ manager.insert_action_group(self._action_group, -1) ++ self._merge_id = manager.add_ui_from_string(ui_str) ++ ++ def uninstall_ui(self): ++ manager = self._window.get_ui_manager() ++ manager.remove_ui(self._merge_id) ++ manager.remove_action_group(self._action_group) ++ ++ manager.ensure_update() + +- self._accel = gtk.AccelGroup() +- self._accel.connect_by_path(accel_path, self._do_command) +- self._window.add_accel_group(self._accel) +- + def deactivate(self): +- self._window.remove_accel_group(self._accel) ++ self.uninstall_ui() ++ + self._window = None + self._plugin = None + + def update_ui(self): + pass +- +- def _do_command(self, group, obj, keyval, mod): ++ ++ def on_commander_mode(self, action): + view = self._window.get_active_view() + + if not view: + return False + +- if not self._entry: +- self._entry = Entry(self._window.get_active_view()) +- self._entry.connect('destroy', self.on_entry_destroy) ++ if action.get_active(): ++ if not self._entry or view != self._view: ++ self._entry = Entry(view) ++ self._entry.connect('destroy', self.on_entry_destroy) ++ ++ self._entry.grab_focus() ++ self._view = view ++ elif self._entry: ++ self._entry.destroy() ++ self._view = None + +- self._entry.grab_focus() + return True + + def on_entry_destroy(self, widget): + self._entry = None ++ self._action_group.get_action('CommanderModeAction').set_active(False) +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-copy-paste.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-copy-paste.patch new file mode 100644 index 000000000000..4d15075b0bf8 --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-copy-paste.patch @@ -0,0 +1,62 @@ +From 0372583cc0af915e84558caa515429bbb372358d Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse@icecrew.nl> +Date: Thu, 29 Apr 2010 17:05:40 +0000 +Subject: Add Ctrl+Shift+C/V copy paste accelerators to terminal + +--- +diff --git a/plugins/terminal/terminal.py b/plugins/terminal/terminal.py +index 902b424..28ee996 100644 +--- a/plugins/terminal/terminal.py ++++ b/plugins/terminal/terminal.py +@@ -94,6 +94,19 @@ class GeditTerminal(gtk.HBox): + self._vte.connect("popup-menu", self.on_vte_popup_menu) + self._vte.connect("child-exited", lambda term: term.fork_command()) + ++ self._accel_base = '<gedit>/plugins/terminal' ++ self._accels = { ++ 'copy-clipboard': [gtk.keysyms.C, gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK, self.copy_clipboard], ++ 'paste-clipboard': [gtk.keysyms.V, gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK, self.paste_clipboard] ++ } ++ ++ for name in self._accels: ++ path = self._accel_base + '/' + name ++ accel = gtk.accel_map_lookup_entry(path) ++ ++ if accel == None: ++ gtk.accel_map_add_entry(path, self._accels[name][0], self._accels[name][1]) ++ + self._vte.fork_command() + + def do_grab_focus(self): +@@ -196,6 +209,15 @@ class GeditTerminal(gtk.HBox): + elif modifiers == gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK: + self.get_toplevel().child_focus(gtk.DIR_TAB_BACKWARD) + return True ++ ++ for name in self._accels: ++ path = self._accel_base + '/' + name ++ entry = gtk.accel_map_lookup_entry(path) ++ ++ if entry and entry[0] == event.keyval and entry[1] == modifiers: ++ self._accels[name][2]() ++ return True ++ + return False + + def on_vte_button_press(self, term, event): +@@ -212,11 +234,13 @@ class GeditTerminal(gtk.HBox): + + item = gtk.ImageMenuItem(gtk.STOCK_COPY) + item.connect("activate", lambda menu_item: self.copy_clipboard()) ++ item.set_accel_path(self._accel_base + '/copy-clipboard') + item.set_sensitive(self._vte.get_has_selection()) + menu.append(item) + + item = gtk.ImageMenuItem(gtk.STOCK_PASTE) + item.connect("activate", lambda menu_item: self.paste_clipboard()) ++ item.set_accel_path(self._accel_base + '/paste-clipboard') + menu.append(item) + + self.emit("populate-popup", menu) +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-edit-menu.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-edit-menu.patch new file mode 100644 index 000000000000..85a2b9afffaf --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-edit-menu.patch @@ -0,0 +1,121 @@ +From 0c4ef746e91cb8987430b89f22cb4699e06410fe Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse.vandenkieboom@epfl.ch> +Date: Mon, 03 May 2010 11:48:21 +0000 +Subject: Make multi edit menu item proper toggle item + +--- +diff --git a/plugins/multiedit/multiedit/documenthelper.py b/plugins/multiedit/multiedit/documenthelper.py +index 58ccac7..df08c7f 100644 +--- a/plugins/multiedit/multiedit/documenthelper.py ++++ b/plugins/multiedit/multiedit/documenthelper.py +@@ -69,6 +69,16 @@ class DocumentHelper(Signals): + self.reset_buffer(self._view.get_buffer()) + + self.initialize_event_handlers() ++ self.toggle_callback = None ++ ++ def get_view(self): ++ return self._view ++ ++ def set_toggle_callback(self, callback, data): ++ self.toggle_callback = lambda: callback(data) ++ ++ def enabled(self): ++ return self._in_mode + + def _update_selection_tag(self): + style = self._view.get_style() +@@ -147,12 +157,21 @@ class DocumentHelper(Signals): + self._view.set_border_window_size(gtk.TEXT_WINDOW_TOP, 0) + self.remove_edit_points() + ++ if self.toggle_callback: ++ self.toggle_callback() ++ + def enable_multi_edit(self): + self._view.set_border_window_size(gtk.TEXT_WINDOW_TOP, 20) + self._in_mode = True + +- def toggle_multi_edit(self): +- if self._in_mode: ++ if self.toggle_callback: ++ self.toggle_callback() ++ ++ def toggle_multi_edit(self, enabled): ++ if self.enabled() == enabled: ++ return ++ ++ if self.enabled(): + self.disable_multi_edit() + else: + self.enable_multi_edit() +diff --git a/plugins/multiedit/multiedit/windowhelper.py b/plugins/multiedit/multiedit/windowhelper.py +index d9941ae..adae3af 100644 +--- a/plugins/multiedit/multiedit/windowhelper.py ++++ b/plugins/multiedit/multiedit/windowhelper.py +@@ -58,14 +58,15 @@ class WindowHelper(Signals): + + self.connect_signal(window, 'tab-added', self.on_tab_added) + self.connect_signal(window, 'tab-removed', self.on_tab_removed) +- ++ self.connect_signal(window, 'active-tab-changed', self.on_active_tab_changed) ++ + self.install_ui() + + def install_ui(self): + manager = self._window.get_ui_manager() + + self._action_group = gtk.ActionGroup("GeditMultiEditPluginActions") +- self._action_group.add_actions( ++ self._action_group.add_toggle_actions( + [('MultiEditModeAction', None, _('Multi Edit Mode'), '<Ctrl><Shift>C', _('Start multi edit mode'), self.on_multi_edit_mode)]) + + manager.insert_action_group(self._action_group, -1) +@@ -95,26 +96,40 @@ class WindowHelper(Signals): + def add_document_helper(self, view): + if view.get_data(constants.DOCUMENT_HELPER_KEY) != None: + return +- +- DocumentHelper(view) ++ ++ helper = DocumentHelper(view) ++ helper.set_toggle_callback(self.on_multi_edit_toggled, helper) + + def remove_document_helper(self, view): + helper = view.get_data(constants.DOCUMENT_HELPER_KEY) + + if helper != None: + helper.stop() +- ++ ++ def get_action(self): ++ return self._action_group.get_action('MultiEditModeAction') ++ ++ def on_multi_edit_toggled(self, helper): ++ if helper.get_view() == self._window.get_active_view(): ++ self.get_action().set_active(helper.enabled()) ++ + def on_tab_added(self, window, tab): + self.add_document_helper(tab.get_view()) + + def on_tab_removed(self, window, tab): + self.remove_document_helper(tab.get_view()) +- ++ ++ def on_active_tab_changed(self, window, tab): ++ view = tab.get_view() ++ helper = view.get_data(constants.DOCUMENT_HELPER_KEY) ++ ++ self.get_action().set_active(helper != None and helper.enabled()) ++ + def on_multi_edit_mode(self, action): + view = self._window.get_active_view() + helper = view.get_data(constants.DOCUMENT_HELPER_KEY) + + if helper != None: +- helper.toggle_multi_edit() ++ helper.toggle_multi_edit(self.get_action().get_active()) + + # ex:ts=4:et: +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-find-replace.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-find-replace.patch new file mode 100644 index 000000000000..5cdda2a17f47 --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-find-replace.patch @@ -0,0 +1,64 @@ +From 30ede3f5966a87b7cc3591dc3ea856855abf953a Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse@icecrew.nl> +Date: Sun, 11 Apr 2010 20:27:18 +0000 +Subject: Fix issues with find/replace in selections + +--- +diff --git a/plugins/commander/modules/find/finder.py b/plugins/commander/modules/find/finder.py +index eb732b9..3abc16b 100644 +--- a/plugins/commander/modules/find/finder.py ++++ b/plugins/commander/modules/find/finder.py +@@ -71,15 +71,19 @@ class Finder: + ret = self.do_find(bounds) + + # Check if we need to wrap around if nothing is found +- startiter = buf.get_iter_at_mark(self.search_start_mark) ++ if self.search_start_mark: ++ startiter = buf.get_iter_at_mark(self.search_start_mark) ++ else: ++ startiter = None ++ + startbound = buf.get_iter_at_mark(self.search_boundaries.start) + +- if not ret and not self.from_start and not startiter.equal(startbound): ++ if not ret and not self.from_start and (startiter and not startiter.equal(startbound)): + self.from_start = True + + # Try from beginning + bounds[0] = buf.get_start_iter() +- bounds[1] = buf.get_iter_at_mark(self.search_start_mark) ++ bounds[1] = startiter + + # Make sure to just stop at the start of the previous + self.search_boundaries.end = self.search_start_mark +@@ -131,6 +135,9 @@ class Finder: + # end, and then continue to start from the beginning of the buffer if needed + bounds = list(buf.get_bounds()) + self.search_start_mark = buf.create_mark(None, buf.get_iter_at_mark(buf.get_insert()), True) ++ selection = False ++ else: ++ selection = True + + bounds[0].order(bounds[1]) + +@@ -139,7 +146,10 @@ class Finder: + self.search_boundaries.end = self._create_or_move(Finder.FIND_ENDMARK, bounds[1], False) + + # Set the result marks so the next find will start at the correct location +- piter = buf.get_iter_at_mark(buf.get_insert()) ++ if selection: ++ piter = bounds[0] ++ else: ++ piter = buf.get_iter_at_mark(buf.get_insert()) + + self.find_result.start = self._create_or_move(Finder.FIND_RESULT_STARTMARK, piter, True) + self.find_result.end = self._create_or_move(Finder.FIND_RESULT_ENDMARK, piter, False) +@@ -270,4 +280,4 @@ class Finder: + buf.end_user_action() + + self.cancel() +- yield commands.result.DONE +\ No newline at end of file ++ yield commands.result.DONE +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-keybinding-toggle.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-keybinding-toggle.patch new file mode 100644 index 000000000000..b7c8e5a55020 --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-keybinding-toggle.patch @@ -0,0 +1,68 @@ +From f02718befc0f65350a90acc636106d8f9377c252 Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse@icecrew.nl> +Date: Sat, 01 May 2010 15:10:42 +0000 +Subject: Make multi edit keybinding toggle multi edit mode + +--- +diff --git a/plugins/multiedit/multiedit/documenthelper.py b/plugins/multiedit/multiedit/documenthelper.py +index 44937a8..58ccac7 100644 +--- a/plugins/multiedit/multiedit/documenthelper.py ++++ b/plugins/multiedit/multiedit/documenthelper.py +@@ -138,13 +138,24 @@ class DocumentHelper(Signals): + for handler in self._event_handlers: + handler[0] = map(lambda x: gtk.gdk.keyval_from_name(x), handler[0]) + ++ def disable_multi_edit(self): ++ if self._column_mode: ++ self._cancel_column_mode() ++ ++ self._in_mode = False ++ ++ self._view.set_border_window_size(gtk.TEXT_WINDOW_TOP, 0) ++ self.remove_edit_points() ++ + def enable_multi_edit(self): + self._view.set_border_window_size(gtk.TEXT_WINDOW_TOP, 20) ++ self._in_mode = True + ++ def toggle_multi_edit(self): + if self._in_mode: +- return +- +- self._in_mode = True ++ self.disable_multi_edit() ++ else: ++ self.enable_multi_edit() + + def remove_edit_points(self): + buf = self._buffer +@@ -156,15 +167,6 @@ class DocumentHelper(Signals): + self._multi_edited = False + self._view.queue_draw() + +- def disable_multi_edit(self): +- if self._column_mode: +- self._cancel_column_mode() +- +- self._in_mode = False +- +- self._view.set_border_window_size(gtk.TEXT_WINDOW_TOP, 0) +- self.remove_edit_points() +- + def do_escape_mode(self, event): + if self._column_mode: + self._cancel_column_mode() +diff --git a/plugins/multiedit/multiedit/windowhelper.py b/plugins/multiedit/multiedit/windowhelper.py +index 63ac0ef..d9941ae 100644 +--- a/plugins/multiedit/multiedit/windowhelper.py ++++ b/plugins/multiedit/multiedit/windowhelper.py +@@ -115,6 +115,6 @@ class WindowHelper(Signals): + helper = view.get_data(constants.DOCUMENT_HELPER_KEY) + + if helper != None: +- helper.enable_multi_edit() ++ helper.toggle_multi_edit() + + # ex:ts=4:et: +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-replace-all.patch b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-replace-all.patch new file mode 100644 index 000000000000..03510afb15ec --- /dev/null +++ b/app-editors/gedit-plugins/files/gedit-plugins-2.30.0-replace-all.patch @@ -0,0 +1,53 @@ +From facc66d97ee959309ce7900553cc1f7a6517c394 Mon Sep 17 00:00:00 2001 +From: Jesse van den Kieboom <jesse@icecrew.nl> +Date: Thu, 29 Apr 2010 17:15:09 +0000 +Subject: Improved handling of scrolling for replace-all command + +--- +diff --git a/plugins/commander/modules/find/finder.py b/plugins/commander/modules/find/finder.py +index 3abc16b..bc453f1 100644 +--- a/plugins/commander/modules/find/finder.py ++++ b/plugins/commander/modules/find/finder.py +@@ -195,7 +195,7 @@ class Finder: + + self.cancel() + yield commands.result.DONE +- ++ + def _restore_cursor(self, mark): + buf = mark.get_buffer() + +@@ -221,10 +221,16 @@ class Finder: + + if not ret: + yield commands.result.DONE +- ++ ++ self.scroll_back = False ++ + # Then ask for the replacement string + if not self.replacestr: + try: ++ if replaceall: ++ self.scroll_back = True ++ self.select_last_result() ++ + replacestr, words, modifier = (yield commands.result.Prompt('Replace with:')) + self.set_replace(replacestr) + except GeneratorExit, e: +@@ -272,10 +278,11 @@ class Finder: + buf.end_user_action() + + self.cancel() +- raise e ++ raise e + + if replaceall: +- self._restore_cursor(startmark) ++ if self.scroll_back: ++ self._restore_cursor(startmark) + + buf.end_user_action() + +-- +cgit v0.8.3.1 diff --git a/app-editors/gedit-plugins/gedit-plugins-2.30.0.ebuild b/app-editors/gedit-plugins/gedit-plugins-2.30.0.ebuild new file mode 100644 index 000000000000..ebf675fd2ba0 --- /dev/null +++ b/app-editors/gedit-plugins/gedit-plugins-2.30.0.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/gedit-plugins/gedit-plugins-2.30.0.ebuild,v 1.1 2010/06/18 13:10:29 pacho Exp $ + +EAPI="2" +GCONF_DEBUG="no" + +inherit gnome2 multilib python eutils + +DESCRIPTION="Offical plugins for gedit." +HOMEPAGE="http://live.gnome.org/GeditPlugins" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +SLOT="0" + +IUSE="bookmarks +bracketcompletion charmap colorpicker +drawspaces +joinlines python +session showtabbar smartspaces terminal" + +RDEPEND=">=x11-libs/gtk+-2.14 + gnome-base/gconf + >=x11-libs/gtksourceview-2.6 + >=app-editors/gedit-2.29.3[python] + >=dev-python/pygtk-2.14 + charmap? ( + >=gnome-extra/gucharmap-2.24.3 + ) + session? ( + dev-lang/python[xml] + ) + python? ( + >=dev-python/pygtksourceview-2.2.0 + ) + terminal? ( + >=x11-libs/vte-0.19.4[python] + )" +DEPEND="${RDEPEND} + dev-util/pkgconfig + dev-util/intltool" + +DOCS="AUTHORS NEWS ChangeLog*" + +pkg_setup() { + local myplugins="codecomment" + + for plugin in ${IUSE/python}; do + if use session && [ "${plugin/+}" = "session" ]; then + myplugins="${myplugins},sessionsaver" + elif use ${plugin/+}; then + myplugins="${myplugins},${plugin/+}" + fi + done + + G2CONF="${G2CONF} + --disable-dependency-tracking + --with-plugins=${myplugins} + $(use_enable python)" +} + +src_prepare() { + gnome2_src_prepare + + # Fix issues with find/replace in selections + epatch "${FILESDIR}/${P}-find-replace.patch" + + # Add Ctrl+Shift+C/V copy paste accelerators to terminal + epatch "${FILESDIR}/${P}-copy-paste.patch" + + # Improved handling of scrolling for replace-all command + epatch "${FILESDIR}/${P}-replace-all.patch" + + # Fix background color of the commander entry + epatch "${FILESDIR}/${P}-background-color.patch" + + # Make multi edit keybinding toggle multi edit mode + epatch "${FILESDIR}/${P}-keybinding-toggle.patch" + + # Make multi edit menu item proper toggle item + epatch "${FILESDIR}/${P}-edit-menu.patch" + + # Added commander toggle menu item + epatch "${FILESDIR}/${P}-commander-menu.patch" + + # disable pyc compiling + mv py-compile py-compile.orig + ln -s $(type -P true) py-compile +} + +src_test() { + emake check || die "make check failed" +} + +src_install() { + gnome2_src_install + # gedit doesn't rely on *.la files + find "${D}" -name "*.la" -delete || die "*.la files removal failed" +} + +pkg_postinst() { + gnome2_pkg_postinst + python_need_rebuild + python_mod_optimize /usr/$(get_libdir)/gedit-2/plugins +} + +pkg_postrm() { + gnome2_pkg_postrm + python_mod_cleanup /usr/$(get_libdir)/gedit-2/plugins +} |