summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f56c24)
raw | patch | inline | side by side (parent: 0f56c24)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Wed, 29 Mar 2006 05:39:11 +0000 (05:39 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Wed, 29 Mar 2006 05:39:11 +0000 (05:39 +0000) |
Adding in the help dialog basics.
src/extension/helpdialog.cpp | [new file with mode: 0644] | patch | blob |
src/extension/helpdialog.h | [new file with mode: 0644] | patch | blob |
src/extension/prefdialog.cpp | patch | blob | history | |
src/extension/prefdialog.h | patch | blob | history |
diff --git a/src/extension/helpdialog.cpp b/src/extension/helpdialog.cpp
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Authors:
+ * Ted Gould <ted@gould.cx>
+ *
+ * Copyright (C) 2006 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <gtkmm/stock.h>
+#include <glibmm/i18n.h>
+
+#include "../dialogs/dialog-events.h"
+
+#include "prefdialog.h"
+
+namespace Inkscape {
+namespace Extension {
+
+HelpDialog::HelpDialog (Glib::ustring name, gchar const * help) :
+ Gtk::Dialog::Dialog(_("Help with ") + name, true, true)
+{
+ Gtk::Button * ok = add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
+ set_default_response(Gtk::RESPONSE_OK);
+ ok->grab_focus();
+
+ GtkWidget *dlg = GTK_WIDGET(gobj());
+ sp_transientize(dlg);
+
+ return;
+}
+
+}; }; /* namespace Inkscape, Extension */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
diff --git a/src/extension/helpdialog.h b/src/extension/helpdialog.h
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Authors:
+ * Ted Gould <ted@gould.cx>
+ *
+ * Copyright (C) 2006 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifndef INKSCAPE_EXTENSION_HELP_DIALOG_H__
+#define INKSCAPE_EXTENSION_HELP_DIALOG_H__
+
+#include <glibmm/ustring.h>
+
+#include <gdkmm/types.h>
+#include <gtkmm/dialog.h>
+
+namespace Inkscape {
+namespace Extension {
+
+class HelpDialog : public Gtk::Dialog {
+
+public:
+ HelpDialog (Glib::ustring name, gchar const * help);
+};
+
+
+};}; /* namespace Inkscape, Extension */
+
+#endif /* INKSCAPE_EXTENSION_HELP_DIALOG_H__ */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
index 86f1a50bed8518a9a4187a53589cecc3e448a813..aacf5eec32237ba22b8103b20cda068a2ccb59dd 100644 (file)
return;
}
+Gtk::ResponseType
+PrefDialog::run (void) {
+ Gtk::ResponseType resp = Gtk::RESPONSE_HELP;
+ while (resp == Gtk::RESPONSE_HELP) {
+ resp = Gtk::Dialog::run();
+ if (resp == Gtk::RESPONSE_HELP) {
+ HelpDialog help(_name, _help);
+ help->run();
+ help->hide();
+ }
+ }
+ return resp;
+}
+
}; }; /* namespace Inkscape, Extension */
/*
index 4324bedfdaffd677f1ca71e74383dc583ff208b1..bf30eda36617535eea455986be0ba56667f85f4c 100644 (file)
public:
PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls);
+ Gtk::ResponseType run (void);
+
};