[passepartout] Started cleaning up the about dialog
- From: Sven Herzberg <herzi src gnome org>
- To: svn-commits-list gnome org
- Subject: [passepartout] Started cleaning up the about dialog
- Date: Sun, 12 Apr 2009 14:21:29 -0400 (EDT)
commit 53332a08f8b6a3067ba79eba9a3616c0ef036d56
Author: Sven Herzberg <sven imendio com>
Date: Mon Mar 19 08:59:14 2007 +0100
Started cleaning up the about dialog
---
po/POTFILES.in | 1 +
src/pptout/aboutdialog.cc | 84 +++++++++++-----------------------------
src/pptout/aboutdialog.h | 3 +-
src/pptout/widget/programs.cc | 4 --
src/pptout/widget/programs.h | 1 -
src/pptout/window.cc | 1 +
src/pptout/windowmenus.cc | 9 +---
7 files changed, 30 insertions(+), 73 deletions(-)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a2e2772..ed50389 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
passepartout.desktop.in
+src/pptout/aboutdialog.cc
src/pptout/main.cc
src/pptout/window.cc
src/pptout/windowmenus.cc
diff --git a/src/pptout/aboutdialog.cc b/src/pptout/aboutdialog.cc
index 70854d0..740a901 100644
--- a/src/pptout/aboutdialog.cc
+++ b/src/pptout/aboutdialog.cc
@@ -3,6 +3,8 @@
///
#include "aboutdialog.h"
#include "defines.h"
+
+#include <glib/gi18n.h>
#include "widget/wmisc.h"
#include "widget/programs.h"
#include <gtkmm/label.h>
@@ -34,76 +36,36 @@ namespace {
}
AboutDialog::AboutDialog()
- : DialogWrap("About")
+// : DialogWrap("About")
+{
{
+ gchar const* authors[] = {
+ "Frederik Arnerup",
+ "Rasmus Kaj",
+ NULL
+ };
+ // FIXME: the size looks fishy
+ set_logo (Gdk::Pixbuf::create_from_inline(69624, logo));
+ set_name (_("Passepartout"));
+ set_version (VERSION);
+ set_copyright (_("Copyright (c) 2002-2004"));
+ set_website ("http://www.stacken.kth.se/project/pptout/");
+ gchar* str = g_strdup_printf (_("GNOME support: %s"), (have_gnome ? _("enabled") : _("disabled")));
+ set_comments (_("A DTP application for GNOME") + std::string("\n") + str);
+ g_free (str);
+ set_authors (authors);
+ // FIXME: set_mailing_list (mail_address);
+}
set_resizable(false);
- // Info
- Gtk::Box *hbox = manage(new Gtk::HBox(false, double_space));
- hbox->set_border_width(double_space);
-
- Gtk::Image *image =
- manage(new Gtk::Image(Gdk::Pixbuf::create_from_inline(69624, logo)));
- hbox->pack_start(*image, Gtk::PACK_SHRINK);
-
- Gtk::Box *message = manage(new Gtk::VBox());
- hbox->pack_start(*message, Gtk::PACK_SHRINK);
-
- Gtk::Label *label =
- manage(new Gtk::Label("", Gtk::JUSTIFY_LEFT, Gtk::ALIGN_BOTTOM));
- label->set_markup("<big><b>Passepartout " + std::string(VERSION)
- + "</b></big>"
- "\nCopyright © 2002 - 2004,"
- " Fredrik Arnerup & Rasmus Kaj");
- label->set_selectable();
- message->pack_start(*label);
-
- label =
- manage(new Gtk::Label("", Gtk::JUSTIFY_LEFT, Gtk::ALIGN_TOP));
- label->set_markup("<u><span foreground=\"blue\">" + homepage +
- "</span></u>");
- Gtk::Button *webpage = manage(new Gtk::Button());
- webpage->add(*label);
- webpage->set_relief(Gtk::RELIEF_NONE);
- webpage->set_border_width(0);
- webpage->signal_clicked().connect(sigc::ptr_fun(&Programs::open_homepage));
- message->pack_start(*webpage, Gtk::PACK_SHRINK);
-
- label =
- manage(new Gtk::Label("", Gtk::JUSTIFY_LEFT, Gtk::ALIGN_TOP));
- label->set_markup("<u><span foreground=\"blue\">" + mail_address
- + "</span></u>");
- Gtk::Button *mail = manage(new Gtk::Button());
- mail->add(*label);
- mail->set_relief(Gtk::RELIEF_NONE);
- mail->set_border_width(0);
- mail->signal_clicked().connect
- (sigc::bind(sigc::ptr_fun(&Programs::open_url), "mailto:" + mail_address));
- message->pack_start(*mail, Gtk::PACK_SHRINK);
-
- label =
- manage(new Gtk::Label("", Gtk::JUSTIFY_LEFT, Gtk::ALIGN_BOTTOM));
- label->set_markup("\nBuild date: " + std::string(builddate) + "\n"
- "GNOME support: " + (have_gnome ? "yes" : "no"));
- label->set_selectable();
- message->pack_start(*label, Gtk::PACK_SHRINK);
-
- add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE)->grab_focus();
-
// Credits
Gtk::ScrolledWindow *scroller = manage(new Gtk::ScrolledWindow());
scroller->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
- label = manage(new Gtk::Label(Glib::ustring("\n") + authors));
+ Gtk::Label *label = manage(new Gtk::Label(Glib::ustring("\n") + authors));
scroller->add(*label);
label->set_selectable();
- // Notebook
- Gtk::Notebook *book = manage(new Gtk::Notebook());
- book->append_page(*hbox, *manage(new Gtk::Label("_Info",
- 0.0, 0.5, true)));
- book->append_page(*scroller, *manage(new Gtk::Label("_Credits",
- 0.0, 0.5, true)));
- get_vbox()->pack_start(*book);
+ get_vbox()->pack_start(*scroller);
show_all_children();
}
diff --git a/src/pptout/aboutdialog.h b/src/pptout/aboutdialog.h
index 7ed6ac9..9e18fa4 100644
--- a/src/pptout/aboutdialog.h
+++ b/src/pptout/aboutdialog.h
@@ -4,11 +4,12 @@
// Copyright (C) 2002 - 2004, Fredrik Arnerup & Rasmus Kaj, See COPYING
///
#include "widget/dialogwrap.h"
+#include <gtkmm/aboutdialog.h>
/**
* This is a singleton.
*/
-class AboutDialog : public DialogWrap {
+class AboutDialog : public Gtk::AboutDialog {
public:
static AboutDialog &instance();
private:
diff --git a/src/pptout/widget/programs.cc b/src/pptout/widget/programs.cc
index dba8842..7cd82b4 100644
--- a/src/pptout/widget/programs.cc
+++ b/src/pptout/widget/programs.cc
@@ -16,8 +16,6 @@ namespace {
const std::string browser = "gnome-moz-remote";
}
-const std::string homepage = "http://www.stacken.kth.se/project/pptout/";
-
void Programs::open_url(const std::string &url) {
#ifdef HAVE_GNOME
GError *error = 0;
@@ -33,8 +31,6 @@ void Programs::open_url(const std::string &url) {
#endif
}
-void Programs::open_homepage() { open_url(homepage); }
-
void Programs::open_docs() {
std::string url = DOCDIR "/users_guide.html";
if(access(url))
diff --git a/src/pptout/widget/programs.h b/src/pptout/widget/programs.h
index 7803150..765556e 100644
--- a/src/pptout/widget/programs.h
+++ b/src/pptout/widget/programs.h
@@ -13,7 +13,6 @@ extern const std::string homepage;
namespace Programs {
void open_url(const std::string&);
- void open_homepage();
void open_docs();
/// Add items for calling external programs (based on mime type) on
diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index f4de87b..9bf2038 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -127,6 +127,7 @@ void FrameWindow::constructor_common() {
scroller->add(document_view);
scroller->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+ scroller->set_shadow_type (Gtk::SHADOW_IN);
cafe_opera = manage(new Gtk::Statusbar());
cafe_opera->set_has_resize_grip(false);
diff --git a/src/pptout/windowmenus.cc b/src/pptout/windowmenus.cc
index 9373d6d..e003123 100644
--- a/src/pptout/windowmenus.cc
+++ b/src/pptout/windowmenus.cc
@@ -328,12 +328,9 @@ void FrameWindow::create_menus() {
AccelKey("F1"),
ptr_fun(&Programs::open_docs));
- main_group->add(Action::create("HelpAbout", _("_About")),
+ main_group->add(Action::create("HelpAbout", Stock::ABOUT, _("_About")),
mem_fun(::AboutDialog::instance(), &::AboutDialog::show_all));
- main_group->add(Action::create("HelpHomepage", Stock::HOME, _("_Homepage")),
- ptr_fun(&Programs::open_homepage));
-
main_group->add(Action::create("HelpInspiration", _("_Inspiration")),
mem_fun(Inspiration::instance(),
&Inspiration::show_all));
@@ -408,10 +405,10 @@ void FrameWindow::create_menus() {
" <menu action='HelpMenu'>"
" <menuitem action='HelpHelp'/>"
- " <menuitem action='HelpAbout'/>"
" <separator/>"
- " <menuitem action='HelpHomepage'/>"
" <menuitem action='HelpInspiration'/>"
+ " <separator/>"
+ " <menuitem action='HelpAbout'/>"
" </menu>"
" </menubar>"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]