~indicator-applet-developers/indicator-applet/applet-0-3

« back to all changes in this revision

Viewing changes to src/applet-main.c

Compiler cleanups from Kevin Turner

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <gdk/gdkkeysyms.h>
27
27
 
28
28
#include "libindicator/indicator-object.h"
29
 
 
 
29
#include "tomboykeybinder.h"
30
30
 
31
31
static gchar * indicator_order[] = {
32
32
        "libapplication.so",
231
231
}
232
232
 
233
233
static void
234
 
entry_removed (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data)
 
234
entry_removed (IndicatorObject * io G_GNUC_UNUSED, IndicatorObjectEntry * entry,
 
235
               gpointer user_data)
235
236
{
236
237
        g_debug("Signal: Entry Removed");
237
238
 
260
261
 
261
262
/* Gets called when an entry for an object was moved. */
262
263
static void
263
 
entry_moved (IndicatorObject * io, IndicatorObjectEntry * entry, gint old, gint new, gpointer user_data)
 
264
entry_moved (IndicatorObject * io, IndicatorObjectEntry * entry,
 
265
             gint old G_GNUC_UNUSED, gint new G_GNUC_UNUSED, gpointer user_data)
264
266
{
265
267
        GtkWidget * menu = GTK_WIDGET(user_data);
266
268
 
332
334
}
333
335
 
334
336
static void
335
 
hotkey_filter (char * keystring, gpointer data)
 
337
hotkey_filter (char * keystring G_GNUC_UNUSED, gpointer data)
336
338
{
337
339
        g_return_if_fail(GTK_IS_MENU_SHELL(data));
338
340
 
357
359
static gboolean
358
360
menubar_press (GtkWidget * widget,
359
361
                    GdkEventButton *event,
360
 
                    gpointer data)
 
362
                    gpointer data G_GNUC_UNUSED)
361
363
{
362
364
        if (event->button != 1) {
363
365
                g_signal_stop_emission_by_name(widget, "button-press-event");
367
369
}
368
370
 
369
371
static gboolean
370
 
menubar_scroll (GtkWidget      *widget,
 
372
menubar_scroll (GtkWidget      *widget G_GNUC_UNUSED,
371
373
                GdkEventScroll *event,
372
 
                gpointer        data)
 
374
                gpointer        data G_GNUC_UNUSED)
373
375
{
374
376
  GtkWidget *menuitem;
375
 
  GtkWidget *parent;
376
377
 
377
378
  menuitem = gtk_get_event_widget ((GdkEvent *)event);
378
379
 
379
380
  IndicatorObject *io = g_object_get_data (G_OBJECT (menuitem), "indicator");
380
381
  g_signal_emit_by_name (io, "scroll", 1, event->direction);
 
382
 
 
383
  return FALSE;
381
384
}
382
385
 
383
386
static gboolean
384
387
menubar_on_expose (GtkWidget * widget,
385
 
                    GdkEventExpose *event,
 
388
                    GdkEventExpose *event G_GNUC_UNUSED,
386
389
                    GtkWidget * menubar)
387
390
{
388
391
        if (GTK_WIDGET_HAS_FOCUS(menubar))
393
396
}
394
397
 
395
398
static void
396
 
about_cb (BonoboUIComponent *ui_container,
397
 
          gpointer           data,
398
 
          const gchar       *cname)
 
399
about_cb (BonoboUIComponent *ui_container G_GNUC_UNUSED,
 
400
          gpointer           data G_GNUC_UNUSED,
 
401
          const gchar       *cname G_GNUC_UNUSED)
399
402
{
400
403
        static const gchar *authors[] = {
401
404
                "Ted Gould <ted@canonical.com>",
448
451
#define N_(x) x
449
452
 
450
453
static void
451
 
log_to_file_cb (GObject * source_obj, GAsyncResult * result, gpointer user_data)
 
454
log_to_file_cb (GObject * source_obj G_GNUC_UNUSED,
 
455
                GAsyncResult * result G_GNUC_UNUSED, gpointer user_data)
452
456
{
453
457
        g_free(user_data);
454
458
        return;
455
459
}
456
460
 
457
461
static void
458
 
log_to_file (const gchar * domain, GLogLevelFlags level, const gchar * message, gpointer data)
 
462
log_to_file (const gchar * domain G_GNUC_UNUSED,
 
463
             GLogLevelFlags level G_GNUC_UNUSED,
 
464
             const gchar * message,
 
465
             gpointer data G_GNUC_UNUSED)
459
466
{
460
467
        if (log_file == NULL) {
461
468
                GError * error = NULL;
500
507
}
501
508
 
502
509
static gboolean
503
 
applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data)
 
510
applet_fill_cb (PanelApplet * applet, const gchar * iid G_GNUC_UNUSED,
 
511
                gpointer data G_GNUC_UNUSED)
504
512
{
505
513
        static const BonoboUIVerb menu_verbs[] = {
506
514
                BONOBO_UI_VERB ("IndicatorAppletAbout", about_cb),
512
520
                "</popup>";
513
521
 
514
522
        GtkWidget *menubar;
515
 
        gint i;
516
523
        gint indicators_loaded = 0;
517
524
        static gboolean first_time = FALSE;
518
525