~ubuntu-branches/ubuntu/karmic/file-browser-applet/karmic

« back to all changes in this revision

Viewing changes to src/panel-menu-bar.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2009-02-13 21:33:45 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090213213345-gowiib2ifj0hmjb3
Tags: 0.6.1-0ubuntu1
* New upstream release. (LP: #329282)
 - Added mnemonic keyboard shortcut to menus for 
   faster keyboard navigation.
 - Added recent documents' support.
 - Improved menu browser focus after context menu close.
 - Fixed bugs #43, 44, 45, 49, 51, 56, 59, 60, 62.
* debian/control:
 - Update Vcs-Bzr field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 * Boston, MA 02110-1301, USA.
24
24
 */
25
25
 
26
 
#include <glib.h>
27
26
#include <glib/gprintf.h>
28
27
#include <gdk/gdkkeysyms.h>
 
28
#include <panel-applet.h>
 
29
#include <glib-object.h>
 
30
 
29
31
#include "panel-menu-bar.h"
30
32
#include "preferences.h"
31
33
#include "menu-browser.h"
32
34
#include "utils.h"
 
35
#include "config.h"
33
36
 
34
 
#ifdef ENABLE_GTK_HOTKEY 
 
37
#ifdef LIBGTKHOTKEY_FOUND 
35
38
#include <gtkhotkey.h>
36
39
#endif
37
40
 
38
41
/******************************************************************************/
39
42
#define PANEL_MENU_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PANEL_MENU_BAR, PanelMenuBarPrivate))
40
 
#define TOOLTIP_TEXT            "Browse and open files in your home directory"
 
43
#define TOOLTIP_TEXT            _("Browse and open files in your home directory")
41
44
/******************************************************************************/
42
45
struct _PanelMenuBarPrivate {
43
46
        PanelApplet                     *applet;
240
243
        }
241
244
}
242
245
/******************************************************************************/
243
 
#ifdef ENABLE_GTK_HOTKEY
 
246
#ifdef LIBGTKHOTKEY_FOUND
244
247
static void
245
248
panel_menu_bar_on_hotkey_press (GtkHotkeyInfo *hot_key_info,
246
249
                                                                guint event_time,
264
267
 
265
268
        GError *error = NULL;
266
269
 
267
 
        GtkHotkeyInfo *hot_key_info = gtk_hotkey_info_new ("file-browser-applet",
268
 
                                                                                                           "file-browser-applet",
 
270
        GtkHotkeyInfo *hot_key_info = gtk_hotkey_info_new (APP_NAME,
 
271
                                                       APP_NAME,
269
272
                                                       "<Super>h",
270
273
                                                                                                           NULL);
271
274
 
549
552
/******************************************************************************/
550
553
gboolean
551
554
panel_menu_bar_on_key_press (GtkWidget *widget,
552
 
                                                                GdkEventKey *event,
553
 
                                                                PanelMenuBar *self) {
 
555
                                                         GdkEventKey *event,
 
556
                                                         PanelMenuBar *self) {
554
557
        if (DEBUG) g_printf ("In %s\n", __FUNCTION__);
555
558
 
556
559
        g_return_val_if_fail (IS_PANEL_MENU_BAR (self), TRUE);
641
644
        /* get a handle to the applet context menu */
642
645
        self->priv->bonobo_control = panel_applet_get_control (applet);
643
646
 
644
 
#ifdef ENABLE_GTK_HOTKEY
 
647
#ifdef LIBGTKHOTKEY_FOUND
645
648
        /* setup global keybinding */
646
649
        panel_menu_bar_add_keybinding (self);
647
650
#endif