~rosco2/ubuntu/wily/gramps/bug-1492304

« back to all changes in this revision

Viewing changes to gramps/gui/views/pageview.py

  • Committer: Package Import Robot
  • Author(s): Ross Gammon
  • Date: 2015-08-11 23:03:11 UTC
  • mfrom: (1.4.3)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: package-import@ubuntu.com-20150811230311-acjr8gcfe8isx7ij
* New upstream release
* Drop patches applied upstream or cherry-picked from there
* Add version constraints for gtk and pygobject
* Add goocanvas dependency - available soon
* Drop webkit dpendency as HTML view has been removed
* Force removal of upstream packages when installing Debian one
  (LP: #1464845)
* Drop fixperm override as permissions fixed upstream
* Fix spelling error in changelog
* Switch to nose for unit tests
* Add build dependencies for the nose tests
* Update copyright file
* Add uversionmangle to watch file to deal with alpha/beta versions
* Add manual test cases
* Drop FAQ URL from upstream metadata - changes every release
* Add patch to fix transparent windows in Ubuntu.
  Thanks to Lance Orner (LP: #1451259)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
# python modules
28
28
#
29
29
#----------------------------------------------------------------
30
 
import sys
31
30
import logging
32
31
_LOG = logging.getLogger('.pageview')
33
32
 
51
50
from ..widgets.grampletbar import GrampletBar
52
51
from ..configure import ConfigureDialog
53
52
from gramps.gen.config import config
 
53
from ..actiongroup import ActionGroup
54
54
 
55
55
#------------------------------------------------------------------------------
56
56
#
152
152
        self.bottombar = GrampletBar(self.dbstate, self.uistate, self,
153
153
                                     self.ident + "_bottombar",
154
154
                                     defaults[1])
155
 
        hpane = Gtk.HPaned()
156
 
        vpane = Gtk.VPaned()
 
155
        hpane = Gtk.Paned()
 
156
        vpane = Gtk.Paned(orientation=Gtk.Orientation.VERTICAL)
157
157
        hpane.pack1(vpane, resize=True, shrink=False)
158
158
        hpane.pack2(self.sidebar, resize=False, shrink=True)
159
159
        hpane.show()
223
223
        creates it. The copy is handled through the drag and drop
224
224
        system.
225
225
        """
226
 
        if sys.version_info[0] < 3:
227
 
            import cPickle as pickle
228
 
        else:
229
 
            import pickle
 
226
        import pickle
230
227
        from ..clipboard import ClipboardWindow, obj2target
231
228
        handled = False
232
229
        for handle in handles:
354
351
        Return image associated with the view category, which is used for the 
355
352
        icon for the button.
356
353
        """
357
 
        return Gtk.STOCK_MISSING_IMAGE
 
354
        return 'image-missing'
358
355
 
359
356
    def get_viewtype_stock(self):
360
357
        """
361
358
        Return immage associated with the viewtype inside a view category, it
362
359
        will be used for the icon on the button to select view in the category
363
360
        """
364
 
        return Gtk.STOCK_MISSING_IMAGE
 
361
        return 'image-missing'
365
362
 
366
363
    def get_title(self):
367
364
        """
418
415
        and self.action_toggle_list. The user should define these in 
419
416
        self.define_actions
420
417
        """
421
 
        self.action_group = Gtk.ActionGroup(name=self.title)
 
418
        self.action_group = ActionGroup(name=self.title)
422
419
        if len(self.action_list) > 0:
423
420
            self.action_group.add_actions(self.action_list)
424
421
        if len(self.action_toggle_list) > 0:
425
422
            self.action_group.add_toggle_actions(self.action_toggle_list)
426
423
 
427
 
    def _add_action(self, name, stock_icon, label, accel=None, tip=None, 
 
424
    def _add_action(self, name, icon_name, label, accel=None, tip=None,
428
425
                   callback=None):
429
426
        """
430
427
        Add an action to the action list for the current view. 
431
428
        """
432
 
        self.action_list.append((name, stock_icon, label, accel, tip, 
 
429
        self.action_list.append((name, icon_name, label, accel, tip,
433
430
                                 callback))
434
431
 
435
 
    def _add_toggle_action(self, name, stock_icon, label, accel=None, 
 
432
    def _add_toggle_action(self, name, icon_name, label, accel=None,
436
433
                           tip=None, callback=None, value=False):
437
434
        """
438
435
        Add a toggle action to the action list for the current view. 
439
436
        """
440
 
        self.action_toggle_list.append((name, stock_icon, label, accel, 
 
437
        self.action_toggle_list.append((name, icon_name, label, accel,
441
438
                                        tip, callback, value))
442
439
    
443
440
    def _add_toolmenu_action(self, name, label, tooltip, callback, 
626
623
        PageView.__init__(self, title, pdata, dbstate, uistate)
627
624
    
628
625
    def build_widget(self):
629
 
        box = Gtk.VBox(homogeneous=False, spacing=1)
 
626
        box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=1)
630
627
        #top widget at the top
631
628
        box.pack_start(Gtk.Label(label=_('View %(name)s: %(msg)s') % {
632
629
                'name': self.title,