mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 09:09:54 -05:00
A few quick fixes to get it up to speed with latest Gtk-- version and finally make it work.
This commit is contained in:
parent
6411d8429b
commit
7965e0e50d
4 changed files with 16 additions and 14 deletions
|
|
@ -23,7 +23,7 @@ int Gtk_LdapTreeItem::search() {
|
|||
}
|
||||
par->scroller2->add_child(this->notebook);
|
||||
// par->scroller2->remove((Gtk_Object)par->scroller2->children()->first());
|
||||
this->notebook->reparent(par->scroller2);
|
||||
this->notebook->reparent(*par->scroller2);
|
||||
this->notebook->show();
|
||||
par->scroller2->show();
|
||||
return 0;
|
||||
|
|
@ -45,7 +45,7 @@ int Gtk_LdapTreeItem::search() {
|
|||
}
|
||||
ldap_value_free(values);
|
||||
label = new Gtk_Label(attribute);
|
||||
notebook->append_page(table, label);
|
||||
notebook->append_page(*table, *label);
|
||||
table->show();
|
||||
label->show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@
|
|||
#include <gtk--/container.h>
|
||||
|
||||
void My_Scroller::remove_child(int i) {
|
||||
cout << "Unparenting child[" << i << "]" << endl;
|
||||
this->children[i]->unparent();
|
||||
// cout << "Unparenting child[" << i << "]" << endl;
|
||||
// this->children[i]->unparent();
|
||||
cout << "Deleting child[" << i << "] from children" << endl;
|
||||
// this->remove(children()->first());
|
||||
delete this->children[i];
|
||||
// delete this->children[i];
|
||||
this->remove_c(this->children[i]->gtkobj());
|
||||
gtk_widget_destroy(this->children[i]->gtkobj());
|
||||
cout << "done" << endl;
|
||||
}
|
||||
void My_Scroller::add_child(Gtk_Widget *w) {
|
||||
|
|
|
|||
|
|
@ -9,26 +9,26 @@ My_Window::My_Window(GtkWindowType t) : Gtk_Window(t) {
|
|||
this->scroller = new Gtk_ScrolledWindow();
|
||||
this->scroller->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
// this->scroller->set_usize(this->height(), 400);
|
||||
pane->add1(this->scroller);
|
||||
pane->add1(*this->scroller);
|
||||
this->scroller->show();
|
||||
|
||||
this->scroller2 = new My_Scroller();
|
||||
this->scroller2->set_policy(GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||
pane->add2(this->scroller2);
|
||||
pane->add2(*this->scroller2);
|
||||
this->scroller2->show();
|
||||
|
||||
top_hbox = new Gtk_HBox();
|
||||
this->urlfield = new Gtk_Entry();
|
||||
top_hbox->pack_start(this->urlfield, TRUE, TRUE, 1);
|
||||
top_hbox->pack_start(*this->urlfield, TRUE, TRUE, 1);
|
||||
this->urlfield->show();
|
||||
this->display_button = new Gtk_Button("Display");
|
||||
connect_to_method(this->display_button->clicked, this, &do_display);
|
||||
top_hbox->pack_end(this->display_button, FALSE, FALSE, 1);
|
||||
top_hbox->pack_end(*this->display_button, FALSE, FALSE, 1);
|
||||
this->display_button->show();
|
||||
|
||||
main_hbox = new Gtk_VBox();
|
||||
main_hbox->pack_start(top_hbox, FALSE, TRUE, 1);
|
||||
main_hbox->pack_end(pane, TRUE, TRUE, 1);
|
||||
main_hbox->pack_start(*top_hbox, FALSE, TRUE, 1);
|
||||
main_hbox->pack_end(*pane, TRUE, TRUE, 1);
|
||||
top_hbox->show();
|
||||
pane->show();
|
||||
this->add(main_hbox);
|
||||
|
|
@ -86,13 +86,13 @@ Gtk_LdapItem* My_Window::make_tree(My_Window *p, LDAP* l_i, char* b_d) {
|
|||
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);
|
||||
subtree->append(subtreeitem);
|
||||
subtree->append(*subtreeitem);
|
||||
printf("inserting %s into %s", s[0], c);
|
||||
if (subtreeresult->tree != NULL) {
|
||||
printf(".");
|
||||
subsubtree = new Gtk_Tree(*subtreeresult->tree);
|
||||
printf(".");
|
||||
subtreeitem->set_subtree(subsubtree);
|
||||
subtreeitem->set_subtree(*subsubtree);
|
||||
printf(".");
|
||||
}
|
||||
subtreeitem->show();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ int main(int argc, char **argv) {
|
|||
if (treeresult->tree != NULL) {
|
||||
subtree = new Gtk_Tree(*treeresult->tree);
|
||||
printf("inserting %s into root\n", base_dn);
|
||||
treeitem->set_subtree(subtree);
|
||||
treeitem->set_subtree(*subtree);
|
||||
}
|
||||
treeitem->show();
|
||||
window->scroller->add(tree);
|
||||
|
|
|
|||
Loading…
Reference in a new issue