]> git.sur5r.net Git - openldap/commitdiff
Updates to cache and misc. other fixes on gtk-tool
authorPredrag "Pele" Balorda <pele@openldap.org>
Fri, 27 Nov 1998 02:08:19 +0000 (02:08 +0000)
committerPredrag "Pele" Balorda <pele@openldap.org>
Fri, 27 Nov 1998 02:08:19 +0000 (02:08 +0000)
contrib/gtk-tool/ChangeLog
contrib/gtk-tool/Gtk_LdapTreeItem.cc
contrib/gtk-tool/My_Window.cc
contrib/gtk-tool/My_Window.h
contrib/gtk-tool/branch_node.xpm
contrib/gtk-tool/main.cc
contrib/gtk-tool/root_node.xpm

index a46e0ba56f814b6fb030935c15f7bcb9ec970bca..a002fc7edd602aef0773df8604632b060da86b31 100644 (file)
@@ -1,5 +1,12 @@
 ChangeLog for gtk-tool
 
+27/11/1998 - Pele
+       * Added viewports, both sides now scroll automatically
+       * Brought back the "cache" stuff, now data gets reused if it's allready
+       available without redundant searches/listings.
+       * Editing pixmaps by hand is so much, er, fun!
+       * Miniscule fixes
+
 26/11/1998 - Pele
        * Added nice icons in the browser pane - looks decent now.
        * Fixed scrolling in the data (right) pane - now scrolls if there is
