rpms/notification-daemon/devel browser.patch, NONE, 1.1 monitor-stacks.patch, NONE, 1.1 notification-daemon-rtl.patch, NONE, 1.1 screensaver-check.patch, NONE, 1.1 variable-monitors.patch, NONE, 1.1 notification-daemon.spec, 1.35, 1.36
Matthias Clasen
mclasen at fedoraproject.org
Mon Nov 2 05:21:27 UTC 2009
- Previous message: rpms/gnome-games/devel gnome-games.spec, 1.231, 1.232 sources, 1.110, 1.111 0001-Require-stable-versions-of-clutter-and-clutter-gtk.patch, 1.1, NONE gcc43.patch, 1.1, NONE gnome-games-2.19.3-dupe.patch, 1.1, NONE gnome-games-2.20-gnobots-crash.patch, 1.1, NONE gnome-games-2.22.1.1-fix-icons.patch, 1.3, NONE mines-cosmetics.patch, 1.1, NONE mines-fixes.patch, 1.1, NONE mines-keys-fix.patch, 1.1, NONE mines-redraw-fix.patch, 1.1, NONE mines-sensitive-fix.patch, 1.1, NONE mines-visible-fix.patch, 1.1, NONE sudoku-saved-data.patch, 1.1, NONE
- Next message: rpms/gnome-desktop/devel gnome-desktop.spec, 1.226, 1.227 sources, 1.90, 1.91 pnpids.patch, 1.1, NONE slideshow-api.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/pkgs/rpms/notification-daemon/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9532
Modified Files:
notification-daemon.spec
Added Files:
browser.patch monitor-stacks.patch
notification-daemon-rtl.patch screensaver-check.patch
variable-monitors.patch
Log Message:
Copy F12 work over
browser.patch:
daemon.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
--- NEW FILE browser.patch ---
diff -up notification-daemon-0.4.1/src/daemon/daemon.c.browser notification-daemon-0.4.1/src/daemon/daemon.c
--- notification-daemon-0.4.1/src/daemon/daemon.c.browser 2009-10-15 17:25:08.816399825 -0400
+++ notification-daemon-0.4.1/src/daemon/daemon.c 2009-10-15 17:30:10.680399278 -0400
@@ -845,27 +845,18 @@ url_clicked_cb(GtkWindow *nw, const char
escaped_url = g_shell_quote(url);
- /*
- * We can't actually check for GNOME_DESKTOP_SESSION_ID, because it's
- * not in the environment for this program :(
- */
- if (/*g_getenv("GNOME_DESKTOP_SESSION_ID") != NULL &&*/
- g_find_program_in_path("gnome-open") != NULL)
+ if (g_find_program_in_path("gvfs-open") != NULL)
{
- cmd = g_strdup_printf("gnome-open %s", escaped_url);
+ cmd = g_strdup_printf("gvfs-open %s", escaped_url);
}
- else if (g_find_program_in_path("mozilla-firefox") != NULL)
+ else if (g_find_program_in_path("xdg-open") != NULL)
{
- cmd = g_strdup_printf("mozilla-firefox %s", escaped_url);
+ cmd = g_strdup_printf("xdg-open %s", escaped_url);
}
else if (g_find_program_in_path("firefox") != NULL)
{
cmd = g_strdup_printf("firefox %s", escaped_url);
}
- else if (g_find_program_in_path("mozilla") != NULL)
- {
- cmd = g_strdup_printf("mozilla %s", escaped_url);
- }
else
{
g_warning("Unable to find a browser.");
monitor-stacks.patch:
stack.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- NEW FILE monitor-stacks.patch ---
--- notification-daemon-0.4.1/src/daemon/stack.c 2009-09-23 01:47:50.000000000 -0400
+++ hacked-foo/src/daemon/stack.c 2009-10-15 21:26:03.269041656 -0400
@@ -199,17 +199,21 @@
static void
notify_stack_shift_notifications(NotifyStack *stack,
GtkWindow *nw,
- GSList **nw_l,
+ GSList **nw_l,
gint init_width,
gint init_height,
gint *nw_x,
gint *nw_y)
{
GdkRectangle workarea;
+ GdkRectangle monitor;
GSList *l;
gint x, y, shiftx = 0, shifty = 0, index = 1;
get_work_area(GTK_WIDGET(nw), &workarea);
+ gdk_screen_get_monitor_geometry (stack->screen, stack->monitor, &monitor);
+ gdk_rectangle_intersect (&monitor, &workarea, &workarea);
+
get_origin_coordinates(stack->location, &workarea, &x, &y,
&shiftx, &shifty, init_width, init_height);
notification-daemon-rtl.patch:
theme.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE notification-daemon-rtl.patch ---
diff -Naur notification-daemon-svn3009.pos.orig/src/themes/standard/theme.c notification-daemon-svn3009/src/themes/standard/theme.c
--- notification-daemon-svn3009.pos.orig/src/themes/standard/theme.c 2008-12-09 13:28:46.000000000 +0200
+++ notification-daemon-svn3009/src/themes/standard/theme.c 2008-12-09 15:26:22.000000000 +0200
@@ -48,7 +48,7 @@
glong remaining;
UrlClickedCb url_clicked;
-
+ int is_rtl;
} WindowData;
enum
@@ -134,6 +134,7 @@
GdkColor color;
int stripe_x = windata->main_hbox->allocation.x + 1;
int stripe_y = windata->main_hbox->allocation.y + 1;
+ if (windata->is_rtl) stripe_x=windata->width-STRIPE_WIDTH-stripe_x;
int stripe_height = windata->main_hbox->allocation.height - 2;
#ifdef ENABLE_GRADIENT_LOOK
cairo_pattern_t *gradient;
@@ -587,6 +588,7 @@
windata->url_clicked = url_clicked;
win = gtk_window_new(GTK_WINDOW_POPUP);
+ windata->is_rtl=pango_context_get_base_dir(gtk_widget_get_pango_context(win)) & ( PANGO_DIRECTION_RTL | PANGO_DIRECTION_WEAK_RTL );
windata->win = win;
windata->enable_transparency = FALSE;
screensaver-check.patch:
daemon.c | 55 ++++++++++++++++++++++++++++++-------------------------
1 file changed, 30 insertions(+), 25 deletions(-)
--- NEW FILE screensaver-check.patch ---
--- notification-daemon-0.4.1/src/daemon/daemon.c 2009-10-15 17:21:49.127672315 -0400
+++ hacked/src/daemon/daemon.c 2009-10-15 17:21:34.683409674 -0400
@@ -883,33 +883,38 @@
static gboolean
screensaver_active(GtkWidget *nw)
{
- GdkDisplay *display = gdk_drawable_get_display(GDK_DRAWABLE(nw->window));
- Atom type;
- int format;
- unsigned long nitems, bytes_after;
- unsigned char *temp_data;
- gboolean active = FALSE;
- Atom XA_BLANK = gdk_x11_get_xatom_by_name_for_display(display, "BLANK");
- Atom XA_LOCK = gdk_x11_get_xatom_by_name_for_display(display, "LOCK");
-
- /* Check for a screensaver first. */
- if (XGetWindowProperty(
- GDK_DISPLAY_XDISPLAY(display),
- GDK_ROOT_WINDOW(),
- gdk_x11_get_xatom_by_name_for_display(display, "_SCREENSAVER_STATUS"),
- 0, G_MAXLONG, False, XA_INTEGER, &type, &format, &nitems,
- &bytes_after, &temp_data) == Success &&
- type && temp_data != NULL)
- {
- CARD32 *data = (CARD32 *)temp_data;
-
- active = (type == XA_INTEGER && nitems >= 3 &&
- (time_t)data[1] > (time_t)666000000L &&
- (data[0] == XA_BLANK || data[0] == XA_LOCK));
+ DBusGConnection *connection;
+ DBusGProxy *gs_proxy;
+ GError *error;
+ gboolean active;
+
+ active = FALSE;
+
+ error = NULL;
+ connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+ if (connection == NULL)
+ {
+ g_warning ("Failed to get dbus connection: %s", error->message);
+ g_error_free(error);
+ goto out;
+
}
+ gs_proxy = dbus_g_proxy_new_for_name(connection,
+ "org.gnome.ScreenSaver",
+ "/",
+ "org.gnome.ScreenSaver");
+
+ if (!dbus_g_proxy_call(gs_proxy, "GetActive", &error,
+ G_TYPE_INVALID,
+ G_TYPE_BOOLEAN, &active,
+ G_TYPE_INVALID))
+ {
+ g_warning("Failed to call gnome-screensaver: %s", error->message);
+ g_error_free(error);
+ }
+ g_object_unref (gs_proxy);
+out:
- if (temp_data != NULL)
- XFree(temp_data);
return active;
}
variable-monitors.patch:
daemon.c | 59 ++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 38 insertions(+), 21 deletions(-)
--- NEW FILE variable-monitors.patch ---
--- notification-daemon-0.4.1/src/daemon/daemon.c 2009-10-15 21:22:24.598052888 -0400
+++ hacked-foo/src/daemon/daemon.c 2009-10-15 21:26:56.380290516 -0400
@@ -162,44 +162,59 @@
}
static void
-notify_daemon_init(NotifyDaemon *daemon)
+reallocate_stacks (NotifyDaemon *daemon)
{
- NotifyStackLocation location;
- GConfClient *client = get_gconf_client();
GdkDisplay *display;
GdkScreen *screen;
+ gint old_stacks_size;
+ GConfClient *client = get_gconf_client();
+ NotifyStackLocation location;
gchar *slocation;
gint i;
+ display = gdk_display_get_default();
+ screen = gdk_display_get_default_screen(display);
+
+ if (daemon->priv->stacks_size < gdk_screen_get_n_monitors (screen)) {
+ slocation = gconf_client_get_string(client, GCONF_KEY_POPUP_LOCATION,
+ NULL);
+ location = get_stack_location_from_string(slocation);
+ g_free(slocation);
+
+ old_stacks_size = daemon->priv->stacks_size;
+ daemon->priv->stacks_size = gdk_screen_get_n_monitors(screen);
+ daemon->priv->stacks = g_renew(NotifyStack *, daemon->priv->stacks, daemon->priv->stacks_size);
+ for (i = old_stacks_size; i < daemon->priv->stacks_size; i++) {
+ daemon->priv->stacks[i] = notify_stack_new(daemon,
+ screen,
+ i,
+ location);
+ }
+ }
+
+
+}
+
+static void
+notify_daemon_init(NotifyDaemon *daemon)
+{
daemon->priv = G_TYPE_INSTANCE_GET_PRIVATE(daemon, NOTIFY_TYPE_DAEMON,
- NotifyDaemonPrivate);
+ NotifyDaemonPrivate);
daemon->priv->next_id = 1;
daemon->priv->timeout_source = 0;
- slocation = gconf_client_get_string(client, GCONF_KEY_POPUP_LOCATION,
- NULL);
- location = get_stack_location_from_string(slocation);
- g_free(slocation);
+ daemon->priv->stacks_size = 0;
+ daemon->priv->stacks = NULL;
- display = gdk_display_get_default();
- screen = gdk_display_get_default_screen(display);
- daemon->priv->stacks_size = gdk_screen_get_n_monitors(screen);
- daemon->priv->stacks = g_new0(NotifyStack *, daemon->priv->stacks_size);
+ reallocate_stacks (daemon);
daemon->priv->idle_reposition_notify_ids = g_hash_table_new(NULL, NULL);
daemon->priv->monitored_window_hash = g_hash_table_new(NULL, NULL);
gdk_window_add_filter(NULL, _notify_x11_filter, daemon);
-
- for (i = 0; i < daemon->priv->stacks_size; i++)
- {
- daemon->priv->stacks[i] = notify_stack_new(daemon, screen,
- i, location);
- }
-
daemon->priv->notification_hash =
g_hash_table_new_full(g_int_hash, g_int_equal, g_free,
- (GDestroyNotify)_notify_timeout_destroy);
+ (GDestroyNotify)_notify_timeout_destroy);
}
static void
@@ -1308,7 +1323,9 @@
gdk_display_get_pointer(gdk_display_get_default(),
&screen, &x, &y, NULL);
monitor = gdk_screen_get_monitor_at_point(screen, x, y);
- g_assert(monitor >= 0 && monitor < priv->stacks_size);
+ if (monitor >= priv->stacks_size) {
+ reallocate_stacks (daemon);
+ }
notify_stack_add_window(priv->stacks[monitor], nw, new_notification);
}
Index: notification-daemon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/notification-daemon/devel/notification-daemon.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- notification-daemon.spec 25 Sep 2009 00:33:58 -0000 1.35
+++ notification-daemon.spec 2 Nov 2009 05:21:25 -0000 1.36
@@ -7,7 +7,7 @@
Summary: Desktop Notification Daemon
Name: notification-daemon
Version: 0.4.1
-Release: 0.20090923.2%{?dist}
+Release: 0.20090923.4%{?dist}
URL: http://www.galago-project.org/specs/notification/
License: GPLv2+
Group: System Environment/Libraries
@@ -41,6 +41,15 @@ Patch1: default-theme.patch
Patch2: location.patch
Patch10: notification-daemon-always-stack.patch
+# Cut down on crazy browser choices
+Patch11: browser.patch
+# A working screensaver check
+Patch12: screensaver-check.patch
+# Make per-monitor stacks work as intended
+Patch13: monitor-stacks.patch
+# Don't crash if new monitors appear
+Patch14: variable-monitors.patch
+
%description
notification-daemon is the server implementation of the freedesktop.org desktop
notification specification. Notifications can be used to inform the user
@@ -53,6 +62,10 @@ user's way.
%patch1 -p1 -b .default-theme
%patch2 -p1 -b .location
%patch10 -p1 -b .always-stack
+%patch11 -p1 -b .browser
+%patch12 -p1 -b .screensaver-check
+%patch13 -p1 -b .monitor-stacks
+%patch14 -p1 -b .variable-monitors
autoreconf -i -f
@@ -113,6 +126,14 @@ gconftool-2 --makefile-install-rule \
%changelog
+* Fri Oct 23 2009 Matthias Clasen <mclasen at redhat.com> - 0.4.1-1.20090923.4
+- Don't abort if gnome-screensaver is not running (#529592)
+
+* Thu Oct 15 2009 Matthias Clasen <mclasen at redhat.com> - 0.4.1-1.20090923.3
+- Fix issues with the multi-monitor support
+- Make screensaver check work
+- Use gvfs-open instead of gnome-open
+
* Thu Sep 24 2009 Matthias Clasen <mclasen at redhat.com> - 0.4.1-1.20090923.2
- Change default theme to 'slider'
- Previous message: rpms/gnome-games/devel gnome-games.spec, 1.231, 1.232 sources, 1.110, 1.111 0001-Require-stable-versions-of-clutter-and-clutter-gtk.patch, 1.1, NONE gcc43.patch, 1.1, NONE gnome-games-2.19.3-dupe.patch, 1.1, NONE gnome-games-2.20-gnobots-crash.patch, 1.1, NONE gnome-games-2.22.1.1-fix-icons.patch, 1.3, NONE mines-cosmetics.patch, 1.1, NONE mines-fixes.patch, 1.1, NONE mines-keys-fix.patch, 1.1, NONE mines-redraw-fix.patch, 1.1, NONE mines-sensitive-fix.patch, 1.1, NONE mines-visible-fix.patch, 1.1, NONE sudoku-saved-data.patch, 1.1, NONE
- Next message: rpms/gnome-desktop/devel gnome-desktop.spec, 1.226, 1.227 sources, 1.90, 1.91 pnpids.patch, 1.1, NONE slideshow-api.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list