summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e9e9278)
raw | patch | inline | side by side (parent: e9e9278)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 22 Mar 2008 00:17:46 +0000 (00:17 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 22 Mar 2008 00:17:46 +0000 (00:17 +0000) |
src/dialogs/Makefile_insert | patch | blob | history | |
src/dialogs/calligraphic-profile-rename.cpp | [deleted file] | patch | blob | history |
src/dialogs/calligraphic-profile-rename.h | [deleted file] | patch | blob | history |
src/widgets/Makefile_insert | patch | blob | history | |
src/widgets/calligraphic-profile-rename.cpp | [new file with mode: 0755] | patch | blob |
src/widgets/calligraphic-profile-rename.h | [new file with mode: 0755] | patch | blob |
src/widgets/toolbox.cpp | patch | blob | history |
index 2f687ea46ae25f4feb8e882e7748c39c7e2e4937..4b1d42abbafdbc1c70e8621e9b9e374978f693f3 100644 (file)
dialogs/unclump.cpp \
dialogs/unclump.h \
dialogs/iconpreview.cpp \
- dialogs/iconpreview.h \
- dialogs/calligraphic-profile-rename.h \
- dialogs/calligraphic-profile-rename.cpp
+ dialogs/iconpreview.h
# dialogs/sp-widget.c \
# dialogs/sp-widget.h \
diff --git a/src/dialogs/calligraphic-profile-rename.cpp b/src/dialogs/calligraphic-profile-rename.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/**\r
- *\r
- * \brief Dialog for naming calligraphic profiles\r
- *\r
- * Author:\r
- * Aubanel MONNIER \r
- *\r
- * Copyright (C) 2007 Aubanel MONNIER\r
- *\r
- * Released under GNU GPL. Read the file 'COPYING' for more information\r
- */\r
-\r
-#ifdef HAVE_CONFIG_H\r
-# include <config.h>\r
-#endif\r
-\r
-#include <glibmm/i18n.h>\r
-#include <gtkmm/stock.h>\r
-\r
-#include "desktop.h"\r
-#include "calligraphic-profile-rename.h"\r
-\r
-\r
-namespace Inkscape {\r
-namespace UI {\r
-namespace Dialogs {\r
-CalligraphicProfileDialog::CalligraphicProfileDialog(): _applied(false){\r
- Gtk::VBox *mainVBox = get_vbox();\r
- _layout_table.set_spacings(4);\r
- _layout_table.resize (1, 2);\r
-\r
- _profile_name_entry.set_activates_default(true);\r
-\r
- _profile_name_label.set_label(_("Profile name:"));\r
- _profile_name_label.set_alignment(1.0, 0.5);\r
- \r
- _layout_table.attach(_profile_name_label,\r
- 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);\r
- _layout_table.attach(_profile_name_entry,\r
- 1, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);\r
- mainVBox->pack_start(_layout_table, false, false, 4);\r
- // Buttons\r
- _close_button.set_use_stock(true);\r
- _close_button.set_label(Gtk::Stock::CANCEL.id);\r
- _close_button.set_flags(Gtk::CAN_DEFAULT);\r
- \r
- _apply_button.set_use_underline(true);\r
- _apply_button.set_label(_("Save"));\r
- _apply_button.set_flags(Gtk::CAN_DEFAULT);\r
- \r
- _close_button.signal_clicked()\r
- .connect(sigc::mem_fun(*this, &CalligraphicProfileDialog::_close));\r
- _apply_button.signal_clicked()\r
- .connect(sigc::mem_fun(*this, &CalligraphicProfileDialog::_apply));\r
- \r
- signal_delete_event().connect(\r
- sigc::bind_return(\r
- sigc::hide(sigc::mem_fun(*this, &CalligraphicProfileDialog::_close)),\r
- true\r
- )\r
- );\r
-\r
- add_action_widget(_close_button, Gtk::RESPONSE_CLOSE);\r
- add_action_widget(_apply_button, Gtk::RESPONSE_APPLY);\r
-\r
- _apply_button.grab_default();\r
-\r
- show_all_children();\r
-\r
-}\r
-\r
-void\r
-CalligraphicProfileDialog::_apply()\r
-{\r
- _profile_name = _profile_name_entry.get_text();\r
- _applied = true;\r
- _close();\r
-}\r
-\r
-void\r
-CalligraphicProfileDialog::_close()\r
-{\r
- this->Gtk::Dialog::hide();\r
- \r
-}\r
-\r
-void CalligraphicProfileDialog::show(SPDesktop *desktop){\r
- CalligraphicProfileDialog &dial = instance();\r
- dial._applied=false;\r
- dial.set_modal(true);\r
- desktop->setWindowTransient (dial.gobj());\r
- dial.property_destroy_with_parent() = true;\r
- // dial.Gtk::Dialog::show();\r
- //dial.present();\r
- dial.run();\r
-}\r
-\r
-\r
-}}}\r
diff --git a/src/dialogs/calligraphic-profile-rename.h b/src/dialogs/calligraphic-profile-rename.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**\r
- *\r
- * \brief Dialog for naming calligraphic profiles\r
- *\r
- * Author:\r
- * Aubanel MONNIER \r
- *\r
- * Copyright (C) 2007 Aubanel MONNIER\r
- *\r
- * Released under GNU GPL. Read the file 'COPYING' for more information\r
- */\r
-\r
-#ifndef INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H\r
-#define INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H\r
-\r
-#include <gtkmm/dialog.h>\r
-#include <gtkmm/entry.h>\r
-#include <gtkmm/label.h>\r
-#include <gtkmm/table.h>\r
-\r
-namespace Inkscape {\r
- namespace UI {\r
- namespace Dialogs {\r
- \r
- class CalligraphicProfileDialog: public Gtk::Dialog { \r
- public:\r
- CalligraphicProfileDialog();\r
- virtual ~CalligraphicProfileDialog(){} ;\r
- static void show(SPDesktop *desktop);\r
- static bool applied(){return instance()._applied;}\r
- static Glib::ustring getProfileName() { return instance()._profile_name;}\r
-\r
- Glib::ustring getName() const { return "CalligraphicProfileDialog"; }\r
-\r
- \r
- protected:\r
- void _close();\r
- void _apply();\r
-\r
- Gtk::Label _profile_name_label;\r
- Gtk::Entry _profile_name_entry;\r
- Gtk::Table _layout_table;\r
- Gtk::Button _close_button;\r
- Gtk::Button _apply_button;\r
- Glib::ustring _profile_name;\r
- bool _applied;\r
- private:\r
- static CalligraphicProfileDialog &instance(){static CalligraphicProfileDialog instance; return instance;}\r
- CalligraphicProfileDialog(CalligraphicProfileDialog const &); // no copy\r
- CalligraphicProfileDialog &operator=(CalligraphicProfileDialog const &); // no assign\r
- }; \r
- }\r
- }\r
-}\r
-\r
-#endif INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H\r
index d460371579a0a152ecc004f999adb2497bedc2b8..6cc3bb1f004f0dd0a871543b4f81779924bfcd23 100644 (file)
widgets_libspwidgets_a_SOURCES = \
widgets/button.cpp \
widgets/button.h \
+ widgets/calligraphic-profile-rename.cpp \
+ widgets/calligraphic-profile-rename.h \
widgets/dash-selector.cpp \
widgets/dash-selector.h \
widgets/desktop-widget.cpp \
diff --git a/src/widgets/calligraphic-profile-rename.cpp b/src/widgets/calligraphic-profile-rename.cpp
--- /dev/null
@@ -0,0 +1,99 @@
+/**\r
+ *\r
+ * \brief Dialog for naming calligraphic profiles\r
+ *\r
+ * Author:\r
+ * Aubanel MONNIER \r
+ *\r
+ * Copyright (C) 2007 Aubanel MONNIER\r
+ *\r
+ * Released under GNU GPL. Read the file 'COPYING' for more information\r
+ */\r
+\r
+#ifdef HAVE_CONFIG_H\r
+# include <config.h>\r
+#endif\r
+\r
+#include <glibmm/i18n.h>\r
+#include <gtkmm/stock.h>\r
+\r
+#include "desktop.h"\r
+#include "calligraphic-profile-rename.h"\r
+\r
+\r
+namespace Inkscape {\r
+namespace UI {\r
+namespace Dialogs {\r
+CalligraphicProfileDialog::CalligraphicProfileDialog(): _applied(false){\r
+ Gtk::VBox *mainVBox = get_vbox();\r
+ _layout_table.set_spacings(4);\r
+ _layout_table.resize (1, 2);\r
+\r
+ _profile_name_entry.set_activates_default(true);\r
+\r
+ _profile_name_label.set_label(_("Profile name:"));\r
+ _profile_name_label.set_alignment(1.0, 0.5);\r
+ \r
+ _layout_table.attach(_profile_name_label,\r
+ 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);\r
+ _layout_table.attach(_profile_name_entry,\r
+ 1, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);\r
+ mainVBox->pack_start(_layout_table, false, false, 4);\r
+ // Buttons\r
+ _close_button.set_use_stock(true);\r
+ _close_button.set_label(Gtk::Stock::CANCEL.id);\r
+ _close_button.set_flags(Gtk::CAN_DEFAULT);\r
+ \r
+ _apply_button.set_use_underline(true);\r
+ _apply_button.set_label(_("Save"));\r
+ _apply_button.set_flags(Gtk::CAN_DEFAULT);\r
+ \r
+ _close_button.signal_clicked()\r
+ .connect(sigc::mem_fun(*this, &CalligraphicProfileDialog::_close));\r
+ _apply_button.signal_clicked()\r
+ .connect(sigc::mem_fun(*this, &CalligraphicProfileDialog::_apply));\r
+ \r
+ signal_delete_event().connect(\r
+ sigc::bind_return(\r
+ sigc::hide(sigc::mem_fun(*this, &CalligraphicProfileDialog::_close)),\r
+ true\r
+ )\r
+ );\r
+\r
+ add_action_widget(_close_button, Gtk::RESPONSE_CLOSE);\r
+ add_action_widget(_apply_button, Gtk::RESPONSE_APPLY);\r
+\r
+ _apply_button.grab_default();\r
+\r
+ show_all_children();\r
+\r
+}\r
+\r
+void\r
+CalligraphicProfileDialog::_apply()\r
+{\r
+ _profile_name = _profile_name_entry.get_text();\r
+ _applied = true;\r
+ _close();\r
+}\r
+\r
+void\r
+CalligraphicProfileDialog::_close()\r
+{\r
+ this->Gtk::Dialog::hide();\r
+ \r
+}\r
+\r
+void CalligraphicProfileDialog::show(SPDesktop *desktop){\r
+ CalligraphicProfileDialog &dial = instance();\r
+ dial._applied=false;\r
+ dial.set_modal(true);\r
+ desktop->setWindowTransient (dial.gobj());\r
+ dial.property_destroy_with_parent() = true;\r
+ // dial.Gtk::Dialog::show();\r
+ //dial.present();\r
+ dial.run();\r
+}\r
+\r
+\r
+}}}\r
diff --git a/src/widgets/calligraphic-profile-rename.h b/src/widgets/calligraphic-profile-rename.h
--- /dev/null
@@ -0,0 +1,56 @@
+/**\r
+ *\r
+ * \brief Dialog for naming calligraphic profiles\r
+ *\r
+ * Author:\r
+ * Aubanel MONNIER \r
+ *\r
+ * Copyright (C) 2007 Aubanel MONNIER\r
+ *\r
+ * Released under GNU GPL. Read the file 'COPYING' for more information\r
+ */\r
+\r
+#ifndef INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H\r
+#define INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H\r
+\r
+#include <gtkmm/dialog.h>\r
+#include <gtkmm/entry.h>\r
+#include <gtkmm/label.h>\r
+#include <gtkmm/table.h>\r
+\r
+namespace Inkscape {\r
+ namespace UI {\r
+ namespace Dialogs {\r
+ \r
+ class CalligraphicProfileDialog: public Gtk::Dialog { \r
+ public:\r
+ CalligraphicProfileDialog();\r
+ virtual ~CalligraphicProfileDialog(){} ;\r
+ static void show(SPDesktop *desktop);\r
+ static bool applied(){return instance()._applied;}\r
+ static Glib::ustring getProfileName() { return instance()._profile_name;}\r
+\r
+ Glib::ustring getName() const { return "CalligraphicProfileDialog"; }\r
+\r
+ \r
+ protected:\r
+ void _close();\r
+ void _apply();\r
+\r
+ Gtk::Label _profile_name_label;\r
+ Gtk::Entry _profile_name_entry;\r
+ Gtk::Table _layout_table;\r
+ Gtk::Button _close_button;\r
+ Gtk::Button _apply_button;\r
+ Glib::ustring _profile_name;\r
+ bool _applied;\r
+ private:\r
+ static CalligraphicProfileDialog &instance(){static CalligraphicProfileDialog instance; return instance;}\r
+ CalligraphicProfileDialog(CalligraphicProfileDialog const &); // no copy\r
+ CalligraphicProfileDialog &operator=(CalligraphicProfileDialog const &); // no assign\r
+ }; \r
+ }\r
+ }\r
+}\r
+\r
+#endif INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H\r
index c59447b78fd3f0ec61810ce28bee93317e0b0dd7..d3fef1f8dd33a115ab704cd509c0a67eae0afc6b 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
#include "svg/css-ostringstream.h"
-#include "../dialogs/calligraphic-profile-rename.h"
+#include "widgets/calligraphic-profile-rename.h"
using Inkscape::UnitTracker;