summaryrefslogtreecommitdiff
path: root/hw/xquartz/X11Controller.m
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-07-20 22:38:25 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-07-24 09:41:32 -0700
commit7ff84d350b44fa40669c1d0d48a715a0bf056ece (patch)
treee73e260312dd935cd226346246ed749759044325 /hw/xquartz/X11Controller.m
parent1e1dbd1e462f571dad2f9684fcf4cd8ae17eedd5 (diff)
XQuartz: Added a "Check for X11 Updates..." menu item.
(cherry picked from commit 305144bfa4b59791123c44e869fab93a084792d6)
Diffstat (limited to 'hw/xquartz/X11Controller.m')
-rw-r--r--hw/xquartz/X11Controller.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index adf861ca9..2e05816b0 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -53,6 +53,10 @@
#include <sys/types.h>
#include <sys/wait.h>
+#ifdef XQUARTZ_SPARKLE
+#include <Sparkle/SUUpdater.h>
+#endif
+
BOOL xquartz_resetenv_display = NO;
@implementation X11Controller
@@ -312,6 +316,23 @@ BOOL xquartz_resetenv_display = NO;
[self install_apps_menu:list];
}
+#ifdef XQUARTZ_SPARKLE
+- (void) set_check_for_updates_menu_item {
+ if(check_for_updates_item)
+ return; // already did it...
+
+ NSMenu *menu = [x11_about_item menu];
+
+ check_for_updates_item = [menu insertItemWithTitle:NSLocalizedString(@"Check for X11 Updates...", @"Check for X11 Updates...")
+ action:@selector (checkForUpdates:)
+ keyEquivalent:@""
+ atIndex:1];
+ [check_for_updates_item setTarget:[SUUpdater sharedUpdater]];
+ [check_for_updates_item setEnabled:YES];
+
+}
+#endif
+
- (void) launch_client:(NSString *)filename
{
int child1, child2 = 0;