Merge lp:~ted/evolution-indicator/libindicate-update into lp:evolution-indicator

Proposed by Ted Gould
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ted/evolution-indicator/libindicate-update
Merge into: lp:evolution-indicator
Diff against target: 90 lines (+6/-49)
2 files modified
configure.ac (+1/-1)
src/evolution-indicator.c (+5/-48)
To merge this branch: bzr merge lp:~ted/evolution-indicator/libindicate-update
Reviewer Review Type Date Requested Status
David Barth Approve
Review via email: mp+20622@code.launchpad.net

Description of the change

A quick little patch to use the new libindicate signals with timestamps.
Now we can present_with_time.

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) wrote :

Timestamps power!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2010-01-21 16:22:32 +0000
+++ configure.ac 2010-03-04 04:50:28 +0000
@@ -51,7 +51,7 @@
51AC_SUBST(GCC_FLAGS)51AC_SUBST(GCC_FLAGS)
5252
53PKG_CHECK_MODULES(DEPS,53PKG_CHECK_MODULES(DEPS,
54 indicate >= 0.2.054 indicate >= 0.3.0
55 evolution-plugin55 evolution-plugin
56 dbus-156 dbus-1
57 dbus-glib-157 dbus-glib-1
5858
=== modified file 'src/evolution-indicator.c'
--- src/evolution-indicator.c 2009-12-17 14:59:03 +0000
+++ src/evolution-indicator.c 2010-03-04 04:50:28 +0000
@@ -100,7 +100,7 @@
100int e_plugin_lib_enable (EPluginLib *ep, int enable);100int e_plugin_lib_enable (EPluginLib *ep, int enable);
101GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *epl);101GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *epl);
102102
103static void show_evolution (gpointer arg0, gpointer arg1);103static void show_evolution (gpointer arg0, guint timestamp, gpointer arg1);
104104
105static void show_evolution_in_indicator_applet (void);105static void show_evolution_in_indicator_applet (void);
106static void hide_evolution_in_indicator_applet (void);106static void hide_evolution_in_indicator_applet (void);
@@ -945,52 +945,8 @@
945 *945 *
946 */946 */
947947
948/*948static void
949 * Taken from libtomboy, (C) 2008 Novell, LGPL v2 or later949show_evolution (gpointer arg0, guint timestamp, gpointer arg1)
950 */
951static void
952tomboy_window_override_user_time (GtkWindow *window)
953{
954 guint32 ev_time = gtk_get_current_event_time();
955
956 if (ev_time == 0) {
957 /*
958 * FIXME: Global keypresses use an event filter on the root
959 * window, which processes events before GDK sees them.
960 */
961 //ev_time = tomboy_keybinder_get_current_event_time ();
962 ev_time = GDK_CURRENT_TIME;
963 }
964 if (ev_time == 0) {
965 gint ev_mask = gtk_widget_get_events (GTK_WIDGET(window));
966 if (!(ev_mask & GDK_PROPERTY_CHANGE_MASK)) {
967 gtk_widget_add_events (GTK_WIDGET (window),
968 GDK_PROPERTY_CHANGE_MASK);
969 }
970
971 /*
972 * NOTE: Last resort for D-BUS or other non-interactive
973 * openings. Causes roundtrip to server. Lame.
974 */
975 ev_time = gdk_x11_get_server_time (GTK_WIDGET(window)->window);
976 }
977
978 gdk_x11_window_set_user_time (GTK_WIDGET(window)->window, ev_time);
979}
980
981static void
982really_present_window (GtkWindow *window)
983{
984 if (!GTK_WIDGET_REALIZED (window))
985 gtk_widget_realize (GTK_WIDGET (window));
986
987 tomboy_window_override_user_time (window);
988
989 gtk_window_present (window);
990}
991
992static void
993show_evolution (gpointer arg0, gpointer arg1)
994{950{
995#define MAIL_ICON "evolution-mail"951#define MAIL_ICON "evolution-mail"
996 EShell *shell = evo_shell;952 EShell *shell = evo_shell;
@@ -1029,7 +985,8 @@
1029 return;985 return;
1030 }986 }
1031987
1032 really_present_window (mail_window);988 gtk_window_present_with_time (mail_window, timestamp);
989
1033 for (i = indicators; i; i = i->next)990 for (i = indicators; i; i = i->next)
1034 {991 {
1035 IndicateIndicator *indicator = i->data;992 IndicateIndicator *indicator = i->data;

Subscribers

People subscribed via source and target branches