Commit 6b8986ca authored by Stephan Kulow's avatar Stephan Kulow

retagging

parent a59edd4a
......@@ -14,7 +14,6 @@ AM_PROG_LIBTOOL
AC_LANG_CPLUSPLUS
AM_PATH_GTKMM(1.2.8,,
AC_MSG_ERROR(Cannot find a matching GTK-- library: Please install version 1.2.8 or newer))
PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 >= 2.8.0])
AC_OUTPUT(Makefile src/Makefile )
%{CC_TEMPLATE}
#include <gtk--/main.h>
#include <gtkmm/main.h>
#include "main_window.hh"
......@@ -9,8 +9,7 @@ int main(int argc, char **argv)
Gtk::Main m(&argc, &argv);
main_window *main_window = new class main_window();
m.run();
delete main_window;
main_window main_window;
Gtk::Main::run(main_window);
return 0;
}
......@@ -14,6 +14,12 @@
<property name="modal">False</property>
<property name="resizable">True</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_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<signal name="delete_event" handler="quit"/>
<child>
......
......@@ -6,4 +6,5 @@
<program_name>%{APPNAMELC}</program_name>
<language>C++</language>
<gnome_support>FALSE</gnome_support>
<gettext_support>FALSE</gettext_support>
</glade-project>
......@@ -7,9 +7,6 @@
#include "config.h"
#include "main_window.hh"
#include <gtk--/main.h>
gint main_window::quit(GdkEventAny *ev)
{
Gtk::Main::quit();
bool main_window::quit(GdkEventAny *ev)
{ return 0;
}
......@@ -13,7 +13,7 @@
# define _MAIN_WINDOW_HH
class main_window : public main_window_glade
{
protected:
virtual gint quit(GdkEventAny *ev);
bool quit(GdkEventAny *ev);
};
#endif
%{CC_TEMPLATE}
// DO NOT EDIT THIS FILE ! It was created using
// glade-- /home/amp8165/Projects/gtk2mm/gtk2mm.glade
// for gtk 2.2.4 and gtkmm 1.2.10
// DO NOT EDIT THIS FILE ! It was created using glade--
// for gtk 2.8.3 and gtkmm 2.8.0
//
// Please modify the corresponding derived classes in ./src/main_window.cc
#if defined __GNUC__ && __GNUC__ < 3
#error This program will crash if compiled with g++ 2.x
// see the dynamic_cast bug in the gtkmm FAQ
#endif //
#include "config.h"
#include <gtkmmconfig.h>
#if GTKMM_MAJOR_VERSION==2 && GTKMM_MINOR_VERSION>2
#include <sigc++/compatibility.h>
#define GMM_GTKMM_22_24(a,b) b
#else //gtkmm 2.2
#define GMM_GTKMM_22_24(a,b) a
#endif //
#include "main_window_glade.hh"
#include <gdk/gdkkeysyms.h>
#include <gtk--/accelgroup.h>
#include <gtkmm/accelgroup.h>
main_window_glade::main_window_glade(
) : Gtk::Window(GTK_WINDOW_TOPLEVEL)
) : Gtk::Window(Gtk::WINDOW_TOPLEVEL)
{ main_window = this;
Gtk::AccelGroup *main_window_accgrp = Gtk::AccelGroup::create();
gmm_data = new GlademmData(main_window_accgrp);
gmm_data = new GlademmData(get_accel_group());
main_window->set_title("%{APPNAME} Project");
main_window->set_modal(false);
main_window->add_accel_group(*(gmm_data->getAccelGroup()));
main_window->property_window_position().set_value(Gtk::WIN_POS_CENTER);
main_window->set_resizable(true);
main_window->property_destroy_with_parent().set_value(false);
main_window->show();
main_window->delete_event.connect(SigC::slot(this, &main_window_glade::quit));
main_window->signal_delete_event().connect(SigC::slot(*this, &main_window_glade::quit), false);
}
main_window_glade::~main_window_glade()
......
%{HH_TEMPLATE}
// DO NOT EDIT THIS FILE ! It was created using
// glade-- /home/amp8165/Projects/gtk2mm/gtk2mm.glade
// for gtk 2.2.4 and gtkmm 1.2.10
// DO NOT EDIT THIS FILE ! It was created using glade--
// for gtk 2.8.3 and gtkmm 2.8.0
//
// Please modify the corresponding derived classes in ./src/main_window.hh and./src/main_window.cc
......@@ -12,38 +11,38 @@
#if !defined(GLADEMM_DATA)
#define GLADEMM_DATA
#include <gtk--/accelgroup.h>
#include <gtkmm/accelgroup.h>
class GlademmData
{
Gtk::AccelGroup *accgrp;
Glib::RefPtr<Gtk::AccelGroup> accgrp;
public:
GlademmData(Gtk::AccelGroup *ag) : accgrp(ag)
GlademmData(Glib::RefPtr<Gtk::AccelGroup> ag) : accgrp(ag)
{
}
Gtk::AccelGroup * getAccelGroup()
Glib::RefPtr<Gtk::AccelGroup> getAccelGroup()
{ return accgrp;
}
};
#endif //GLADEMM_DATA
#include <gtk--/window.h>
#include <gtkmm/window.h>
class main_window_glade : public Gtk::Window
{
GlademmData *gmm_data;
public:
class Gtk::Window *main_window;
class Gtk::Window * main_window;
protected:
main_window_glade();
~main_window_glade();
virtual gint quit(GdkEventAny *ev) = 0;
private:
virtual bool quit(GdkEventAny *ev) = 0;
};
#endif
......@@ -32,6 +32,10 @@
#include <config.h>
#if DB_VERSION_MAJOR != 4
#error "BDB Version 4 required."
#endif
struct _Catalog_Private
{
QString dbName;
......@@ -196,8 +200,15 @@ void Catalog::setEnabled( bool isEnabled )
kdDebug() << "set_cachesize: " << db_strerror(ret) << endl;
}
if ((ret = dbp->open(
dbp, NULL, QFile::encodeName( indexName ).data(), 0, DB_BTREE, DB_CREATE, 0664)) != 0) {
if ((ret =
#if DB_VERSION_MINOR >= 1
dbp->open(dbp, NULL, QFile::encodeName( indexName ).data(), 0, DB_BTREE, DB_CREATE, 0664)
#else
dbp->open(dbp, QFile::encodeName( indexName ).data(), 0, DB_BTREE, DB_CREATE, 0664)
#endif
== 0))
{
kdDebug() << "db_open: " << db_strerror(ret) << endl;
dbp->close( dbp, 0 );
return;
......@@ -257,8 +268,14 @@ void Catalog::setEnabled( bool isEnabled )
kdDebug() << "set_cachesize: " << db_strerror(ret) << endl;
}
if ((ret = d->dbp->open(
d->dbp, NULL, d->dbName.local8Bit(), 0, DB_BTREE, DB_CREATE, 0664)) != 0) {
if ((ret =
#if DB_VERSION_MINOR >= 1
d->dbp->open(d->dbp, NULL, d->dbName.local8Bit(), 0, DB_BTREE, DB_CREATE, 0664)
#else
d->dbp->open(d->dbp, d->dbName.local8Bit(), 0, DB_BTREE, DB_CREATE, 0664)
#endif
!= 0))
{
kdDebug() << "db_open: " << db_strerror(ret) << endl;
close();
return;
......
......@@ -139,7 +139,13 @@ QStringList &Profile::listByType(List type)
case ExplicitDisable:
return m_explicitDisable;
}
//FIXME: What to return here?
// This is ugly, but at least it returns something (and compiles).
static QStringList empty;
empty.clear();
return empty;
}
bool Profile::hasInEntryList(EntryList &list, QString value)
......
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