Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 191385 Details for
Bug 269570
[PATCH]net-im/empathy-2.26.1 libnotify hard dep
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
empathy-2.26.1-client-notify-support.patch
empathy-2.26.1-client-notify-support.patch (text/plain), 7.91 KB, created by
Romain Perier (RETIRED)
on 2009-05-15 14:44:39 UTC
(
hide
)
Description:
empathy-2.26.1-client-notify-support.patch
Filename:
MIME Type:
Creator:
Romain Perier (RETIRED)
Created:
2009-05-15 14:44:39 UTC
Size:
7.91 KB
patch
obsolete
> src/empathy-chat-window.c | 18 +++++++++++------- > src/empathy-preferences.c | 7 +++++++ > src/empathy-status-icon.c | 35 ++++++++++++++++++++--------------- > src/empathy.c | 10 ++++++---- > 4 files changed, 44 insertions(+), 26 deletions(-) > >diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c >index d7c1a39..031cdb3 100644 >--- a/src/empathy-chat-window.c >+++ b/src/empathy-chat-window.c >@@ -33,8 +33,9 @@ > #include <gdk/gdkkeysyms.h> > #include <glade/glade.h> > #include <glib/gi18n.h> >+#ifdef HAVE_NOTIFY > #include <libnotify/notification.h> >- >+#endif > #include <telepathy-glib/util.h> > #include <libmissioncontrol/mission-control.h> > >@@ -72,8 +73,9 @@ typedef struct { > EmpathyChatroomManager *chatroom_manager; > GtkWidget *dialog; > GtkWidget *notebook; >+#ifdef HAVE_NOTIFY > NotifyNotification *notification; >- >+#endif > /* Menu items. */ > GtkWidget *menu_conv_clear; > GtkWidget *menu_conv_insert_smiley; >@@ -841,6 +843,7 @@ typedef struct { > EmpathyChat *chat; > } NotificationData; > >+#ifdef HAVE_NOTIFY > static void > chat_window_notification_closed_cb (NotifyNotification *notify, > NotificationData *cb_data) >@@ -850,7 +853,7 @@ chat_window_notification_closed_cb (NotifyNotification *notify, > > #ifdef notify_notification_get_closed_reason > reason = notify_notification_get_closed_reason (notify); >-#endif >+#endif /* notify_notification_get_closed_reason */ > if (reason == EMPATHY_NOTIFICATION_CLOSED_DISMISSED) { > empathy_chat_window_present_chat (cb_data->chat); > } >@@ -915,6 +918,7 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window, > g_free (header); > g_free (escaped); > } >+#endif /* HAVE_NOTIFY */ > > static void > chat_window_new_message_cb (EmpathyChat *chat, >@@ -948,11 +952,11 @@ chat_window_new_message_cb (EmpathyChat *chat, > EMPATHY_SOUND_MESSAGE_INCOMING); > } > } >- >+#ifdef HAVE_NOTIFY > if (!has_focus) { > chat_window_show_or_update_notification (window, message, chat); > } >- >+#endif > if (has_focus && priv->current_chat == chat) { > return; > } >@@ -1249,13 +1253,13 @@ chat_window_finalize (GObject *object) > if (priv->save_geometry_id != 0) { > g_source_remove (priv->save_geometry_id); > } >- >+#ifdef HAVE_NOTIFY > if (priv->notification != NULL) { > notify_notification_close (priv->notification, NULL); > g_object_unref (priv->notification); > priv->notification = NULL; > } >- >+#endif > chat_windows = g_list_remove (chat_windows, window); > gtk_widget_destroy (priv->dialog); > >diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c >index 0ad8e9b..fe36e79 100644 >--- a/src/empathy-preferences.c >+++ b/src/empathy-preferences.c >@@ -1060,6 +1060,9 @@ empathy_preferences_show (GtkWindow *parent) > static EmpathyPreferences *preferences; > GladeXML *glade; > gchar *filename; >+#ifndef HAVE_NOTIFY >+ GtkWidget *vbox; >+#endif > > if (preferences) { > gtk_window_present (GTK_WINDOW (preferences->dialog)); >@@ -1120,6 +1123,10 @@ empathy_preferences_show (GtkWindow *parent) > gtk_widget_show (page); > } > >+#ifndef HAVE_NOTIFY >+ vbox = gtk_notebook_get_nth_page (GTK_NOTEBOOK(preferences->notebook), 1); >+ gtk_widget_hide(vbox); >+#endif > if (parent) { > gtk_window_set_transient_for (GTK_WINDOW (preferences->dialog), > GTK_WINDOW (parent)); >diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c >index 492c37a..5b5005c 100644 >--- a/src/empathy-status-icon.c >+++ b/src/empathy-status-icon.c >@@ -26,9 +26,9 @@ > #include <gtk/gtk.h> > #include <glade/glade.h> > #include <gdk/gdkkeysyms.h> >- >+#ifdef HAVE_NOTIFY > #include <libnotify/notification.h> >- >+#endif /* HAVE_NOTIFY */ > #include <libempathy/empathy-utils.h> > #include <libempathy/empathy-idle.h> > #include <libempathy/empathy-account-manager.h> >@@ -60,8 +60,9 @@ typedef struct { > guint blink_timeout; > EmpathyEventManager *event_manager; > EmpathyEvent *event; >+#ifdef HAVE_NOTIFY > NotifyNotification *notification; >- >+#endif > GtkWindow *window; > GtkWidget *popup_menu; > GtkWidget *show_window_item; >@@ -71,6 +72,7 @@ typedef struct { > > G_DEFINE_TYPE (EmpathyStatusIcon, empathy_status_icon, G_TYPE_OBJECT); > >+#ifdef HAVE_NOTIFY > static gboolean > activate_event (EmpathyEvent *event) > { >@@ -88,7 +90,7 @@ status_icon_notification_closed_cb (NotifyNotification *notification, > > #ifdef notify_notification_get_closed_reason > reason = notify_notification_get_closed_reason (notification); >-#endif >+#endif /* notify_notification_get_closed_reason */ > if (priv->notification) { > g_object_unref (priv->notification); > priv->notification = NULL; >@@ -162,7 +164,7 @@ status_icon_update_notification (EmpathyStatusIcon *icon) > notification_close_helper (priv); > } > } >- >+#endif /* HAVE_NOTIFY */ > static void > status_icon_update_tooltip (EmpathyStatusIcon *icon) > { >@@ -236,8 +238,9 @@ status_icon_event_added_cb (EmpathyEventManager *manager, > > status_icon_update_icon (icon); > status_icon_update_tooltip (icon); >+#ifdef HAVE_NOTIFY > status_icon_update_notification (icon); >- >+#endif > if (!priv->blink_timeout) { > priv->blink_timeout = g_timeout_add (BLINK_TIMEOUT, > (GSourceFunc) status_icon_blink_timeout_cb, >@@ -263,9 +266,10 @@ status_icon_event_removed_cb (EmpathyEventManager *manager, > > /* update notification anyway, as it's safe and we might have been > * changed presence in the meanwhile >- */ >+ */ >+#ifdef HAVE_NOTIFY > status_icon_update_notification (icon); >- >+#endif > if (!priv->event && priv->blink_timeout) { > g_source_remove (priv->blink_timeout); > priv->blink_timeout = 0; >@@ -282,11 +286,11 @@ status_icon_event_updated_cb (EmpathyEventManager *manager, > if (event != priv->event) { > return; > } >- >+#ifdef HAVE_NOTIFY > if (empathy_notification_is_enabled ()) { > status_icon_update_notification (icon); > } >- >+#endif > status_icon_update_tooltip (icon); > } > >@@ -346,12 +350,12 @@ status_icon_toggle_visibility (EmpathyStatusIcon *icon) > static void > status_icon_idle_notify_cb (EmpathyStatusIcon *icon) > { >- EmpathyStatusIconPriv *priv = GET_PRIV (icon); >- > status_icon_update_icon (icon); > status_icon_update_tooltip (icon); >- >+#ifdef HAVE_NOTIFY > if (!empathy_notification_is_enabled ()) { >+ /* Fix avoidable QA warning */ >+ EmpathyStatusIconPriv *priv = GET_PRIV (icon); > /* dismiss the outstanding notification if present */ > > if (priv->notification) { >@@ -360,6 +364,7 @@ status_icon_idle_notify_cb (EmpathyStatusIcon *icon) > priv->notification = NULL; > } > } >+#endif > } > > static gboolean >@@ -511,13 +516,13 @@ status_icon_finalize (GObject *object) > g_signal_handlers_disconnect_by_func (priv->account_manager, > status_icon_connection_changed_cb, > object); >- >+#ifdef HAVE_NOTIFY > if (priv->notification) { > notify_notification_close (priv->notification, NULL); > g_object_unref (priv->notification); > priv->notification = NULL; > } >- >+#endif > g_object_unref (priv->icon); > g_object_unref (priv->idle); > g_object_unref (priv->account_manager); >diff --git a/src/empathy.c b/src/empathy.c >index a2115a6..f95787a 100644 >--- a/src/empathy.c >+++ b/src/empathy.c >@@ -32,8 +32,9 @@ > #include <gdk/gdkx.h> > > #include <libebook/e-book.h> >+#ifdef HAVE_NOTIFY > #include <libnotify/notify.h> >- >+#endif /* HAVE_NOTIFY */ > #include <telepathy-glib/util.h> > #include <libmissioncontrol/mc-account.h> > #include <libmissioncontrol/mission-control.h> >@@ -559,8 +560,9 @@ main (int argc, char *argv[]) > empathy_chatroom_manager_observe (chatroom_manager, dispatcher); > > ft_manager = empathy_ft_manager_dup_singleton (); >- >+#ifdef HAVE_NOTIFY > notify_init (_(PACKAGE_NAME)); >+#endif > /* Create the call factory */ > call_factory = empathy_call_factory_initialise (); > g_signal_connect (G_OBJECT (call_factory), "new-call-handler", >@@ -577,9 +579,9 @@ main (int argc, char *argv[]) > g_object_unref (dispatcher); > g_object_unref (chatroom_manager); > g_object_unref (ft_manager); >- >+#ifdef HAVE_NOTIFY > notify_uninit (); >- >+#endif > return EXIT_SUCCESS; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269570
:
191048
|
191383
| 191385 |
191387