summaryrefslogtreecommitdiff
path: root/linux/main.cpp
diff options
context:
space:
mode:
authorleo2000-12-15 19:54:11 +0000
committerleo2000-12-15 19:54:11 +0000
commit68c5d0eab6376ba5d9329aa3d3b6cf0023a5bca6 (patch)
treeda5d4ccb019126bbc40f0eb8b814873241e685d7 /linux/main.cpp
parentd9bc55babd4e7fa69e46445d928c8c545376a3cf (diff)
Check that the saved window position is valid
git-svn-id: http://svn.leocad.org/trunk@175 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'linux/main.cpp')
-rw-r--r--linux/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index fbba97a..6d9d661 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -18,6 +18,7 @@
#include "main.h"
#include "system.h"
#include "config.h"
+#include "dialogs.h"
void create_main_menu (GtkObject *window, GtkWidget *vbox);
@@ -191,6 +192,11 @@ void OnCommand(GtkWidget* widget, gpointer data)
gtk_widget_show (anim_toolbar.handle_box);
} break;
+ case ID_VIEW_TOOLBAR_MODIFY:
+ {
+ modifydlg_toggle ();
+ } break;
+
case ID_VIEW_TOOLBAR_PIECES:
{
gpointer widget = gtk_object_get_data (GTK_OBJECT (main_window), "menu_view_toolbar_floating");
@@ -647,7 +653,8 @@ int main (int argc, char* argv[])
x = Sys_ProfileLoadInt ("Window", "PositionX", -1);
y = Sys_ProfileLoadInt ("Window", "PositionY", -1);
- if (x != -1 && y != -1)
+ if ((x != -1 && y != -1) &&
+ (x < gdk_screen_width () && y < gdk_screen_height ()))
gtk_widget_set_uposition (main_window, x, y);
gtk_signal_connect (GTK_OBJECT (main_window), "delete_event", (GtkSignalFunc) main_quit, NULL);