From: Predrag "Pele" Balorda Date: Fri, 4 Dec 1998 01:11:12 +0000 (+0000) Subject: gtk-tool updates, multiple server support, smarter traversal, ldap_get_option enhance... X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~969 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ff80013124399f31ddb6a167c3177abe4ede2534;p=openldap gtk-tool updates, multiple server support, smarter traversal, ldap_get_option enhancements, code cleanups --- diff --git a/contrib/gtk-tool/ChangeLog b/contrib/gtk-tool/ChangeLog index 19bfd7daea..fb97b263c0 100644 --- a/contrib/gtk-tool/ChangeLog +++ b/contrib/gtk-tool/ChangeLog @@ -1,5 +1,18 @@ ChangeLog for gtk-tool +03/12/1998 - Pele + * Added support for multiple servers (via multiple -s options) + * More testing + * Started experimenting with status bar for display of various info + * Got rid of many warning and error messages generate by gtk + * Added a new icon for objectclass=alias; + * Display of some ldap options aquired with ldap_get_option when + server selected. + * Traversing set to only 1 subtree (then 1 by 1); + * Started experimenting with a progress bar for traversal + (so users don't get bored while waiting for subtrees to be aquired and + constructed) + 02/12/1998 - Pele * Added Gtk_LdapTree class * Added utils (with debug only) diff --git a/contrib/gtk-tool/Gtk_LdapServer.cc b/contrib/gtk-tool/Gtk_LdapServer.cc index d9fddb5b93..3c91b61827 100644 --- a/contrib/gtk-tool/Gtk_LdapServer.cc +++ b/contrib/gtk-tool/Gtk_LdapServer.cc @@ -9,10 +9,13 @@ Gtk_LdapServer::Gtk_LdapServer() : Gtk_TreeItem() { } Gtk_LdapServer::Gtk_LdapServer(My_Window *w, char *h, int p) : Gtk_TreeItem() { + char *s, *s2; this->par = w; this->hostname = h; this->port = p; + this->notebook = NULL; debug("%s %i\n", this->hostname, this->port); + this->setType(1); this->getConfig(); } @@ -28,6 +31,7 @@ void Gtk_LdapServer::setType(int t) { debug("Gtk_LdapServer::setType(%i)\n", t); Gtk_Pixmap *xpm_icon; Gtk_Label *label; + char *c = NULL; if (this->getchild() != NULL) { xpm_label = new Gtk_HBox(GTK_HBOX(this->getchild()->gtkobj())); xpm_label->remove_c(xpm_label->children()->nth_data(0)); @@ -38,6 +42,8 @@ void Gtk_LdapServer::setType(int t) { if (strcasecmp(this->hostname,"localhost") == 0) xpm_icon=new Gtk_Pixmap(*xpm_label, local_server); else xpm_icon=new Gtk_Pixmap(*xpm_label, remote_server); +// sprintf(c, "%s:%i", this->hostname, this->port); +// printf("%s\n", c); label = new Gtk_Label(this->hostname); xpm_label->pack_start(*xpm_icon, false, false, 1); xpm_label->pack_start(*label, false, false, 1); @@ -49,20 +55,22 @@ void Gtk_LdapServer::setType(int t) { int Gtk_LdapServer::showDetails() { debug("Gtk_LdapServer::showDetails()\n"); - this->getDetails(); - /* if (this->notebook != NULL) { +// debug("Have notebook here"); if (par->viewport->getchild() != NULL) { +// debug(" and viewport has children"); par->viewport->remove_c(par->viewport->getchild()->gtkobj()); +// debug(" which have been removed"); } +// else debug(" and viewport without children"); par->viewport->add(this->notebook); this->notebook->show(); par->viewport->show(); return 0; } - else this->getDetails(); + if (this->getOptions() != 0) return 1; this->showDetails(); - */ +// debug("done\n"); return 0; } @@ -107,79 +115,168 @@ int Gtk_LdapServer::getConfig() { return entriesCount; } -int Gtk_LdapServer::getDetails() { - debug("Gtk_LdapServer::getDetails()\n"); - Gtk_HBox *hbox; - Gtk_VBox *vbox; +char* Gtk_LdapServer::getOptDescription(int option) { + debug("Gtk_LdapServer::getOptDescription(%i) ", option); + char *c; + switch (option) { + case LDAP_OPT_API_INFO: c = "API info"; break; + case LDAP_OPT_CLIENT_CONTROLS: c = "Client controls"; break; + case LDAP_OPT_DEREF: c = "Dereference"; break; + case LDAP_OPT_DESC: c = "Description"; break; + case LDAP_OPT_DNS: c = "DNS Lookup"; break; + case LDAP_OPT_ERROR_NUMBER: c = "Error number"; break; + case LDAP_OPT_ERROR_STRING: c = "Error string"; break; + case LDAP_OPT_SIZELIMIT: c = "Size limit"; break; + case LDAP_OPT_TIMELIMIT: c = "Time limit"; break; + case LDAP_OPT_REFERRALS: c = "Referrals"; break; + case LDAP_OPT_RESTART: c = "Started"; break; + case LDAP_OPT_PROTOCOL_VERSION: c = "Protocol version"; break; + case LDAP_OPT_HOST_NAME: c = "Host name"; break; + case LDAP_OPT_SERVER_CONTROLS: c = "Server controls"; break; + default: c = "No description"; break; + } + debug("%s\n", c); + return c; +} + +int Gtk_LdapServer::getOptType(int option) { + debug("Gtk_LdapServer::getOptType(%i) ", option); + int type; /* 0 = int, 1 = string, 2 = boolean */ + switch(option) { + /* ints */ + case LDAP_OPT_DEREF: + case LDAP_OPT_DESC: + case LDAP_OPT_SIZELIMIT: + case LDAP_OPT_TIMELIMIT: + case LDAP_OPT_ERROR_NUMBER: + case LDAP_OPT_PROTOCOL_VERSION: type = 0; break; + /* strings */ + case LDAP_OPT_ERROR_STRING: + case LDAP_OPT_HOST_NAME: type = 1; break; + /* bools */ + case LDAP_OPT_REFERRALS: + case LDAP_OPT_DNS: + case LDAP_OPT_RESTART: type = 2; break; + case LDAP_OPT_SERVER_CONTROLS: + case LDAP_OPT_CLIENT_CONTROLS: + case LDAP_OPT_API_INFO: + default: type = 0; break; + } + debug("%i\n", type); + return type; +} + +int Gtk_LdapServer::getOptions() { + debug("Gtk_LdapServer::getOptions()\n"); + if (this->notebook != NULL) return 0; + Gtk_HBox *hbox, *mini_hbox; + Gtk_VBox *vbox, *mini_vbox; + Gtk_Table *table; Gtk_Label *label; Gtk_RadioButton *radio1, *radio2; - char *val; - int ival; + char *s_value; + int i_value; + char *thing; + int things[9] = { + LDAP_OPT_API_INFO, + // LDAP_OPT_CLIENT_CONTROLS, + // LDAP_OPT_DESC, + LDAP_OPT_DEREF, + LDAP_OPT_DNS, + // LDAP_OPT_ERROR_NUMBER, + // LDAP_OPT_ERROR_STRING, + LDAP_OPT_HOST_NAME, + LDAP_OPT_PROTOCOL_VERSION, + LDAP_OPT_REFERRALS, + LDAP_OPT_RESTART, + // LDAP_OPT_SERVER_CONTROLS, + LDAP_OPT_SIZELIMIT, + LDAP_OPT_TIMELIMIT + }; - if (GTK_TREE_ITEM(this->gtkobj())->subtree == NULL) { +/* if (GTK_TREE_ITEM(this->gtkobj())->subtree == NULL) { this->getSubtree(); - } + } */ -/* - cout << "getting ldap options"; - vbox = new Gtk_VBox(); - opt_util = new LdapOpts(); +// debug("getting ldap options"); +// vbox = new Gtk_VBox(); + table = new Gtk_Table(11, 2, TRUE); - for (int i=0; igetOption(things[i]); + for (int i=0; i<9; i++) { + // debug("%i\n", i); + hbox = new Gtk_HBox(TRUE, 2); + hbox->border_width(2); + thing = this->getOptDescription(things[i]); + label = new Gtk_Label(thing); + label->set_justify(GTK_JUSTIFY_LEFT); + label->set_alignment(0, 0); hbox->pack_start(*label); label->show(); - int tipus = opt_util->getType(things[i]); + int tipus = this->getOptType(things[i]); switch (tipus) { case 0: - ldap_get_option(NULL, things[i], &val); - label = new Gtk_Label(val); + ldap_get_option(NULL, things[i], &i_value); + debug("%s value %d\n", thing, i_value); + sprintf(s_value, "%d", i_value); + label = new Gtk_Label(s_value); + label->set_justify(GTK_JUSTIFY_LEFT); + label->set_alignment(0, 0); + hbox->pack_end(*label); + label->show(); break; case 1: - ldap_get_option(NULL, numerals[i], &ival); - sprintf(val, "%i", ival); - label = new Gtk_Label(val); + ldap_get_option(this->ld, things[i], &s_value); + label = new Gtk_Label(s_value); + label->set_justify(GTK_JUSTIFY_LEFT); + label->set_alignment(0, 0); + hbox->pack_end(*label); + label->show(); break; case 2: - ldap_get_option(NULL, booleans[i], &ival); - sprintf(val, "%s", ival == (int) LDAP_OPT_ON ? "on" : "off"); - label = new Gtk_Label(val); + ldap_get_option(this->ld, things[i], &i_value); + // sprintf(s_value, "%s", i_value == (int) LDAP_OPT_ON ? "on" : "off"); + // label = new Gtk_Label(s_value); + radio1 = new Gtk_RadioButton(static_cast(0), "Enabled"); + radio2 = new Gtk_RadioButton(*radio1, "Disabled"); + if (i_value == 1) radio1->set_state(true); + else radio2->set_state(true); + mini_hbox = new Gtk_HBox(FALSE, 2); + mini_hbox->border_width(2); + mini_hbox->pack_start(*radio1); + radio1->show(); + mini_hbox->pack_end(*radio2); + radio2->show(); + hbox->pack_end(*mini_hbox); + mini_hbox->show(); break; default: + label = new Gtk_Label("Nothing"); + label->set_justify(GTK_JUSTIFY_LEFT); + label->set_alignment(0, 0); + hbox->pack_end(*label); + label->show(); break; } - - hbox->pack_start(*label); - label->show(); - vbox->pack_start(*hbox); + // hbox->pack_end(*label); + // label->show(); + table->attach_defaults(*hbox, 0, 2, i, i+1); hbox->show(); - } - - vbox->border_width(2); - this->notebook = new Gtk_Viewport(); - this->notebook->add(*vbox); - vbox->show(); -*/ - this->setType(1); + table->border_width(2); + this->notebook = new Gtk_Frame("LDAP Options"); + this->notebook->add(*table); + table->show(); return 0; } Gtk_Tree* Gtk_LdapServer::getSubtree() { debug("Gtk_LdapServer::getSubtree()\n"); - Gtk_LdapItem *treeresult; Gtk_LdapTree *tree, *subtree; Gtk_LdapTreeItem *treeitem; int entries; debug("this->hostname=%s\n", this->hostname); debug("this->port=%i", this->port); -/* if ((this->ld = ldap_open(this->hostname, this->port)) == NULL) { - perror("connection"); - } -*/ char *c; char *tok; @@ -207,13 +304,18 @@ Gtk_Tree* Gtk_LdapServer::getSubtree() { return tree; } +void Gtk_LdapServer::show_impl() { + debug("%s showed\n", this->hostname); + Gtk_c_signals_Item *sig=(Gtk_c_signals_Item *)internal_getsignalbase(); + sig->show(GTK_WIDGET(gtkobj())); +} + void Gtk_LdapServer::select_impl() { debug("%s selected\n", this->hostname); -// gtk_item_select(GTK_ITEM(GTK_TREE_ITEM(this->gtkobj()))); Gtk_c_signals_Item *sig=(Gtk_c_signals_Item *)internal_getsignalbase(); + if (this->showDetails() == 0) debug("%s select_impl done\n", this->hostname); if (!sig->select) return; sig->select(GTK_ITEM(gtkobj())); - this->showDetails(); } void Gtk_LdapServer::collapse_impl() { diff --git a/contrib/gtk-tool/Gtk_LdapServer.h b/contrib/gtk-tool/Gtk_LdapServer.h index 3f9daf9834..3f265b98f6 100644 --- a/contrib/gtk-tool/Gtk_LdapServer.h +++ b/contrib/gtk-tool/Gtk_LdapServer.h @@ -26,9 +26,10 @@ public: int c, port; My_Window *par; // Gtk_Notebook *notebook; - Gtk_Viewport *notebook; + Gtk_Frame *notebook; Gtk_HBox *xpm_label; // Gtk_Tree *subtree; + Gtk_Menu *popup; G_List *databases; Gtk_LdapServer(); Gtk_LdapServer(My_Window *w, char *c, int p); @@ -37,8 +38,11 @@ public: void setType(int t); int getConfig(); Gtk_Tree* getSubtree(); - int getDetails(); + char* getOptDescription(int option); + int getOptType(int option); + int getOptions(); int showDetails(); + void show_impl(); void select_impl(); void collapse_impl(); void expand_impl(); diff --git a/contrib/gtk-tool/Gtk_LdapTree.cc b/contrib/gtk-tool/Gtk_LdapTree.cc index 9b7b5517e1..18aab887d4 100644 --- a/contrib/gtk-tool/Gtk_LdapTree.cc +++ b/contrib/gtk-tool/Gtk_LdapTree.cc @@ -1,16 +1,18 @@ #include void Gtk_LdapTree::show_impl() { - cout << "tree show" << endl; - Gtk_LdapTree *tree; - Gtk_LdapTreeItem *item; - Gtk_LdapTree::selectioniterator i; + debug("tree show\n"); + Gtk_LdapTree *tree = NULL; + Gtk_LdapTreeItem *item = NULL; + Gtk_LdapTree::iterator 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); + if (item->gtkobj()->subtree == NULL) { + 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(); diff --git a/contrib/gtk-tool/Gtk_LdapTreeItem.cc b/contrib/gtk-tool/Gtk_LdapTreeItem.cc index 24f5398b75..129fc6fcc6 100644 --- a/contrib/gtk-tool/Gtk_LdapTreeItem.cc +++ b/contrib/gtk-tool/Gtk_LdapTreeItem.cc @@ -50,6 +50,11 @@ Gtk_LdapTree* Gtk_LdapTreeItem::getSubtree(LDAP *ld, int counter) { tree->set_view_mode(GTK_TREE_VIEW_ITEM); tree->set_view_lines(false); entry = ldap_first_entry(this->ld, r_i); + // float i = 1; + // float percent = 100/entriesCount; + // cout << "percent is " << percent << endl; + // this->par->progress.update(0); + // this->par->progress.show(); while (entry != NULL) { subtreeitem = new Gtk_LdapTreeItem(ldap_get_dn(this->ld, entry), this->par, this->ld); subtree = subtreeitem->getSubtree(this->ld, counter); @@ -59,8 +64,15 @@ Gtk_LdapTree* Gtk_LdapTreeItem::getSubtree(LDAP *ld, int counter) { if (subtree != NULL) subtreeitem->set_subtree(*subtree); debug("done\n"); entry = ldap_next_entry(this->ld, entry); + // gfloat pvalue = (i*percent)/100; + // cout << pvalue << " %" << endl; + // this->par->progress.update(pvalue); + // this->par->progress.show(); + // i++; } // this->set_subtree(*tree); + // this->par->progress.update(0); + // this->par->progress->show(); } // this->getDetails(); debug("done\n"); @@ -83,6 +95,8 @@ void Gtk_LdapTreeItem::setType(int t) { xpm_icon=new Gtk_Pixmap(*xpm_label, branch_node); else if (strcasecmp(this->objectClass,"person") == 0) xpm_icon=new Gtk_Pixmap(*xpm_label, leaf_node); + else if (strcasecmp(this->objectClass,"alias") == 0) + xpm_icon=new Gtk_Pixmap(*xpm_label, alias_node); else xpm_icon=new Gtk_Pixmap(*xpm_label, general_node); label = new Gtk_Label(this->rdn); xpm_label->pack_start(*xpm_icon, false, false, 1); @@ -142,6 +156,8 @@ int Gtk_LdapTreeItem::getDetails() { } ldap_value_free(values); label = new Gtk_Label(attribute); + label->set_alignment(0, 0); + label->set_justify(GTK_JUSTIFY_LEFT); notebook->append_page(*table, *label); table->show(); label->show(); diff --git a/contrib/gtk-tool/Gtk_LdapTreeItem.h b/contrib/gtk-tool/Gtk_LdapTreeItem.h index 799181f1bc..63aa1f6194 100644 --- a/contrib/gtk-tool/Gtk_LdapTreeItem.h +++ b/contrib/gtk-tool/Gtk_LdapTreeItem.h @@ -9,6 +9,7 @@ #include "icons/root_node.h" #include "icons/branch_node.h" #include "icons/leaf_node.h" +#include "icons/alias_node.h" #include "icons/general_node.h" #define ROOT_NODE 1 diff --git a/contrib/gtk-tool/Makefile b/contrib/gtk-tool/Makefile index e1259393c2..fa9f860065 100644 --- a/contrib/gtk-tool/Makefile +++ b/contrib/gtk-tool/Makefile @@ -1,7 +1,7 @@ HOME_LOCATION=$(shell pwd) CC= gcc CPLUS= g++ -OPTS=-g +OPTS=-g #-DDEBUG INCLUDES=`gtkmm-config --cflags` -I. LDFLAGS=`gtkmm-config --libs` -L/usr/lib -L/usr/X11/lib -L/usr/local/gnome/lib -L/usr/local/ldap/lib -lldap -llber -L/usr/local/kerberos/lib -lkrb5 -lkrb4 LIBS=-lXext -lgtkmm -lX11 -lXt -lXxf86dga diff --git a/contrib/gtk-tool/My_Window.cc b/contrib/gtk-tool/My_Window.cc index 718f994f18..941844c80a 100644 --- a/contrib/gtk-tool/My_Window.cc +++ b/contrib/gtk-tool/My_Window.cc @@ -4,6 +4,7 @@ My_Window::My_Window(GtkWindowType t) : Gtk_Window(t) { cout << "My_Window(t)" << endl; Gtk_VBox *main_hbox; Gtk_HBox *top_hbox; + Gtk_VBox *bottom_hbox; Gtk_Menu *menu; Gtk_MenuItem *file_menu, *menuitem; @@ -43,12 +44,20 @@ My_Window::My_Window(GtkWindowType t) : Gtk_Window(t) { top_hbox->pack_end(*this->display_button, FALSE, FALSE, 1); this->display_button->show(); + this->status = new Gtk_Statusbar(); + + bottom_hbox = new Gtk_VBox(); + bottom_hbox->pack_start(*pane, TRUE, TRUE, 1); + bottom_hbox->pack_end(*status, FALSE, TRUE, 1); + pane->show(); + status->show(); + main_hbox = new Gtk_VBox(); main_hbox->pack_start(*this->menubar, FALSE, FALSE, 1); main_hbox->pack_start(*top_hbox, FALSE, TRUE, 1); - main_hbox->pack_end(*pane, TRUE, TRUE, 1); + main_hbox->pack_end(*bottom_hbox, TRUE, TRUE, 1); top_hbox->show(); - pane->show(); + bottom_hbox->show(); this->add(main_hbox); main_hbox->show(); } @@ -58,75 +67,31 @@ My_Window::~My_Window() { delete this; } +int My_Window::debug(const char *format,...) { +#ifdef DEBUG + va_list args; + int ret; + char *c; + char buff[50]; + unsigned int m_context_id; + va_start(args, format); + ret = vprintf(format, args); +/* if (this->status != NULL) { + m_context_id = this->status->get_context_id("gtk-tool"); + ret = vsprintf(c, format, args); + g_snprintf(buff, 50, "Action: %s", c); + this->status->push(m_context_id, buff); + } +*/ va_end(args); + return ret; +#endif +} + void My_Window::do_display() { cout << this->urlfield->get_text() << endl; } -void My_Window::expand(Gtk_TreeItem *t) { - gchar *name; - GtkLabel *label; - label = GTK_LABEL (GTK_BIN (t->gtkobj())->child); - gtk_label_get (label, &name); - g_print("%s selected\n", name); -} gint My_Window::delete_event_impl(GdkEventAny*) { Gtk_Main::instance()->quit(); return 0; } - -Gtk_LdapItem* My_Window::make_tree(My_Window *p, LDAP* l_i, char* b_d) { -// printf("make_tree(%s)\n", b_d); - Gtk_LdapItem *treeresult, *subtreeresult; - Gtk_Tree *tree, *subtree, *subsubtree; - Gtk_LdapTreeItem *treeitem, *subtreeitem; - LDAPMessage *r_i, *entry; - gchar *c; - char **s; - char *c_num; - int entriesCount = 0; - int error; - int r_e_i; - - error = ldap_search_s(l_i, b_d, LDAP_SCOPE_ONELEVEL, "objectclass=*", NULL, 0, &r_i); -// printf("%s\n", ldap_err2string(error)); - entriesCount = ldap_count_entries(l_i, r_i); -// printf("%i results\n", entriesCount); - s = ldap_explode_dn(b_d, 1); - c = g_strdup_printf("%s", s[0]); - treeitem = new Gtk_LdapTreeItem(c, p, l_i); - treeitem->dn = b_d; treeitem->ld = l_i; - treeresult = new Gtk_LdapItem(); - treeitem->getDetails(); - if (entriesCount == 0) { - // treeitem->setType(LEAF_NODE); - treeresult->treeitem = new Gtk_LdapTreeItem(*treeitem); - treeresult->tree = NULL; - return treeresult; - } - subtree = new Gtk_Tree(); - subtree->set_selection_mode(GTK_SELECTION_BROWSE); - subtree->set_view_mode(GTK_TREE_VIEW_ITEM); - subtree->set_view_lines(false); - entry = ldap_first_entry(l_i, r_i); - while (entry != NULL) { - s = ldap_explode_dn(ldap_get_dn(l_i, entry), 1); - subtreeresult = make_tree(p, l_i, ldap_get_dn(l_i, entry)); - subtreeitem = new Gtk_LdapTreeItem(*subtreeresult->treeitem); - // printf("inserting %s into %s", s[0], c); - subtree->append(*subtreeitem); - if (subtreeresult->tree != NULL) { - // printf("."); - subsubtree = new Gtk_Tree(*subtreeresult->tree); - // printf("."); - subtreeitem->set_subtree(*subsubtree); - // printf("."); - } - subtreeitem->show(); - // printf("\n"); - entry = ldap_next_entry(l_i, entry); - } -// treeitem->setType(BRANCH_NODE); - treeresult->treeitem = new Gtk_LdapTreeItem(*treeitem); - treeresult->tree = new Gtk_Tree(*subtree); - return treeresult; -} diff --git a/contrib/gtk-tool/My_Window.h b/contrib/gtk-tool/My_Window.h index 93b86f8ec8..05f028bfba 100644 --- a/contrib/gtk-tool/My_Window.h +++ b/contrib/gtk-tool/My_Window.h @@ -2,14 +2,6 @@ #define MY_WINDOW_H #include "cpluscommon.h" #include "gtk.h" -#include -#include -/*#include "My_Scroller.h"*/ -#include "Gtk_LdapItem.h" -#include "Gtk_LdapTreeItem.h" -class Gtk_LdapTreeItem; -class Gtk_LdapItem; -class My_Scroller; class My_Window : public Gtk_Window { public: @@ -20,11 +12,12 @@ public: Gtk_Button *display_button; Gtk_Paned *pane; Gtk_MenuBar *menubar; +// Gtk_ProgressBar progress; + Gtk_Statusbar *status; My_Window(GtkWindowType t); ~My_Window(); + int debug(const char *c,...); void do_display(); - void expand(Gtk_TreeItem *t); gint delete_event_impl(GdkEventAny *); - Gtk_LdapItem* make_tree(My_Window *p, LDAP* l_i, char* b_d); }; #endif diff --git a/contrib/gtk-tool/README b/contrib/gtk-tool/README index 7b176a2823..282dd59591 100644 --- a/contrib/gtk-tool/README +++ b/contrib/gtk-tool/README @@ -18,6 +18,11 @@ not running slapd on your local machine, then supply it with a "-s hostname" i.e.: ./main -s server02.nowhere.net +or if you feel like having an adventure try multiple servers +i.e.: + ./main -s server02.nowhere.net -s server03.nowhere.com:322 + +etc... It does not accept -b switch as it no longer needs it to aquire databases. But please feel free to add whatever else you consider neccessary to understanding how this thing works. Enjoy, and I hope this can be useful to diff --git a/contrib/gtk-tool/icons/local_server.h b/contrib/gtk-tool/icons/local_server.h index cbdecb97bb..2e454b51db 100644 --- a/contrib/gtk-tool/icons/local_server.h +++ b/contrib/gtk-tool/icons/local_server.h @@ -1,343 +1,266 @@ /* XPM */ static char *local_server[] = { /* columns rows colors chars-per-pixel */ -"19 20 317 2", +"19 20 240 2", " c Gray0", -". c #006301880000", -"X c #010401400000", -"o c #02c102600000", -"O c #038e038e0000", -"+ c #00000513029f", -"@ c #04b804e70000", -"# c #04f305220000", -"$ c #057105930000", -"% c #0a480a9802be", -"& c #0b430d040000", -"* c #00330b711620", -"= c #026109171623", -"- c #03080b971bb6", -"; c #04cf0e3b1b1f", -": c #06820e0c1f92", -"> c #05f211601517", -", c #0d1c14761171", -"< c #103c10c20561", -"1 c #10b8111b05da", -"2 c #10eb11600624", -"3 c #113b11ce0683", -"4 c #11b61255071b", -"5 c #1cbc1dcf05fe", -"6 c #183419e80d82", -"7 c #0bc61653218e", -"8 c #0d95142d22f4", -"9 c #0d4b16ff205b", -"0 c #0ac114eb2eb2", -"q c #0f4c1909310f", -"w c #13ea1c602934", -"e c #168f1d8e2dc3", -"r c #11011aa43294", -"t c #135a1ce3349b", -"y c #12331ce037d0", -"u c #158d1eed368a", -"i c #173b20ea296e", -"p c #180c202a2fdd", -"a c #1be821642dd5", -"s c #1cf825312e1a", -"d c #17a520e637c6", -"f c #1691208039a1", -"g c #187e208b309c", -"h c #19fb20683177", -"j c #1c9a23ff3169", -"k c #1e75259e3112", -"l c #1e0e255034df", -"z c #1f9627cc36a0", -"x c #180b21d33add", -"c c #19c7236d3c4a", -"v c #1b7524fe3da3", -"b c #1fd328903c87", -"n c #236423c405a4", -"m c #258f25bd1420", -"M c #207d21b21817", -"N c #2b272c0b143d", -"B c #2ec52ee910e0", -"V c #22ab27f13368", -"C c #224327bc3709", -"Z c #23dd2b2f3641", -"A c #25e52af6367c", -"S c #21ac29c038db", -"D c #23262b4c3aa4", -"F c #2d0331e538f1", -"G c #2c9533173bd8", -"H c #2eb0335c3dd0", -"J c #38613a462b08", -"K c #39a53b832cfc", -"L c #3de83e452c21", -"P c #3c073e012ee8", -"I c #3a193d073d97", -"U c #1f9129164137", -"Y c #23a72d3b4658", -"T c #26792f0e43d2", -"R c #27d92fb742a5", -"E c #24ef2ebc47f4", -"W c #26602f7446ad", -"Q c #26f62ffd4716", -"! c #24e02e7b4826", -"~ c #26f630054723", -"^ c #2735303b4747", -"/ c #279230bb484d", -"( c #2866317d4879", -") c #28743191492e", -"_ c #298e32944970", -"` c #29b032b04a02", -"' c #2af433c64a91", -"] c #2ca6355d4bec", -"[ c #2ccd35c74c46", -"{ c #2d8a36fd4f6e", -"} c #2efe37d84db6", -"| c #2f6938114e35", -" . c #31cb37c3410c", -".. c #300738ca4ee0", -"X. c #310a39a94f2b", -"o. c #382d3c6a45a1", -"O. c #307139a5514a", -"+. c #32063abd503a", -"@. c #32df3b845116", -"#. c #33853bb6517b", -"$. c #35053d7852a2", -"%. c #37783f9054a1", -"&. c #3e69404831f4", -"*. c #3b3441654977", -"=. c #3cc942ce4b1d", -"-. c #38c040c155d1", -";. c #38af40d25609", -":. c #394841a55893", -">. c #3b8e4386584f", -",. c #3e44465a5a6f", -"<. c #3f7f46cb5a18", -"1. c #3cd944da5c5b", -"2. c #3f3948575dc4", -"3. c #418e43953549", -"4. c #44e746ff384b", -"5. c #444a482e3b3b", -"6. c #47ff4a023b15", -"7. c #489f4cee3a3f", -"8. c #4b614d013e70", -"9. c #419845584d4f", -"0. c #4d634e2d4a8b", -"q. c #4e674ea14b28", -"w. c #4e734f844b8c", -"e. c #44254aa35364", -"r. c #414649565f39", -"t. c #439a4ad95e55", -"y. c #48c34eb7556c", -"u. c #4a444d635487", -"i. c #4fea50db4160", -"p. c #4f73514041fa", -"a. c #5168526142f2", -"s. c #505850834b2d", -"d. c #540f52e24eb8", -"f. c #569657f74c68", -"g. c #5358543c5864", -"h. c #52e6551e5b74", -"j. c #544956435d37", -"k. c #57695c235475", -"l. c #54a95a425f8b", -"z. c #566c5b4d5cf4", -"x. c #56e35ee55bb7", -"c. c #458a4d8a6069", -"v. c #499450c8635b", -"b. c #4b9b53576549", -"n. c #4bba5481622b", -"m. c #4adf549f64e3", -"M. c #4ced535064d4", -"N. c #4dc0565762ae", -"B. c #57a15cd961d8", -"V. c #54c25c97683c", -"C. c #5fd163d75f3d", -"Z. c #5c2563546eb5", -"A. c #640967b35e37", -"S. c #67906b695fd7", -"D. c #63dd688360b0", -"F. c #6437689a6c5f", -"G. c #685c6878686f", -"H. c #688a6c556ba2", -"J. c #6f876f8c6f85", -"K. c #631069c67489", -"L. c #6a0170827ae5", -"P. c #717d74ec7736", -"I. c #75d671ee71ae", -"U. c #77bb77bb77bb", -"Y. c #7b347df07b19", -"T. c #7f2648ea8c0e", -"R. c #7c43605280d0", -"E. c #72d5791483e2", -"W. c #7cf57fbe80b1", -"Q. c #7e7980f98299", -"!. c #7e91816e839c", -"~. c #7ed384e490ee", -"^. c #8022480a8cca", -"/. c #8d2d43d496c7", -"(. c #8b934b72959f", -"). c #8cd54cf296d9", -"_. c #8f2e4f3b98ff", -"`. c #9289528b9b4d", -"'. c #8a2c67b98f02", -"]. c #8d2360e19956", -"[. c #8f7c69599410", -"{. c #808780878087", -"}. c #872189db835c", -"|. c #85758bb285b4", -" X c #88ec88ec88ec", -".X c #8a418d6488df", -"XX c #8cf08fa88cea", -"oX c #8f8f934f8ed7", -"OX c #8bd591c29248", -"+X c #8bec903c972c", -"@X c #8e0b91789285", -"#X c Gray57", -"$X c #91f691e192da", -"%X c #93d593db93a6", -"&X c #96aa98eb9f9a", -"*X c Gray60", -"=X c #9a8e9a7d9a57", -"-X c #9b679e4c9b80", -";X c #9c149bd29e1a", -":X c #9cbc9ebd9c6a", -">X c #9320985aa0de", -",X c #96949ceeabca", -"o c #e530e657e743", -",o c #e6d6e519e56f", -" c #1c8d1df31118", +", c #1ec01fc915d0", +"< c #1ef51ff71651", +"1 c #0000079e232a", +"2 c #03a20f492c9f", +"3 c #05590f692831", +"4 c #072b113229fd", +"5 c #0de317392448", +"6 c #0e48163327ef", +"7 c #09e713c52c71", +"8 c #0ebe1619282b", +"9 c #0e6d17482956", +"0 c #0f4817eb299f", +"q c #0c56160c2dcf", +"w c #0f201a2425db", +"e c #0be6165230b9", +"r c #0d6917bd324a", +"t c #0ff51a183470", +"y c #10431cfd2b8f", +"u c #15631d8a32e0", +"i c #16811da73182", +"p c #1f2f209a1346", +"a c #1d4020891a22", +"s c #171221aa2fcd", +"d c #160d20113996", +"f c #18d621893596", +"g c #1d8e235a30e7", +"h c #1e4226db3a44", +"j c #1f4027663b36", +"k c #1ebd282c3af4", +"l c #21c022e615d4", +"z c #224e22ab1570", +"x c #24e325221696", +"c c #2172227b18dd", +"v c #2374248b1abd", +"b c #25ae26bd18f5", +"n c #257726891c6a", +"m c #275c28461e3d", +"M c #2ce52d5d1e67", +"N c #2e0d317f1d9b", +"B c #298b2a6f2027", +"V c #2a5b2ae92075", +"C c #2b1d2bb82201", +"Z c #2b922c3522c4", +"A c #2b8b2dfb26cc", +"S c #224929923335", +"D c #23892b663903", +"F c #217c2aa73e75", +"G c #280f2f9e3ac1", +"H c #2f6231172843", +"J c #28e4318f3d9b", +"K c #2de4327f3c5e", +"L c #385c392a2eb5", +"P c #370e3bbe368b", +"I c #3d973fff3561", +"U c #200d2964419b", +"Y c #21382a9542af", +"T c #21372b164533", +"R c #22882c8447b1", +"E c #267e2f8a46a5", +"W c #23f82e1d485b", +"Q c #27c430b34778", +"! c #277f30be48e2", +"~ c #280330ee4794", +"^ c #28c331ed4959", +"/ c #28f9321f48f3", +"( c #295232764a58", +") c #2aab33ad4a5d", +"_ c #2b9734644ad0", +"` c #2b4234414b9a", +"' c #2cdd35a14c17", +"] c #2d9c3759502c", +"[ c #35c73a1843c3", +"{ c #348e39fb453b", +"} c #36d33e394a1a", +"| c #34a13d075244", +" . c #34f73d7b5328", +".. c #35983dbd5362", +"X. c #36cc3f2f53d4", +"o. c #37713fd854df", +"O. c #3c1b41ef4a48", +"+. c #382941505988", +"@. c #3cb244ae5933", +"#. c #413545b24744", +"$. c #44c1455c418f", +"%. c #428c464e4eb2", +"&. c #49e74b17480e", +"*. c #4b7a4b984919", +"=. c #4b424c124924", +"-. c #4e2b4ce1494c", +";. c #4b5450bb574f", +":. c #545f56ee543c", +">. c #520055075b58", +",. c #45ca4deb63f7", +"<. c #47c54ea9618f", +"1. c #477d4f716673", +"2. c #48314fb16218", +"3. c #4cd2542760ea", +"4. c #4b93542768dd", +"5. c #528858de6a23", +"6. c #5d7f62a36740", +"7. c #606162956770", +"8. c #639c687068a6", +"9. c #692e6b18620d", +"0. c #6c456e4766cc", +"q. c #6bc06e9068a9", +"w. c #64656af87761", +"e. c #6c7f6da9716d", +"r. c #6e426e0971fc", +"t. c #6eae6f6f73f0", +"y. c #6f79716769b5", +"u. c #75af75d26eec", +"i. c #71a275b87813", +"p. c #7dc582a986da", +"a. c #862d47a59174", +"s. c #885b47d79329", +"d. c #8fac5b4596fb", +"f. c #898d7a518c04", +"g. c #8a1b7bb78c25", +"h. c #9ff76cefabfe", +"j. c #a01373e4a9c2", +"k. c #a9327743af85", +"l. c #813c82307990", +"z. c #81e482da7a7f", +"x. c #82a183727b14", +"c. c #833e83de7b92", +"v. c #83248602867e", +"b. c #8b538c308b37", +"n. c #8f4d99148ef8", +"m. c #8ddd9240969e", +"M. c #9b689b8586d9", +"N. c #953097a99355", +"B. c Gray58", +"V. c #96d09842970f", +"C. c #979799719910", +"Z. c #9b579caa9ae3", +"A. c #9ba99d2a9c8f", +"S. c Gray62", +"D. c #99659de1a359", +"F. c #ac17ab8b9ea2", +"G. c Gray64", +"H. c #a007a1f1a793", +"J. c #a2a1a27ea639", +"K. c #a1c7a6b9ac80", +"L. c Gray66", +"P. c #aa08ab5ba86e", +"I. c #aaa1aa8daa8b", +"U. c #adedaf8bae65", +"Y. c #a8ffaf75b90b", +"T. c #ad0bb5d3aca9", +"R. c #afcab577bbfb", +"E. c #b3cab37fae09", +"W. c #b065b1f7b0b8", +"Q. c #b1f1b1efb1e7", +"!. c #b0b0b090b228", +"~. c #b27fb26eb259", +"^. c #b34ab4cdb34c", +"/. c #b6f9b7c3b6c1", +"(. c #b2d3b572b8bd", +"). c #b679bc3fbfdf", +"_. c #b94dba06b74f", +"`. c #bb54bb51bb4c", +"'. c #bf9eb931bc1d", +"]. c Gray74", +"[. c #bd72bdc7bee1", +"{. c #bebbbe54bf75", +"}. c #c12dc14abd26", +"|. c #c23ec236c1f7", +" X c Gray76", +".X c #c3e8c682c6e7", +"XX c #c6c6c7c3c0d5", +"oX c #c1a0c68acf26", +"OX c #c506c896cf5d", +"+X c #c991ca28ccd9", +"@X c Gray80", +"#X c #cdcccceccccd", +"$X c #cf73c67ed0d0", +"%X c #c95fcc81d1c3", +"&X c #ca18cce0d140", +"*X c #ce76d0ddd44f", +"=X c #cfc6d296d6cb", +"-X c #d1e9d451d713", +";X c #d559d665d6c9", +":X c #d501d68ed787", +">X c Gray84", +",X c #d543d771d9f9", +"o6oeopoaouoio0X3 ", -"$ a.>Xk ; w Z .*.y.B.F.P.Q.!.W.soDX2 ", -"$ p.hXs.j _ T R b d u t r q 0 - 3omX2 ", -"$ 8.aX0.D 1.t.M.<.' / ) ) ) ! g 9omX1 ", -"$ 6.tX0.z 2.b.v.-.( W Q ^ ^ Y p 9onX< ", -"$ 4.rXw.S r.c.#.] } _ Q ^ ^ Y p 9obX< ", -"# 3.wXq.l :.,.+.X.%.[ ~ ~ ^ Y e 8ovX< ", -"# &.9Xq.h { ;.>.$...` / ( ( E e 7ovX< ", -"@ K 7Xd.C O.@.| W U v c x f y : ,obX1 ", -"@ J +XF = 8 a V A H o.9.u.h.j.g.yocX1 ", -"@ P QX,X1XiXlXFX^Xoo2orosososososoxX< ", -"O 6 D.A.S.OX~.E.L.K.Z.V.N.n.m.x.k.5.% ", -" dodododoM I l.=.G s 9 * > + . dodo ", -"dododoX dodoO 5 C.e.i 7 , & dododododo", -"L N B dX:o%o o(X}XJXsX W.=.h ,.X._ | ) E Q T 6 MXl.NXNXNX", +"c * U.*.u +.@.o. .` ^ ) W 8 MXl.NXNXNX", +"< % P.-.i ] ' Y d t r e 2 @ mXl.NXNXNX", +", & D.{ # g K [ %.>.7.e.t.r.MXx.NXNXNX", +"; & ).Y.R.oXOX=X8XiXjXvXlXkXaX9.NXNXNX", +"X A H I 8.w.3.} J s y w - a : NXNXNX", +" NXNX NX . P S o NX NXNXNX", +"M $ + M.}.E.F.XX(.m.p.q.:.#.N = NXNXNX", +"'.rXzXcXMXxXsX9X4X1X#X{.!.J.N.u.NXNXNX", +"j.h.2XT.;X+X|.H.[.].~.I.G.Z.n.f.NXNXNX", +"a.s.k.$X5X>X@X X`.Q.L.S.B.b.g.d.NXNXNX", +"NXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNX", +"NXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNX", +"NXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNX" }; diff --git a/contrib/gtk-tool/icons/remote_server.h b/contrib/gtk-tool/icons/remote_server.h index 6ad1453a90..482f27b14e 100644 --- a/contrib/gtk-tool/icons/remote_server.h +++ b/contrib/gtk-tool/icons/remote_server.h @@ -1,343 +1,266 @@ /* XPM */ static char *remote_server[] = { /* columns rows colors chars-per-pixel */ -"19 20 317 2", +"19 20 240 2", " c Gray0", -". c #006301880000", -"X c #010401400000", -"o c #02c102600000", -"O c #038e038e0000", -"+ c #00000513029f", -"@ c #04b804e70000", -"# c #04f305220000", -"$ c #057105930000", -"% c #0a480a9802be", -"& c #0b430d040000", -"* c #00330b711620", -"= c #026109171623", -"- c #03080b971bb6", -"; c #04cf0e3b1b1f", -": c #06820e0c1f92", -"> c #05f211601517", -", c #0d1c14761171", -"< c #103c10c20561", -"1 c #10b8111b05da", -"2 c #10eb11600624", -"3 c #113b11ce0683", -"4 c #11b61255071b", -"5 c #1cbc1dcf05fe", -"6 c #183419e80d82", -"7 c #0bc61653218e", -"8 c #0d95142d22f4", -"9 c #0d4b16ff205b", -"0 c #0ac114eb2eb2", -"q c #0f4c1909310f", -"w c #13ea1c602934", -"e c #168f1d8e2dc3", -"r c #11011aa43294", -"t c #135a1ce3349b", -"y c #12331ce037d0", -"u c #158d1eed368a", -"i c #173b20ea296e", -"p c #180c202a2fdd", -"a c #1be821642dd5", -"s c #1cf825312e1a", -"d c #17a520e637c6", -"f c #1691208039a1", -"g c #187e208b309c", -"h c #19fb20683177", -"j c #1c9a23ff3169", -"k c #1e75259e3112", -"l c #1e0e255034df", -"z c #1f9627cc36a0", -"x c #180b21d33add", -"c c #19c7236d3c4a", -"v c #1b7524fe3da3", -"b c #1fd328903c87", -"n c #236423c405a4", -"m c #258f25bd1420", -"M c #207d21b21817", -"N c #2b272c0b143d", -"B c #2ec52ee910e0", -"V c #22ab27f13368", -"C c #224327bc3709", -"Z c #23dd2b2f3641", -"A c #25e52af6367c", -"S c #21ac29c038db", -"D c #23262b4c3aa4", -"F c #2d0331e538f1", -"G c #2c9533173bd8", -"H c #2eb0335c3dd0", -"J c #38613a462b08", -"K c #39a53b832cfc", -"L c #3de83e452c21", -"P c #3c073e012ee8", -"I c #3a193d073d97", -"U c #1f9129164137", -"Y c #23a72d3b4658", -"T c #26792f0e43d2", -"R c #27d92fb742a5", -"E c #24ef2ebc47f4", -"W c #26602f7446ad", -"Q c #26f62ffd4716", -"! c #24e02e7b4826", -"~ c #26f630054723", -"^ c #2735303b4747", -"/ c #279230bb484d", -"( c #2866317d4879", -") c #28743191492e", -"_ c #298e32944970", -"` c #29b032b04a02", -"' c #2af433c64a91", -"] c #2ca6355d4bec", -"[ c #2ccd35c74c46", -"{ c #2d8a36fd4f6e", -"} c #2efe37d84db6", -"| c #2f6938114e35", -" . c #31cb37c3410c", -".. c #300738ca4ee0", -"X. c #310a39a94f2b", -"o. c #382d3c6a45a1", -"O. c #307139a5514a", -"+. c #32063abd503a", -"@. c #32df3b845116", -"#. c #33853bb6517b", -"$. c #35053d7852a2", -"%. c #37783f9054a1", -"&. c #3e69404831f4", -"*. c #3b3441654977", -"=. c #3cc942ce4b1d", -"-. c #38c040c155d1", -";. c #38af40d25609", -":. c #394841a55893", -">. c #3b8e4386584f", -",. c #3e44465a5a6f", -"<. c #3f7f46cb5a18", -"1. c #3cd944da5c5b", -"2. c #3f3948575dc4", -"3. c #418e43953549", -"4. c #44e746ff384b", -"5. c #444a482e3b3b", -"6. c #47ff4a023b15", -"7. c #489f4cee3a3f", -"8. c #4b614d013e70", -"9. c #419845584d4f", -"0. c #4d634e2d4a8b", -"q. c #4e674ea14b28", -"w. c #4e734f844b8c", -"e. c #44254aa35364", -"r. c #414649565f39", -"t. c #439a4ad95e55", -"y. c #48c34eb7556c", -"u. c #4a444d635487", -"i. c #4fea50db4160", -"p. c #4f73514041fa", -"a. c #5168526142f2", -"s. c #505850834b2d", -"d. c #540f52e24eb8", -"f. c #569657f74c68", -"g. c #5358543c5864", -"h. c #52e6551e5b74", -"j. c #544956435d37", -"k. c #57695c235475", -"l. c #54a95a425f8b", -"z. c #566c5b4d5cf4", -"x. c #56e35ee55bb7", -"c. c #458a4d8a6069", -"v. c #499450c8635b", -"b. c #4b9b53576549", -"n. c #4bba5481622b", -"m. c #4adf549f64e3", -"M. c #4ced535064d4", -"N. c #4dc0565762ae", -"B. c #57a15cd961d8", -"V. c #54c25c97683c", -"C. c #5fd163d75f3d", -"Z. c #5c2563546eb5", -"A. c #640967b35e37", -"S. c #67906b695fd7", -"D. c #63dd688360b0", -"F. c #6437689a6c5f", -"G. c #685c6878686f", -"H. c #688a6c556ba2", -"J. c #6f876f8c6f85", -"K. c #631069c67489", -"L. c #6a0170827ae5", -"P. c #717d74ec7736", -"I. c #75d671ee71ae", -"U. c #77bb77bb77bb", -"Y. c #7b347df07b19", -"T. c #7f2648ea8c0e", -"R. c #7c43605280d0", -"E. c #72d5791483e2", -"W. c #7cf57fbe80b1", -"Q. c #7e7980f98299", -"!. c #7e91816e839c", -"~. c #7ed384e490ee", -"^. c #8022480a8cca", -"/. c #8d2d43d496c7", -"(. c #8b934b72959f", -"). c #8cd54cf296d9", -"_. c #8f2e4f3b98ff", -"`. c #9289528b9b4d", -"'. c #8a2c67b98f02", -"]. c #8d2360e19956", -"[. c #8f7c69599410", -"{. c #808780878087", -"}. c #872189db835c", -"|. c #85758bb285b4", -" X c #88ec88ec88ec", -".X c #8a418d6488df", -"XX c #8cf08fa88cea", -"oX c #8f8f934f8ed7", -"OX c #8bd591c29248", -"+X c #8bec903c972c", -"@X c #8e0b91789285", -"#X c Gray57", -"$X c #91f691e192da", -"%X c #93d593db93a6", -"&X c #96aa98eb9f9a", -"*X c Gray60", -"=X c #9a8e9a7d9a57", -"-X c #9b679e4c9b80", -";X c #9c149bd29e1a", -":X c #9cbc9ebd9c6a", -">X c #9320985aa0de", -",X c #96949ceeabca", -"o c #e530e657e743", -",o c #e6d6e519e56f", -" c #1c8d1df31118", +", c #1ec01fc915d0", +"< c #1ef51ff71651", +"1 c #0000079e232a", +"2 c #03a20f492c9f", +"3 c #05590f692831", +"4 c #072b113229fd", +"5 c #0de317392448", +"6 c #0e48163327ef", +"7 c #09e713c52c71", +"8 c #0ebe1619282b", +"9 c #0e6d17482956", +"0 c #0f4817eb299f", +"q c #0c56160c2dcf", +"w c #0f201a2425db", +"e c #0be6165230b9", +"r c #0d6917bd324a", +"t c #0ff51a183470", +"y c #10431cfd2b8f", +"u c #15631d8a32e0", +"i c #16811da73182", +"p c #1f2f209a1346", +"a c #1d4020891a22", +"s c #171221aa2fcd", +"d c #160d20113996", +"f c #18d621893596", +"g c #1d8e235a30e7", +"h c #1e4226db3a44", +"j c #1f4027663b36", +"k c #1ebd282c3af4", +"l c #21c022e615d4", +"z c #224e22ab1570", +"x c #24e325221696", +"c c #2172227b18dd", +"v c #2374248b1abd", +"b c #25ae26bd18f5", +"n c #257726891c6a", +"m c #275c28461e3d", +"M c #2ce52d5d1e67", +"N c #2e0d317f1d9b", +"B c #298b2a6f2027", +"V c #2a5b2ae92075", +"C c #2b1d2bb82201", +"Z c #2b922c3522c4", +"A c #2b8b2dfb26cc", +"S c #224929923335", +"D c #23892b663903", +"F c #217c2aa73e75", +"G c #280f2f9e3ac1", +"H c #2f6231172843", +"J c #28e4318f3d9b", +"K c #2de4327f3c5e", +"L c #385c392a2eb5", +"P c #370e3bbe368b", +"I c #3d973fff3561", +"U c #200d2964419b", +"Y c #21382a9542af", +"T c #21372b164533", +"R c #22882c8447b1", +"E c #267e2f8a46a5", +"W c #23f82e1d485b", +"Q c #27c430b34778", +"! c #277f30be48e2", +"~ c #280330ee4794", +"^ c #28c331ed4959", +"/ c #28f9321f48f3", +"( c #295232764a58", +") c #2aab33ad4a5d", +"_ c #2b9734644ad0", +"` c #2b4234414b9a", +"' c #2cdd35a14c17", +"] c #2d9c3759502c", +"[ c #35c73a1843c3", +"{ c #348e39fb453b", +"} c #36d33e394a1a", +"| c #34a13d075244", +" . c #34f73d7b5328", +".. c #35983dbd5362", +"X. c #36cc3f2f53d4", +"o. c #37713fd854df", +"O. c #3c1b41ef4a48", +"+. c #382941505988", +"@. c #3cb244ae5933", +"#. c #413545b24744", +"$. c #44c1455c418f", +"%. c #428c464e4eb2", +"&. c #49e74b17480e", +"*. c #4b7a4b984919", +"=. c #4b424c124924", +"-. c #4e2b4ce1494c", +";. c #4b5450bb574f", +":. c #545f56ee543c", +">. c #520055075b58", +",. c #45ca4deb63f7", +"<. c #47c54ea9618f", +"1. c #477d4f716673", +"2. c #48314fb16218", +"3. c #4cd2542760ea", +"4. c #4b93542768dd", +"5. c #528858de6a23", +"6. c #5d7f62a36740", +"7. c #606162956770", +"8. c #639c687068a6", +"9. c #692e6b18620d", +"0. c #6c456e4766cc", +"q. c #6bc06e9068a9", +"w. c #64656af87761", +"e. c #6c7f6da9716d", +"r. c #6e426e0971fc", +"t. c #6eae6f6f73f0", +"y. c #6f79716769b5", +"u. c #75af75d26eec", +"i. c #71a275b87813", +"p. c #7dc582a986da", +"a. c #862d47a59174", +"s. c #885b47d79329", +"d. c #8fac5b4596fb", +"f. c #898d7a518c04", +"g. c #8a1b7bb78c25", +"h. c #9ff76cefabfe", +"j. c #a01373e4a9c2", +"k. c #a9327743af85", +"l. c #813c82307990", +"z. c #81e482da7a7f", +"x. c #82a183727b14", +"c. c #833e83de7b92", +"v. c #83248602867e", +"b. c #8b538c308b37", +"n. c #8f4d99148ef8", +"m. c #8ddd9240969e", +"M. c #9b689b8586d9", +"N. c #953097a99355", +"B. c Gray58", +"V. c #96d09842970f", +"C. c #979799719910", +"Z. c #9b579caa9ae3", +"A. c #9ba99d2a9c8f", +"S. c Gray62", +"D. c #99659de1a359", +"F. c #ac17ab8b9ea2", +"G. c Gray64", +"H. c #a007a1f1a793", +"J. c #a2a1a27ea639", +"K. c #a1c7a6b9ac80", +"L. c Gray66", +"P. c #aa08ab5ba86e", +"I. c #aaa1aa8daa8b", +"U. c #adedaf8bae65", +"Y. c #a8ffaf75b90b", +"T. c #ad0bb5d3aca9", +"R. c #afcab577bbfb", +"E. c #b3cab37fae09", +"W. c #b065b1f7b0b8", +"Q. c #b1f1b1efb1e7", +"!. c #b0b0b090b228", +"~. c #b27fb26eb259", +"^. c #b34ab4cdb34c", +"/. c #b6f9b7c3b6c1", +"(. c #b2d3b572b8bd", +"). c #b679bc3fbfdf", +"_. c #b94dba06b74f", +"`. c #bb54bb51bb4c", +"'. c #bf9eb931bc1d", +"]. c Gray74", +"[. c #bd72bdc7bee1", +"{. c #bebbbe54bf75", +"}. c #c12dc14abd26", +"|. c #c23ec236c1f7", +" X c Gray76", +".X c #c3e8c682c6e7", +"XX c #c6c6c7c3c0d5", +"oX c #c1a0c68acf26", +"OX c #c506c896cf5d", +"+X c #c991ca28ccd9", +"@X c Gray80", +"#X c #cdcccceccccd", +"$X c #cf73c67ed0d0", +"%X c #c95fcc81d1c3", +"&X c #ca18cce0d140", +"*X c #ce76d0ddd44f", +"=X c #cfc6d296d6cb", +"-X c #d1e9d451d713", +";X c #d559d665d6c9", +":X c #d501d68ed787", +">X c Gray84", +",X c #d543d771d9f9", +"o6oeopoaouoio0X3 ", -"$ a.>Xk ; w Z .*.y.B.F.P.Q.!.W.soDX2 ", -"$ p.hXs.j _ T R b d u t r q 0 - 3omX2 ", -"$ 8.aX0.D 1.t.M.<.' / ) ) ) ! g 9omX1 ", -"$ 6.tX0.z 2.b.v.-.( W Q ^ ^ Y p 9onX< ", -"$ 4.rXw.S r.c.#.] } _ Q ^ ^ Y p 9obX< ", -"# 3.wXq.l :.,.+.X.%.[ ~ ~ ^ Y e 8ovX< ", -"# &.9Xq.h { ;.>.$...` / ( ( E e 7ovX< ", -"@ K 7Xd.C O.@.| W U v c x f y : ,obX1 ", -"@ J +XF = 8 a V A H o.9.u.h.j.g.yocX1 ", -"@ P QX,X1XiXlXFX^Xoo2orosososososoxX< ", -"O 6 D.A.S.OX~.E.L.K.Z.V.N.n.m.x.k.5.% ", -" dodododoM I l.=.G s 9 * > + . dodo ", -"dododoX dodoO 5 C.e.i 7 , & dododododo", -"L N B dX:o%o o(X}XJXsX W.=.h ,.X._ | ) E Q T 6 MXl.NXNXNX", +"c * U.*.u +.@.o. .` ^ ) W 8 MXl.NXNXNX", +"< % P.-.i ] ' Y d t r e 2 @ mXl.NXNXNX", +", & D.{ # g K [ %.>.7.e.t.r.MXx.NXNXNX", +"; & ).Y.R.oXOX=X8XiXjXvXlXkXaX9.NXNXNX", +"X A H I 8.w.3.} J s y w - a : NXNXNX", +" NXNX NX . P S o NX NXNXNX", +"M $ + M.}.E.F.XX(.m.p.q.:.#.N = NXNXNX", +"'.rXzXcXMXxXsX9X4X1X#X{.!.J.N.u.NXNXNX", +"j.h.2XT.;X+X|.H.[.].~.I.G.Z.n.f.NXNXNX", +"a.s.k.$X5X>X@X X`.Q.L.S.B.b.g.d.NXNXNX", +"NXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNX", +"NXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNX", +"NXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNXNX" }; diff --git a/contrib/gtk-tool/main.cc b/contrib/gtk-tool/main.cc index dadc194a7f..b2de0c2514 100644 --- a/contrib/gtk-tool/main.cc +++ b/contrib/gtk-tool/main.cc @@ -13,29 +13,36 @@ int main(int argc, char **argv) { Gtk_Tree *machine, *machinetree; Gtk_LdapServer *treeitem; Gtk_Viewport *viewport; - char *host = NULL; + char *host = NULL, *prt = NULL; char *base_dn = NULL; int c, port = 0; + G_List *hosts; + int host_count = 0; + char *pair[2]; - while ((c = getopt(argc, argv, "b:s:p:h")) != -1) { + hosts = new G_List(); + while ((c = getopt(argc, argv, "s:p:h")) != -1) { switch (c) { - case 'b': - base_dn = optarg; break; case 's': - host = strdup(optarg); break; + cout << "host" << endl; + hosts = hosts->append(strdup(optarg)); + break; case 'p': port = atoi(optarg); break; case 'h': default: - fprintf(stderr, "Usage: %s [-s server] [-p port] [-b base_dn]\n", argv[0]); + fprintf(stderr, "Usage: %s ([-s server[:port]])*\n", argv[0]); exit(-1); } } - -// if (base_dn == NULL) base_dn = "o=University of Michigan, c=US"; - if (host == NULL) ldap_get_option(NULL, LDAP_OPT_HOST_NAME, host); - //host = "localhost"; - cout << host << endl; + cout << hosts->length() << "hosts" << endl; + for (int f=0; flength(); f++) { + debug("%s\n", hosts->nth_data(f)); + } + if (hosts->length() == 0) { + ldap_get_option(NULL, LDAP_OPT_HOST_NAME, host); + hosts = hosts->append(host); + } if (port == 0) port = LDAP_PORT; Gtk_Main m(&argc, &argv); @@ -43,24 +50,28 @@ int main(int argc, char **argv) { window = new My_Window(GTK_WINDOW_TOPLEVEL); tree = new Gtk_Tree(); - treeitem = new Gtk_LdapServer(window, host, port); - subtree = treeitem->getSubtree(); - tree->append(*treeitem); - treeitem->set_subtree(*subtree); - treeitem->show(); + for (int f=0; flength(); f++) { + host = strtok(hosts->nth_data(f), ":"); + prt = strtok(NULL, "\0"); + if (prt != NULL) port = atoi(prt); + else port = LDAP_PORT; + treeitem = new Gtk_LdapServer(window, host, port); + subtree = treeitem->getSubtree(); + tree->append(*treeitem); + treeitem->set_subtree(*subtree); + treeitem->show(); + } viewport = new Gtk_Viewport(); viewport->add(tree); window->scroller->add(viewport); tree->show(); viewport->show(); window->scroller->show(); - treeitem->showDetails(); +// treeitem->showDetails(); // treeitem->select(); - window->set_title("Hello"); + window->set_title("gtk-tool"); window->activate(); - window->set_usize(600, 500); - window->show(); m.run();