summaryrefslogtreecommitdiffstats
path: root/src/Patchage.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-02 17:10:26 +0000
committerDavid Robillard <d@drobilla.net>2008-01-02 17:10:26 +0000
commitcc2e862e207046040438c8f0c1c1cab3dd140b13 (patch)
treee1c57dc527c35da48fe7d4f5d9819c3cdf18ccf1 /src/Patchage.cpp
parentd29ecca68be290b7c2505e48fd2b6906f2f317d9 (diff)
downloadpatchage-cc2e862e207046040438c8f0c1c1cab3dd140b13.tar.gz
patchage-cc2e862e207046040438c8f0c1c1cab3dd140b13.tar.bz2
patchage-cc2e862e207046040438c8f0c1c1cab3dd140b13.zip
Added back retarded "do the winndow manager's job" code.
git-svn-id: http://svn.drobilla.net/lad/patchage@1005 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Patchage.cpp')
-rw-r--r--src/Patchage.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index e008bed..8a0a3ed 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -237,6 +237,14 @@ Patchage::Patchage(int argc, char** argv)
// Idle callback, check if we need to refresh
Glib::signal_timeout().connect(
sigc::mem_fun(this, &Patchage::idle_callback), 100);
+
+ _main_win->resize(
+ static_cast<int>(_state_manager->get_window_size().x),
+ static_cast<int>(_state_manager->get_window_size().y));
+
+ _main_win->move(
+ static_cast<int>(_state_manager->get_window_location().x),
+ static_cast<int>(_state_manager->get_window_location().y));
_update_pane_position = true;
}
@@ -409,6 +417,25 @@ Patchage::refresh()
}
+/** Update the stored window location and size in the StateManager (in memory).
+ */
+void
+Patchage::store_window_location()
+{
+ int loc_x, loc_y, size_x, size_y;
+ _main_win->get_position(loc_x, loc_y);
+ _main_win->get_size(size_x, size_y);
+ Coord window_location;
+ window_location.x = loc_x;
+ window_location.y = loc_y;
+ Coord window_size;
+ window_size.x = size_x;
+ window_size.y = size_y;
+ _state_manager->set_window_location(window_location);
+ _state_manager->set_window_size(window_size);
+}
+
+
void
Patchage::clear_load()
{
@@ -665,6 +692,7 @@ Patchage::on_show_messages()
void
Patchage::on_store_positions()
{
+ store_window_location();
_state_manager->save(_settings_filename);
}