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
1=== modified file 'configure.ac'
2--- configure.ac 2010-01-21 16:22:32 +0000
3+++ configure.ac 2010-03-04 04:50:28 +0000
4@@ -51,7 +51,7 @@
5 AC_SUBST(GCC_FLAGS)
6
7 PKG_CHECK_MODULES(DEPS,
8- indicate >= 0.2.0
9+ indicate >= 0.3.0
10 evolution-plugin
11 dbus-1
12 dbus-glib-1
13
14=== modified file 'src/evolution-indicator.c'
15--- src/evolution-indicator.c 2009-12-17 14:59:03 +0000
16+++ src/evolution-indicator.c 2010-03-04 04:50:28 +0000
17@@ -100,7 +100,7 @@
18 int e_plugin_lib_enable (EPluginLib *ep, int enable);
19 GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *epl);
20
21-static void show_evolution (gpointer arg0, gpointer arg1);
22+static void show_evolution (gpointer arg0, guint timestamp, gpointer arg1);
23
24 static void show_evolution_in_indicator_applet (void);
25 static void hide_evolution_in_indicator_applet (void);
26@@ -945,52 +945,8 @@
27 *
28 */
29
30-/*
31- * Taken from libtomboy, (C) 2008 Novell, LGPL v2 or later
32- */
33-static void
34-tomboy_window_override_user_time (GtkWindow *window)
35-{
36- guint32 ev_time = gtk_get_current_event_time();
37-
38- if (ev_time == 0) {
39- /*
40- * FIXME: Global keypresses use an event filter on the root
41- * window, which processes events before GDK sees them.
42- */
43- //ev_time = tomboy_keybinder_get_current_event_time ();
44- ev_time = GDK_CURRENT_TIME;
45- }
46- if (ev_time == 0) {
47- gint ev_mask = gtk_widget_get_events (GTK_WIDGET(window));
48- if (!(ev_mask & GDK_PROPERTY_CHANGE_MASK)) {
49- gtk_widget_add_events (GTK_WIDGET (window),
50- GDK_PROPERTY_CHANGE_MASK);
51- }
52-
53- /*
54- * NOTE: Last resort for D-BUS or other non-interactive
55- * openings. Causes roundtrip to server. Lame.
56- */
57- ev_time = gdk_x11_get_server_time (GTK_WIDGET(window)->window);
58- }
59-
60- gdk_x11_window_set_user_time (GTK_WIDGET(window)->window, ev_time);
61-}
62-
63-static void
64-really_present_window (GtkWindow *window)
65-{
66- if (!GTK_WIDGET_REALIZED (window))
67- gtk_widget_realize (GTK_WIDGET (window));
68-
69- tomboy_window_override_user_time (window);
70-
71- gtk_window_present (window);
72-}
73-
74-static void
75-show_evolution (gpointer arg0, gpointer arg1)
76+static void
77+show_evolution (gpointer arg0, guint timestamp, gpointer arg1)
78 {
79 #define MAIL_ICON "evolution-mail"
80 EShell *shell = evo_shell;
81@@ -1029,7 +985,8 @@
82 return;
83 }
84
85- really_present_window (mail_window);
86+ gtk_window_present_with_time (mail_window, timestamp);
87+
88 for (i = indicators; i; i = i->next)
89 {
90 IndicateIndicator *indicator = i->data;

Subscribers

People subscribed via source and target branches