From: Predrag "Pele" Balorda Date: Wed, 2 Dec 1998 15:15:49 +0000 (+0000) Subject: New classes for gtk-tool X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~978 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9c975d34b4ee92016e2951181b295d507a6d4f50;p=openldap New classes for gtk-tool --- diff --git a/contrib/gtk-tool/Gtk_LdapTree.cc b/contrib/gtk-tool/Gtk_LdapTree.cc new file mode 100644 index 0000000000..9b7b5517e1 --- /dev/null +++ b/contrib/gtk-tool/Gtk_LdapTree.cc @@ -0,0 +1,18 @@ +#include + +void Gtk_LdapTree::show_impl() { + cout << "tree show" << endl; + Gtk_LdapTree *tree; + Gtk_LdapTreeItem *item; + Gtk_LdapTree::selectioniterator i; + debug("iterator\n"); + for (i=this->begin(); i!=this->end();i++) { + item = (Gtk_LdapTreeItem *)GTK_TREE_ITEM((*i)); + debug("#%s#\n", item->dn); + tree = item->getSubtree(item->ld, 1); + if (tree != NULL) item->set_subtree(*tree); + } + debug("done\n"); + Gtk_c_signals_Tree *sig=(Gtk_c_signals_Tree *)internal_getsignalbase(); + sig->show(GTK_WIDGET(gtkobj())); +} diff --git a/contrib/gtk-tool/Gtk_LdapTree.h b/contrib/gtk-tool/Gtk_LdapTree.h new file mode 100644 index 0000000000..a0a713bc04 --- /dev/null +++ b/contrib/gtk-tool/Gtk_LdapTree.h @@ -0,0 +1,10 @@ +#ifndef GTK_LDAP_TREE_H +#define GTK_LDAP_TREE_H +#include +#include "utils.h" +#include + +class Gtk_LdapTree : public Gtk_Tree { + void show_impl(); +}; +#endif diff --git a/contrib/gtk-tool/utils.cc b/contrib/gtk-tool/utils.cc new file mode 100644 index 0000000000..43fa369086 --- /dev/null +++ b/contrib/gtk-tool/utils.cc @@ -0,0 +1,13 @@ +#include +#include + +int debug(const char *format,...) { +#ifdef DEBUG + va_list args; + int ret; + va_start(args, format); + ret = vprintf(format, args); + va_end(args); + return ret; +#endif +} diff --git a/contrib/gtk-tool/utils.h b/contrib/gtk-tool/utils.h new file mode 100644 index 0000000000..d7a593a91b --- /dev/null +++ b/contrib/gtk-tool/utils.h @@ -0,0 +1,4 @@ +#ifndef MY_UTIL_H +#define MY_UTIL_H +int debug(const char *format,...); +#endif /* MY_UTIL_H */