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"))
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)
121
logger.warning("Unity and Dbusmenu not found. Skipping launcher integration.")
101
# For now, I'll get rid of this ...
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)
124
# logger.warning("Unity and Dbusmenu not found. Skipping launcher integration.")
123
126
# Initialize all the variables
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)
253
256
self.ntb_main.set_current_page(0)