Ticket #57 (enhancement)

Opened 4 years ago

Last modified 4 years ago

[PATCH] Add popup stack custom location functionality

Status: closed (fixed)

Reported by: M.S. Assigned to: chipx86
Priority: normal Milestone: notification-daemon 1.0
Component: notification-daemon Version: 0.4.0
Severity: normal Keywords:
Cc: D-BUS Version:
Patch Included: OS/Distro Version:

The popup stack based notification bubbles are all stacked up originating from the bottom right corner of the workspace area. This patch intends to customize the process of positioning the bubbles of the stack in general. As of now it adds the ability to specify a window edge(top_left, top_right, ...) but leaves it open for further ideas.

I leave it up for an open discussion if this kind of functionality should be implemented into the theme engine (as well as current workspace/xy placement code) or rather let the theme only be a layout/graphic engine while the daemon fully takes care of the positioning both the xy and the popup stack.

This is bullet one on the libnotify todo list found in this wiki. ;)


This patch roughly has the following changes:

- Change default bottom right popup stack behaviour with customizable one
- Add popup stack locations: "top_left", "top_right", "bottom_left", "bottom_right"
- Add dynamic GConf key to allow configuration of popup stack location on the fly (callback)
- Changed macros to define GConf keys
- Fixed notification-daemon to SIGABRT if gtk_icon_info_get_base_size() returned zero


NOTE: In order to test the patch I created a small test bash script which creates notifications with randoms properties (icons, expire time, urgency, text, body fortune, etc.) and dynamically changes the gconf value /apps/notification-daemon/popup_location in order to test the integrity. So far this worked great even with low usleep values and mass popups ;)

However I noticed the notification-daemon to crash (actually to SIGABRT) due to the last change to the gtk_icon_them_load change related to using small icons if available. For some icons, gtk_icon_info_get_base_size(icon_info) returned "0" on my system resulting in a gdk assertion failing upon calling gtk_icon_theme_load_icon next. I made a change in the patch to fix that behaviour (which makes the icon the method returned 0 for display correctly and not fail the assertion).

Might be worth to check out, even if this patch overall does not get upstream.

Attachments

add-popup-stack-location-functionality.patch (10.0 kB) - added by Martin Szulecki on 04/29/06 03:35:01.
Add popup_location functionality, GConf key, minor SIGABRT fix
stresstest-locations.sh (1.1 kB) - added by M.S. on 05/11/06 07:49:19.
stress test script, was requested, prolly needs modification if you use it

Change History

04/29/06 03:35:01: Modified by Martin Szulecki

  • attachment add-popup-stack-location-functionality.patch added.

Add popup_location functionality, GConf key, minor SIGABRT fix

05/11/06 07:49:19: Modified by M.S.

  • attachment stresstest-locations.sh added.

stress test script, was requested, prolly needs modification if you use it

07/29/06 03:48:35: Modified by chipx86

  • status changed from new to closed.
  • resolution set to fixed.

(In [2884]) Patch by M.S. to support custom corner stacking positions through a gconf key. Now users can specify that their notifications should originate from any corner they choose. This closes ticket #57.

07/29/06 11:08:45: Modified by M.S.

  • status changed from closed to reopened.
  • resolution deleted.

There is a typo in the schema default value hunk. It says "right_bottom", which is a value that does not exist. Should be "bottom_right", sorry!

07/29/06 15:36:42: Modified by chipx86

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [2885]) Fix a typo for the default value for stack location. It should have been "bottom_right," not "right_bottom." Closes ticket #57.