~anton0/ubuntu/precise/unity/lp-789979

« back to all changes in this revision

Viewing changes to tests/test_service_hud.c

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2012-03-23 12:55:51 UTC
  • mfrom: (1.1.65)
  • Revision ID: package-import@ubuntu.com-20120323125551-c0o25x31caiq8cwy
Tags: 5.8.0-0ubuntu1
* New upstream release.
  - New "push mouse offscreen" feature really difficult to get (LP: #923749)
  - unity-2d-panel crashed with SIGSEGV in
    unity::indicator::DBusIndicators::Impl::RequestSyncAll() (LP: #864737)
  - Pressing "Alt+Enter" causes compiz to crash in CompOption::value() from
    unity::UnityScreen::showLauncherKeyTerminate (LP: #960957)
  - SEGSIGV after unplugging external monitor (LP: #962693)
  - Background colorization should use a different heuristic (LP: #865239)
  - compiz+unity3d generates > 50 wakeups a second on idle system
    (LP: #917210)
  - [FFe, UIFe] HUD - The HUD does not respect launcher autohide or icon
    size settings (LP: #921506)
  - clicking on folders in the file lens does not open nautilus
    (LP: #921665)
  - No text inside multirange filters (LP: #927710)
  - can't alt-tab restore minimized uis which have an instance on another
    workspace (LP: #933397)
  - Ubuntu Software Center Unity launcher integration is not working
    (LP: #932280)
  - The line separator between the launcher and the dash is cleared when
    selecting a category (LP: #941082)
  - unity-panel-service crashed with SIGSEGV in g_hash_table_foreach()
    (LP: #937119)
  - Alt-F10 locks up Unity (LP: #948522)
  - multimonitor, launcher: Provide an option to display either a single
    launcher or a launcher on each display in a multi-monitor environment
    (LP: #950136)
  - multimonitor: Please give me a way to turn off sticky monitor edges
    (LP: #946104)
  - Unity 5.6: key bindings (such as Super) don't work on empty workspace or
    on slow/loaded systems (LP: #953089)
  - Alt+arrows keyboard shortcuts don't invoke Back and Forward navigation
    (LP: #953783)
  - HUD is sending 2 menu signals instead of 1 (LP: #956878)
  - 6th item of HUD not fully visible (LP: #957229)
  - HUD: seems to trigger operations more than once (LP: #960503)
  - Launcher gets always desaturated when using HUD on secondary monitor
    (LP: #961169)
  - [5.8 pre staging] launcher is displayed on the left screen, not the
    primary one (LP: #961281)
  - launcher icons do not re-saturate after dash is closed (LP: #961844)
  - Launcher shows arrows for applications on all workspaces (LP: #961977)
  - Dash - Implement overlay scrollbars in Dash (LP: #608124)
  - [UIFe] Dash - No message displayed when no results are returned in the
    Dash (LP: #711199)
  - Dash - "See more..." line should be base-aligned with section header
    (LP: #748101)
  - Dash - Missing category separator line in dash (LP: #850984)
  - Dash and Launcher - As soon as a user starts dragging a file from the
    Dash, there is a 'flicker' before the Launcher icons that are valid drop
    receptacles re-saturate (LP: #863230)
  - Dash - When multiple results have equal string match relevancy ranking,
    those with equal ranking should be then sorted by frequency of use.
    (LP: #871900)
  - Keyboard shortcut - F10 shortcut is used to show menu and this is wrong
    (LP: #878492)
  - Frozen double icon after launching and dragging at once (LP: #918753)
  - HUD is over gtk-menu (LP: #921305)
  - Files missing from Unity's POTFILES.in (LP: #923762)
  - Hidden menus are not really hidden (LP: #926330)
  - Need to bring back a "reveal border" option (LP: #927523)
  - Unity Panel lose shadow on changing the wallpaper (LP: #930271)
  - Incorrect item count in "See x more results" (LP: #934944)
  - Coverity PW.PARAMETER_HIDDEN - CID 10671 (LP: #938890)
  - Coverity PW.CAST_TO_QUALIFIED_TYPE - CID 10670 (LP: #938895)
  - [Shortcut overlay] Hardcoded value for switching ws (LP: #939517)
  - Dash - Font metrics and colors are wrong (LP: #942508)
  - Alt-tab switcher view should be pre-loaded to improve the startup time
    (LP: #942634)
  - Shortcut hint overlay should be hidden by Escape key (LP: #943422)
  - Dash/HUD - Spinner off-centre, looks drunk (LP: #943656)
  - Unable to restart lens which doesn't do global search (LP: #947301)
  - Launcher Switcher (Super+Tab) selection could be changed by arrow keys
    too (LP: #950404)
  - you have to release alt for alt + F10 working (LP: #943223)
  - magnifying glass is being overdrawn by text in searchbar  (LP: #955160)
  - hud searches don't update properly (LP: #956480)
  - Filters not working (LP: #961338)
  - Panel goes solid if switching from hud to dash or vice versa
    (LP: #962720)
  - compiz configuration options for unity are "fixme" (LP: #877382)
  - Launcher - When Launcher already has keyboard focus, Alt-F1 doesn't exit
    focus (LP: #885304)
  - Dash - dash is not closed with alt+f4 (LP: #891818)
  - Dash Home tooltip should use header capitalization (LP: #924354)
  - Typo in string 149: stoped (LP: #931382)
  - unity should not use dconf to store the average background colour
    (LP: #949277)
  - [UIFE] No HUD keybinding in the shortcut overlay (LP: #942515)
  - The hseparator is drawn also for the final dash category (LP: #955296)
* debian/patches/series:
  - remove the distro patches in trunk right now
* debian/control:
  - build-dep on latest nux,compiz and libcompizconfig for ABI breakage

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
                                GDBusMethodInvocation *invocation,
52
52
                                gpointer user_data);
53
53
 
 
54
static gboolean                 do_emit_signal(gpointer data);
 
55
static void                     emit_signal(GDBusConnection *connection);
 
56
 
 
57
 
54
58
G_DEFINE_TYPE(ServiceHud, service_hud, G_TYPE_OBJECT);
55
59
static GDBusNodeInfo * node_info = NULL;
56
60
static GDBusInterfaceInfo * iface_info = NULL;
60
64
  set_property: NULL,
61
65
};
62
66
 
63
 
 
64
67
struct _ServiceHudPrivate
65
68
{
66
69
  GDBusConnection * bus;
67
70
  GCancellable * bus_lookup;
68
71
  guint bus_registration;
 
72
  guint sig_emission_handle;
69
73
};
70
74
 
71
75
static void
88
92
    self->priv->bus = NULL;
89
93
  }
90
94
 
 
95
  if (self->priv->sig_emission_handle) {
 
96
    g_source_remove(self->priv->sig_emission_handle);
 
97
    self->priv->sig_emission_handle = 0;
 
98
  }
 
99
 
91
100
}
92
101
 
93
102
static void
129
138
  
130
139
  self->priv->bus_lookup = g_cancellable_new();
131
140
  g_bus_get(G_BUS_TYPE_SESSION, self->priv->bus_lookup, bus_got_cb, self);
132
 
  
133
141
}
134
142
 
135
143
ServiceHud*
168
176
    g_error_free(error);
169
177
    return;
170
178
  }
 
179
  else
 
180
  {
 
181
    self->priv->sig_emission_handle = g_timeout_add(1000, do_emit_signal, bus);
 
182
  }
171
183
  
172
184
  return;
173
185
}
174
186
 
 
187
static gboolean
 
188
do_emit_signal(gpointer data)
 
189
{
 
190
  emit_signal(G_DBUS_CONNECTION(data));
 
191
  return TRUE;
 
192
}
 
193
 
 
194
static void
 
195
emit_signal(GDBusConnection *connection)
 
196
{
 
197
  GVariant *query;
 
198
  int num_entries = 5;
 
199
 
 
200
  /* Build into into a variant */
 
201
  GVariantBuilder ret_builder;
 
202
  g_variant_builder_init(&ret_builder, G_VARIANT_TYPE_TUPLE);
 
203
  g_variant_builder_add_value(&ret_builder, g_variant_new_string("target"));
 
204
  GVariantBuilder builder;
 
205
  
 
206
  g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);
 
207
   
 
208
  int i = 0;
 
209
  for (i = 0; i < num_entries; i++) 
 
210
  {
 
211
    gchar* target = g_strdup_printf("test-%i", i);
 
212
    gchar* icon = g_strdup_printf("icon-%i", i);
 
213
    gchar* future_icon = g_strdup(icon);
 
214
    gchar* completion_text = g_strdup_printf("completion-%i", i);
 
215
    gchar* accelerator = g_strdup_printf("<alt>+whatever");
 
216
 
 
217
    GVariantBuilder tuple;
 
218
    g_variant_builder_init(&tuple, G_VARIANT_TYPE_TUPLE);
 
219
    g_variant_builder_add_value(&tuple, g_variant_new_string(target));
 
220
    g_variant_builder_add_value(&tuple, g_variant_new_string(icon));
 
221
    g_variant_builder_add_value(&tuple, g_variant_new_string(future_icon));
 
222
    g_variant_builder_add_value(&tuple, g_variant_new_string(completion_text));
 
223
    g_variant_builder_add_value(&tuple, g_variant_new_string(accelerator));
 
224
    // build a fake key
 
225
    GVariant* key;
 
226
    {
 
227
      GVariantBuilder keybuilder;
 
228
      g_variant_builder_init(&keybuilder, G_VARIANT_TYPE_TUPLE);
 
229
      g_variant_builder_add_value(&keybuilder, g_variant_new_string("dummy string"));
 
230
      g_variant_builder_add_value(&keybuilder, g_variant_new_string("dummy string"));
 
231
      g_variant_builder_add_value(&keybuilder, g_variant_new_string("dummy string"));
 
232
      g_variant_builder_add_value(&keybuilder, g_variant_new_int32(1986));
 
233
 
 
234
      key = g_variant_new_variant(g_variant_builder_end(&keybuilder));
 
235
    }
 
236
    g_variant_ref_sink(key);
 
237
    g_variant_builder_add_value(&tuple, key);
 
238
    g_variant_builder_add_value(&builder, g_variant_builder_end(&tuple));
 
239
    g_free(target);
 
240
    g_free(icon);
 
241
    g_free(future_icon);
 
242
    g_free(completion_text);
 
243
  }
 
244
  g_variant_builder_add_value(&ret_builder, g_variant_builder_end(&builder));
 
245
 
 
246
  GVariant* query_key;
 
247
  {
 
248
    GVariantBuilder keybuilder;
 
249
    g_variant_builder_init(&keybuilder, G_VARIANT_TYPE_TUPLE);
 
250
    g_variant_builder_add_value(&keybuilder, g_variant_new_string("dummy string"));
 
251
    g_variant_builder_add_value(&keybuilder, g_variant_new_string("dummy string"));
 
252
    g_variant_builder_add_value(&keybuilder, g_variant_new_string("dummy string"));
 
253
    g_variant_builder_add_value(&keybuilder, g_variant_new_int32(1986));
 
254
 
 
255
    query_key = g_variant_new_variant(g_variant_builder_end(&keybuilder));
 
256
  }
 
257
  g_variant_ref_sink(query_key);
 
258
  g_variant_builder_add_value(&ret_builder, query_key);
 
259
  
 
260
  query = g_variant_builder_end(&ret_builder);
 
261
  
 
262
  g_dbus_connection_emit_signal (connection, NULL, "/com/canonical/hud",
 
263
                                 "com.canonical.hud", "UpdatedQuery",
 
264
                                 query, NULL);
 
265
}
 
266
 
175
267
static void
176
268
bus_method (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data)
177
269
{