~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to services/panel-service.c

  • Committer: Jason Smith
  • Date: 2011-01-11 15:48:03 UTC
  • mfrom: (729.3.2 scrollwheel-support)
  • Revision ID: jason.smith@canonical.com-20110111154803-kgsad6i33goz7oad
merge mouse wheel support for indicator branch by Connar Carney (big thanks)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "panel-service.h"
24
24
 
 
25
#include <stdlib.h>
25
26
#include <libindicator/indicator.h>
26
27
#include <libindicator/indicator-object.h>
27
28
#include <gtk/gtk.h>
996
997
}
997
998
 
998
999
void
 
1000
panel_service_scroll_entry (PanelService   *self,
 
1001
                            const gchar    *entry_id,
 
1002
                            gint32         delta)
 
1003
{
 
1004
  PanelServicePrivate  *priv = self->priv;
 
1005
  IndicatorObjectEntry *entry = g_hash_table_lookup (priv->id2entry_hash, entry_id);
 
1006
  IndicatorObject *object = g_hash_table_lookup (priv->entry2indicator_hash, entry);
 
1007
  GdkScrollDirection direction = delta > 0 ? GDK_SCROLL_DOWN : GDK_SCROLL_UP;
 
1008
  g_signal_emit_by_name(object, "scroll", abs(delta/120), direction);
 
1009
}
 
1010
 
 
1011
void
999
1012
panel_service_get_last_xy   (PanelService  *self,
1000
1013
                             gint          *x,
1001
1014
                             gint          *y)