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 000000000..5ba0ab109 Binary files /dev/null and b/gramps2/src/images/stock_zoom.png differ