index 26a8b8b9839bdbde02dbe8368bd507520073820d..355691145379271c3da025237cc38c143ccf1dd4 100644 (file)
@@ -51,31 +51,17 @@ int Gtk_LdapTreeItem::getDetails() {
        Gtk_Notebook *g;
        Gtk_Viewport *viewport;
        viewport = new Gtk_Viewport();
-/*
        if (this->notebook != NULL) {
                printf("Data on %s available\n", this->rdn);
-               if (par->scroller2->children() != NULL) {
-       //      if (par->scroller2->children[0] != NULL) {
-                       printf(".");
-               //      par->scroller2->release(par->scroller2->children()->nth_data(0));
-                       par->scroller2->remove_c(par->scroller2->children()->nth_data(0));
-               //      par->scroller2->remove_child(0);
+               if (par->viewport->getchild() != NULL) {
+                       par->viewport->remove_c(par->viewport->getchild()->gtkobj());
                }
-       //      par->scroller2->add_child(this->notebook);      
-               viewport->add(this->notebook);
-                       printf(".");
-               par->scroller2->add(viewport); //this->notebook);       
-                       printf(".");
-       //      this->notebook->reparent(*par->scroller2);
+               par->viewport->add(this->notebook);
                this->notebook->show();
-                       printf(".");
-               viewport->show();
-                       printf(".");
-               par->scroller2->show();
-                       printf(".");
+               par->viewport->show();
+       //      par->scroller2->show();
                return 0;
        }
-*/
        error = ldap_search_s(this->ld, this->dn, LDAP_SCOPE_BASE, "objectclass=*", NULL, 0, &result_identifier);
        entriesCount = ldap_count_entries(ld, result_identifier);
        if (entriesCount == 0) return 0;
@@ -99,20 +85,13 @@ int Gtk_LdapTreeItem::getDetails() {
                }
        }
        if (par->scroller2 != NULL) {
-       //      cout << "Scroller2 exists" << endl;
-               if (par->scroller2->children() != NULL ) {
-       //      if (par->scroller2->children[0] != NULL) {
-       //              cout << "There are children in scroller2" << endl;
-       //              par->scroller2->release(par->scroller2->children()->nth_data(0));
-                       par->scroller2->remove_c(par->scroller2->children()->nth_data(0));
-               //      par->scroller2->remove_child(0);
+               if (par->viewport->getchild() != NULL) {
+                       par->viewport->remove_c(par->viewport->getchild()->gtkobj());
                }
-       //      par->scroller2->add_child(this->notebook);
-               viewport->add(this->notebook);
-               par->scroller2->add(viewport); //this->notebook);       
+               par->viewport->add(this->notebook);
                this->notebook->show();
-               viewport->show();
-               par->scroller2->show();
+               par->viewport->show();
+       //      par->scroller2->show();
                cout << "Added details for " << this->rdn << endl;
        }
        return 0;
index 67d4f1b124c4a92e40c42c8ff56ff2fcc972464e..9e07dc89a6bf81d640de60faa296c45bb2893291 100644 (file)
@@ -14,7 +14,9 @@ My_Window::My_Window(GtkWindowType t) : Gtk_Window(t) {
 
 //     this->scroller2 = new My_Scroller();
        this->scroller2 = new Gtk_ScrolledWindow();
+       this->viewport = new Gtk_Viewport();
        this->scroller2->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+       this->scroller2->add(*this->viewport);
        pane->add2(*this->scroller2);   
        this->scroller2->show();
 
index ce4a6f34f859d8a3e9d3cd341efd5ff07b6f041a..7cf29a0f47ede9f8b2f39092f4f6ce4bd8b01992 100644 (file)
@@ -14,6 +14,7 @@ class My_Scroller;
 class My_Window : public Gtk_Window {
 public:
        Gtk_ScrolledWindow *scroller, *scroller2;
+       Gtk_Viewport *viewport;
 //     My_Scroller *scroller2;
        Gtk_Entry *urlfield;
        Gtk_Button *display_button;
index 1797f8574157103d18fdf8210204f9aa30c9c49f..e1db8cf7576cec70ba1f9250c15437746a26e315 100644 (file)
@@ -14,19 +14,19 @@ static char *magick[] = {
 "% c None",
 /* pixels */
 "%%%%%%%%%%%%%%%%%%%",
-"%%%%%%ooooo %%%%%%%",
-"%%%%%o$$##@O %%%%%%",
-"%%%%oOOOOOOOoooooo%",
-"%%%%o###########@O ",
-"%%%%o#@@@@@@@@@@+O ",
-"%%%%o#@@@@@@@+@+@@ ",
-"%%%%o#@@@@@@@@+@+O ",
-"%%%%o#@@@@@+@+@+@O ",
-"%%%%o#@@@@@@+@+@+O ",
-"%%%%o#@@@+@+@+@++@ ",
-"%%%%o#+@+@+@+@+++O ",
-"%%%%oOOOOOOOOOOOOO ",
-"%%%%%              ",
+"%%ooooo %%%%%%%%%%%",
+"%o$$##@O %%%%%%%%%%",
+"oOOOOOOOoooooo%%%%%",
+"o###########@O %%%%",
+"o#@@@@@@@@@@+O %%%%",
+"o#@@@@@@@+@+@@ %%%%",
+"o#@@@@@@@@+@+O %%%%",
+"o#@@@@@+@+@+@O %%%%",
+"o#@@@@@@+@+@+O %%%%",
+"o#@@@+@+@+@++@ %%%%",
+"o#+@+@+@+@+++O %%%%",
+"oOOOOOOOOOOOOO %%%%",
+"%              %%%%",
 "%%%%%%%%%%%%%%%%%%%",
 "%%%%%%%%%%%%%%%%%%%",
 "%%%%%%%%%%%%%%%%%%%",
index e83cff8b21c2faad7e8cbef698f21df5c0a76154..022fac6d819724a2535b8a8a07c659ed4d63be3d 100644 (file)
@@ -11,6 +11,7 @@ int main(int argc, char **argv) {
        Gtk_LdapItem *treeresult;
        Gtk_Tree *tree, *subtree;
        Gtk_LdapTreeItem *treeitem;
+       Gtk_Viewport *viewport;
        LDAPMessage **thing;
        LDAP *ld;
        char *host = NULL;
@@ -57,8 +58,11 @@ int main(int argc, char **argv) {
                treeitem->set_subtree(*subtree);
        }
        treeitem->show();
-       window->scroller->add(tree);
+       viewport = new Gtk_Viewport();
+       viewport->add(tree);
+       window->scroller->add(viewport);
        tree->show();
+       viewport->show();
        window->scroller->show();
        treeitem->getDetails();
        window->set_title("Hello");
index a5286eab930367c65cb29d770fe5016e5e111f1d..e8d1004684b11d8e41c9689189a0db0944281ca8 100644 (file)
@@ -52,22 +52,22 @@ static char *magick[] = {
 "z c Gray100",
 "x c None",
 /* pixels */
-"xxxxxx&t&&txxxxxxxx",
-"xxxxhujds9u&&xxxxxx",
-"xxxhzzdadd1<1 xxxxx",
-"xx7zhjdag&1e,$ xxxx",
-"xx7ddkuj61e&$, xxxx",
-"x7asapryt&.@>., xxx",
-"x7983py&z5l..,  xxx",
-"x2i226&z5l54.%. xxx",
-"x272;:t5l545..  xxx",
-"x22;-$&h5454. . xxx",
-"x---1.,&454.&.. xxx",
-"x-*##$#+...&zq0xxxx",
-"xxXO++. + . qfq0xxx",
-"xxxXoOo+.. . qfq0xx",
-"xxxxXX+=++ ..xqq0xx",
-"xxxxxx.....xxxx..xx",
+"xxxxx&t&&txxxxxxxxx",
+"xxxhujds9u&&xxxxxxx",
+"xxhzzdadd1<1 xxxxxx",
+"x7zhjdag&1e,$ xxxxx",
+"x7ddkuj61e&$, xxxxx",
+"7asapryt&.@>., xxxx",
+"7983py&z5l..,  xxxx",
+"2i226&z5l54.%. xxxx",
+"272;:t5l545..  xxxx",
+"22;-$&h5454. . xxxx",
+"---1.,&454.&.. xxxx",
+"-*##$#+...&zq0xxxxx",
+"xXO++. + . qfq0xxxx",
+"xxXoOo+.. . qfq0xxx",
+"xxxXX+=++ ..xqq0xxx",
+"xxxxx.....xxxx..xxx",
 "xxxxxxxxxxxxxxxxxxx",
 "xxxxxxxxxxxxxxxxxxx",
 "xxxxxxxxxxxxxxxxxxx",