From 79e9f3e9b52fcb585d61d90efdbb93737953aaaf Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 24 Jan 2007 00:23:39 +0000 Subject: [PATCH] * src/DataViews/_MediaView.py: add view option * src/images/Makefile.am: add stock_zoom * src/images/stock_zoom.png: added * src/gramps_main.py: register stock_zoom as a stock icon svn: r7965 --- gramps2/ChangeLog | 4 ++++ gramps2/src/DataViews/_MediaView.py | 14 +++++++++++--- gramps2/src/gramps_main.py | 2 ++ gramps2/src/images/Makefile.am | 1 + gramps2/src/images/stock_zoom.png | Bin 0 -> 997 bytes 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 gramps2/src/images/stock_zoom.png diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index d218eadaf..6fcec01eb 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,8 @@ 2007-01-23 Don Allingham + * src/DataViews/_MediaView.py: add view option + * src/images/Makefile.am: add stock_zoom + * src/images/stock_zoom.png: added + * src/gramps_main.py: register stock_zoom as a stock icon * src/GrampsDb/_GrampsBSDDB.py: initialize the next gramps_id indexes to the length of the tables to prevent a walk of the db entries. diff --git a/gramps2/src/DataViews/_MediaView.py b/gramps2/src/DataViews/_MediaView.py index 6b55664f3..68ea4951e 100644 --- a/gramps2/src/DataViews/_MediaView.py +++ b/gramps2/src/DataViews/_MediaView.py @@ -60,7 +60,7 @@ import RelLib from Editors import EditMedia, DeleteMediaQuery import Errors -from QuestionDialog import QuestionDialog +from QuestionDialog import QuestionDialog, ErrorDialog from Filters.SideBar import MediaSidebarFilter from DdTargets import DdTargets @@ -184,11 +184,12 @@ class MediaView(PageView.ListView): def define_actions(self): PageView.ListView.define_actions(self) + self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES, _('_Column Editor'), callback=self.column_editor) self.add_action('FilterEdit', None, _('Media Filter Editor'), callback=self.filter_editor) - self.add_action('OpenMedia', None, _('View in an external viewer'), + self.add_action('OpenMedia', 'gramps-viewmedia', _('View'), callback=self.view_media) def view_media(self, obj): @@ -201,6 +202,10 @@ class MediaView(PageView.ListView): app = Mime.get_application(mime_type) if app: Utils.launch(app[0], ref_obj.get_path()) + else: + ErrorDialog(_("Cannot view %s") % ref_obj.get_path(), + _("GRAMPS cannot find an application that can view " + "a file type of %s.") % mime_type) def column_editor(self, obj): import ColumnOrder @@ -238,7 +243,8 @@ class MediaView(PageView.ListView): vbox.pack_start(base, True) self.tt = gtk.Tooltips() - self.tt.set_tip(ebox, _('Double click image to view in an external viewer')) + self.tt.set_tip(ebox, + _('Double click image to view in an external viewer')) self.selection.connect('changed', self.row_change) self._set_dnd() @@ -290,6 +296,8 @@ class MediaView(PageView.ListView): + + diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 8dfb135e9..fbe6fd7c6 100644 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -133,6 +133,8 @@ def register_stock_icons (): ('gramps-url',_('URL'),gtk.gdk.CONTROL_MASK,0,'')), (os.path.join(const.image_dir,'share-fam.png'), ('gramps-sharefamily',_('Share Family'),gtk.gdk.CONTROL_MASK,0,'')), + (os.path.join(const.image_dir,'stock_zoom.png'), + ('gramps-viewmedia',_('View'),gtk.gdk.CONTROL_MASK,0,'')), ] # Register our stock items diff --git a/gramps2/src/images/Makefile.am b/gramps2/src/images/Makefile.am index e7e66dc85..7c02207d2 100644 --- a/gramps2/src/images/Makefile.am +++ b/gramps2/src/images/Makefile.am @@ -95,6 +95,7 @@ dist_pkgdata_DATA = \ stock_lock-open.png\ stock_lock.png\ stock_notes.png\ + stock_zoom.png\ somerights20.gif \ document.png #\ $(map_tile_images) diff --git a/gramps2/src/images/stock_zoom.png b/gramps2/src/images/stock_zoom.png new file mode 100644 index 0000000000000000000000000000000000000000..5ba0ab1093a58c4b37c8fa4ff85457f35f341ee4 GIT binary patch literal 997 zcmVOq?k^aNyqa z?meG-zVDs;1XV1VOr~|uCK3ISXf|VW5WyvgJY+sr&X(QIfIdrk+<1w_K(rgQTNo; z6p=`TKp;RU6e1Fd(Ad~WI2^|B_v82b>FVl2RaLpSw>RF}+WPy$!^6#s0A1IAQ52

&4}A;c~g~dc6b!0en6mZ{ED&`1n|!oSb~CY1+@914w{) zJf5;`dvJ1clDfJ&g25n>NCc0^gUjVYN{N)R43Sde^ZDrL=pda=Q!14PL!nTrDj=83 zji*v6nwy*P`FzyZ*CT{LN{JBS6R(8E<8hM7B&w>8R|ROAru6ss4mlwa+B7EbH?8{Ji|FI~yy#GMQ(!80fmr z(a{l>WnESUluD)b<>h6H#Ui?{qiGttu9wG-JF#N1h^ngP_|no6wr#Ih1xP6~nM{Uk zHjApN6bc1YRek1~rco#q%C2b|s;Y8$c*x@7B0#2Uqv^U{6hiczot?!Ji3GN7qw9KE zGDi-l3I~?Y=b4?I<@WY=1(bTq!ZyDQt;+NiCqEhl&M&gb(S92_t=H^=7YrU?{) z?|}#4&o5oqQ6MaYcrT?K92gj&udk0-EC#^o=_zY#YpkxW0;~Yr;(?&EJHC`J~3Aq6*U=WB3Ue_v5{13oKAcP-k Tb-QgN00000NkvXXu0mjfB!A$9 literal 0 HcmV?d00001