Improve hover handling on displaytabs
svn: r20858
This commit is contained in:
@@ -114,6 +114,14 @@ class EmbeddedList(ButtonTab):
|
|||||||
if fun:
|
if fun:
|
||||||
fun()
|
fun()
|
||||||
return True
|
return True
|
||||||
|
elif event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1:
|
||||||
|
if self.tree.get_hover_selection():
|
||||||
|
self.tree.set_hover_selection(False)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
self.tree.set_hover_selection(True)
|
||||||
|
#let code for single click still select the current row:
|
||||||
|
return False
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_popup_menu_items(self):
|
def get_popup_menu_items(self):
|
||||||
|
@@ -565,6 +565,5 @@ class GalleryTab(ButtonTab, DbGUIElement):
|
|||||||
return self.get_data().index(obj)
|
return self.get_data().index(obj)
|
||||||
|
|
||||||
def clean_up(self):
|
def clean_up(self):
|
||||||
print "CLEANING"
|
|
||||||
self.iconlist.disconnect(self.__id_connect_sel)
|
self.iconlist.disconnect(self.__id_connect_sel)
|
||||||
super(ButtonTab, self).clean_up()
|
super(ButtonTab, self).clean_up()
|
||||||
|
@@ -119,6 +119,14 @@ class GroupEmbeddedList(EmbeddedList):
|
|||||||
if fun:
|
if fun:
|
||||||
fun()
|
fun()
|
||||||
return True
|
return True
|
||||||
|
elif event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1:
|
||||||
|
if self.tree.get_hover_selection():
|
||||||
|
self.tree.set_hover_selection(False)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
self.tree.set_hover_selection(True)
|
||||||
|
#let code for single click still select the current row:
|
||||||
|
return False
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def is_empty(self):
|
def is_empty(self):
|
||||||
|
Reference in New Issue
Block a user