Commit 0dc10866 authored by Daniel Elstner's avatar Daniel Elstner
Browse files

Remove. The Debian package of regexxer is not the only one out there, and

* ui/aboutdialog.glade (label_debian_*): Remove.  The Debian
package of regexxer is not the only one out there, and I cannot
list all of them in the about dialog.  Sorry Ross :/
(label_translator_{what,who}): Give credit to the translator(s)
for the user's locale as listed in the translation of the string
"translator-credits".
(label_url): Get rid of the custom SelectableLabel widget class.
The only feature provided by the custom widget was tab-navigation
to labels -- I figured one can simply use C-Tab to do just that.
(label_author_who): ditto
(label_translator_who): ditto.

* src/aboutdialog.cc (SelectableLabel): Remove custom widget.
(AboutDialog::create): Acommodate to glade file modifications.
parent 4da6c6e9
2004-05-19 Daniel Elstner <daniel.elstner@gmx.net>
* ui/aboutdialog.glade (label_debian_*): Remove. The Debian
package of regexxer is not the only one out there, and I cannot
list all of them in the about dialog. Sorry Ross :/
(label_translator_{what,who}): Give credit to the translator(s)
for the user's locale as listed in the translation of the string
"translator-credits".
(label_url): Get rid of the custom SelectableLabel widget class.
The only feature provided by the custom widget was tab-navigation
to labels -- I figured one can simply use C-Tab to do just that.
(label_author_who): ditto
(label_translator_who): ditto.
* src/aboutdialog.cc (SelectableLabel): Remove custom widget.
(AboutDialog::create): Acommodate to glade file modifications.
2004-05-19 Daniel Elstner <daniel.elstner@gmx.net>
* Makefile.am (ACLOCAL_AMFLAGS): No need to explicitely specify
......
......@@ -21,11 +21,11 @@
#include "aboutdialog.h"
#include "globalstrings.h"
#include <libglademm.h>
#include <glibmm/markup.h>
#include <gtkmm/dialog.h>
#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include <libglademm.h>
#include <memory>
#include <config.h>
......@@ -34,52 +34,6 @@
namespace
{
class SelectableLabel : public Gtk::Label
{
public:
explicit SelectableLabel(const Glib::ustring& label);
virtual ~SelectableLabel();
protected:
virtual bool on_focus(Gtk::DirectionType direction);
};
SelectableLabel::SelectableLabel(const Glib::ustring& label)
:
Gtk::Label(label)
{
set_selectable(true);
}
SelectableLabel::~SelectableLabel()
{}
bool SelectableLabel::on_focus(Gtk::DirectionType)
{
if (can_focus() && !is_focus())
{
grab_focus();
return true;
}
return false;
}
extern "C"
GtkWidget* regexxer_create_selectable_label(char*, char* label, char*, int, int)
{
try
{
Gtk::Widget *const widget = new SelectableLabel(label);
widget->show();
return Gtk::manage(widget)->gobj();
}
catch (...)
{
g_return_val_if_reached(0);
}
}
void apply_label_markup(Gtk::Label& label)
{
label.set_markup("<span size=\"small\">" + Glib::Markup::escape_text(label.get_text()) + "</span>");
......@@ -105,10 +59,10 @@ Gtk::Dialog* AboutDialog::create(Gtk::Window& parent)
xml->get_widget("image", image)->set(application_icon_filename);
Gtk::Label* label = 0;
xml->get_widget("label_title", label)->set_markup("<span size=\"xx-large\" weight=\"heavy\">"
PACKAGE_STRING "</span>");
xml->get_widget("label_title", label)->set_markup(
"<span size=\"xx-large\" weight=\"heavy\">" PACKAGE_STRING "</span>");
apply_label_markup(*xml->get_widget("label_author_what", label));
apply_label_markup(*xml->get_widget("label_debian_what", label));
apply_label_markup(*xml->get_widget("label_translator_what", label));
dialog->signal_response().connect(sigc::hide(sigc::mem_fun(*dialog, &Gtk::Widget::hide)));
......
......@@ -10,6 +10,11 @@
<property name="modal">False</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">True</property>
<child internal-child="vbox">
......@@ -24,7 +29,7 @@
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="okbutton1">
<widget class="GtkButton" id="okbutton">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
......@@ -33,6 +38,7 @@
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-5</property>
</widget>
</child>
......@@ -53,6 +59,10 @@
<property name="yalign">0.33</property>
<property name="xscale">0.5</property>
<property name="yscale">0.5</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkVBox" id="box">
......@@ -88,7 +98,6 @@
<child>
<widget class="GtkLabel" id="label_title">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
......@@ -120,18 +129,23 @@
<property name="spacing">10</property>
<child>
<widget class="Custom" id="label_url">
<widget class="GtkLabel" id="label_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="creation_function">regexxer_create_selectable_label</property>
<property name="string1">http://regexxer.sourceforge.net/</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Mon, 10 May 2004 09:32:41 GMT</property>
<property name="label">http://regexxer.sourceforge.net/</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">5</property>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
......@@ -155,9 +169,6 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<accessibility>
<atkrelation target="label_author_who" type="flows-to"/>
</accessibility>
</widget>
<packing>
<property name="padding">0</property>
......@@ -167,17 +178,19 @@
</child>
<child>
<widget class="Custom" id="label_author_who">
<widget class="GtkLabel" id="label_author_who">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="creation_function">regexxer_create_selectable_label</property>
<property name="string1">Daniel Elstner &lt;daniel.elstner@gmx.net&gt;</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Mon, 10 May 2004 09:40:03 GMT</property>
<accessibility>
<atkrelation target="label_author_what" type="flows-from"/>
</accessibility>
<property name="label">Daniel Elstner &lt;daniel.elstner@gmx.net&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
......@@ -194,15 +207,15 @@
</child>
<child>
<widget class="GtkVBox" id="box_debian">
<widget class="GtkVBox" id="box_translator">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">2</property>
<child>
<widget class="GtkLabel" id="label_debian_what">
<widget class="GtkLabel" id="label_translator_what">
<property name="visible">True</property>
<property name="label" translatable="yes">Debian package by</property>
<property name="label" translatable="yes">translated by</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
......@@ -212,9 +225,6 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<accessibility>
<atkrelation target="label_debian_who" type="flows-to"/>
</accessibility>
</widget>
<packing>
<property name="padding">0</property>
......@@ -224,17 +234,19 @@
</child>
<child>
<widget class="Custom" id="label_debian_who">
<widget class="GtkLabel" id="label_translator_who">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="creation_function">regexxer_create_selectable_label</property>
<property name="string1">Ross Burton &lt;ross@burtonini.com&gt;</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Mon, 10 May 2004 10:18:47 GMT</property>
<accessibility>
<atkrelation target="label_debian_what" type="flows-from"/>
</accessibility>
<property name="label" translatable="yes">translator-credits</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment