Code

r11472@tres: ted | 2006-04-22 20:32:45 -0700
[inkscape.git] / src / extension / prefdialog.cpp
index c9d32c7e2c75f2ed204d0f63d216ac32cb639f81..3058b939f5df0e66a347a4c09dc83d2e87709641 100644 (file)
@@ -13,7 +13,6 @@
 #include "../dialogs/dialog-events.h"
 
 #include "prefdialog.h"
-#include "helpdialog.h"
 
 namespace Inkscape {
 namespace Extension {
@@ -28,16 +27,24 @@ namespace Extension {
     them.  It also places the passed in widgets into the dialog.
 */
 PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls) :
-    Gtk::Dialog::Dialog(name + _(" Preferences"), true, true), _help(help), _name(name)
+    Gtk::Dialog::Dialog("Temp Title", true, true), _help(help), _name(name)
 {
+    /* A hack to internationalize the title properly */
+    gchar * title = g_strdup_printf(_("%s Preferences"), name.c_str());
+    this->set_title(title);
+    g_free(title);
+
     Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox());
     hbox->pack_start(*controls, true, true, 6);
     hbox->show();
     this->get_vbox()->pack_start(*hbox, true, true, 6);
 
+
+    /*
     Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
     if (_help == NULL)
         help_button->set_sensitive(false);
+    */
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
 
     Gtk::Button * ok = add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
@@ -65,9 +72,7 @@ PrefDialog::run (void) {
     while (resp == Gtk::RESPONSE_HELP) {
         resp = Gtk::Dialog::run();
         if (resp == Gtk::RESPONSE_HELP) {
-            HelpDialog help(_name, _help);
-            help.run();
-            help.hide();
+
         }
     }
     return resp;