Allow no effect on group button when the windows request attention

Registered by Eemil Lagerspetz

Sometimes, dockbarx thinks that a window requests attention when it is quitting (for example eclipse). This results in a red launcher, that cannot be turned back to normal colour. Also, sometimes an application that has not quit has the red background set on it, and clicking on any of its windows does nothing to make the red background go away. Since fixing this misbehaviour may be slower than working around it, and some users may like the group button to not reflect application attention, I propose a new attention notification effect: nothing. Simply do nothing to the group button when an application requests attention. I have included a patch.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Matias Särs
Completed by
Matias Särs

Related branches

Sprints

Whiteboard

Vermind: Here is a patch to implement the "nothing" option:

--- dockbarx.py 2009-05-25 09:48:56.000000000 +0300
+++ dockbarx-mine.py 2009-07-09 14:38:37.000000000 +0300
@@ -1397,6 +1403,9 @@
         if self.needs_attention:
             if settings["groupbutton_attention_notification_type"] == 'red':
                 self.icon_effect = IconFactory.RED_BACKGROUND
+ elif settings["groupbutton_attention_notification_type"] == 'nothing':
+ #do nothing
+ self.icon_effect = 0
             else:
                 self.needs_attention_anim_trigger = False
                 if not self.attention_effect_running:
@@ -2291,9 +2300,12 @@
         self.rb1_2.connect("toggled", self.rb_toggled, "rb1_compwater")
         self.rb1_3 = gtk.RadioButton(self.rb1_1, "Red background")
         self.rb1_3.connect("toggled", self.rb_toggled, "rb1_red")
+ self.rb1_4 = gtk.RadioButton(self.rb1_1, "Nothing")
+ self.rb1_4.connect("toggled", self.rb_toggled, "rb1_nothing")
         vbox.pack_start(self.rb1_1, False)
         vbox.pack_start(self.rb1_2, False)
         vbox.pack_start(self.rb1_3, False)
+ vbox.pack_start(self.rb1_4, False)
         hbox.pack_start(vbox, True, padding=5)

         vbox = gtk.VBox()
@@ -2395,6 +2407,8 @@
             self.rb1_2.set_active(True)
         elif settings_attention == 'red':
             self.rb1_3.set_active(True)
+ elif settings_attention == 'nothing':
+ self.rb1_4.set_active(True)

         settings_workspace = settings["workspace_behavior"]

@@ -2473,6 +2487,9 @@
         if par1 == 'rb1_red' and button.get_active():
             value = 'red'
             rb1_toggled = True
+ if par1 == 'rb1_nothing' and button.get_active():
+ value = 'nothing'
+ rb1_toggled = True

         if rb1_toggled and value != settings["groupbutton_attention_notification_type"]:
             GCONF_CLIENT.set_string(GCONF_DIR+'/groupbutton_attention_notification_type', value)

Matias: I think it would be a better option to add checkboxes the current attention effects instead of using radio buttons, since there really isn't any reason why you shouldn't be able to choose more than one effect as well as choosing none.

Matias: I changed my mind. The patch is implemented as-is. Thanks.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.