From 68c5d0eab6376ba5d9329aa3d3b6cf0023a5bca6 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 15 Dec 2000 19:54:11 +0000 Subject: Check that the saved window position is valid git-svn-id: http://svn.leocad.org/trunk@175 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- linux/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'linux/main.cpp') 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); -- cgit v1.2.3