XQuartz: Set can_quit to true during a Sparkle-initiated relaunch.
This commit is contained in:
parent
305144bfa4
commit
b2e9a77111
|
@ -970,7 +970,7 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
|
|||
fprintf(stderr, "Error initializing xpbproxy\n");
|
||||
|
||||
#if XQUARTZ_SPARKLE
|
||||
[[X11App controller] set_check_for_updates_menu_item];
|
||||
[[X11App controller] setup_sparkle];
|
||||
[[SUUpdater sharedUpdater] resetUpdateCycle];
|
||||
// [[SUUpdater sharedUpdater] checkForUpdates:X11App];
|
||||
#endif
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
#include "sanitizedCocoa.h"
|
||||
#include "xpr/x-list.h"
|
||||
|
||||
#ifdef XQUARTZ_SPARKLE
|
||||
#include <Sparkle/SUUpdater.h>
|
||||
#endif
|
||||
|
||||
@interface X11Controller : NSObject
|
||||
{
|
||||
IBOutlet NSPanel *prefs_panel;
|
||||
|
@ -91,7 +95,8 @@
|
|||
- (void) set_window_menu_check:(NSNumber *)n;
|
||||
- (void) set_apps_menu:(NSArray *)list;
|
||||
#ifdef XQUARTZ_SPARKLE
|
||||
- (void) set_check_for_updates_menu_item;
|
||||
- (void) setup_sparkle;
|
||||
- (void) updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
|
||||
#endif
|
||||
- (void) set_can_quit:(OSX_BOOL)state;
|
||||
- (void) server_ready;
|
||||
|
|
|
@ -53,10 +53,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#ifdef XQUARTZ_SPARKLE
|
||||
#include <Sparkle/SUUpdater.h>
|
||||
#endif
|
||||
|
||||
BOOL xquartz_resetenv_display = NO;
|
||||
|
||||
@implementation X11Controller
|
||||
|
@ -317,7 +313,7 @@ BOOL xquartz_resetenv_display = NO;
|
|||
}
|
||||
|
||||
#ifdef XQUARTZ_SPARKLE
|
||||
- (void) set_check_for_updates_menu_item {
|
||||
- (void) setup_sparkle {
|
||||
if(check_for_updates_item)
|
||||
return; // already did it...
|
||||
|
||||
|
@ -330,7 +326,15 @@ BOOL xquartz_resetenv_display = NO;
|
|||
[check_for_updates_item setTarget:[SUUpdater sharedUpdater]];
|
||||
[check_for_updates_item setEnabled:YES];
|
||||
|
||||
// Set X11Controller as the delegate for the updater.
|
||||
[[SUUpdater sharedUpdater] setDelegate:self];
|
||||
}
|
||||
|
||||
// Sent immediately before installing the specified update.
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update {
|
||||
[self set_can_quit:YES];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
- (void) launch_client:(NSString *)filename
|
||||
|
|
Loading…
Reference in New Issue
Block a user