summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22e6ef6)
raw | patch | inline | side by side (parent: 22e6ef6)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 27 Nov 2006 15:01:13 +0000 (15:01 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 27 Nov 2006 15:01:13 +0000 (15:01 +0000) |
index 2bed7b3993d0fa53695018d41e6894bdc9d207d7..172f4f6774f0a4db3f7ef477b9126eb857c59c0e 100644 (file)
* Clone tiling dialog
*
* Authors:
- * bulia byak <buliabyak@users.sf.net>
+ * bulia byak <buliabyak@users.sf.net>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 2004-2005 Authors
+ * Copyright (C) 2004-2006 Authors
* Released under GNU GPL
*/
#include "../sp-filter.h"
#include "../filter-chemistry.h"
+#define MIN_ONSCREEN_DISTANCE 50
+
static GtkWidget *dlg = NULL;
static win_data wd;
dlg = sp_window_new (title, TRUE);
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute (prefs_path, "x", 0);
- y = prefs_get_int_attribute (prefs_path, "y", 0);
+ x = prefs_get_int_attribute (prefs_path, "x", -1000);
+ y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0) {
+ if (w && h) {
+ gtk_window_resize ((GtkWindow *) dlg, w, h);
+ }
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move ((GtkWindow *) dlg, x, y);
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
- if (w && h) {
- gtk_window_resize ((GtkWindow *) dlg, w, h);
- }
sp_transientize (dlg);
wd.win = dlg;
diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp
index f3efeed81329bba0fb4af6b8777e3a7e56f27285..257abb13815715b5fc5879f580685f33a0ffafea 100644 (file)
--- a/src/dialogs/find.cpp
+++ b/src/dialogs/find.cpp
#include "../sp-offset.h"
#include <xml/repr.h>
+#define MIN_ONSCREEN_DISTANCE 50
+
using NR::X;
using NR::Y;
dlg = sp_window_new (title, TRUE);
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute (prefs_path, "x", 0);
- y = prefs_get_int_attribute (prefs_path, "y", 0);
+ x = prefs_get_int_attribute (prefs_path, "x", -1000);
+ y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
w = prefs_get_int_attribute (prefs_path, "w", 0);
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0) {
+ if (w && h)
+ gtk_window_resize ((GtkWindow *) dlg, w, h);
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move ((GtkWindow *) dlg, x, y);
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
- if (w && h)
- gtk_window_resize ((GtkWindow *) dlg, w, h);
sp_transientize (dlg);
wd.win = dlg;
diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp
index eac3a0c5a549b794aa8dde82491792dfba80aa7c..8d6ff399d27c5f52b4d97d66f7f9586538cb3c4b 100644 (file)
--- a/src/dialogs/input.cpp
+++ b/src/dialogs/input.cpp
*
* Authors:
* Nicklas Lindgren <nili@lysator.liu.se>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 2005 Authors
+ * Copyright (C) 2005-2006 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "dialog-events.h"
#include "../prefs-utils.h"
+#define MIN_ONSCREEN_DISTANCE 50
static GtkWidget *dlg = NULL;
static win_data wd;
dlg = gtk_input_dialog_new();
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute (prefs_path, "x", 0);
- y = prefs_get_int_attribute (prefs_path, "y", 0);
+ x = prefs_get_int_attribute (prefs_path, "x", -1000);
+ y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0) {
+ if (w && h) {
+ gtk_window_resize ((GtkWindow *) dlg, w, h);
+ }
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move ((GtkWindow *) dlg, x, y);
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
- if (w && h) {
- gtk_window_resize ((GtkWindow *) dlg, w, h);
- }
sp_transientize (dlg);
wd.win = dlg;
index 3bb7f7d84e9c31e77449b944bbc775ce3436dd41..db4eb34fcbe7d7f5881bb45eec00267922e44a3f 100644 (file)
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 1999-2005 Authors
+ * Copyright (C) 1999-2006 Authors
* Copyright (C) 2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
#include "dialog-events.h"
#include "../prefs-utils.h"
+#define MIN_ONSCREEN_DISTANCE 50
static GtkWidget *dlg = NULL;
static win_data wd;
dlg = sp_window_new (title, TRUE);
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute (prefs_path, "x", 0);
- y = prefs_get_int_attribute (prefs_path, "y", 0);
+ x = prefs_get_int_attribute (prefs_path, "x", -1000);
+ y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0) {
+ if (w && h) {
+ gtk_window_resize ((GtkWindow *) dlg, w, h);
+ }
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move ((GtkWindow *) dlg, x, y);
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
- if (w && h) {
- gtk_window_resize ((GtkWindow *) dlg, w, h);
- }
sp_transientize (dlg);
wd.win = dlg;
index 3cb670805d310e008a5b64bcc46f372386120e84..ce65edbebcfc0042eef2c3762d50ab1a79d298d2 100644 (file)
* Lauris Kaplinski <lauris@kaplinski.com>
* Frank Felfe <innerspace@iname.com>
* bulia byak <buliabyak@users.sf.net>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 1999-2005 authors
+ * Copyright (C) 1999-2006 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
#include "xml/repr.h"
#include "display/sp-canvas.h"
+#define MIN_ONSCREEN_DISTANCE 50
+
static GtkWidget *dlg = NULL;
static win_data wd;
dlg = sp_window_new (title, TRUE);
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute (prefs_path, "x", 0);
- y = prefs_get_int_attribute (prefs_path, "y", 0);
+ x = prefs_get_int_attribute (prefs_path, "x", -1000);
+ y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
w = prefs_get_int_attribute (prefs_path, "w", 0);
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0)
+ if (w && h) gtk_window_resize ((GtkWindow *) dlg, w, h);
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE)))
gtk_window_move ((GtkWindow *) dlg, x, y);
else
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
- if (w && h) gtk_window_resize ((GtkWindow *) dlg, w, h);
sp_transientize (dlg);
wd.win = dlg;
wd.stop = 0;
index 85237c7cb6cd681507d6236ec64b44e3e47830b0..a44860ee394971a78782f14ad1c543c7294bc6a0 100644 (file)
/**
* \brief Text editing dialog
*
- * Author:
+ * Authors:
* Lauris Kaplinski <lauris@ximian.com>
* bulia byak <buliabyak@users.sf.net>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 1999-2002 Lauris Kaplinski
+ * Copyright (C) 1999-2006 Authors
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
#include <xml/repr.h>
#define VB_MARGIN 4
+#define MIN_ONSCREEN_DISTANCE 50
static void sp_text_edit_dialog_selection_modified (Inkscape::Application *inkscape, Inkscape::Selection *sel, guint flags, GtkWidget *dlg);
static void sp_text_edit_dialog_selection_changed (Inkscape::Application *inkscape, Inkscape::Selection *sel, GtkWidget *dlg);
dlg = sp_window_new (title, TRUE);
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute (prefs_path, "x", 0);
- y = prefs_get_int_attribute (prefs_path, "y", 0);
+ x = prefs_get_int_attribute (prefs_path, "x", -1000);
+ y = prefs_get_int_attribute (prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
h = prefs_get_int_attribute (prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0) {
+ if (w && h)
+ gtk_window_resize ((GtkWindow *) dlg, w, h);
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move ((GtkWindow *) dlg, x, y);
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
- if (w && h)
- gtk_window_resize ((GtkWindow *) dlg, w, h);
sp_transientize (dlg);
wd.win = dlg;
index b843819894f4b5cb578b514dce1cbe3c2fc2afc0..3402e72b5cc0a0b147a55c794b1734771d26f14f 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
* Lauris Kaplinski <lauris@kaplinski.com>
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 1999-2005 Authors
+ * Copyright (C) 1999-2006 Authors
* Copyright (C) 2004 David Turner
*
* Released under GNU GPL, read the file 'COPYING' for more information
#include "message-stack.h"
#include "message-context.h"
+#define MIN_ONSCREEN_DISTANCE 50
+
struct EditableDest {
GtkEditable *editable;
gchar *text;
dlg = sp_window_new("", TRUE);
if (x == -1000 || y == -1000) {
- x = prefs_get_int_attribute(prefs_path, "x", 0);
- y = prefs_get_int_attribute(prefs_path, "y", 0);
+ x = prefs_get_int_attribute(prefs_path, "x", -1000);
+ y = prefs_get_int_attribute(prefs_path, "y", -1000);
}
if (w ==0 || h == 0) {
w = prefs_get_int_attribute(prefs_path, "w", 0);
h = prefs_get_int_attribute(prefs_path, "h", 0);
}
- if (x<0) x=0;
- if (y<0) y=0;
+// if (x<0) x=0;
+// if (y<0) y=0;
- if (x != 0 || y != 0) {
+ if (w && h) {
+ gtk_window_resize((GtkWindow *) dlg, w, h);
+ }
+ if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
gtk_window_move((GtkWindow *) dlg, x, y);
} else {
gtk_window_set_position(GTK_WINDOW(dlg), GTK_WIN_POS_CENTER);
}
- if (w && h) {
- gtk_window_resize((GtkWindow *) dlg, w, h);
- }
sp_transientize(dlg);
wd.win = dlg;
wd.stop = 0;