mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4314 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c3f9ef4313
commit
f24ed7d6ca
@ -1,3 +1,33 @@
|
||||
2002-06-02 Michael A. Koziarski <michael@koziarski.com>
|
||||
|
||||
== Gtkmm2 upgrade ==
|
||||
|
||||
* dialogs/*: Updated to glade-2 format.
|
||||
* Dialogs.C: add() calls updated
|
||||
* GError.C
|
||||
* GError.h
|
||||
* GERT.C
|
||||
* GERT.h
|
||||
* GPreamble.C
|
||||
* GPreamble.h
|
||||
* GTabularCreate.C
|
||||
* GTabularCreate.h
|
||||
* GUIRunTime.C
|
||||
* GUrl.C
|
||||
* GUrl.h: updated for gtkmm2
|
||||
* GnomeBase.C
|
||||
* GnomeBase.h: updated for gtkmm2 and libglademm.
|
||||
* gnome_helpers.C
|
||||
* gnome_helpers.h: Cruft removed. Blasted X.h #defines #undef'd
|
||||
* Timeout_pimpl.C
|
||||
* Timeout_pimpl.h
|
||||
* GUIRuntime.C: fix up the references to Gnome::* to use Gtk::*,
|
||||
slight other changes required
|
||||
* Makefile.am: all neccessary changes, mostly including stuff
|
||||
that's been moved into src/frontends/xforms
|
||||
|
||||
|
||||
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* FileDialog.C: LyXView moved into frontends/
|
||||
|
@ -14,19 +14,22 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "gettext.h"
|
||||
|
||||
#include "Dialogs.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "gnomeBC.h"
|
||||
#include "Tooltips.h"
|
||||
#include "GUI.h"
|
||||
|
||||
#include "GUrl.h"
|
||||
#include "GUI.h"
|
||||
#include "gnomeBC.h"
|
||||
|
||||
#include "frontends/LyXView.h"
|
||||
|
||||
#include "GError.h"
|
||||
#include "GTabularCreate.h"
|
||||
#include "GERT.h"
|
||||
#include "GPreamble.h"
|
||||
#include "GTabularCreate.h"
|
||||
#include "GUrl.h"
|
||||
|
||||
|
||||
#include "Tooltips.h"
|
||||
|
||||
bool Dialogs::tooltipsEnabled()
|
||||
{
|
||||
@ -34,15 +37,21 @@ bool Dialogs::tooltipsEnabled()
|
||||
}
|
||||
Dialogs::Dialogs(LyXView * lv)
|
||||
{
|
||||
add(new GUIUrl<GUrl, gnomeBC>(*lv, *this));
|
||||
add(new GUIError<GError, gnomeBC>(*lv, *this));
|
||||
add(new GUITabularCreate<GTabularCreate, gnomeBC>(*lv, *this));
|
||||
add(new GUIERT<GERT, gnomeBC>(*lv, *this));
|
||||
add(new GUIPreamble<GPreamble, gnomeBC>(*lv, *this));
|
||||
|
||||
add(new GUI<ControlError,GErrorDialog,
|
||||
OkCancelPolicy, gnomeBC>(*lv, *this));
|
||||
add(new GUI<ControlERT, GERT,
|
||||
NoRepeatedApplyReadOnlyPolicy, gnomeBC>(*lv, *this));
|
||||
add(new GUI<ControlUrl, GUrl,
|
||||
NoRepeatedApplyReadOnlyPolicy, gnomeBC>(*lv,*this));
|
||||
add(new GUI<ControlPreamble, GPreamble,
|
||||
NoRepeatedApplyReadOnlyPolicy, gnomeBC>(*lv, *this));
|
||||
add(new GUI<ControlTabularCreate, GTabularCreate,
|
||||
OkApplyCancelReadOnlyPolicy, gnomeBC>(*lv, *this));
|
||||
|
||||
// reduce the number of connections needed in
|
||||
// dialogs by a simple connection here.
|
||||
hideAll.connect(hideBufferDependent.slot());
|
||||
hideAll.connect(hideBufferDependent);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include "gnomeBC.h"
|
||||
#include "GERT.h"
|
||||
|
||||
#include <gtk--/radiobutton.h>
|
||||
#include <gtk--/button.h>
|
||||
#include <gtkmm/radiobutton.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
GERT::GERT(ControlERT & c)
|
||||
: FormCB<ControlERT>(c, "GERT")
|
||||
@ -33,9 +33,9 @@ GERT::~GERT()
|
||||
void GERT::build()
|
||||
{
|
||||
// Connect the buttons.
|
||||
ok_btn()->clicked.connect(SigC::slot(this, &GERT::OKClicked));
|
||||
cancel_btn()->clicked.connect(SigC::slot(this, &GERT::CancelClicked));
|
||||
apply_btn()->clicked.connect(SigC::slot(this, &GERT::ApplyClicked));
|
||||
ok_btn()->signal_clicked().connect(SigC::slot(*this, &GERT::OKClicked));
|
||||
cancel_btn()->signal_clicked().connect(SigC::slot(*this, &GERT::CancelClicked));
|
||||
apply_btn()->signal_clicked().connect(SigC::slot(*this, &GERT::ApplyClicked));
|
||||
|
||||
// Manage the buttons state
|
||||
bc().setOK(ok_btn());
|
||||
@ -55,9 +55,9 @@ void GERT::build()
|
||||
|
||||
void GERT::connect_signals()
|
||||
{
|
||||
slot_open = open()->clicked.connect(SigC::slot(this, &GERT::InputChanged));
|
||||
slot_collapsed = collapsed()->clicked.connect(SigC::slot(this, &GERT::InputChanged));
|
||||
slot_inlined = inlined()->clicked.connect(SigC::slot(this, &GERT::InputChanged));
|
||||
slot_open = open()->signal_clicked().connect(SigC::slot(*this, &GERT::InputChanged));
|
||||
slot_collapsed = collapsed()->signal_clicked().connect(SigC::slot(*this, &GERT::InputChanged));
|
||||
slot_inlined = inlined()->signal_clicked().connect(SigC::slot(*this, &GERT::InputChanged));
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,18 +19,20 @@
|
||||
#include "gnomeBC.h"
|
||||
#include "GError.h"
|
||||
|
||||
#include <gtk--/button.h>
|
||||
#include <gtk--/text.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/textview.h>
|
||||
|
||||
GError::GError(ControlError & c)
|
||||
GErrorDialog::GErrorDialog(ControlError & c)
|
||||
: FormCB<ControlError>(c, "GError")
|
||||
{}
|
||||
|
||||
|
||||
void GError::build()
|
||||
void GErrorDialog::build()
|
||||
{
|
||||
// Connect the buttons.
|
||||
button_close()->clicked.connect(SigC::slot(this, &GError::CloseClicked));
|
||||
button_close()->signal_clicked().connect(
|
||||
SigC::slot(*this, &GErrorDialog::CloseClicked)
|
||||
);
|
||||
|
||||
// Manage the buttons state
|
||||
bc().setCancel(button_close());
|
||||
@ -40,17 +42,17 @@ void GError::build()
|
||||
}
|
||||
|
||||
|
||||
void GError::update()
|
||||
void GErrorDialog::update()
|
||||
{
|
||||
textarea()->insert(controller().params());
|
||||
textarea()->get_buffer()->set_text(controller().params());
|
||||
}
|
||||
|
||||
Gtk::Button * GError::button_close() const
|
||||
Gtk::Button * GErrorDialog::button_close() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_button_close");
|
||||
}
|
||||
|
||||
Gtk::Text * GError::textarea() const
|
||||
Gtk::TextView * GErrorDialog::textarea() const
|
||||
{
|
||||
return getWidget<Gtk::Text>("r_textarea");
|
||||
return getWidget<Gtk::TextView>("r_textarea");
|
||||
}
|
||||
|
@ -25,19 +25,19 @@
|
||||
namespace Gtk {
|
||||
|
||||
class Button;
|
||||
class Text;
|
||||
class TextView;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements the dialog to show error messages.
|
||||
*/
|
||||
class GError : public FormCB<ControlError> {
|
||||
class GErrorDialog : public FormCB<ControlError> {
|
||||
public:
|
||||
///
|
||||
GError(ControlError & c);
|
||||
GErrorDialog(ControlError & c);
|
||||
///
|
||||
~GError() {}
|
||||
~GErrorDialog() {}
|
||||
///
|
||||
void apply() {}
|
||||
///
|
||||
@ -56,7 +56,7 @@ private:
|
||||
/// generated by accessors.py
|
||||
Gtk::Button * button_close() const;
|
||||
/// generated by accessors.py
|
||||
Gtk::Text * textarea() const;
|
||||
Gtk::TextView * textarea() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include "gnomeBC.h"
|
||||
#include "GPreamble.h"
|
||||
|
||||
#include <gtk--/text.h>
|
||||
#include <gtk--/button.h>
|
||||
#include <gtkmm/textview.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
GPreamble::GPreamble(ControlPreamble & c)
|
||||
: FormCB<ControlPreamble>(c, "GPreamble")
|
||||
@ -33,9 +33,9 @@ GPreamble::~GPreamble()
|
||||
void GPreamble::build()
|
||||
{
|
||||
// Connect the buttons.
|
||||
ok_btn()->clicked.connect(SigC::slot(this, &GPreamble::OKClicked));
|
||||
cancel_btn()->clicked.connect(SigC::slot(this, &GPreamble::CancelClicked));
|
||||
apply_btn()->clicked.connect(SigC::slot(this, &GPreamble::ApplyClicked));
|
||||
ok_btn()->signal_clicked().connect(SigC::slot(*this, &GPreamble::OKClicked));
|
||||
cancel_btn()->signal_clicked().connect(SigC::slot(*this, &GPreamble::CancelClicked));
|
||||
apply_btn()->signal_clicked().connect(SigC::slot(*this, &GPreamble::ApplyClicked));
|
||||
// Manage the buttons state
|
||||
bc().setOK(ok_btn());
|
||||
bc().setCancel(cancel_btn());
|
||||
@ -45,22 +45,24 @@ void GPreamble::build()
|
||||
|
||||
void GPreamble::apply()
|
||||
{
|
||||
controller().params() = preamble()->get_chars(0,-1);
|
||||
controller().params() = preamble()->get_buffer()->get_text(preamble()->get_buffer()->get_start_iter(),
|
||||
preamble()->get_buffer()->get_end_iter(),
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
void GPreamble::update()
|
||||
{
|
||||
disconnect_signals();
|
||||
preamble()->set_point(0);
|
||||
preamble()->forward_delete(preamble()->get_length());
|
||||
preamble()->insert(controller().params());
|
||||
preamble()->get_buffer()->set_text(controller().params());
|
||||
connect_signals();
|
||||
}
|
||||
|
||||
void GPreamble::connect_signals()
|
||||
{
|
||||
slot_preamble_ = preamble()->changed.connect(SigC::slot(this, &GPreamble::InputChanged));
|
||||
slot_preamble_ = preamble()->
|
||||
get_buffer()->
|
||||
signal_changed().connect(SigC::slot(*this, &GPreamble::InputChanged));
|
||||
}
|
||||
|
||||
void GPreamble::disconnect_signals()
|
||||
@ -80,7 +82,7 @@ Gtk::Button * GPreamble::cancel_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
}
|
||||
Gtk::Text * GPreamble::preamble() const
|
||||
Gtk::TextView * GPreamble::preamble() const
|
||||
{
|
||||
return getWidget<Gtk::Text>("r_preamble");
|
||||
return getWidget<Gtk::TextView>("r_preamble");
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace Gtk {
|
||||
class Button;
|
||||
class Text;
|
||||
class TextView;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,7 +58,7 @@ private:
|
||||
/// generated by accessors.py
|
||||
Gtk::Button * cancel_btn() const;
|
||||
/// generated by accessors.py
|
||||
Gtk::Text * preamble() const;
|
||||
Gtk::TextView * preamble() const;
|
||||
|
||||
///
|
||||
SigC::Connection slot_preamble_;
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include "gnomeBC.h"
|
||||
#include "GTabularCreate.h"
|
||||
|
||||
#include <gtk--/spinbutton.h>
|
||||
#include <gtk--/button.h>
|
||||
#include <gtkmm/spinbutton.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
GTabularCreate::GTabularCreate(ControlTabularCreate & c)
|
||||
: FormCB<ControlTabularCreate>(c, "GTabularCreate")
|
||||
@ -34,11 +34,11 @@ GTabularCreate::~GTabularCreate()
|
||||
void GTabularCreate::build()
|
||||
{
|
||||
// Connect the buttons.
|
||||
ok_btn()->clicked.connect(SigC::slot(this,
|
||||
ok_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::OKClicked));
|
||||
cancel_btn()->clicked.connect(SigC::slot(this,
|
||||
cancel_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::CancelClicked));
|
||||
apply_btn()->clicked.connect(SigC::slot(this,
|
||||
apply_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::ApplyClicked));
|
||||
|
||||
// Manage the buttons state
|
||||
|
@ -22,7 +22,8 @@
|
||||
#include "GnomeBase.h"
|
||||
|
||||
namespace Gtk {
|
||||
class SpinButton;
|
||||
class SpinButton;
|
||||
class Button;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,12 +14,14 @@
|
||||
#endif
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
#include "gnome_helpers.h"
|
||||
#include "GUIRunTime.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <gnome--/main.h>
|
||||
#include <glade/glade.h>
|
||||
#include <gtkmm/main.h>
|
||||
#include <libglademm/xml.h>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
// For now we use the xforms image loader if we can.
|
||||
// In the future, this will be replaced by a gnome equivalent.
|
||||
@ -31,13 +33,6 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
// I keep these here so that it will be processed as early in
|
||||
// the compilation process as possible.
|
||||
#if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
|
||||
#error LyX will not compile with this version of XForms.\
|
||||
Please get version 0.89.\
|
||||
If you want to try to compile anyway, delete this test in src/frontends/gnome/GUIRunTime.C.
|
||||
#endif
|
||||
|
||||
extern bool finished;
|
||||
|
||||
@ -48,7 +43,7 @@ int const xforms_include_version = FL_INCLUDE_VERSION;
|
||||
} // namespace anon
|
||||
|
||||
|
||||
int GUIRunTime::initApplication(int &, char * argv[])
|
||||
int GUIRunTime::initApplication(int & argc , char * argv[])
|
||||
{
|
||||
// Check the XForms version in the forms.h header against
|
||||
// the one in the libforms. If they don't match quit the
|
||||
@ -79,16 +74,15 @@ int GUIRunTime::initApplication(int &, char * argv[])
|
||||
// lyx_gui, the same place as xforms does the same. (Lgb)
|
||||
string app_id(PACKAGE);
|
||||
string app_version(VERSION);
|
||||
static Gnome::Main a(app_id, app_version, 1, argv);
|
||||
glade_gnome_init(); // Initialize the glade library.
|
||||
new Gtk::Main (argc, argv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GUIRunTime::processEvents()
|
||||
{
|
||||
while (Gnome::Main::instance()->events_pending())
|
||||
Gnome::Main::instance()->iteration(FALSE);
|
||||
while (Gtk::Main::events_pending())
|
||||
Gtk::Main::iteration(false);
|
||||
}
|
||||
|
||||
|
||||
@ -141,16 +135,15 @@ LyXView * GUIRunTime::createMainView(int w, int h)
|
||||
void GUIRunTime::initialiseGraphics()
|
||||
{
|
||||
using namespace grfx;
|
||||
using SigC::slot;
|
||||
|
||||
#if defined(HAVE_FLIMAGE_DUP) && defined(HAVE_FLIMAGE_TO_PIXMAP)
|
||||
// connect the image loader based on the xforms library
|
||||
GImage::newImage.connect(slot(&xformsGImage::newImage));
|
||||
GImage::loadableFormats.connect(slot(&xformsGImage::loadableFormats));
|
||||
GImage::newImage.connect(boost::bind(&xformsGImage::newImage));
|
||||
GImage::loadableFormats.connect(boost::bind(&xformsGImage::loadableFormats));
|
||||
#else
|
||||
// connect the image loader based on the XPM library
|
||||
GImage::newImage.connect(slot(&GImageXPM::newImage));
|
||||
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
|
||||
GImage::newImage.connect(boost::bind(&GImageXPM::newImage));
|
||||
GImage::loadableFormats.connect(boost::bind(&GImageXPM::loadableFormats));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,9 @@
|
||||
#include "gnomeBC.h"
|
||||
#include "GUrl.h"
|
||||
|
||||
#include <gtk--/entry.h>
|
||||
#include <gtk--/checkbutton.h>
|
||||
#include <gtkmm/entry.h>
|
||||
#include <gtkmm/checkbutton.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
GUrl::GUrl(ControlUrl & c)
|
||||
: FormCB<ControlUrl>(c, "GUrl")
|
||||
@ -34,10 +35,10 @@ GUrl::~GUrl()
|
||||
void GUrl::build()
|
||||
{
|
||||
// Connect the buttons.
|
||||
ok_btn()->clicked.connect(SigC::slot(this, &GUrl::OKClicked));
|
||||
cancel_btn()->clicked.connect(SigC::slot(this, &GUrl::CancelClicked));
|
||||
apply_btn()->clicked.connect(SigC::slot(this, &GUrl::ApplyClicked));
|
||||
restore_btn()->clicked.connect(SigC::slot(this, &GUrl::RestoreClicked));
|
||||
ok_btn()->signal_clicked().connect(SigC::slot(*this, &GUrl::OKClicked));
|
||||
cancel_btn()->signal_clicked().connect(SigC::slot(*this, &GUrl::CancelClicked));
|
||||
apply_btn()->signal_clicked().connect(SigC::slot(*this, &GUrl::ApplyClicked));
|
||||
restore_btn()->signal_clicked().connect(SigC::slot(*this, &GUrl::RestoreClicked));
|
||||
|
||||
// Manage the buttons state
|
||||
bc().setOK(ok_btn());
|
||||
@ -58,9 +59,9 @@ void GUrl::build()
|
||||
void GUrl::connect_signals()
|
||||
{
|
||||
// Get notifications on input change
|
||||
slot_url_ = url()->changed.connect(SigC::slot(this, &GUrl::InputChanged));
|
||||
slot_name_ = name()->changed.connect(SigC::slot(this, &GUrl::InputChanged));
|
||||
slot_html_ = html_cb()->toggled.connect(SigC::slot(this, &GUrl::InputChanged));
|
||||
slot_url_ = url()->signal_changed().connect(SigC::slot(*this, &GUrl::InputChanged));
|
||||
slot_name_ = name()->signal_changed().connect(SigC::slot(*this, &GUrl::InputChanged));
|
||||
slot_html_ = html_cb()->signal_toggled().connect(SigC::slot(*this, &GUrl::InputChanged));
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,24 +17,22 @@
|
||||
#include "debug.h"
|
||||
#include "support/filetools.h"
|
||||
#include <glib.h>
|
||||
|
||||
#include <gnome--/dialog.h>
|
||||
#include <gtkmm/dialog.h>
|
||||
|
||||
GnomeBase::GnomeBase(ControlButtons & c,
|
||||
string const & name)
|
||||
: ViewBC<gnomeBC>(c)
|
||||
, file_(name + ".glade"), widget_name_(name), xml_(0)
|
||||
, dialog_(0)
|
||||
{}
|
||||
|
||||
GnomeBase::~GnomeBase()
|
||||
{
|
||||
if (xml_)
|
||||
gtk_object_unref(GTK_OBJECT(xml_));
|
||||
loadXML();
|
||||
}
|
||||
|
||||
GnomeBase::~GnomeBase()
|
||||
{}
|
||||
|
||||
void GnomeBase::loadXML() const
|
||||
|
||||
void GnomeBase::loadXML()
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Change this before declaring it production code! (be 20010325)
|
||||
@ -49,7 +47,7 @@ void GnomeBase::loadXML() const
|
||||
|
||||
lyxerr[Debug::GUI] << "Glade file to open is " << file << '\n';
|
||||
|
||||
xml_ = glade_xml_new(file.c_str(), widget_name_.c_str());
|
||||
xml_ = Gnome::Glade::Xml::create (file, widget_name_);
|
||||
}
|
||||
|
||||
|
||||
@ -99,10 +97,10 @@ void GnomeBase::InputChanged()
|
||||
bc().valid(validate());
|
||||
}
|
||||
|
||||
Gnome::Dialog * GnomeBase::dialog()
|
||||
Gtk::Dialog * GnomeBase::dialog()
|
||||
{
|
||||
if (!dialog_)
|
||||
dialog_ = getWidget<Gnome::Dialog>(widget_name_.c_str());
|
||||
dialog_ = getWidget<Gtk::Dialog>(widget_name_);
|
||||
|
||||
return dialog_;
|
||||
}
|
||||
|
@ -17,13 +17,17 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "gnomeBC.h"
|
||||
#include <sigc++/signal_system.h>
|
||||
#include "gnome_helpers.h"
|
||||
|
||||
namespace Gnome {
|
||||
class Dialog;
|
||||
#include <sigc++/sigc++.h>
|
||||
#include <libglademm/xml.h>
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "gnomeBC.h"
|
||||
|
||||
|
||||
namespace Gtk {
|
||||
class Dialog;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -40,10 +44,10 @@ public:
|
||||
protected:
|
||||
/// Get the widget named 'name' from the xml representation.
|
||||
template <class T>
|
||||
T* getWidget(char const * name) const;
|
||||
T* getWidget(const string & name) const;
|
||||
|
||||
/// Get the dialog we use.
|
||||
Gnome::Dialog * dialog();
|
||||
Gtk::Dialog * dialog();
|
||||
|
||||
/// Show the dialog.
|
||||
void show();
|
||||
@ -66,29 +70,27 @@ protected:
|
||||
|
||||
private:
|
||||
/// Loads the glade file to memory.
|
||||
void loadXML() const;
|
||||
void loadXML();
|
||||
|
||||
/// The glade file name
|
||||
const string file_;
|
||||
/// The widget name
|
||||
const string widget_name_;
|
||||
/// The XML representation of the dialogs.
|
||||
mutable GladeXML * xml_;
|
||||
Glib::RefPtr<Gnome::Glade::Xml> xml_;
|
||||
|
||||
/** The dialog we work with, since it is managed by libglade, we do not
|
||||
* need to delete it or destroy it, it will be destroyed with the rest
|
||||
* of the libglade GladeXML structure.
|
||||
*/
|
||||
Gnome::Dialog * dialog_;
|
||||
Gtk::Dialog * dialog_;
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
T* GnomeBase::getWidget(char const * name) const
|
||||
T* GnomeBase::getWidget(const string & name) const
|
||||
{
|
||||
if (xml_ == 0)
|
||||
loadXML();
|
||||
return getWidgetPtr<T>(xml_, name);
|
||||
return dynamic_cast<T*>(xml_->get_widget(name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,7 +6,7 @@ INCLUDES = $(FRONTEND_INCLUDES) -I$(top_srcdir)/src/ \
|
||||
-I$(top_srcdir)/src/frontends/ \
|
||||
-I$(top_srcdir)/src/frontends/xforms \
|
||||
-I$(top_srcdir)/src/frontends/controllers \
|
||||
$(SIGC_CFLAGS) $(BOOST_INCLUDES)
|
||||
$(BOOST_INCLUDES)
|
||||
|
||||
if USE_BASIC_IMAGE_LOADER
|
||||
else
|
||||
@ -19,9 +19,14 @@ xforms_objects = \
|
||||
../xforms/bmtable.lo \
|
||||
../xforms/combox.lo \
|
||||
../xforms/Color.lo \
|
||||
../xforms/ColorHandler.lo \
|
||||
../xforms/DropDown.lo \
|
||||
../xforms/FeedbackController.lo \
|
||||
../xforms/FileDialog.lo \
|
||||
../xforms/FontInfo.lo \
|
||||
../xforms/FormBaseDeprecated.lo \
|
||||
../xforms/FormFiledialog.lo \
|
||||
../xforms/form_filedialog.lo \
|
||||
../xforms/FormMathsBitmap.lo \
|
||||
../xforms/FormMathsDeco.lo \
|
||||
../xforms/form_maths_deco.lo \
|
||||
@ -35,12 +40,19 @@ xforms_objects = \
|
||||
../xforms/form_maths_space.lo \
|
||||
../xforms/FormMathsStyle.lo \
|
||||
../xforms/form_maths_style.lo \
|
||||
../xforms/lyxlookup.lo \
|
||||
../xforms/MathsSymbols.lo \
|
||||
../xforms/Menubar_pimpl.lo \
|
||||
../xforms/Toolbar_pimpl.lo \
|
||||
../xforms/Tooltips.lo \
|
||||
../xforms/xfont_loader.lo \
|
||||
../xforms/xfont_metrics.lo \
|
||||
../xforms/xforms_helpers.lo \
|
||||
../xforms/xformsBC.lo $(XFORMSGIMAGE)
|
||||
../xforms/xforms_resize.lo \
|
||||
../xforms/xformsBC.lo \
|
||||
../xforms/XFormsView.lo \
|
||||
../xforms/XPainter.lo \
|
||||
../xforms/XWorkArea.lo $(XFORMSGIMAGE)
|
||||
|
||||
libgnome.la: xforms.lo $(libgnome_la_OBJECTS) $(libgnome_la_DEPENDENCIES)
|
||||
|
||||
@ -56,17 +68,16 @@ xforms.lo: $(xforms_objects)
|
||||
|
||||
libgnome_la_SOURCES = \
|
||||
Dialogs.C \
|
||||
FileDialog.C \
|
||||
GError.C \
|
||||
GError.h \
|
||||
GTabularCreate.C \
|
||||
GTabularCreate.h \
|
||||
GUrl.C \
|
||||
GUrl.h \
|
||||
GERT.C \
|
||||
GERT.h \
|
||||
GPreamble.C \
|
||||
GPreamble.h \
|
||||
GTabularCreate.C \
|
||||
GTabularCreate.h \
|
||||
GUrl.C \
|
||||
GUrl.h \
|
||||
gnome_helpers.C \
|
||||
gnome_helpers.h \
|
||||
GnomeBase.C \
|
||||
@ -75,11 +86,11 @@ libgnome_la_SOURCES = \
|
||||
gnomeBC.h \
|
||||
GUIRunTime.C \
|
||||
pixbutton.h \
|
||||
support.c \
|
||||
support.h \
|
||||
Timeout_pimpl.C \
|
||||
Timeout_pimpl.h
|
||||
|
||||
|
||||
|
||||
# Trying to make things a litte more tidy. -- Koz-2002-01-11
|
||||
# mainapp.C \
|
||||
# mainapp.h \
|
||||
|
@ -13,7 +13,7 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include <gnome--/main.h>
|
||||
#include <gtkmm/main.h>
|
||||
#include "Timeout_pimpl.h"
|
||||
#include "debug.h"
|
||||
|
||||
@ -41,8 +41,8 @@ void Timeout::Pimpl::start()
|
||||
stop();
|
||||
}
|
||||
|
||||
conn_ = Gnome::Main::timeout.connect(
|
||||
SigC::slot(this, &Timeout::Pimpl::timeoutEvent),
|
||||
conn_ = Gtk::Main::signal_timeout().connect(
|
||||
SigC::slot(*this, &Timeout::Pimpl::timeoutEvent),
|
||||
owner_->timeout_ms
|
||||
);
|
||||
running_ = true;
|
||||
@ -56,8 +56,8 @@ void Timeout::Pimpl::stop()
|
||||
}
|
||||
|
||||
|
||||
gint Timeout::Pimpl::timeoutEvent()
|
||||
bool Timeout::Pimpl::timeoutEvent()
|
||||
{
|
||||
owner_->emit();
|
||||
return 0; // discontinue emitting timeouts.
|
||||
return false; // discontinue emitting timeouts.
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "frontends/Timeout.h"
|
||||
#include "glib.h" // for gint
|
||||
|
||||
#include <sigc++/signal_system.h>
|
||||
#include <sigc++/sigc++.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
@ -38,7 +38,7 @@ public:
|
||||
|
||||
public:
|
||||
/// The timeout signal, this gets called when the timeout passed.
|
||||
gint timeoutEvent();
|
||||
bool timeoutEvent();
|
||||
private:
|
||||
/// the owning timer
|
||||
Timeout * owner_;
|
||||
|
@ -1,160 +1,148 @@
|
||||
<?xml version="1.0"?>
|
||||
<GTK-Interface>
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
|
||||
|
||||
<project>
|
||||
<name>diainserturl</name>
|
||||
<program_name>diainserturl</program_name>
|
||||
<directory></directory>
|
||||
<source_directory></source_directory>
|
||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||
<language>C</language>
|
||||
<gnome_support>True</gnome_support>
|
||||
<gettext_support>True</gettext_support>
|
||||
<use_widget_names>True</use_widget_names>
|
||||
<output_main_file>False</output_main_file>
|
||||
<output_build_files>False</output_build_files>
|
||||
<gnome_help_support>True</gnome_help_support>
|
||||
<main_source_file>diainserturl_interface.c</main_source_file>
|
||||
<main_header_file>diainserturl_interface.h</main_header_file>
|
||||
<handler_source_file>diainserturl_callbacks.c</handler_source_file>
|
||||
<handler_header_file>diainserturl_callbacks.h</handler_header_file>
|
||||
</project>
|
||||
<glade-interface>
|
||||
<widget class="GtkDialog" id="GERT">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">no</property>
|
||||
<property name="title" translatable="yes">ERT Options</property>
|
||||
<property name="type">GTK_WINDOW_DIALOG</property>
|
||||
<property name="modal">no</property>
|
||||
<property name="allow_shrink">yes</property>
|
||||
<property name="allow_grow">yes</property>
|
||||
<property name="window-position">GTK_WIN_POS_NONE</property>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>GERT</name>
|
||||
<border_width>2</border_width>
|
||||
<visible>False</visible>
|
||||
<title>ERT Options</title>
|
||||
<type>GTK_WINDOW_DIALOG</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>True</allow_shrink>
|
||||
<allow_grow>True</allow_grow>
|
||||
<auto_shrink>False</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>True</hide_on_close>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_ok_btn">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_apply_btn">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_cancel_btn">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="has_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">yes</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame1">
|
||||
<property name="label" translatable="yes">Status</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow">GTK_SHADOW_ETCHED_IN</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="r_open">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="label" translatable="yes">_Open</property>
|
||||
<property name="active">yes</property>
|
||||
<property name="draw_indicator">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="r_collapsed">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="label" translatable="yes">_Collapsed</property>
|
||||
<property name="active">no</property>
|
||||
<property name="draw_indicator">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="group">r_open</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="r_inlined">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="label" translatable="yes">_Inlined View</property>
|
||||
<property name="active">no</property>
|
||||
<property name="draw_indicator">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="group">r_open</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">yes</property>
|
||||
<property name="fill">yes</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">4</property>
|
||||
<property name="expand">yes</property>
|
||||
<property name="fill">yes</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area1</name>
|
||||
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_ok_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_apply_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_cancel_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<has_default>True</has_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkFrame</class>
|
||||
<name>frame1</name>
|
||||
<label>Status</label>
|
||||
<label_xalign>0</label_xalign>
|
||||
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<name>vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>r_open</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>_Open</label>
|
||||
<active>True</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>status</group>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>r_collapsed</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>_Collapsed</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>status</group>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkRadioButton</class>
|
||||
<name>r_inlined</name>
|
||||
<can_focus>True</can_focus>
|
||||
<label>_Inlined View</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<group>status</group>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
</GTK-Interface>
|
||||
</glade-interface>
|
||||
|
@ -1,100 +1,86 @@
|
||||
<?xml version="1.0"?>
|
||||
<GTK-Interface>
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<project>
|
||||
<name>diainserturl</name>
|
||||
<program_name>diainserturl</program_name>
|
||||
<directory></directory>
|
||||
<source_directory></source_directory>
|
||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||
<language>C</language>
|
||||
<gnome_support>True</gnome_support>
|
||||
<gettext_support>True</gettext_support>
|
||||
<use_widget_names>True</use_widget_names>
|
||||
<output_main_file>False</output_main_file>
|
||||
<output_build_files>False</output_build_files>
|
||||
<gnome_help_support>True</gnome_help_support>
|
||||
<main_source_file>diainserturl_interface.c</main_source_file>
|
||||
<main_header_file>diainserturl_interface.h</main_header_file>
|
||||
<handler_source_file>diainserturl_callbacks.c</handler_source_file>
|
||||
<handler_header_file>diainserturl_callbacks.h</handler_header_file>
|
||||
</project>
|
||||
<glade-interface>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>GError</name>
|
||||
<title>Error</title>
|
||||
<type>GTK_WINDOW_DIALOG</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>True</allow_shrink>
|
||||
<allow_grow>True</allow_grow>
|
||||
<auto_shrink>True</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>True</hide_on_close>
|
||||
<widget class="GtkDialog" id="GError">
|
||||
<property name="title" translatable="yes">Error</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area1</name>
|
||||
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">10</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_button_close">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_button_close</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkScrolledWindow</class>
|
||||
<name>scrolledwindow1</name>
|
||||
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
|
||||
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
|
||||
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
|
||||
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkText</class>
|
||||
<name>r_textarea</name>
|
||||
<width>250</width>
|
||||
<height>200</height>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>False</editable>
|
||||
<text></text>
|
||||
</widget>
|
||||
<child>
|
||||
<widget class="GtkTextView" id="r_textarea">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap_mode">GTK_WRAP_NONE</property>
|
||||
<property name="cursor_visible">True</property>
|
||||
<property name="pixels_above_lines">0</property>
|
||||
<property name="pixels_below_lines">0</property>
|
||||
<property name="pixels_inside_wrap">0</property>
|
||||
<property name="left_margin">0</property>
|
||||
<property name="right_margin">0</property>
|
||||
<property name="indent">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</GTK-Interface>
|
||||
</glade-interface>
|
||||
|
@ -1,108 +1,110 @@
|
||||
<?xml version="1.0"?>
|
||||
<GTK-Interface>
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<project>
|
||||
<name>Project1</name>
|
||||
<program_name>project1</program_name>
|
||||
<directory></directory>
|
||||
<source_directory>src</source_directory>
|
||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||
<language>C</language>
|
||||
<gnome_support>True</gnome_support>
|
||||
<gettext_support>True</gettext_support>
|
||||
</project>
|
||||
<glade-interface>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>GPreamble</name>
|
||||
<title>LaTeX Preamble</title>
|
||||
<type>GTK_WINDOW_DIALOG</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>True</allow_shrink>
|
||||
<allow_grow>True</allow_grow>
|
||||
<auto_shrink>True</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>False</hide_on_close>
|
||||
<widget class="GtkDialog" id="GPreamble">
|
||||
<property name="title" translatable="yes">LaTeX Preamble</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area1</name>
|
||||
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">10</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_ok_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_apply_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_cancel_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_ok_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_apply_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_cancel_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkScrolledWindow</class>
|
||||
<name>scrolledwindow1</name>
|
||||
<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
|
||||
<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
|
||||
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
|
||||
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkText</class>
|
||||
<name>r_preamble</name>
|
||||
<width>166</width>
|
||||
<height>146</height>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text></text>
|
||||
</widget>
|
||||
<child>
|
||||
<widget class="GtkTextView" id="r_preamble">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap_mode">GTK_WRAP_NONE</property>
|
||||
<property name="cursor_visible">True</property>
|
||||
<property name="pixels_above_lines">0</property>
|
||||
<property name="pixels_below_lines">0</property>
|
||||
<property name="pixels_inside_wrap">0</property>
|
||||
<property name="left_margin">0</property>
|
||||
<property name="right_margin">0</property>
|
||||
<property name="indent">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</GTK-Interface>
|
||||
</glade-interface>
|
||||
|
@ -1,215 +1,184 @@
|
||||
<?xml version="1.0"?>
|
||||
<GTK-Interface>
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
|
||||
|
||||
<project>
|
||||
<name>DiaInsertTabular</name>
|
||||
<program_name>diainserttabular</program_name>
|
||||
<directory></directory>
|
||||
<source_directory>src</source_directory>
|
||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||
<language>C</language>
|
||||
<gnome_support>True</gnome_support>
|
||||
<gettext_support>True</gettext_support>
|
||||
</project>
|
||||
<glade-interface>
|
||||
<widget class="GtkDialog" id="GTabularCreate">
|
||||
<property name="title" translatable="yes">Insert Tabular</property>
|
||||
<property name="type">GTK_WINDOW_DIALOG</property>
|
||||
<property name="modal">no</property>
|
||||
<property name="allow_shrink">no</property>
|
||||
<property name="allow_grow">no</property>
|
||||
<property name="visible">no</property>
|
||||
<property name="window-position">GTK_WIN_POS_NONE</property>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>GTabularCreate</name>
|
||||
<title>Insert Tabular</title>
|
||||
<type>GTK_WINDOW_DIALOG</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>False</allow_shrink>
|
||||
<allow_grow>False</allow_grow>
|
||||
<auto_shrink>False</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>True</hide_on_close>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_ok_btn">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_apply_btn">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_cancel_btn">
|
||||
<property name="can_default">yes</property>
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">yes</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="homogeneous">yes</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
<property name="n-rows">2</property>
|
||||
<property name="n-columns">2</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="label" translatable="yes">Rows</property>
|
||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_padding">0</property>
|
||||
<property name="y_padding">0</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label3">
|
||||
<property name="label" translatable="yes">Columns</property>
|
||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_padding">0</property>
|
||||
<property name="y_padding">0</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="r_rows">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="numeric">no</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="snap_to_ticks">no</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="adjustment">1 1 50 1 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_padding">0</property>
|
||||
<property name="y_padding">0</property>
|
||||
<property name="x_options">expand|fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSpinButton" id="r_cols">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="numeric">no</property>
|
||||
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="snap_to_ticks">no</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="adjustment">1 1 50 1 10 10</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_padding">0</property>
|
||||
<property name="y_padding">0</property>
|
||||
<property name="x_options">expand|fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">yes</property>
|
||||
<property name="fill">yes</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">4</property>
|
||||
<property name="expand">yes</property>
|
||||
<property name="fill">yes</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area1</name>
|
||||
<layout_style>GTK_BUTTONBOX_END</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_ok_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_apply_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_cancel_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table1</name>
|
||||
<rows>2</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>True</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label2</name>
|
||||
<label>Rows</label>
|
||||
<justify>GTK_JUSTIFY_RIGHT</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label3</name>
|
||||
<label>Columns</label>
|
||||
<justify>GTK_JUSTIFY_RIGHT</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkSpinButton</class>
|
||||
<name>r_rows</name>
|
||||
<can_focus>True</can_focus>
|
||||
<climb_rate>1</climb_rate>
|
||||
<digits>0</digits>
|
||||
<numeric>False</numeric>
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>1</lower>
|
||||
<upper>50</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
<page_size>10</page_size>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkSpinButton</class>
|
||||
<name>r_cols</name>
|
||||
<can_focus>True</can_focus>
|
||||
<climb_rate>1</climb_rate>
|
||||
<digits>0</digits>
|
||||
<numeric>False</numeric>
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>1</lower>
|
||||
<upper>50</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
<page_size>10</page_size>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
</GTK-Interface>
|
||||
</glade-interface>
|
||||
|
@ -1,269 +1,230 @@
|
||||
<?xml version="1.0"?>
|
||||
<GTK-Interface>
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<project>
|
||||
<name>diainserturl</name>
|
||||
<program_name>diainserturl</program_name>
|
||||
<directory></directory>
|
||||
<source_directory></source_directory>
|
||||
<pixmaps_directory>pixmaps</pixmaps_directory>
|
||||
<language>C</language>
|
||||
<gnome_support>True</gnome_support>
|
||||
<gettext_support>True</gettext_support>
|
||||
<use_widget_names>True</use_widget_names>
|
||||
<output_main_file>False</output_main_file>
|
||||
<output_build_files>False</output_build_files>
|
||||
<gnome_help_support>True</gnome_help_support>
|
||||
<main_source_file>diainserturl_interface.c</main_source_file>
|
||||
<main_header_file>diainserturl_interface.h</main_header_file>
|
||||
<handler_source_file>diainserturl_callbacks.c</handler_source_file>
|
||||
<handler_header_file>diainserturl_callbacks.h</handler_header_file>
|
||||
</project>
|
||||
<glade-interface>
|
||||
|
||||
<widget>
|
||||
<class>GnomeDialog</class>
|
||||
<name>GUrl</name>
|
||||
<border_width>2</border_width>
|
||||
<visible>False</visible>
|
||||
<title>Insert URL</title>
|
||||
<type>GTK_WINDOW_DIALOG</type>
|
||||
<position>GTK_WIN_POS_NONE</position>
|
||||
<modal>False</modal>
|
||||
<allow_shrink>True</allow_shrink>
|
||||
<allow_grow>True</allow_grow>
|
||||
<auto_shrink>False</auto_shrink>
|
||||
<auto_close>False</auto_close>
|
||||
<hide_on_close>True</hide_on_close>
|
||||
<widget class="GtkDialog" id="GUrl">
|
||||
<property name="border_width">2</property>
|
||||
<property name="title" translatable="yes">Insert URL</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<child_name>GnomeDialog:vbox</child_name>
|
||||
<name>dialog-vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>8</spacing>
|
||||
<child>
|
||||
<padding>4</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<widget>
|
||||
<class>GtkHButtonBox</class>
|
||||
<child_name>GnomeDialog:action_area</child_name>
|
||||
<name>dialog-action_area1</name>
|
||||
<layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
|
||||
<spacing>8</spacing>
|
||||
<child_min_width>85</child_min_width>
|
||||
<child_min_height>27</child_min_height>
|
||||
<child_ipad_x>7</child_ipad_x>
|
||||
<child_ipad_y>0</child_ipad_y>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
<pack>GTK_PACK_END</pack>
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||
<property name="spacing">10</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_restore_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Restore</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_ok_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-ok</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_apply_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="r_cancel_btn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="response_id">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_restore_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<label>Restore</label>
|
||||
<stock_pixmap>GNOME_STOCK_PIXMAP_UNDO</stock_pixmap>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_ok_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_apply_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkButton</class>
|
||||
<name>r_cancel_btn</name>
|
||||
<can_default>True</can_default>
|
||||
<has_default>True</has_default>
|
||||
<can_focus>True</can_focus>
|
||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<name>vbox1</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>2</spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">2</property>
|
||||
<property name="column_spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Name</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">r_name</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_URL</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">r_url</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="r_url">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="r_name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">True</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char" translatable="yes">*</property>
|
||||
<property name="activates_default">False</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="r_html_cb">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_HTML type</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table1</name>
|
||||
<rows>2</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>2</row_spacing>
|
||||
<column_spacing>2</column_spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label2</name>
|
||||
<label>_Name</label>
|
||||
<justify>GTK_JUSTIFY_LEFT</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<default_focus_target>r_name</default_focus_target>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>False</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label1</name>
|
||||
<label>_URL</label>
|
||||
<justify>GTK_JUSTIFY_LEFT</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<default_focus_target>r_url</default_focus_target>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GnomeEntry</class>
|
||||
<name>url1</name>
|
||||
<border_width>1</border_width>
|
||||
<history_id>FormUrl_url</history_id>
|
||||
<max_saved>10</max_saved>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GnomeEntry:entry</child_name>
|
||||
<name>r_url</name>
|
||||
<can_default>True</can_default>
|
||||
<has_default>True</has_default>
|
||||
<can_focus>True</can_focus>
|
||||
<has_focus>True</has_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GnomeEntry</class>
|
||||
<name>name1</name>
|
||||
<border_width>1</border_width>
|
||||
<history_id>FormUrl_name</history_id>
|
||||
<max_saved>10</max_saved>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GnomeEntry:entry</child_name>
|
||||
<name>r_name</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCheckButton</class>
|
||||
<name>r_html_cb</name>
|
||||
<border_width>2</border_width>
|
||||
<can_focus>True</can_focus>
|
||||
<label>_HTML type</label>
|
||||
<active>False</active>
|
||||
<draw_indicator>True</draw_indicator>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</GTK-Interface>
|
||||
</glade-interface>
|
||||
|
@ -6,8 +6,9 @@
|
||||
|
||||
#include "gnomeBC.h"
|
||||
#include "ButtonController.tmpl"
|
||||
#include "gtk--/widget.h"
|
||||
#include "gtk--/button.h"
|
||||
|
||||
#include <gtkmm/widget.h>
|
||||
#include <gtkmm/button.h>
|
||||
|
||||
gnomeBC::gnomeBC(string const & cancel, string const & close)
|
||||
: GuiBC<Gtk::Button, Gtk::Widget>(cancel, close)
|
||||
|
@ -9,209 +9,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <gdk--/font.h>
|
||||
#include <gdk/gdktypes.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "gnome_helpers.h"
|
||||
|
||||
string get_font_name(Gdk_Font const & font)
|
||||
{
|
||||
gchar * name = get_font_name(font.gdkobj());
|
||||
string name_str(name);
|
||||
g_free(name);
|
||||
return name_str;
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
get_font_name (const GdkFont * font)
|
||||
{
|
||||
Atom font_atom, atom;
|
||||
bool status = false;
|
||||
|
||||
#ifdef E_FONT_VERBOSE
|
||||
gint i;
|
||||
g_print ("Extracting X font info\n");
|
||||
#endif
|
||||
|
||||
font_atom = gdk_atom_intern ("FONT", FALSE);
|
||||
|
||||
if (font->type == GDK_FONT_FONTSET) {
|
||||
XFontStruct **font_structs;
|
||||
gint num_fonts;
|
||||
gchar **font_names;
|
||||
|
||||
num_fonts = XFontsOfFontSet (
|
||||
static_cast<XFontSet>(GDK_FONT_XFONT (font))
|
||||
, &font_structs, &font_names);
|
||||
#ifdef E_FONT_VERBOSE
|
||||
g_print ("Fonts of fontset:\n");
|
||||
for (i = 0; i < num_fonts; i++) g_print (" %s\n", font_names[i]);
|
||||
#endif
|
||||
status = XGetFontProperty (font_structs[0], font_atom, &atom);
|
||||
} else {
|
||||
status = XGetFontProperty (
|
||||
static_cast<XFontStruct*>(GDK_FONT_XFONT (font))
|
||||
, font_atom, &atom);
|
||||
}
|
||||
|
||||
if (status) {
|
||||
return gdk_atom_name (atom);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if USE_UNUSED_STUFF_FROM_E_FONT
|
||||
/*
|
||||
* Splits full X font name into pieces, overwriting hyphens
|
||||
*/
|
||||
|
||||
static void
|
||||
split_name (gchar * c[], gchar * name)
|
||||
{
|
||||
gchar *p;
|
||||
gint i;
|
||||
|
||||
p = name;
|
||||
if (*p == '-') p++;
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
c[i] = p;
|
||||
/* Skip text */
|
||||
while (*p && (*p != '-')) p++;
|
||||
/* Replace hyphen with '\0' */
|
||||
if (*p) *p++ = '\0';
|
||||
}
|
||||
|
||||
c[i] = p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find light and bold variants of a font, ideally using the provided
|
||||
* weight for the light variant, and a weight 2 shades darker than it
|
||||
* for the bold variant. If there isn't something 2 shades darker, use
|
||||
* something 3 or more shades darker if it exists, or 1 shade darker
|
||||
* if that's all there is. If there is nothing darker than the provided
|
||||
* weight, but there are lighter fonts, then use the darker one for
|
||||
* bold and a lighter one for light.
|
||||
*/
|
||||
|
||||
static gboolean
|
||||
find_variants (gchar **namelist, gint length, gchar *weight,
|
||||
gchar **lightname, gchar **boldname)
|
||||
{
|
||||
static GHashTable *wh = NULL;
|
||||
/* Standard, Found, Bold, Light */
|
||||
gint sw, fw, bw, lw;
|
||||
gchar s[32];
|
||||
gchar *f, *b, *l;
|
||||
gchar *p;
|
||||
gint i;
|
||||
|
||||
if (!wh) {
|
||||
wh = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
g_hash_table_insert (wh, "light", GINT_TO_POINTER (1));
|
||||
g_hash_table_insert (wh, "book", GINT_TO_POINTER (2));
|
||||
g_hash_table_insert (wh, "regular", GINT_TO_POINTER (2));
|
||||
g_hash_table_insert (wh, "medium", GINT_TO_POINTER (3));
|
||||
g_hash_table_insert (wh, "demibold", GINT_TO_POINTER (5));
|
||||
g_hash_table_insert (wh, "bold", GINT_TO_POINTER (6));
|
||||
g_hash_table_insert (wh, "black", GINT_TO_POINTER (8));
|
||||
}
|
||||
|
||||
g_snprintf (s, 32, weight);
|
||||
g_strdown (s);
|
||||
sw = GPOINTER_TO_INT (g_hash_table_lookup (wh, s));
|
||||
if (sw == 0) return FALSE;
|
||||
|
||||
fw = 0; lw = 0; bw = 32;
|
||||
f = NULL; l = NULL; b = NULL;
|
||||
*lightname = NULL; *boldname = NULL;
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
p = namelist[i];
|
||||
if (*p) p++;
|
||||
while (*p && (*p != '-')) p++;
|
||||
if (*p) p++;
|
||||
while (*p && (*p != '-')) p++;
|
||||
if (*p) p++;
|
||||
f = p;
|
||||
while (*p && (*p != '-')) p++;
|
||||
if (*p) *p = '\0';
|
||||
g_strdown (f);
|
||||
fw = GPOINTER_TO_INT (g_hash_table_lookup (wh, f));
|
||||
if (fw) {
|
||||
if (fw > sw) {
|
||||
if ((fw - 2 == sw) ||
|
||||
((fw > bw) && (bw == sw + 1)) ||
|
||||
((fw < bw) && (fw - 2 > sw))) {
|
||||
bw = fw;
|
||||
b = f;
|
||||
}
|
||||
} else if (fw < sw) {
|
||||
if ((fw + 2 == sw) ||
|
||||
((fw < lw) && (lw == sw - 1)) ||
|
||||
((fw > lw) && (fw + 2 < sw))) {
|
||||
lw = fw;
|
||||
l = f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (b) {
|
||||
*lightname = weight;
|
||||
*boldname = b;
|
||||
return TRUE;
|
||||
} else if (l) {
|
||||
*lightname = l;
|
||||
*boldname = weight;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef E_FONT_VERBOSE
|
||||
/*
|
||||
* Return newly allocated full name
|
||||
*/
|
||||
|
||||
static void
|
||||
e_font_print_gdk_font_name (const GdkFont * font)
|
||||
{
|
||||
Atom font_atom, atom;
|
||||
Bool status;
|
||||
|
||||
font_atom = gdk_atom_intern ("FONT", FALSE);
|
||||
|
||||
g_print ("-------- start of font description --------\n");
|
||||
|
||||
if (font == NULL) {
|
||||
g_print ("GdkFont is NULL\n");
|
||||
} else if (font->type == GDK_FONT_FONTSET) {
|
||||
XFontStruct **font_structs;
|
||||
gint num_fonts;
|
||||
gchar **font_names;
|
||||
gint i;
|
||||
|
||||
num_fonts = XFontsOfFontSet (GDK_FONT_XFONT (font), &font_structs, &font_names);
|
||||
|
||||
g_print ("Gdk Fontset, locale: %s\n", XLocaleOfFontSet (GDK_FONT_XFONT (font)));
|
||||
for (i = 0; i < num_fonts; i++) {
|
||||
g_print (" %s\n", font_names[i]);
|
||||
}
|
||||
} else {
|
||||
gchar * name;
|
||||
status = XGetFontProperty (GDK_FONT_XFONT (font), font_atom, &atom);
|
||||
name = gdk_atom_name (atom);
|
||||
g_print ("GdkFont: %s\n", name);
|
||||
if (name) g_free (name);
|
||||
}
|
||||
|
||||
g_print ("-------- end of font description --------\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -15,40 +15,9 @@
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
#include <glade/glade-xml.h>
|
||||
#include <glib.h>
|
||||
|
||||
// Glade Helper Function.
|
||||
|
||||
|
||||
/** This function will get a widget from the glade XML representation and
|
||||
* will wrap it into the gtk--/gnome-- representation.
|
||||
*/
|
||||
template<class T>
|
||||
T* getWidgetPtr(GladeXML* xml, char const * name)
|
||||
{
|
||||
T* result = static_cast<T*>(Gtk::wrap_auto((GtkObject*)glade_xml_get_widget(xml, name)));
|
||||
if (result == NULL)
|
||||
{
|
||||
lyxerr << "** ERROR **: unable to load widget: " << name << endl;
|
||||
g_assert(result != NULL);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
class Gdk_Font;
|
||||
|
||||
/** Takes a Gdk::Font object reference and returns the name associated
|
||||
* with the font it holds.
|
||||
*/
|
||||
string get_font_name(Gdk_Font const & font);
|
||||
|
||||
|
||||
/** Takes a GdkFont pointer and returns the name associated with the font
|
||||
* it holds. It returns a newly allocated gchar* string.
|
||||
*
|
||||
* This function was lifted from e-font.c from the gabber package.
|
||||
*/
|
||||
gchar * get_font_name(GdkFont const * font);
|
||||
#undef Status
|
||||
#undef Value
|
||||
#undef DestroyNotify
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user