summaryrefslogtreecommitdiff
path: root/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-20 22:31:21 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-20 22:40:06 +0100
commitbe4533717afe45196eb172330046aa0499d02c7c (patch)
tree464af42b33f1995aa7effc2f9432c7343e5febc4 /LibGUI
parent1030e6b84887544063429f141e65c30668165e4f (diff)
downloadserenity-be4533717afe45196eb172330046aa0499d02c7c.zip
FileManager: Add ability to create new directories.
Diffstat (limited to 'LibGUI')
-rw-r--r--LibGUI/GDialog.cpp7
-rw-r--r--LibGUI/GMessageBox.cpp2
-rw-r--r--LibGUI/GWindow.h3
3 files changed, 7 insertions, 5 deletions
diff --git a/LibGUI/GDialog.cpp b/LibGUI/GDialog.cpp
index d6a925bfb2..3832d2b32c 100644
--- a/LibGUI/GDialog.cpp
+++ b/LibGUI/GDialog.cpp
@@ -25,14 +25,15 @@ int GDialog::exec()
show();
auto result = m_event_loop->exec();
m_event_loop = nullptr;
- dbgprintf("event loop returned with result %d\n", result);
+ dbgprintf("%s: event loop returned with result %d\n", class_name(), result);
return result;
}
void GDialog::done(int result)
{
- ASSERT(m_event_loop);
+ if (!m_event_loop)
+ return;
m_result = result;
- dbgprintf("quit event loop with result %d\n", result);
+ dbgprintf("%s: quit event loop with result %d\n", class_name(), result);
m_event_loop->quit(result);
}
diff --git a/LibGUI/GMessageBox.cpp b/LibGUI/GMessageBox.cpp
index 8f97cca5bd..057cd6a28a 100644
--- a/LibGUI/GMessageBox.cpp
+++ b/LibGUI/GMessageBox.cpp
@@ -39,7 +39,7 @@ void GMessageBox::build()
button->set_preferred_size({ 100, 16 });
button->set_caption("OK");
button->on_click = [this] (auto&) {
- dbgprintf("OK button clicked\n");
+ dbgprintf("GMessageBox: OK button clicked\n");
done(0);
};
}
diff --git a/LibGUI/GWindow.h b/LibGUI/GWindow.h
index 1f899e1acb..720de5b408 100644
--- a/LibGUI/GWindow.h
+++ b/LibGUI/GWindow.h
@@ -80,8 +80,9 @@ public:
Size base_size() const { return m_base_size; }
void set_base_size(const Size& size) { m_base_size = size; }
-private:
virtual const char* class_name() const override { return "GWindow"; }
+
+private:
virtual bool is_window() const override final { return true; }
Retained<GraphicsBitmap> create_backing_bitmap(const Size&);