~ubuntu-branches/ubuntu/oneiric/indicator-applet/oneiric

« back to all changes in this revision

Viewing changes to src/applet-main.c

  • Committer: Bazaar Package Importer
  • Author(s): Ted Gould, Ken VanDine
  • Date: 2010-05-27 15:09:57 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20100527150957-q2ovexc6e0i9cuvo
Tags: 0.4.1-0ubuntu1
* New upstream release.
  * Fix build of Bonobo server files
  * Creating a new binary target indicator-applet-appmenu
* debian/control, debian/indicator-applet-appmenu.install: Adding
  a new binary package for indicator-applet-appmenu

[Ken VanDine]
* debian/control
  - Change maintainer to ubuntu-desktop

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
A small wrapper utility to load indicators and put them as menu items
3
3
into the gnome-panel using it's applet interface.
4
4
 
5
 
Copyright 2009 Canonical Ltd.
 
5
Copyright 2009-2010 Canonical Ltd.
6
6
 
7
7
Authors:
8
8
    Ted Gould <ted@canonical.com>
76
76
               "indicator-applet-complete", "0",
77
77
               applet_fill_cb, NULL);
78
78
#endif
 
79
#ifdef INDICATOR_APPLET_APPMENU
 
80
PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_IndicatorAppletAppmenu_Factory",
 
81
               PANEL_TYPE_APPLET,
 
82
               "indicator-applet-appmenu", "0",
 
83
               applet_fill_cb, NULL);
 
84
#endif
79
85
 
80
86
/*************
81
87
 * log files
89
95
#ifdef INDICATOR_APPLET_COMPLETE
90
96
#define LOG_FILE_NAME  "indicator-applet-complete.log"
91
97
#endif
 
98
#ifdef INDICATOR_APPLET_APPMENU
 
99
#define LOG_FILE_NAME  "indicator-applet-appmenu.log"
 
100
#endif
92
101
GOutputStream * log_file = NULL;
93
102
 
94
103
/*****************
103
112
#ifdef INDICATOR_APPLET_COMPLETE
104
113
gchar * hotkey_keycode = "<Super>S";
105
114
#endif
 
115
#ifdef INDICATOR_APPLET_APPMENU
 
116
gchar * hotkey_keycode = "<Super>F1";
 
117
#endif
106
118
 
107
119
/*************
108
120
 * init function
439
451
 
440
452
        gtk_show_about_dialog(NULL,
441
453
                "version", VERSION,
442
 
                "copyright", "Copyright \xc2\xa9 2009 Canonical, Ltd.",
 
454
                "copyright", "Copyright \xc2\xa9 2009-2010 Canonical, Ltd.",
443
455
#ifdef INDICATOR_APPLET_SESSION
444
456
                "comments", _("A place to adjust your status, change users or exit your session."),
445
457
#else
 
458
#ifdef INDICATOR_APPLET_APPMENU
 
459
                "comments", _("An applet to hold your application menus."),
 
460
#endif
446
461
                "comments", _("An applet to hold all of the system indicators."),
447
462
#endif
448
463
                "authors", authors,
625
640
#ifdef INDICATOR_APPLET_COMPLETE
626
641
                g_set_application_name(_("Indicator Applet Complete"));
627
642
#endif
 
643
#ifdef INDICATOR_APPLET_APPMENU
 
644
                g_set_application_name(_("Indicator Applet Application Menu"));
 
645
#endif
628
646
                
629
647
                g_log_set_default_handler(log_to_file, NULL);
630
648
 
648
666
        atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (applet)),
649
667
                             "indicator-applet-complete");
650
668
#endif
 
669
#ifdef INDICATOR_APPLET_APPMENU
 
670
        atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (applet)),
 
671
                             "indicator-applet-appmenu");
 
672
#endif
651
673
 
652
674
        /* Init some theme/icon stuff */
653
675
        gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(),
706
728
 
707
729
                const gchar * name;
708
730
                while ((name = g_dir_read_name(dir)) != NULL) {
 
731
#ifdef INDICATOR_APPLET_APPMENU
 
732
                        if (g_strcmp0(name, "libappmenu.so")) {
 
733
                                continue;
 
734
                        }
 
735
#else
 
736
                        if (!g_strcmp0(name, "libappmenu.so")) {
 
737
                                continue;
 
738
                        }
 
739
#endif
709
740
#ifdef INDICATOR_APPLET
710
741
                        if (!g_strcmp0(name, "libsession.so")) {
711
742
                                continue;