~kokoto-java/kazam/depencie-and-stuff

« back to all changes in this revision

Viewing changes to kazam/app.py

  • Committer: David Klasinc
  • Date: 2012-11-23 20:12:56 UTC
  • mfrom: (193.7.6 unstable)
  • Revision ID: bigwhale@lubica.net-20121123201256-exwo8z63hvmaqpk0
MergeĀ fromĀ unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        self.icons.append_search_path(os.path.join(prefs.datadir,"icons", "48x48", "apps"))
98
98
        self.icons.append_search_path(os.path.join(prefs.datadir,"icons", "16x16", "apps"))
99
99
 
100
 
        try:
101
 
            from gi.repository import Unity, Dbusmenu
102
 
            launcher = Unity.LauncherEntry.get_for_desktop_id("kazam.desktop")
103
 
            ql = Dbusmenu.Menuitem.new()
104
 
            ql_item1 = Dbusmenu.Menuitem.new()
105
 
            ql_item1.property_set(Dbusmenu.MENUITEM_PROP_LABEL, _("Record screencast"))
106
 
            ql_item1.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
107
 
            ql_item1.connect("item-activated", self.cb_ql_screencast)
108
 
            ql.child_append(ql_item1)
109
 
            ql_item2 = Dbusmenu.Menuitem.new()
110
 
            ql_item2.property_set(Dbusmenu.MENUITEM_PROP_LABEL, _("Take screenshot"))
111
 
            ql_item2.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
112
 
            ql_item2.connect("item-activated", self.cb_ql_screenshot)
113
 
            ql.child_append(ql_item2)
114
 
            ql_item3 = Dbusmenu.Menuitem.new()
115
 
            ql_item3.property_set(Dbusmenu.MENUITEM_PROP_LABEL, _("Preferences"))
116
 
            ql_item3.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
117
 
            ql_item3.connect("item-activated", self.cb_ql_preferences)
118
 
            ql.child_append(ql_item3)
119
 
            launcher.set_property("quicklist", ql)
120
 
        except ImportError:
121
 
            logger.warning("Unity and Dbusmenu not found. Skipping launcher integration.")
 
100
        #
 
101
        # For now, I'll get rid of this ...
 
102
        #
 
103
        #try:
 
104
        #    from gi.repository import Unity, Dbusmenu
 
105
        #    launcher = Unity.LauncherEntry.get_for_desktop_id("kazam.desktop")
 
106
        #    ql = Dbusmenu.Menuitem.new()
 
107
        #    ql_item1 = Dbusmenu.Menuitem.new()
 
108
        #    ql_item1.property_set(Dbusmenu.MENUITEM_PROP_LABEL, _("Record screencast"))
 
109
        #    ql_item1.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
 
110
        #    ql_item1.connect("item-activated", self.cb_ql_screencast)
 
111
        #    ql.child_append(ql_item1)
 
112
        #    ql_item2 = Dbusmenu.Menuitem.new()
 
113
        #    ql_item2.property_set(Dbusmenu.MENUITEM_PROP_LABEL, _("Take screenshot"))
 
114
        #    ql_item2.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
 
115
        #    ql_item2.connect("item-activated", self.cb_ql_screenshot)
 
116
        #    ql.child_append(ql_item2)
 
117
        #    ql_item3 = Dbusmenu.Menuitem.new()
 
118
        #    ql_item3.property_set(Dbusmenu.MENUITEM_PROP_LABEL, _("Preferences"))
 
119
        #    ql_item3.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
 
120
        #    ql_item3.connect("item-activated", self.cb_ql_preferences)
 
121
        #    ql.child_append(ql_item3)
 
122
        #    launcher.set_property("quicklist", ql)
 
123
        #except ImportError:
 
124
        #    logger.warning("Unity and Dbusmenu not found. Skipping launcher integration.")
122
125
 
123
126
        # Initialize all the variables
124
127
 
243
246
        self.sep_2 = Gtk.SeparatorToolItem()
244
247
        self.sep_2.set_draw(False)
245
248
        self.sep_2.set_expand(True)
246
 
        #self.toolbar_aux.insert(self.sep_2, -1)
 
249
        self.toolbar_aux.insert(self.sep_2, -1)
247
250
        self.toolbar_aux.insert(self.btn_full, -1)
248
251
        self.toolbar_aux.insert(self.btn_allscreens, -1)
249
252
        self.toolbar_aux.insert(self.btn_window, -1)
250
253
        self.toolbar_aux.insert(self.btn_area, -1)
251
 
        #self.toolbar_aux.insert(self.sep_2, -1)
 
254
        self.toolbar_aux.insert(self.sep_2, -1)
252
255
 
253
256
        self.ntb_main.set_current_page(0)
254
257