summaryrefslogtreecommitdiff
path: root/tikzit/src/gtk/SettingsDialog.m
diff options
context:
space:
mode:
Diffstat (limited to 'tikzit/src/gtk/SettingsDialog.m')
-rw-r--r--tikzit/src/gtk/SettingsDialog.m34
1 files changed, 17 insertions, 17 deletions
diff --git a/tikzit/src/gtk/SettingsDialog.m b/tikzit/src/gtk/SettingsDialog.m
index 11a0d0d..a70a412 100644
--- a/tikzit/src/gtk/SettingsDialog.m
+++ b/tikzit/src/gtk/SettingsDialog.m
@@ -50,13 +50,24 @@ static void cancel_button_clicked_cb (GtkButton *widget, SettingsDialog *dialog)
if (self) {
configuration = [c retain];
- parentWindow = NULL;
- window = NULL;
}
return self;
}
+- (void) dealloc {
+ if (window) {
+ gtk_widget_destroy (GTK_WIDGET (window));
+ }
+ if (parentWindow) {
+ g_object_unref (parentWindow);
+ }
+
+ [configuration release];
+
+ [super dealloc];
+}
+
- (Configuration*) configuration {
return configuration;
}
@@ -68,6 +79,10 @@ static void cancel_button_clicked_cb (GtkButton *widget, SettingsDialog *dialog)
[self revert];
}
+- (GtkWindow*) parentWindow {
+ return parentWindow;
+}
+
- (void) setParentWindow:(GtkWindow*)parent {
GtkWindow *oldParent = parentWindow;
@@ -118,21 +133,6 @@ static void cancel_button_clicked_cb (GtkButton *widget, SettingsDialog *dialog)
}
}
-- (void) dealloc {
- [configuration release];
- configuration = nil;
-
- if (window) {
- gtk_widget_destroy (GTK_WIDGET (window));
- window = NULL;
- }
- if (parentWindow) {
- g_object_ref (parentWindow);
- }
-
- [super dealloc];
-}
-
@end
// }}}