gqclient-commit Mailing List for GQ LDAP client (Page 4)
Status: Beta
Brought to you by:
sur5r
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
(14) |
Jul
(38) |
Aug
(5) |
Sep
(29) |
Oct
(30) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(30) |
Oct
(217) |
Nov
(24) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
(53) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sta...@us...> - 2003-11-02 17:08:31
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv7744 Modified Files: browse-export.c Log Message: * Removed unneeded #includes * Added missing #include - a related bug caused core-dumps due to wrong function prototype Index: browse-export.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** browse-export.c 2 Nov 2003 07:20:43 -0000 1.4 --- browse-export.c 2 Nov 2003 17:08:28 -0000 1.5 *************** *** 39,49 **** #include "ref-browse.h" - - #include "input.h" /* new_from_entry */ #include "search.h" /* fill_out_search */ #include "template.h" /* struct gq_template */ - #include "formfill.h" /* formlist_from_entry */ - #include "tinput.h" /* formfill_from_template */ #include "browse-dnd.h" /* copy_entry et al */ --- 39,45 ---- *************** *** 56,59 **** --- 52,56 ---- #include "ldif.h" + #include "browse-export.h" struct export { *************** *** 247,251 **** } ! void export_many(GtkWidget *transient_for, GList *to_export) { GtkWidget *filesel; --- 244,248 ---- } ! void export_many(int error_context, GtkWidget *transient_for, GList *to_export) { GtkWidget *filesel; |
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv17477 Modified Files: browse-dnd.c browse-export.c browse-export.h browse.c browse.h configfile.c configfile.h dn-browse.c dn-browse.h dt_binary.c dt_binary.h dt_clist.c dt_clist.h dt_entry.c dt_entry.h dt_generic_binary.c dt_generic_binary.h dt_int.c dt_int.h dt_numstr.c dt_numstr.h dt_oc.c dt_oc.h dt_password.c dt_password.h dt_text.c dt_text.h dt_time.c errorchain.c errorchain.h filter.c filter.h formfill.c formfill.h gq.c input.c input.h ldapops.c ldapops.h mainwin.c mainwin.h prefs.c ref-browse.c ref-browse.h schema.c schema.h schemabrowse.c search.c search.h server-browse.c server-browse.h state.c syntax.c syntax.h template.c template.h tinput.c tinput.h util.c util.h Log Message: A HUGE checkin. It was not possible to separate the following changes into separate change-sets, unfortunately: * error_context There was a problem with error-popups in the presence of modal/transient windows. In case an error was popping up, the modal window caused the error popups to be unaccessible for the user (The "OK" button was unclickable). This required MASSIVE changes all over, but now gq is more user-friendly as well. The new policy is: Whenever an error can be caused by some function, it must take an error context id as a argument. GTK Callbacks calling such functions must create such an error context and must register the error with its associated top-level widget. After doing all operations it must call error_flush, which might pop up a modal error-popup. Never should ANY execution path lead to the existance of two or more nested error contexts. This way, the user always gets a nice feedback about what operation in the end really caused the error. * slighly changed browse_entry data type handling - Added macros to cast a browse_entry to the proper subtype in a gtk-style - All methods now take browse_entry * arguments. That way the compile can do compile-time checks on the method table init assignments. * changed handling of saving configuration The new policy is: If a save fails, the old configuration MUST be restored. This might be an unpleasant thing to do, but users do not understand it if the configuration gets changed, an error pops up informing of a saving error and the configuration stays changed. This policy has not yet been implemented 100% in the current source. Needs to be fixed. (TODO) * Various cleanups along the way - made some functions static - fixed some memory leaks - updated copyright messages Testing required! Index: browse-dnd.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-dnd.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** browse-dnd.c 23 Oct 2003 05:46:23 -0000 1.19 --- browse-dnd.c 2 Nov 2003 07:20:42 -0000 1.20 *************** *** 347,351 **** ! static void do_refresh(struct tab *tab) { GList *l; dnd_refresh *at_end = NULL; --- 347,351 ---- ! static void do_refresh(int error_context, struct tab *tab) { GList *l; dnd_refresh *at_end = NULL; *************** *** 364,368 **** if (dr->dn == NULL) continue; ! refresh_subtree_with_options(dr->tree, tree_node_from_server_dn(dr->tree, dr->server, --- 364,369 ---- if (dr->dn == NULL) continue; ! refresh_subtree_with_options(error_context, ! dr->tree, tree_node_from_server_dn(dr->tree, dr->server, *************** *** 401,404 **** --- 402,406 ---- struct tab *tab) { + int ctx; #ifdef DEBUG if (debug & GQ_DEBUG_BROWSER_DND) { *************** *** 417,421 **** "drag-and-selection-data"); ! do_refresh(tab); } --- 419,425 ---- "drag-and-selection-data"); ! ctx = error_new_context(_("Refreshing entry after dragging"), ctreeroot); ! do_refresh(ctx, tab); ! error_flush(ctx); } *************** *** 533,537 **** --- 537,543 ---- struct ldapserver *source_server; char *newdn = NULL; + int context; + context = error_new_context(_("Moving entry"), ctreeroot); #ifdef DEBUG if (debug & GQ_DEBUG_BROWSER_DND) { *************** *** 562,570 **** if ((source_server == target_server) && ( strcasecmp(dn, target_entry->dn) == 0)) { ! statusbar_msg(_("Cannot move/copy entry onto itself!")); ! error_popup(_("Cannot move/copy entry onto itself!"), ! _("Cannot move/copy entry onto itself!")); ! ! return; } --- 568,574 ---- if ((source_server == target_server) && ( strcasecmp(dn, target_entry->dn) == 0)) { ! error_push(context, _("Cannot move/copy entry onto itself!")); ! ! goto done; } *************** *** 572,589 **** (source_server == target_server) && is_ancestor(target_entry->dn, dn)) { ! statusbar_msg(_("Cannot recursively move/copy entry onto or below itself!")); ! error_popup(_("Cannot recursively move/copy entry onto or below itself!"), ! _("Cannot recursively move/copy entry onto or below itself!")); ! return; } - - if (IS_DN_ENTRY(target_entry)) { newdn = move_entry(dn, source_server, target_entry->dn, target_server, ! flags, move_progress); ! /* register that we have to refresh the target node */ dnd_refresh_list = --- 576,590 ---- (source_server == target_server) && is_ancestor(target_entry->dn, dn)) { ! error_push(context, ! _("Cannot recursively move/copy entry onto or below itself!")); ! goto done; } if (IS_DN_ENTRY(target_entry)) { newdn = move_entry(dn, source_server, target_entry->dn, target_server, ! flags, move_progress, context); ! /* register that we have to refresh the target node */ dnd_refresh_list = *************** *** 627,630 **** --- 628,633 ---- } } + done: + error_flush(context); } *************** *** 877,881 **** }; ! int ctx = error_new_context(_("Getting selection string")); #ifdef DEBUG --- 880,884 ---- }; ! int ctx = error_new_context(_("Getting selection string"), ctree); #ifdef DEBUG *************** *** 893,897 **** /* retrieve from server ... */ ! if( (ld = open_connection(server)) == NULL) goto fail; /* use ManageDSAit: we want to move/copy refs intact */ --- 896,900 ---- /* retrieve from server ... */ ! if( (ld = open_connection(ctx, server)) == NULL) goto fail; /* use ManageDSAit: we want to move/copy refs intact */ *************** *** 1022,1025 **** --- 1025,1029 ---- { GtkWidget *ctree; + int ctx; ctree = GTK_WIDGET(BROWSETAB(tab)->ctreeroot); *************** *** 1034,1039 **** gdk_atom_intern("gq-browse-ctree", FALSE), GDK_CURRENT_TIME); - do_refresh(tab); } --- 1038,1046 ---- gdk_atom_intern("gq-browse-ctree", FALSE), GDK_CURRENT_TIME); + + ctx = error_new_context(_("Refreshing entry after pasting"), ctree); + do_refresh(ctx, tab); + error_flush(ctx); } Index: browse-export.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** browse-export.c 28 Oct 2003 19:16:01 -0000 1.3 --- browse-export.c 2 Nov 2003 07:20:43 -0000 1.4 *************** *** 60,63 **** --- 60,64 ---- GList *to_export; GtkWidget *filesel; + GtkWidget *transient_for; }; *************** *** 104,108 **** /* } */ ! ctx = error_new_context(_("Dump subtree")); if(g_list_length(ex->to_export) == 0) { --- 105,109 ---- /* } */ ! ctx = error_new_context(_("Dump subtree"), ex->transient_for); if(g_list_length(ex->to_export) == 0) { *************** *** 168,172 **** } ! if( (ld = open_connection(dos->server)) == NULL) { /* no extra error, open_connection does error reporting itself... */ --- 169,173 ---- } ! if( (ld = open_connection(ctx, dos->server)) == NULL) { /* no extra error, open_connection does error reporting itself... */ *************** *** 200,204 **** _("%1$d of %2$d bytes written"), written, out->len); ! error_popup(_("Save failed"), gmessage->str); ldap_msgfree(res); --- 201,206 ---- _("%1$d of %2$d bytes written"), written, out->len); ! error_popup(_("Save failed"), gmessage->str, ! ex->transient_for); ldap_msgfree(res); *************** *** 253,256 **** --- 255,259 ---- ex->to_export = to_export; ex->filesel = filesel; + ex->transient_for = transient_for; gtk_object_set_data_full(GTK_OBJECT(filesel), "export", Index: browse-export.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** browse-export.h 28 Oct 2003 19:18:50 -0000 1.2 --- browse-export.h 2 Nov 2003 07:20:43 -0000 1.3 *************** *** 35,39 **** /* to_export is a GList of dn_on_server objects */ ! void export_many(GtkWidget *widget, GList *to_export); #endif --- 35,40 ---- /* to_export is a GList of dn_on_server objects */ ! void export_many(int error_context, GtkWidget *transient_for, ! GList *to_export); #endif Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** browse.c 28 Oct 2003 19:23:52 -0000 1.91 --- browse.c 2 Nov 2003 07:20:43 -0000 1.92 *************** *** 138,142 **** int ctx; ! ctx = error_new_context(_("Exploding DN")); if (config->show_rdn_only) { --- 138,142 ---- int ctx; ! ctx = error_new_context(_("Exploding DN"), GTK_WIDGET(ctree)); if (config->show_rdn_only) { *************** *** 286,291 **** assert(entry->base_methods); if (entry->base_methods->expand) { ! entry->base_methods->expand(entry, ctree, ctree_node, tab); record_path(tab, entry, ctree, ctree_node); } } --- 286,296 ---- assert(entry->base_methods); if (entry->base_methods->expand) { ! int ctx = error_new_context(_("Expanding subtree"), ! GTK_WIDGET(ctree)); ! ! entry->base_methods->expand(entry, ctx, ctree, ctree_node, tab); record_path(tab, entry, ctree, ctree_node); + + error_flush(ctx); } } *************** *** 340,344 **** /* do not update right-hand pane if update-lock is set */ if (! BROWSETAB(tab)->update_lock) { ! entry->base_methods->select(entry, ctree, node, tab); } } --- 345,352 ---- /* do not update right-hand pane if update-lock is set */ if (! BROWSETAB(tab)->update_lock) { ! int ctx = error_new_context(_("Selecting entry"), ! GTK_WIDGET(ctree)); ! entry->base_methods->select(entry, ctx, ctree, node, tab); ! error_flush(ctx); } } *************** *** 364,368 **** assert(entry->base_methods); if (entry->base_methods->refresh) { ! entry->base_methods->refresh(entry, ctree, node, tab); } --- 372,380 ---- assert(entry->base_methods); if (entry->base_methods->refresh) { ! int ctx = error_new_context(_("Refreshing entry"), ! GTK_WIDGET(ctree)); ! ! entry->base_methods->refresh(entry, ctx, ctree, node, tab); ! error_flush(ctx); } *************** *** 408,412 **** } ! static void browse_save_snapshot(char *state_name, struct tab *tab) { char *tmp; --- 420,425 ---- } ! static void browse_save_snapshot(int error_context, ! char *state_name, struct tab *tab) { char *tmp; *************** *** 426,430 **** if (BROWSETAB(tab)->inputform) { ! save_input_snapshot(BROWSETAB(tab)->inputform, tmp); } else { rm_value(tmp); --- 439,443 ---- if (BROWSETAB(tab)->inputform) { ! save_input_snapshot(error_context, BROWSETAB(tab)->inputform, tmp); } else { rm_value(tmp); *************** *** 446,450 **** } ! static void browse_restore_snapshot(char *state_name, struct tab *tab, struct pbar_win *progress) { --- 459,464 ---- } ! static void browse_restore_snapshot(int context, ! char *state_name, struct tab *tab, struct pbar_win *progress) { *************** *** 474,481 **** if (c == ep) { switch(type) { ! case DN_BROWSE_ENTRY: ! node = show_dn(ctree, node, c + 1, FALSE); break; ! case REF_BROWSE_ENTRY: gtk_ctree_expand(ctree, node); node = --- 488,495 ---- if (c == ep) { switch(type) { ! case DN_BROWSE_ENTRY_ID: ! node = show_dn(context, ctree, node, c + 1, FALSE); break; ! case REF_BROWSE_ENTRY_ID: gtk_ctree_expand(ctree, node); node = *************** *** 485,489 **** (GCompareFunc) cmp_name); break; ! case SERVER_BROWSE_ENTRY: server = server_by_name(c + 1); if (server != NULL) { --- 499,503 ---- (GCompareFunc) cmp_name); break; ! case SERVER_BROWSE_ENTRY_ID: server = server_by_name(c + 1); if (server != NULL) { *************** *** 516,520 **** if (BROWSETAB(tab)->inputform) { ! restore_input_snapshot(BROWSETAB(tab)->inputform, tmp); } --- 530,534 ---- if (BROWSETAB(tab)->inputform) { ! restore_input_snapshot(context, BROWSETAB(tab)->inputform, tmp); } *************** *** 780,784 **** ! void refresh_subtree_new_dn(GtkCTree *ctree, GtkCTreeNode *node, const char *newdn, --- 794,799 ---- ! void refresh_subtree_new_dn(int error_context, ! GtkCTree *ctree, GtkCTreeNode *node, const char *newdn, *************** *** 893,897 **** } ! show_server_dn(ctree, server_from_node(ctree, node), e->dn, TRUE); --- 908,913 ---- } ! show_server_dn(error_context, ! ctree, server_from_node(ctree, node), e->dn, TRUE); *************** *** 900,917 **** } ! void refresh_subtree(GtkCTree *ctree, GtkCTreeNode *node) { ! refresh_subtree_new_dn(ctree, node, NULL, 0); } ! void refresh_subtree_with_options(GtkCTree *ctree, GtkCTreeNode *node, int options) { ! refresh_subtree_new_dn(ctree, node, NULL, options); } ! GtkCTreeNode *show_server_dn(GtkCTree *tree, struct ldapserver *server, const char *dn, gboolean select_node) --- 916,936 ---- } ! void refresh_subtree(int error_context, ! GtkCTree *ctree, GtkCTreeNode *node) { ! refresh_subtree_new_dn(error_context, ctree, node, NULL, 0); } ! void refresh_subtree_with_options(int error_context, ! GtkCTree *ctree, GtkCTreeNode *node, int options) { ! refresh_subtree_new_dn(error_context, ctree, node, NULL, options); } ! GtkCTreeNode *show_server_dn(int context, ! GtkCTree *tree, struct ldapserver *server, const char *dn, gboolean select_node) *************** *** 920,929 **** if (node) { gtk_ctree_expand(tree, node); ! return show_dn(tree, node, dn, select_node); } return NULL; } ! GtkCTreeNode *show_dn(GtkCTree *tree, GtkCTreeNode *node, const char *dn, gboolean select_node) { --- 939,949 ---- if (node) { gtk_ctree_expand(tree, node); ! return show_dn(context, tree, node, dn, select_node); } return NULL; } ! GtkCTreeNode *show_dn(int error_context, ! GtkCTree *tree, GtkCTreeNode *node, const char *dn, gboolean select_node) { *************** *** 962,966 **** LDAP *ld; ! if ((ld = open_connection(server)) != NULL) { LDAPMessage *res, *e; LDAPControl c; --- 982,986 ---- LDAP *ld; ! if ((ld = open_connection(error_context, server)) != NULL) { LDAPMessage *res, *e; LDAPControl c; Index: browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** browse.h 28 Oct 2003 19:23:52 -0000 1.36 --- browse.h 2 Nov 2003 07:20:43 -0000 1.37 *************** *** 73,85 **** --- 73,89 ---- virtual function table */ typedef void (*browse_entry_destructor)(browse_entry *entry); + typedef void (*browse_entry_expand)(browse_entry *entry, + int error_context, GtkCTree *ctreeroot, GtkCTreeNode *node, struct tab *tab); typedef void (*browse_entry_select)(browse_entry *entry, + int error_context, GtkCTree *ctreeroot, GtkCTreeNode *node, struct tab *tab); typedef void (*browse_entry_refresh)(browse_entry *entry, + int error_context, GtkCTree *ctreeroot, GtkCTreeNode *node, *************** *** 87,91 **** typedef char* (*browse_entry_get_name)(browse_entry *entry, gboolean long_form); ! typedef void (*browse_entry_popup)(browse_entry *entry, GtkWidget *menu, GtkWidget *ctreeroot, GtkCTreeNode *ctree_node, --- 91,96 ---- typedef char* (*browse_entry_get_name)(browse_entry *entry, gboolean long_form); ! typedef void (*browse_entry_popup)(browse_entry *entry, ! GtkWidget *menu, GtkWidget *ctreeroot, GtkCTreeNode *ctree_node, *************** *** 133,145 **** struct tab *new_browsemode(); ! void refresh_subtree(GtkCTree *ctree, GtkCTreeNode *node); ! void refresh_subtree_new_dn(GtkCTree *ctree, GtkCTreeNode *node, const char *newdn, int options); ! void refresh_subtree_with_options(GtkCTree *ctree, GtkCTreeNode *node, int options); --- 138,153 ---- struct tab *new_browsemode(); ! void refresh_subtree(int error_context, ! GtkCTree *ctree, GtkCTreeNode *node); ! void refresh_subtree_new_dn(int error_context, ! GtkCTree *ctree, GtkCTreeNode *node, const char *newdn, int options); ! void refresh_subtree_with_options(int error_context, ! GtkCTree *ctree, GtkCTreeNode *node, int options); *************** *** 148,155 **** GtkCTreeNode *node); ! GtkCTreeNode *show_server_dn(GtkCTree *tree, struct ldapserver *server, const char *dn, gboolean select_node); ! GtkCTreeNode *show_dn(GtkCTree *tree, GtkCTreeNode *node, const char *dn, gboolean select_node); --- 156,165 ---- GtkCTreeNode *node); ! GtkCTreeNode *show_server_dn(int error_context, ! GtkCTree *tree, struct ldapserver *server, const char *dn, gboolean select_node); ! GtkCTreeNode *show_dn(int error_context, ! GtkCTree *tree, GtkCTreeNode *node, const char *dn, gboolean select_node); Index: configfile.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** configfile.c 23 Oct 2003 05:26:37 -0000 1.47 --- configfile.c 2 Nov 2003 07:20:43 -0000 1.48 *************** *** 294,298 **** char *rcpath; ! load_context = error_new_context(_("Error loading configfile")); rcpath = filename_config(load_context); --- 294,298 ---- char *rcpath; ! load_context = error_new_context(_("Error loading configfile"), NULL); rcpath = filename_config(load_context); *************** *** 504,510 **** } ! void save_config_internal(int write_context, ! struct gq_config *cfg, ! const char *rcpath) { GList *templatelist, *oclist, *filterlist; --- 504,510 ---- } ! gboolean save_config_internal(int write_context, ! struct gq_config *cfg, ! const char *rcpath) { GList *templatelist, *oclist, *filterlist; *************** *** 517,525 **** int mode = S_IRUSR|S_IWUSR; GList *I; if (cfg->config_version > CURRENT_CONFIG_VERSION) { error_push(write_context, _("Configuration file version too high - saving the configuration is not possible")); ! return; } --- 517,526 ---- int mode = S_IRUSR|S_IWUSR; GList *I; + gboolean ok = FALSE; if (cfg->config_version > CURRENT_CONFIG_VERSION) { error_push(write_context, _("Configuration file version too high - saving the configuration is not possible")); ! return FALSE; } *************** *** 543,547 **** strerror(errno)); g_free(tmprcpath); ! return; } fchmod(fileno(wc->outfile), mode); --- 544,548 ---- strerror(errno)); g_free(tmprcpath); ! return FALSE; } fchmod(fileno(wc->outfile), mode); *************** *** 716,745 **** if (rename(tmprcpath, rcpath) == 0) { ! cfg->changed = 0; } else { error_push(write_context, _("Could not replace old configuration (%1$s) with the new one (%2$s):\n%3$s\n"), rcpath, tmprcpath, strerror(errno)); } g_free(tmprcpath); } ! void save_config() { char *rcpath; ! int write_context = error_new_context(_("Error writing configfile")); rcpath = filename_config(write_context); if(!rcpath) { ! error_flush(write_context); ! return; } ! save_config_internal(write_context, config, rcpath); - error_flush(write_context); g_free(rcpath); } --- 717,766 ---- if (rename(tmprcpath, rcpath) == 0) { ! ok =TRUE; } else { error_push(write_context, _("Could not replace old configuration (%1$s) with the new one (%2$s):\n%3$s\n"), rcpath, tmprcpath, strerror(errno)); + ok = FALSE; + } + + if (ok) { + statusbar_msg(_("Configuration saved to '%s'"), rcpath); + } else { + statusbar_msg(_("Saving configuration to '%s' failed."), rcpath); } g_free(tmprcpath); + + return ok; } + gboolean save_config(GtkWidget *transient_for) + { + int write_context = error_new_context(_("Error writing configfile"), + transient_for); + + gboolean ok = save_config_ext(write_context); ! error_flush(write_context); ! ! return ok; ! } ! ! gboolean save_config_ext(int write_context) { char *rcpath; ! gboolean ok; rcpath = filename_config(write_context); if(!rcpath) { ! return FALSE; } ! ok = save_config_internal(write_context, config, rcpath); g_free(rcpath); + + return ok; } *************** *** 766,770 **** cfg->schemaserver = g_strdup(""); /* [0] = '\0'; */ cfg->defaultDT = g_hash_table_new(g_str_hash, g_str_equal); - cfg->changed = 0; cfg->restore_window_sizes = DEFAULT_RESTORE_SIZES; --- 787,790 ---- *************** *** 825,829 **** /* actually do the upgrade if requested */ ! if (dosave) save_config(); } --- 845,849 ---- /* actually do the upgrade if requested */ ! if (dosave) save_config(NULL); } Index: configfile.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** configfile.h 23 Oct 2003 05:26:37 -0000 1.34 --- configfile.h 2 Nov 2003 07:20:43 -0000 1.35 *************** *** 115,119 **** GHashTable *defaultDT; - int changed; }; --- 115,118 ---- *************** *** 179,183 **** void load_config(void); ! void save_config(void); void init_config(void); --- 178,183 ---- void load_config(void); ! gboolean save_config(GtkWidget *transient_for); ! gboolean save_config_ext(int error_context); void init_config(void); Index: dn-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dn-browse.c 28 Oct 2003 19:23:52 -0000 1.8 --- dn-browse.c 2 Nov 2003 07:20:43 -0000 1.9 *************** *** 136,145 **** if (IS_DN_ENTRY(entry)) { char *dn = entry->dn; struct ldapserver *server = (struct ldapserver *) gtk_object_get_data(GTK_OBJECT(widget), "server"); ! new_from_entry(server, dn); } } --- 136,150 ---- if (IS_DN_ENTRY(entry)) { char *dn = entry->dn; + int error_context = + error_new_context(_("Creating new entry from existing entry"), + GTK_WIDGET(widget)); struct ldapserver *server = (struct ldapserver *) gtk_object_get_data(GTK_OBJECT(widget), "server"); + + new_from_entry(error_context, server, dn); ! error_flush(error_context); } } *************** *** 153,156 **** --- 158,162 ---- struct inputform *iform; dn_browse_entry *entry; + int error_context; server = (struct ldapserver *) gtk_object_get_data(GTK_OBJECT(widget), *************** *** 160,163 **** --- 166,174 ---- if (!IS_DN_ENTRY(entry)) return; + error_context = + error_new_context(_("Creating now entry from template"), + widget); + + iform = new_inputform(); iform->dn = NULL; *************** *** 165,169 **** ldapserver_ref(server); ! formlist = formfill_from_template(server, template); if(formlist) { iform->formlist = formlist; --- 176,180 ---- ldapserver_ref(server); ! formlist = formfill_from_template(error_context, server, template); if(formlist) { iform->formlist = formlist; *************** *** 179,186 **** create_form_window(iform); create_form_content(iform); ! build_inputform(iform); } else { free_inputform(iform); } #endif /* HAVE_LDAP_STR2OBJECTCLASS */ } --- 190,200 ---- create_form_window(iform); create_form_content(iform); ! ! build_inputform(error_context, iform); } else { free_inputform(iform); } + + error_flush(error_context); #endif /* HAVE_LDAP_STR2OBJECTCLASS */ } *************** *** 194,197 **** --- 208,212 ---- GList *to_export = NULL; struct dn_on_server *dos; + int error_context; ctree = BROWSETAB(tab)->ctreeroot; *************** *** 206,214 **** return; dos = new_dn_on_server(((dn_browse_entry *)e)->dn, server); dos->flags = LDAP_SCOPE_SUBTREE; /* default is LDAP_SCOPE_BASE */ to_export = g_list_append(to_export, dos); ! export_many(tab->win->mainwin, to_export); } --- 221,234 ---- return; + error_context = error_new_context(_("Exporting entry to LDIF"), + tab->win->mainwin); + dos = new_dn_on_server(((dn_browse_entry *)e)->dn, server); dos->flags = LDAP_SCOPE_SUBTREE; /* default is LDAP_SCOPE_BASE */ to_export = g_list_append(to_export, dos); ! export_many(error_context, tab->win->mainwin, to_export); ! ! error_flush(error_context); } *************** *** 262,266 **** if (do_delete) { ! if (delete_entry_full(server, entry->dn, TRUE)) { browse_entry *p_entry; GtkCTreeNode *parent = GTK_CTREE_ROW(node)->parent; --- 282,288 ---- if (do_delete) { ! int ctx = error_new_context(_("Deleting entry/subtree"), ! GTK_WIDGET(ctree)); ! if (delete_entry_full(ctx, server, entry->dn, TRUE)) { browse_entry *p_entry; GtkCTreeNode *parent = GTK_CTREE_ROW(node)->parent; *************** *** 276,283 **** assert(p_entry->base_methods); if (p_entry->base_methods->refresh) ! p_entry->base_methods->refresh(p_entry, ctree, parent, tab); } } } gtk_clist_thaw(GTK_CLIST(ctree)); --- 298,306 ---- assert(p_entry->base_methods); if (p_entry->base_methods->refresh) ! p_entry->base_methods->refresh(p_entry, ctx, ctree, parent, tab); } } + error_flush(ctx); } gtk_clist_thaw(GTK_CLIST(ctree)); *************** *** 295,301 **** * Destructor for dn_browse_entry objects */ ! static void destroy_dn_browse_entry(dn_browse_entry *entry) { ! if (!entry) return; if (entry->dn) g_free(entry->dn); free(entry); --- 318,330 ---- * Destructor for dn_browse_entry objects */ ! static void destroy_dn_browse_entry(browse_entry *e) { ! dn_browse_entry *entry; ! ! if (!e) return; ! ! assert(IS_DN_ENTRY(e)); ! entry = DN_BROWSE_ENTRY(e); ! if (entry->dn) g_free(entry->dn); free(entry); *************** *** 303,307 **** ! static void dn_browse_entry_expand(dn_browse_entry *entry, GtkCTree *ctree, GtkCTreeNode *node, --- 332,337 ---- ! static void dn_browse_entry_expand(browse_entry *be, ! int error_context, GtkCTree *ctree, GtkCTreeNode *node, *************** *** 316,324 **** char *ref[] = { "ref", NULL }; char *c, **refs; ! int context = error_new_context(_("Expand entry")); LDAPControl ct; LDAPControl *ctrls[2] = { NULL, NULL } ; ! assert(IS_DN_ENTRY(entry)); if (!entry->seen) { --- 346,356 ---- char *ref[] = { "ref", NULL }; char *c, **refs; ! dn_browse_entry *entry; ! LDAPControl ct; LDAPControl *ctrls[2] = { NULL, NULL } ; ! assert(IS_DN_ENTRY(be)); ! entry = DN_BROWSE_ENTRY(be); if (!entry->seen) { *************** *** 334,340 **** } ! if( (ld = open_connection(server)) == NULL) { gtk_clist_thaw(GTK_CLIST(ctree)); - error_flush(context); return; } --- 366,371 ---- } ! if( (ld = open_connection(error_context, server)) == NULL) { gtk_clist_thaw(GTK_CLIST(ctree)); return; } *************** *** 489,494 **** if (rc != LDAP_SUCCESS) { /* FIXME: better error message (but what is the exact cause?)*/ ! error_push(context, ldap_err2string(rc)); ! push_ldap_addl_error(ld, context); if (rc == LDAP_SERVER_DOWN) { --- 520,525 ---- if (rc != LDAP_SUCCESS) { /* FIXME: better error message (but what is the exact cause?)*/ ! error_push(error_context, ldap_err2string(rc)); ! push_ldap_addl_error(ld, error_context); if (rc == LDAP_SERVER_DOWN) { *************** *** 505,517 **** " - %s", _("time limit exceeded")); } else if (err != LDAP_SUCCESS) { ! error_push(context, ldap_err2string(err)); ! push_ldap_addl_error(ld, context); if (c && strlen(c)) { ! error_push(context, _("Matched DN: %s"), c); } if (refs) { int i; for (i = 0 ; refs[i] ; i++) { ! error_push(context, _("Referral to: %s"), refs[i]); } --- 536,548 ---- " - %s", _("time limit exceeded")); } else if (err != LDAP_SUCCESS) { ! error_push(error_context, ldap_err2string(err)); ! push_ldap_addl_error(ld, error_context); if (c && strlen(c)) { ! error_push(error_context, _("Matched DN: %s"), c); } if (refs) { int i; for (i = 0 ; refs[i] ; i++) { ! error_push(error_context, _("Referral to: %s"), refs[i]); } *************** *** 540,545 **** */ - error_flush(context); - done: if (res) ldap_msgfree(res); --- 571,574 ---- *************** *** 547,551 **** } ! static void browse_edit_from_entry(dn_browse_entry *entry, GtkCTree *ctreeroot, GtkCTreeNode *ctreenode, --- 576,581 ---- } ! static void browse_edit_from_entry(browse_entry *e, ! int error_context, GtkCTree *ctreeroot, GtkCTreeNode *ctreenode, *************** *** 558,563 **** char *dn; /* int hidden = 0; */ ! assert(IS_DN_ENTRY(entry)); if (ctreenode == NULL) --- 588,595 ---- char *dn; /* int hidden = 0; */ + dn_browse_entry *entry; ! assert(IS_DN_ENTRY(e)); ! entry = DN_BROWSE_ENTRY(e); if (ctreenode == NULL) *************** *** 593,599 **** tmplist = NULL; ! oldlist = formlist_from_entry(server, dn, 0); #ifdef HAVE_LDAP_STR2OBJECTCLASS ! oldlist = add_schema_attrs(server, oldlist); #endif --- 625,631 ---- tmplist = NULL; ! oldlist = formlist_from_entry(error_context, server, dn, 0); #ifdef HAVE_LDAP_STR2OBJECTCLASS ! oldlist = add_schema_attrs(error_context, server, oldlist); #endif *************** *** 624,628 **** create_form_content(iform); ! build_inputform(iform); } else { inputform_free(iform); --- 656,660 ---- create_form_content(iform); ! build_inputform(error_context, iform); } else { inputform_free(iform); *************** *** 632,647 **** } ! static void dn_browse_entry_refresh(dn_browse_entry *entry, GtkCTree *ctree, GtkCTreeNode *node, struct tab *tab) { ! refresh_subtree(ctree, node); ! entry->base_methods->select((browse_entry *) entry, ctree, node, tab); ! } ! static char* dn_browse_entry_get_name(dn_browse_entry *entry, gboolean long_form) { --- 664,682 ---- } ! static void dn_browse_entry_refresh(browse_entry *entry, ! int error_context, GtkCTree *ctree, GtkCTreeNode *node, struct tab *tab) { + assert(IS_DN_ENTRY(entry)); ! refresh_subtree(error_context, ctree, node); ! DN_BROWSE_ENTRY(entry)->base_methods->select(entry, ! error_context, ! ctree, node, tab); } ! static char* dn_browse_entry_get_name(browse_entry *entry, gboolean long_form) { *************** *** 655,661 **** if (long_form) { ! return g_strdup(entry->dn); } else { ! exploded_dn = gq_ldap_explode_dn(entry->dn, FALSE); #if GTK_MAJOR >= 2 --- 690,696 ---- if (long_form) { ! return g_strdup(DN_BROWSE_ENTRY(entry)->dn); } else { ! exploded_dn = gq_ldap_explode_dn(DN_BROWSE_ENTRY(entry)->dn, FALSE); #if GTK_MAJOR >= 2 *************** *** 674,678 **** } ! static void dn_browse_entry_popup(dn_browse_entry *entry, GtkWidget *menu, GtkWidget *ctreeroot, GtkCTreeNode *ctree_node, --- 709,713 ---- } ! static void dn_browse_entry_popup(browse_entry *entry, GtkWidget *menu, GtkWidget *ctreeroot, GtkCTreeNode *ctree_node, *************** *** 840,849 **** static struct browse_entry_vtab dn_vtab = { ! (browse_entry_destructor) destroy_dn_browse_entry, /* destroy */ ! (browse_entry_expand) dn_browse_entry_expand, /* expand */ ! (browse_entry_select) browse_edit_from_entry, /* select */ ! (browse_entry_refresh) dn_browse_entry_refresh, /* refresh */ ! (browse_entry_get_name) dn_browse_entry_get_name, /* get_name */ ! (browse_entry_popup) dn_browse_entry_popup, /* popup */ }; --- 875,884 ---- static struct browse_entry_vtab dn_vtab = { ! destroy_dn_browse_entry, /* destroy */ ! dn_browse_entry_expand, /* expand */ ! browse_edit_from_entry, /* select */ ! dn_browse_entry_refresh, /* refresh */ ! dn_browse_entry_get_name, /* get_name */ ! dn_browse_entry_popup, /* popup */ }; *************** *** 857,861 **** e = g_malloc0(sizeof(dn_browse_entry)); ! e->type = DN_BROWSE_ENTRY; e->base_methods = &dn_vtab; --- 892,896 ---- e = g_malloc0(sizeof(dn_browse_entry)); ! e->type = DN_BROWSE_ENTRY_ID; e->base_methods = &dn_vtab; Index: dn-browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dn-browse.h 17 Oct 2003 07:26:25 -0000 1.1 --- dn-browse.h 2 Nov 2003 07:20:43 -0000 1.2 *************** *** 35,39 **** * A browse_entry describing a singe DN (eg. a single LDAP object) */ ! #define DN_BROWSE_ENTRY 1 typedef struct { /* common */ --- 35,39 ---- * A browse_entry describing a singe DN (eg. a single LDAP object) */ ! #define DN_BROWSE_ENTRY_ID 1 typedef struct { /* common */ *************** *** 51,55 **** } dn_browse_entry; ! #define IS_DN_ENTRY(entry) IS_ENTRY((entry), DN_BROWSE_ENTRY) browse_entry *new_dn_browse_entry(const char *dn); --- 51,56 ---- } dn_browse_entry; ! #define IS_DN_ENTRY(entry) IS_ENTRY((entry), DN_BROWSE_ENTRY_ID) ! #define DN_BROWSE_ENTRY(x) ((dn_browse_entry*)(x)) browse_entry *new_dn_browse_entry(const char *dn); Index: dt_binary.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_binary.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** dt_binary.c 12 Oct 2003 06:14:18 -0000 1.15 --- dt_binary.c 2 Nov 2003 07:20:43 -0000 1.16 *************** *** 160,169 **** } ! GtkWidget *dt_binary_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) { ! GtkWidget *w = dt_generic_binary_get_widget(form, data, activatefunc, funcdata); --- 160,170 ---- } ! GtkWidget *dt_binary_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) { ! GtkWidget *w = dt_generic_binary_get_widget(error_context, form, data, activatefunc, funcdata); Index: dt_binary.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_binary.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dt_binary.h 28 Sep 2003 03:26:25 -0000 1.5 --- dt_binary.h 2 Nov 2003 07:20:43 -0000 1.6 *************** *** 41,45 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_binary_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, --- 41,46 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_binary_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, Index: dt_clist.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_clist.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dt_clist.c 24 Oct 2003 19:09:30 -0000 1.7 --- dt_clist.c 2 Nov 2003 07:20:43 -0000 1.8 *************** *** 90,99 **** GtkWidget *data_widget); ! GtkWidget *dt_clist_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) { ! GtkWidget *w = dt_generic_binary_get_widget(form, data, activatefunc, funcdata); --- 90,100 ---- GtkWidget *data_widget); ! GtkWidget *dt_clist_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) { ! GtkWidget *w = dt_generic_binary_get_widget(error_context, form, data, activatefunc, funcdata); Index: dt_clist.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_clist.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dt_clist.h 28 Sep 2003 03:26:25 -0000 1.2 --- dt_clist.h 2 Nov 2003 07:20:43 -0000 1.3 *************** *** 58,62 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_clist_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, --- 58,63 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_clist_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, Index: dt_entry.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_entry.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dt_entry.c 12 Oct 2003 06:14:18 -0000 1.11 --- dt_entry.c 2 Nov 2003 07:20:43 -0000 1.12 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_entry.c) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 79,83 **** ! GtkWidget *dt_entry_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) --- 77,82 ---- ! GtkWidget *dt_entry_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) Index: dt_entry.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_entry.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dt_entry.h 2 Oct 2003 16:16:25 -0000 1.6 --- dt_entry.h 2 Nov 2003 07:20:43 -0000 1.7 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_entry.h) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 45,49 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_entry_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); --- 43,48 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_entry_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); Index: dt_generic_binary.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_generic_binary.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dt_generic_binary.c 12 Oct 2003 06:14:18 -0000 1.11 --- dt_generic_binary.c 2 Nov 2003 07:20:43 -0000 1.12 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_generic_binary.c) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 180,184 **** } ! GtkWidget *dt_generic_binary_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, --- 178,183 ---- } ! GtkWidget *dt_generic_binary_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, Index: dt_generic_binary.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_generic_binary.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dt_generic_binary.h 28 Sep 2003 03:26:25 -0000 1.6 --- dt_generic_binary.h 2 Nov 2003 07:20:43 -0000 1.7 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_generic_binary.h) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 56,60 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_generic_binary_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, --- 54,59 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_generic_binary_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, Index: dt_int.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_int.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dt_int.c 21 Oct 2003 20:53:42 -0000 1.2 --- dt_int.c 2 Nov 2003 07:20:43 -0000 1.3 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_entry.c) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 130,134 **** } ! GtkWidget *dt_int_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) --- 128,133 ---- } ! GtkWidget *dt_int_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) Index: dt_int.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_int.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dt_int.h 21 Oct 2003 04:46:41 -0000 1.1 --- dt_int.h 2 Nov 2003 07:20:43 -0000 1.2 *************** *** 40,44 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_int_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); --- 40,45 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_int_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); Index: dt_numstr.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_numstr.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dt_numstr.c 21 Oct 2003 04:46:41 -0000 1.1 --- dt_numstr.c 2 Nov 2003 07:20:43 -0000 1.2 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_entry.c) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 112,118 **** } ! GtkWidget *dt_numstr_get_widget(struct formfill *form, GByteArray *data, ! GtkSignalFunc *activatefunc, ! gpointer funcdata) { GtkWidget *hbox, *inputbox, *label; --- 110,117 ---- } ! GtkWidget *dt_numstr_get_widget(int error_context, ! struct formfill *form, GByteArray *data, ! GtkSignalFunc *activatefunc, ! gpointer funcdata) { GtkWidget *hbox, *inputbox, *label; Index: dt_numstr.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_numstr.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dt_numstr.h 21 Oct 2003 04:46:41 -0000 1.1 --- dt_numstr.h 2 Nov 2003 07:20:43 -0000 1.2 *************** *** 40,44 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_numstr_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); --- 40,45 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_numstr_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); Index: dt_oc.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_oc.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dt_oc.c 18 Oct 2003 08:13:17 -0000 1.19 --- dt_oc.c 2 Nov 2003 07:20:43 -0000 1.20 *************** *** 105,109 **** ! static gboolean do_change(struct change_info *ci); /* Oh what a dirty hack - in order to allow browse selection to work --- 105,109 ---- ! static gboolean do_change(int error_context, struct change_info *ci); /* Oh what a dirty hack - in order to allow browse selection to work *************** *** 132,135 **** --- 132,136 ---- gchar *newtext; gboolean rebuild = FALSE; + int ctx; gtk_timeout_remove(ci->id); *************** *** 142,149 **** ci->newtext = newtext; ! rebuild = do_change(ci); if (rebuild) { ! build_or_update_inputform(ci->iform, FALSE); } return FALSE; } --- 143,155 ---- ci->newtext = newtext; ! ctx = error_new_context(_("Changing objectClass attribute"), ! GTK_WIDGET(c)); ! ! rebuild = do_change(ctx, ci); if (rebuild) { ! build_or_update_inputform(ctx, ci->iform, FALSE); } + + error_flush(ctx); return FALSE; } *************** *** 189,193 **** } ! static gboolean do_change(struct change_info *ci) { gchar *newtext = ci->newtext; --- 195,199 ---- } ! static gboolean do_change(int error_context, struct change_info *ci) { gchar *newtext = ci->newtext; *************** *** 218,222 **** up an error message */ ! ss = get_schema(server); if (strlen(newtext) > 0) { --- 224,228 ---- up an error message */ ! ss = get_schema(error_context, server); if (strlen(newtext) > 0) { *************** *** 243,251 **** if (!found) { - GString *msg = g_string_sized_new(200); - g_string_sprintf(msg, - _("Missing superior objectClass %s"), - *cp); - /* this will fire the change signals again, thus the changeinfo data structure may not be freed */ --- 249,252 ---- *************** *** 254,260 **** ci->newtext = NULL; ! error_popup(_("Missing superior objectClass"), ! msg->str); ! g_string_free(msg, TRUE); return FALSE; --- 255,260 ---- ci->newtext = NULL; ! error_push(error_context, ! _("Missing superior objectClass %s"), *cp); return FALSE; *************** *** 361,369 **** continue; } ! if( (form = new_formfill()) == NULL) { ! error_popup(_("Oops!"), ! _("Not enough memory to make form.")); ! return TRUE; /* ?? */ ! } form->server = server; ldapserver_ref(server); --- 361,367 ---- continue; } ! form = new_formfill(); ! assert(form); ! form->server = server; ldapserver_ref(server); *************** *** 378,382 **** form->flags |= FLAG_NO_USER_MOD; } ! set_displaytype(server, form); formlist = formlist_append(formlist, form); n++; --- 376,380 ---- form->flags |= FLAG_NO_USER_MOD; } ! set_displaytype(error_context, server, form); formlist = formlist_append(formlist, form); n++; *************** *** 393,401 **** } ! if( (form = new_formfill()) == NULL) { ! error_popup(_("Oops!"), ! _("Not enough memory to make form.")); ! return TRUE; /* ?? */ ! } form->server = server; ldapserver_ref(server); --- 391,397 ---- } ! form = new_formfill(); ! assert(form); ! form->server = server; ldapserver_ref(server); *************** *** 409,413 **** form->flags |= FLAG_NO_USER_MOD; } ! set_displaytype(server, form); formlist = formlist_append(formlist, form); n++; --- 405,409 ---- form->flags |= FLAG_NO_USER_MOD; } ! set_displaytype(error_context, server, form); formlist = formlist_append(formlist, form); n++; *************** *** 426,430 **** ! GtkWidget *dt_oc_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) --- 422,427 ---- ! GtkWidget *dt_oc_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) *************** *** 446,450 **** pop = NULL; pop = g_list_append(pop, ""); ! ss = get_schema(server); if (ss) { --- 443,448 ---- pop = NULL; pop = g_list_append(pop, ""); ! ! ss = get_schema(error_context, server); if (ss) { Index: dt_oc.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_oc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dt_oc.h 28 Sep 2003 03:26:25 -0000 1.3 --- dt_oc.h 2 Nov 2003 07:20:43 -0000 1.4 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_oc.h) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 40,44 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_oc_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); --- 38,43 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_oc_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); Index: dt_password.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_password.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** dt_password.c 27 Oct 2003 22:08:03 -0000 1.20 --- dt_password.c 2 Nov 2003 07:20:43 -0000 1.21 *************** *** 371,375 **** #endif /* HAVE_LIBCRYPTO */ ! GtkWidget *dt_password_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) --- 371,376 ---- #endif /* HAVE_LIBCRYPTO */ ! GtkWidget *dt_password_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) Index: dt_password.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_password.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dt_password.h 17 Oct 2003 10:07:40 -0000 1.8 --- dt_password.h 2 Nov 2003 07:20:43 -0000 1.9 *************** *** 2,8 **** GQ -- a GTK-based LDAP client Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_password.h) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 2,6 ---- GQ -- a GTK-based LDAP client Copyright (C) 1998-2001 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 43,47 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_password_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); --- 41,46 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_password_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); Index: dt_text.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_text.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dt_text.c 13 Oct 2003 07:25:00 -0000 1.14 --- dt_text.c 2 Nov 2003 07:20:43 -0000 1.15 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_text.c) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 87,91 **** } ! GtkWidget *dt_text_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) --- 85,90 ---- } ! GtkWidget *dt_text_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata) Index: dt_text.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_text.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dt_text.h 13 Oct 2003 07:25:01 -0000 1.7 --- dt_text.h 2 Nov 2003 07:20:43 -0000 1.8 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! ! This file (dt_text.h) is ! Copyright (C) 2002 by Peter Stamfest and Bert Vermeulen This program is released under the Gnu General Public License with --- 1,6 ---- /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2003 Bert Vermeulen ! Copyright (C) 2002-2003 Peter Stamfest This program is released under the Gnu General Public License with *************** *** 38,42 **** /* Methods, only to be used by subclasses */ ! GtkWidget *dt_text_get_widget(struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); --- 36,41 ---- /* Methods, only to be used by subclasses */ ! GtkWidget *dt_text_get_widget(int error_context, ! struct formfill *form, GByteArray *data, GtkSignalFunc *activatefunc, gpointer funcdata); Index: dt_time.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_time.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dt_time.c 12 Oct 2003 06:14:18 -0000 1.10 --- dt_time.c 2 Nov 2003 07:20:43 -0000 1.11 *************** *** 1,8 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Ber... [truncated message content] |
From: <sta...@us...> - 2003-10-29 21:11:37
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv28524 Modified Files: prefs.c Log Message: * Fixed SF Bug #832340 Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** prefs.c 27 Oct 2003 22:12:23 -0000 1.51 --- prefs.c 29 Oct 2003 21:11:34 -0000 1.52 *************** *** 1485,1489 **** gtk_signal_connect(GTK_OBJECT(button_new), "clicked", GTK_SIGNAL_FUNC(serverstab_newbutton_callback), ! NULL); gtk_box_pack_start(GTK_BOX(vbox2), button_new, FALSE, TRUE, 0); --- 1485,1489 ---- gtk_signal_connect(GTK_OBJECT(button_new), "clicked", GTK_SIGNAL_FUNC(serverstab_newbutton_callback), ! pw); gtk_box_pack_start(GTK_BOX(vbox2), button_new, FALSE, TRUE, 0); |
From: <sta...@us...> - 2003-10-28 19:28:35
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv11345 Modified Files: search.c search.h Log Message: * dropped search-specific struct resultset - replaced by general purpose dn_on_server structure to bundle dn and server information * Added possibility for selecting multiple search results and to apply several operations to the selection (delete, export) via a submenu of the popup menu for search result entries Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** search.c 23 Oct 2003 05:31:34 -0000 1.58 --- search.c 28 Oct 2003 19:26:57 -0000 1.59 *************** *** 50,56 **** #include "syntax.h" #include "utf8-compat.h" ! void find_in_browser(struct tab *tab); ! void add_all_to_browser(struct tab *tab); static int column_by_attr(struct attrs **attrlist, char *attribute); --- 50,60 ---- #include "syntax.h" #include "utf8-compat.h" + #include "browse-export.h" ! static void find_in_browser(struct tab *tab); ! static void add_all_to_browser(struct tab *tab); ! static void add_selected_to_browser(struct tab *tab); ! static void export_search_selected_entry(struct tab *tab); ! static void delete_search_selected(struct tab *tab); static int column_by_attr(struct attrs **attrlist, char *attribute); *************** *** 847,850 **** --- 851,856 ---- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); main_clist = gtk_clist_new(1); + gtk_clist_set_selection_mode(GTK_CLIST(main_clist), + GTK_SELECTION_EXTENDED); gtk_clist_set_column_title(GTK_CLIST(main_clist), 0, ""); gtk_clist_column_titles_show(GTK_CLIST(main_clist)); *************** *** 960,988 **** } - - static struct resultset *new_resultset(struct ldapserver *server) - { - struct resultset *newset; - - newset = g_malloc0(sizeof(struct resultset)); - newset->dn = g_strdup(""); - newset->server = server; - - if (server) ldapserver_ref(server); - - return(newset); - } - - - static void free_resultset(struct resultset *set) - { - if (set) { - if (set->server) ldapserver_unref(set->server); - g_free_if(set->dn); - g_free(set); - } - } - - static int column_by_attr(struct attrs **attrlist, char *attribute) { --- 966,969 ---- *************** *** 1137,1141 **** int row; char *dn, *attr, **vals; ! struct resultset *set; #if GTK_MAJOR < 2 --- 1118,1122 ---- int row; char *dn, *attr, **vals; ! struct dn_on_server *set; #if GTK_MAJOR < 2 *************** *** 1152,1157 **** dn = ldap_get_dn(ld, e); /* store for later reference */ ! set = new_resultset(server); ! g_free_and_dup(set->dn, dn); if(config->showdn) { --- 1133,1137 ---- dn = ldap_get_dn(ld, e); /* store for later reference */ ! set = new_dn_on_server(dn, server); if(config->showdn) { *************** *** 1251,1255 **** row = gtk_clist_append(GTK_CLIST(clist), cl); gtk_clist_set_row_data_full(GTK_CLIST(clist), row, set, ! (GtkDestroyNotify) free_resultset); gtk_clist_column_titles_show(GTK_CLIST(clist)); --- 1231,1235 ---- row = gtk_clist_append(GTK_CLIST(clist), cl); gtk_clist_set_row_data_full(GTK_CLIST(clist), row, set, ! (GtkDestroyNotify) free_dn_on_server); gtk_clist_column_titles_show(GTK_CLIST(clist)); *************** *** 1443,1446 **** --- 1423,1428 ---- /* setup GUI - build new clist */ new_main_clist = gtk_clist_new(MAX_NUM_ATTRIBUTES); + gtk_clist_set_selection_mode(GTK_CLIST(new_main_clist), + GTK_SELECTION_EXTENDED); GTK_CLIST(new_main_clist)->button_actions[2] = GTK_BUTTON_SELECTS; *************** *** 1716,1724 **** static void results_popup_menu(struct tab *tab, GdkEventButton *event, ! struct resultset *set) { GtkWidget *root_menu, *menu, *menu_item, *label; int transient = is_transient_server(set->server); char **exploded_dn = NULL, *name; /* this is a hack to pass the selected set under the menu to the callbacks. --- 1698,1709 ---- static void results_popup_menu(struct tab *tab, GdkEventButton *event, ! struct dn_on_server *set) { GtkWidget *root_menu, *menu, *menu_item, *label; + GtkWidget *submenu; int transient = is_transient_server(set->server); char **exploded_dn = NULL, *name; + GList *selection; + int have_sel; /* this is a hack to pass the selected set under the menu to the callbacks. *************** *** 1758,1761 **** --- 1743,1813 ---- gtk_widget_show(menu_item); + /* Selection submenu */ + menu_item = gtk_menu_item_new_with_label(_("Selection")); + gtk_menu_append(GTK_MENU(menu), menu_item); + submenu = gtk_menu_new(); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_item), submenu); + gtk_widget_show(menu_item); + + /* Check if several entries it should be sensitive */ + selection = GTK_CLIST(SEARCHTAB(tab)->main_clist)->selection; + have_sel = (selection && g_list_length(selection) > 0); + + /* Select All */ + menu_item = gtk_menu_item_new_with_label(_("Select All")); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_signal_connect_object(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(gtk_clist_select_all), + (gpointer) SEARCHTAB(tab)->main_clist); + gtk_widget_show(menu_item); + + /* Unselect All */ + menu_item = gtk_menu_item_new_with_label(_("Unselect All")); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_signal_connect_object(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(gtk_clist_unselect_all), + (gpointer) SEARCHTAB(tab)->main_clist); + gtk_widget_show(menu_item); + gtk_widget_set_sensitive(menu_item, have_sel); + + /* separator */ + menu_item = gtk_menu_item_new(); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_widget_show(menu_item); + + /* Export to LDIF*/ + menu_item = gtk_menu_item_new_with_label(_("Export to LDIF")); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_signal_connect_object(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(export_search_selected_entry), + (gpointer) tab); + gtk_widget_show(menu_item); + gtk_widget_set_sensitive(menu_item, have_sel); + + /* Add to Browser*/ + menu_item = gtk_menu_item_new_with_label(_("Add to Browser")); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_signal_connect_object(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(add_selected_to_browser), + (gpointer) tab); + gtk_widget_show(menu_item); + gtk_widget_set_sensitive(menu_item, have_sel); + + /* separator */ + menu_item = gtk_menu_item_new(); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_widget_show(menu_item); + + /* Delete */ + menu_item = gtk_menu_item_new_with_label(_("Delete")); + gtk_menu_append(GTK_MENU(submenu), menu_item); + gtk_signal_connect_object(GTK_OBJECT(menu_item), "activate", + GTK_SIGNAL_FUNC(delete_search_selected), + (gpointer) tab); + gtk_widget_show(menu_item); + gtk_widget_set_sensitive(menu_item, have_sel); + + /*** End of Selected submenu ***/ + /* Edit */ menu_item = gtk_menu_item_new_with_label(_("Edit")); *************** *** 1806,1809 **** --- 1858,1862 ---- + gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time); *************** *** 1815,1824 **** { GtkCTree *ctree; ! struct resultset *set; struct tab *browsetab; set = SEARCHTAB(tab)->set; SEARCHTAB(tab)->set = NULL; ! if(set == NULL || set->dn == NULL) return; --- 1868,1877 ---- { GtkCTree *ctree; ! struct dn_on_server *set; struct tab *browsetab; set = SEARCHTAB(tab)->set; SEARCHTAB(tab)->set = NULL; ! if(set == NULL || set->dn == NULL || strlen(set->dn) == 0) return; *************** *** 1839,1843 **** { GtkCTree *ctree; ! struct resultset *cur_resultset; struct tab *browsetab; int i; --- 1892,1896 ---- { GtkCTree *ctree; ! struct dn_on_server *cur_resultset; struct tab *browsetab; int i; *************** *** 1863,1870 **** } void search_new_from_entry_callback(struct tab *tab) { ! struct resultset *set; set = SEARCHTAB(tab)->set; --- 1916,2019 ---- } + static void add_selected_to_browser(struct tab *tab) + { + GtkCTree *ctree; + struct dn_on_server *cur_resultset; + struct tab *browsetab; + GtkWidget *clist = SEARCHTAB(tab)->main_clist; + GList *sel, *I; + + /* find last used browser... */ + + browsetab = get_last_of_mode(BROWSE_MODE); + if(browsetab) { + ctree = BROWSETAB(browsetab)->ctreeroot; + gtk_clist_freeze(GTK_CLIST(ctree)); + + sel = GTK_CLIST(clist)->selection; + + for (I = sel ; I ; I = g_list_next(I)) { + cur_resultset = gtk_clist_get_row_data(GTK_CLIST(clist), GPOINTER_TO_INT(I->data)); + show_server_dn(ctree, + cur_resultset->server, cur_resultset->dn, FALSE); + } + gtk_clist_thaw(GTK_CLIST(ctree)); + go_to_page(browsetab); + } else { + single_warning_popup(_("No browser available")); + } + } + + + + static void export_search_selected_entry(struct tab *tab) + { + struct dn_on_server *cur_resultset; + struct tab *browsetab; + GtkWidget *clist = SEARCHTAB(tab)->main_clist; + GList *sel, *I; + + /* find last used browser... */ + + browsetab = get_last_of_mode(BROWSE_MODE); + if(browsetab) { + GList *to_export = NULL; + struct dn_on_server *dos; + + sel = GTK_CLIST(clist)->selection; + + for (I = sel ; I ; I = g_list_next(I)) { + cur_resultset = gtk_clist_get_row_data(GTK_CLIST(clist), GPOINTER_TO_INT(I->data)); + + dos = new_dn_on_server(cur_resultset->dn, + cur_resultset->server); + to_export = g_list_append(to_export, dos); + } + + export_many(tab->win->mainwin, to_export); + } else { + single_warning_popup(_("No browser available")); + } + } + + static void delete_search_selected(struct tab *tab) + { + struct dn_on_server *set; + GtkWidget *clist = SEARCHTAB(tab)->main_clist; + GList *sel, *I; + + sel = GTK_CLIST(clist)->selection; + if (g_list_length(sel) > 0) { + int answer = + question_popup(_("Do you really want to delete the selected entries?"), + _("Do you really want to delete the selected entries?") + ); + + /* FIXME: sort by ldapserver and keep connection open across + deletions */ + if (answer) { + GList *deld = NULL; + + for (I = g_list_last(sel) ; I ; I = g_list_previous(I)) { + set = gtk_clist_get_row_data(GTK_CLIST(clist), + GPOINTER_TO_INT(I->data)); + if (delete_entry(set->server, set->dn)) { + deld = g_list_append(deld, I->data); + } + } + gtk_clist_freeze(GTK_CLIST(clist)); + for (I = g_list_first(deld) ; I ; I = g_list_next(I)) { + gtk_clist_remove(GTK_CLIST(clist), + GPOINTER_TO_INT(I->data)); + } + g_list_free(deld); + gtk_clist_thaw(GTK_CLIST(clist)); + } + } + } void search_new_from_entry_callback(struct tab *tab) { ! struct dn_on_server *set; set = SEARCHTAB(tab)->set; *************** *** 1876,1883 **** } - void search_edit_entry_callback(struct tab *tab) { ! struct resultset *set; set = SEARCHTAB(tab)->set; --- 2025,2031 ---- } void search_edit_entry_callback(struct tab *tab) { ! struct dn_on_server *set; set = SEARCHTAB(tab)->set; *************** *** 1889,1896 **** } - void delete_search_entry(struct tab *tab) { ! struct resultset *set; set = SEARCHTAB(tab)->set; --- 2037,2043 ---- } void delete_search_entry(struct tab *tab) { ! struct dn_on_server *set; set = SEARCHTAB(tab)->set; *************** *** 1902,1910 **** } - int select_entry_callback(GtkWidget *clist, gint row, gint column, GdkEventButton *event, struct tab *tab) { ! struct resultset *set; if(event) { --- 2049,2056 ---- } int select_entry_callback(GtkWidget *clist, gint row, gint column, GdkEventButton *event, struct tab *tab) { ! struct dn_on_server *set; if(event) { *************** *** 1927,1931 **** GtkCListRow *clistrow; GList *list; ! struct resultset *set; if(event && event->button == 3) { --- 2073,2077 ---- GtkCListRow *clistrow; GList *list; ! struct dn_on_server *set; if(event && event->button == 3) { *************** *** 1952,1956 **** struct tab *tab) { ! struct resultset *set; int rc, row, column; --- 2098,2102 ---- struct tab *tab) { ! struct dn_on_server *set; int rc, row, column; Index: search.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** search.h 19 Oct 2003 12:06:42 -0000 1.15 --- search.h 28 Oct 2003 19:26:57 -0000 1.16 *************** *** 39,43 **** int populated_searchbase; int search_lock; ! struct resultset *set; GList *history; --- 39,46 ---- int populated_searchbase; int search_lock; ! ! /* set gets used to pass the current result for some ! callbacks. There was no simple other way except to hack */ ! struct dn_on_server *set; GList *history; *************** *** 48,59 **** int max_depth; GList *attrs; - }; - - struct resultset { - char *dn; - struct ldapserver *server; - /* struct oc *objectclass; */ - /* struct attrs *attributes; */ - /* int num_attributes; */ }; --- 51,54 ---- |
From: <sta...@us...> - 2003-10-28 19:25:15
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv10386 Modified Files: browse.c browse.h dn-browse.c Log Message: * releasing an inputform within a browse tab is now done correctly. This is important for saving the persistent state even if there is no inputform in the right pane (the case for server and ref browse entries) Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** browse.c 27 Oct 2003 22:16:19 -0000 1.90 --- browse.c 28 Oct 2003 19:23:52 -0000 1.91 *************** *** 295,298 **** --- 295,299 ---- { browse_entry *entry; + struct inputform *iform; /* avoid recursive calls to this handler - this causes crashes!!! */ *************** *** 322,325 **** --- 323,337 ---- entry = (browse_entry *) gtk_ctree_node_get_row_data(ctree, node); + /* delete old struct inputform (if any) */ + iform = BROWSETAB(tab)->inputform; + if(iform) { + /* but first get current hide status */ + /* HACK: store hide status it in the browse-tab data-structure */ + BROWSETAB(tab)->hidden = iform->hide_status; + + inputform_free(iform); + BROWSETAB(tab)->inputform = NULL; + } + if (entry) { assert(entry->base_methods); Index: browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** browse.h 21 Oct 2003 20:58:28 -0000 1.35 --- browse.h 28 Oct 2003 19:23:52 -0000 1.36 *************** *** 49,52 **** --- 49,55 ---- /* lock used to suppress flickering during d'n'd */ int update_lock; + + /* used to store old hide-button state - Hack */ + int hidden; }; Index: dn-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dn-browse.c 28 Oct 2003 19:16:01 -0000 1.7 --- dn-browse.c 28 Oct 2003 19:23:52 -0000 1.8 *************** *** 557,561 **** struct inputform *iform; char *dn; ! int hidden = 0; assert(IS_DN_ENTRY(entry)); --- 557,561 ---- struct inputform *iform; char *dn; ! /* int hidden = 0; */ assert(IS_DN_ENTRY(entry)); *************** *** 571,575 **** ctreeroot = BROWSETAB(tab)->ctreeroot; ! /* delete old struct inputform (if any) */ iform = BROWSETAB(tab)->inputform; --- 571,575 ---- ctreeroot = BROWSETAB(tab)->ctreeroot; ! #if 0 /* delete old struct inputform (if any) */ iform = BROWSETAB(tab)->inputform; *************** *** 580,584 **** inputform_free(iform); } ! iform = new_inputform(); BROWSETAB(tab)->inputform = iform; --- 580,584 ---- inputform_free(iform); } ! #endif iform = new_inputform(); BROWSETAB(tab)->inputform = iform; *************** *** 589,594 **** iform->edit = 1; ! /* pass on "hide" status */ ! iform->hide_status = hidden; tmplist = NULL; --- 589,594 ---- iform->edit = 1; ! /* pass on old "hide" status */ ! iform->hide_status = BROWSETAB(tab)->hidden; tmplist = NULL; |
From: <sta...@us...> - 2003-10-28 19:20:03
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv9746 Modified Files: browse-export.h Log Message: * prepared export to ldif functionality for multi-server exports * dropped search-specific struct resultset - replaced by general purpose dn_on_server structure to bundle dn and server information Index: browse-export.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** browse-export.h 23 Oct 2003 05:18:36 -0000 1.1 --- browse-export.h 28 Oct 2003 19:18:50 -0000 1.2 *************** *** 34,40 **** #include "common.h" /* struct ldapserver */ ! void export_many(GtkWidget *widget, ! GList *bases, ! struct ldapserver *server); #endif --- 34,39 ---- #include "common.h" /* struct ldapserver */ ! /* to_export is a GList of dn_on_server objects */ ! void export_many(GtkWidget *widget, GList *to_export); #endif |
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv9090 Modified Files: browse-export.c common.h dn-browse.c ldif.c ldif.h ref-browse.c server-browse.c util.c Log Message: * prepared export to ldif functionality for multi-server exports, changed all LDIF export hooks to use slightly modified API * dropped search-specific struct resultset - replaced by general purpose dn_on_server structure to bundle dn and server information Index: browse-export.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** browse-export.c 24 Oct 2003 19:09:04 -0000 1.2 --- browse-export.c 28 Oct 2003 19:16:01 -0000 1.3 *************** *** 58,63 **** struct export { ! struct ldapserver *server; ! GList *bases; GtkWidget *filesel; }; --- 58,62 ---- struct export { ! GList *to_export; GtkWidget *filesel; }; *************** *** 72,80 **** { if (ex) { ! g_list_foreach(ex->bases, (GFunc) g_free, NULL); ! g_list_free(ex->bases); ! ex->bases = NULL; ! ldapserver_unref(ex->server); ! ex->server = NULL; g_free(ex); } --- 71,77 ---- { if (ex) { ! g_list_foreach(ex->to_export, (GFunc) free_dn_on_server, NULL); ! g_list_free(ex->to_export); ! ex->to_export = NULL; g_free(ex); } *************** *** 95,98 **** --- 92,96 ---- int written; int ctx; + struct ldapserver *last = NULL; out = g_string_sized_new(2048); *************** *** 108,112 **** ctx = error_new_context(_("Dump subtree")); ! if(g_list_length(ex->bases) == 0) { error_push(ctx, _("Nothing to dump!")); goto fail; --- 106,110 ---- ctx = error_new_context(_("Dump subtree")); ! if(g_list_length(ex->to_export) == 0) { error_push(ctx, _("Nothing to dump!")); goto fail; *************** *** 130,134 **** g_string_truncate(out, 0); ! prepend_ldif_header(out, ex->server, ex->bases); written = fwrite(out->str, 1, out->len, outfile); --- 128,132 ---- g_string_truncate(out, 0); ! prepend_ldif_header(out, ex->to_export); written = fwrite(out->str, 1, out->len, outfile); *************** *** 141,153 **** } - if( (ld = open_connection(ex->server)) == NULL) { - /* no extra error, open_connection does error reporting - itself... */ - goto fail; - } - num_entries = 0; gmessage = g_string_sized_new(256); ! for (I = g_list_first(ex->bases) ; I ; I = g_list_next(I)) { LDAPControl ct; LDAPControl *ctrls[2] = { NULL, NULL } ; --- 139,147 ---- } num_entries = 0; gmessage = g_string_sized_new(256); ! for (I = g_list_first(ex->to_export) ; I ; I = g_list_next(I)) { ! struct dn_on_server *dos = I->data; ! LDAPControl ct; LDAPControl *ctrls[2] = { NULL, NULL } ; *************** *** 166,173 **** ctrls[0] = &ct; ! statusbar_msg(_("Subtree search on %s"), (char *) I->data); ! rc = ldap_search_ext_s(ld, (char *) I->data, ! LDAP_SCOPE_SUBTREE, "(objectClass=*)", attrs, --- 160,182 ---- ctrls[0] = &ct; ! statusbar_msg(_("Search on %s"), (char *) dos->dn); ! if (last != dos->server) { ! if (last) { ! close_connection(last, FALSE); ! last = NULL; ! } ! ! if( (ld = open_connection(dos->server)) == NULL) { ! /* no extra error, open_connection does error ! reporting itself... */ ! goto fail; ! } ! ! last = dos->server; ! } ! ! rc = ldap_search_ext_s(ld, (char *) dos->dn, ! dos->flags == LDAP_SCOPE_SUBTREE ? LDAP_SCOPE_SUBTREE : LDAP_SCOPE_BASE, "(objectClass=*)", attrs, *************** *** 194,198 **** ldap_msgfree(res); - close_connection(ex->server, FALSE); goto fail; } --- 203,206 ---- *************** *** 201,209 **** ldap_msgfree(res); } else if (rc == LDAP_SERVER_DOWN) { ! ex->server->server_down++; error_push(ctx, _("Server '%s' down. Export may be incomplete!"), ! ex->server->name); push_ldap_addl_error(ld, ctx); goto fail; --- 209,217 ---- ldap_msgfree(res); } else if (rc == LDAP_SERVER_DOWN) { ! dos->server->server_down++; error_push(ctx, _("Server '%s' down. Export may be incomplete!"), ! dos->server->name); push_ldap_addl_error(ld, ctx); goto fail; *************** *** 213,217 **** _("LDAP error while searching below '%s'." " Export may be incomplete!"), ! (char *) I->data); push_ldap_addl_error(ld, ctx); goto fail; --- 221,225 ---- _("LDAP error while searching below '%s'." " Export may be incomplete!"), ! (char *) dos->dn); push_ldap_addl_error(ld, ctx); goto fail; *************** *** 230,234 **** if (out) g_string_free(out, TRUE); if (gmessage) g_string_free(gmessage, TRUE); ! if (ld) close_connection(ex->server, FALSE); gtk_widget_destroy(ex->filesel); --- 238,242 ---- if (out) g_string_free(out, TRUE); if (gmessage) g_string_free(gmessage, TRUE); ! if (ld && last) close_connection(last, FALSE); gtk_widget_destroy(ex->filesel); *************** *** 237,243 **** } ! void export_many(GtkWidget *transient_for, ! GList *bases, ! struct ldapserver *server) { GtkWidget *filesel; --- 245,249 ---- } ! void export_many(GtkWidget *transient_for, GList *to_export) { GtkWidget *filesel; *************** *** 245,251 **** filesel = gtk_file_selection_new(_("Save LDIF")); ! ex->server = server; ! ldapserver_ref(server); ! ex->bases = bases; ex->filesel = filesel; --- 251,255 ---- filesel = gtk_file_selection_new(_("Save LDIF")); ! ex->to_export = to_export; ex->filesel = filesel; Index: common.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/common.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** common.h 23 Oct 2003 05:46:23 -0000 1.32 --- common.h 28 Oct 2003 19:16:01 -0000 1.33 *************** *** 172,175 **** --- 172,185 ---- #endif + struct dn_on_server { + struct ldapserver *server; + char *dn; + int flags; /* used to specify more + * information if needed */ + }; + + struct dn_on_server *new_dn_on_server(const char *d, struct ldapserver *s); + void free_dn_on_server(struct dn_on_server *s); + #endif Index: dn-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dn-browse.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dn-browse.c 23 Oct 2003 05:46:23 -0000 1.6 --- dn-browse.c 28 Oct 2003 19:16:01 -0000 1.7 *************** *** 192,196 **** browse_entry *e; struct ldapserver *server; ! GList *bases = NULL; ctree = BROWSETAB(tab)->ctreeroot; --- 192,197 ---- browse_entry *e; struct ldapserver *server; ! GList *to_export = NULL; ! struct dn_on_server *dos; ctree = BROWSETAB(tab)->ctreeroot; *************** *** 205,212 **** return; ! bases = g_list_append(bases, ! g_strdup(((dn_browse_entry *)e)->dn)); ! ! export_many(tab->win->mainwin, bases, server); } --- 206,214 ---- return; ! dos = new_dn_on_server(((dn_browse_entry *)e)->dn, server); ! dos->flags = LDAP_SCOPE_SUBTREE; /* default is LDAP_SCOPE_BASE */ ! to_export = g_list_append(to_export, dos); ! ! export_many(tab->win->mainwin, to_export); } Index: ldif.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ldif.c 23 Oct 2003 05:46:23 -0000 1.17 --- ldif.c 28 Oct 2003 19:16:01 -0000 1.18 *************** *** 44,67 **** #include "errorchain.h" ! void prepend_ldif_header(GString *out, struct ldapserver *server, GList *bases) { time_t stamp; GString *tmp; char *username; tmp = g_string_sized_new(256); username = get_username(); time(&stamp); ! g_string_sprintf(tmp, "# This file was generated by %s %s (http://biot.com/gq/)\n" ! "# run by %s %s", ! PACKAGE, VERSION, username ? username : "NULL", ctime(&stamp)); ! while(bases) { ! g_string_sprintfa(tmp, "# subtree search on %s\n", (char *) bases->data); ! bases = bases->next; } ! g_string_sprintfa(tmp, "# server: %s:%d\n# binddn: %s\nversion: 1\n", ! server->ldaphost, server->ldapport, ! (server->binddn && strlen(server->binddn))? server->binddn: "(anonymous)"); g_string_prepend(out, tmp->str); if (username) free(username); --- 44,87 ---- #include "errorchain.h" ! void prepend_ldif_header(GString *out, GList *to_export) { time_t stamp; GString *tmp; char *username; + struct ldapserver *last = NULL; tmp = g_string_sized_new(256); username = get_username(); time(&stamp); ! g_string_sprintf(tmp, ! "#\n" ! "# This file was generated by %s %s (http://biot.com/gq/)\n" ! "# run by %s %s#\n", ! PACKAGE, VERSION, username ? username : "NULL", ! ctime(&stamp)); /* f*** ctime - stupid trailing \n */ ! while(to_export) { ! struct dn_on_server *dos = to_export->data; ! if (dos->server != last) { ! if (dos->flags == LDAP_SCOPE_SUBTREE) { ! g_string_sprintfa(tmp, "# subtree search on server: %s\n", ! dos->server->canon_name); ! } else { ! g_string_sprintfa(tmp, "# base search on server: %s\n", ! dos->server->canon_name); ! } ! g_string_sprintfa(tmp, "# binddn: %s\n", ! (dos->server->binddn && strlen(dos->server->binddn))? dos->server->binddn: "(anonymous)"); ! g_string_sprintfa(tmp, "# searching below: "); ! ! last = dos->server; ! } else { ! g_string_sprintfa(tmp, "# "); ! } ! g_string_sprintfa(tmp, "%s\n", dos->dn); ! ! to_export = to_export->next; } ! g_string_sprintfa(tmp, "# version: 1\n#\n"); g_string_prepend(out, tmp->str); if (username) free(username); Index: ldif.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ldif.h 29 Sep 2003 19:24:17 -0000 1.6 --- ldif.h 28 Oct 2003 19:16:01 -0000 1.7 *************** *** 30,35 **** #include "common.h" ! void prepend_ldif_header(GString *out, struct ldapserver *server, ! GList *bases); gboolean ldif_entry_out(GString *out, LDAP *ld, LDAPMessage *msg, int error_context); --- 30,34 ---- #include "common.h" ! void prepend_ldif_header(GString *out, GList *to_export); gboolean ldif_entry_out(GString *out, LDAP *ld, LDAPMessage *msg, int error_context); Index: ref-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ref-browse.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ref-browse.c 23 Oct 2003 05:18:36 -0000 1.6 --- ref-browse.c 28 Oct 2003 19:16:01 -0000 1.7 *************** *** 378,381 **** --- 378,383 ---- struct ldapserver *server; GList *bases = NULL; + GList *to_export = NULL, *I; + struct dn_on_server *dos; ctree = BROWSETAB(tab)->ctreeroot; *************** *** 391,396 **** bases = get_suffixes(((ref_browse_entry *)e)->server); ! ! export_many(tab->win->mainwin, bases, server); } --- 393,409 ---- bases = get_suffixes(((ref_browse_entry *)e)->server); ! ! /* turn suffixes list into a list of dn_on_server objects ! (impedance match) */ ! for (I = g_list_first(bases) ; I ; I = g_list_next(I) ) { ! dos = new_dn_on_server(I->data, server); ! dos->flags = LDAP_SCOPE_SUBTREE; /* default is LDAP_SCOPE_BASE */ ! to_export = g_list_append(to_export, dos); ! g_free(I->data); ! I->data = NULL; ! } ! g_list_free(bases); ! ! export_many(tab->win->mainwin, to_export); } Index: server-browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/server-browse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** server-browse.c 23 Oct 2003 05:46:23 -0000 1.5 --- server-browse.c 28 Oct 2003 19:16:01 -0000 1.6 *************** *** 528,531 **** --- 528,533 ---- struct ldapserver *server; GList *bases = NULL; + GList *to_export = NULL, *I; + struct dn_on_server *dos; ctree = BROWSETAB(tab)->ctreeroot; *************** *** 541,546 **** bases = get_suffixes(((server_browse_entry *)e)->server); ! ! export_many(tab->win->mainwin, bases, server); } --- 543,559 ---- bases = get_suffixes(((server_browse_entry *)e)->server); ! ! /* turn suffixes list into a list of dn_on_server objects ! (impedance match) */ ! for (I = g_list_first(bases) ; I ; I = g_list_next(I) ) { ! dos = new_dn_on_server(I->data, server); ! dos->flags = LDAP_SCOPE_SUBTREE; /* default is LDAP_SCOPE_BASE */ ! to_export = g_list_append(to_export, dos); ! g_free(I->data); ! I->data = NULL; ! } ! g_list_free(bases); ! ! export_many(tab->win->mainwin, to_export); } Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** util.c 28 Oct 2003 19:02:41 -0000 1.83 --- util.c 28 Oct 2003 19:16:01 -0000 1.84 *************** *** 2034,2037 **** --- 2034,2066 ---- + struct dn_on_server *new_dn_on_server(const char *d, + struct ldapserver *s) + { + struct dn_on_server *dos = g_malloc0(sizeof(struct dn_on_server)); + dos->server = s; + ldapserver_ref(s); + + if (d) { + dos->dn = g_strdup(d); + } else { + dos->dn = NULL; + } + + return dos; + } + + void free_dn_on_server(struct dn_on_server *s) + { + if (s) { + g_free_if(s->dn); + ldapserver_unref(s->server); + s->dn = NULL; + s->server = NULL; + + g_free(s); + } + } + + /* Local Variables: |
From: <sta...@us...> - 2003-10-28 19:03:09
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv7083 Modified Files: util.c Log Message: * fixed some forgotten gtk2 stock items Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** util.c 23 Oct 2003 05:54:15 -0000 1.82 --- util.c 28 Oct 2003 19:02:41 -0000 1.83 *************** *** 1701,1705 **** --- 1701,1709 ---- gtk_box_pack_start(GTK_BOX(hbox2), hbox0, TRUE, TRUE, 0); + #if GTK_MAJOR >= 2 + button = gtk_button_new_from_stock(GTK_STOCK_YES); + #else button = gq_button_new_with_label(_("_Yes")); + #endif gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(query_ok), comm); *************** *** 1710,1714 **** --- 1714,1722 ---- gtk_widget_show(button); + #if GTK_MAJOR >= 2 + button = gtk_button_new_from_stock(GTK_STOCK_NO); + #else button = gq_button_new_with_label(_("_No")); + #endif gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(query_cancel), |
From: <sta...@us...> - 2003-10-28 00:13:32
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv2797 Modified Files: browse.c Log Message: * Improve handling of cancelled state restoration Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** browse.c 24 Oct 2003 19:17:47 -0000 1.89 --- browse.c 27 Oct 2003 22:16:19 -0000 1.90 *************** *** 493,509 **** } ! if (gutter > 0) { ! gtk_paned_set_position(GTK_PANED(BROWSETAB(tab)->mainpane), gutter); ! } ! ! tmp = g_malloc(strlen(state_name) + 10); ! strcpy(tmp, state_name); ! strcat(tmp, ".input"); ! ! if (BROWSETAB(tab)->inputform) { ! restore_input_snapshot(BROWSETAB(tab)->inputform, tmp); } - - g_free(tmp); } --- 493,512 ---- } ! if (!progress->cancelled) { ! if (gutter > 0) { ! gtk_paned_set_position(GTK_PANED(BROWSETAB(tab)->mainpane), ! gutter); ! } ! ! tmp = g_malloc(strlen(state_name) + 10); ! strcpy(tmp, state_name); ! strcat(tmp, ".input"); ! ! if (BROWSETAB(tab)->inputform) { ! restore_input_snapshot(BROWSETAB(tab)->inputform, tmp); ! } ! ! g_free(tmp); } } |
From: <sta...@us...> - 2003-10-27 22:24:52
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv3673 Modified Files: ChangeLog Log Message: * Changes for today Index: ChangeLog =================================================================== RCS file: /cvsroot/gqclient/gq/ChangeLog,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** ChangeLog 24 Oct 2003 19:22:51 -0000 1.49 --- ChangeLog 27 Oct 2003 22:19:45 -0000 1.50 *************** *** 1,2 **** --- 1,9 ---- + 2003-10-27 Peter Stamfest <pe...@st...> + * Finally implemented LMHASH for dt_password. I hope I got it right. + * The combo box of the dt_password displaytype can be focused now + * Restore the right-pane viewport position in browse mode upon a + refresh of the current entry + * Fixed SF Bugs 830376 and 830377. Did some I18N of the template + window in the process. 2003-10-24 Peter Stamfest <pe...@st...> * More referral changes |
From: <sta...@us...> - 2003-10-27 22:22:58
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv3478 Modified Files: TODO Log Message: * Updated TODOs Index: TODO =================================================================== RCS file: /cvsroot/gqclient/gq/TODO,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** TODO 24 Oct 2003 19:21:52 -0000 1.43 --- TODO 27 Oct 2003 22:18:51 -0000 1.44 *************** *** 14,17 **** --- 14,19 ---- 1.0 it will be marked as BROKEN in the GUI + * [1.0] Handle update referrals - iff I can find out how to detect them + * [1.x] Allow to use a "master password" for passwords stored in the .gq config file. Shouldn't be too hard - either implement through *************** *** 76,85 **** ------------ ! * [1.0] Make ALL LDAP operations referral-safe (that is, change all ldap_* to ! ldap_*_ext and set ManageDSAit iff necessary) ! - Done for ldap_search ! - Done for ldap_rename ! ! Some probably still missing, but... * [1.x] Enhance the rudimentary run-type typing system to catch --- 78,82 ---- ------------ ! * [1.x] Rewrite the preferences layout - do it like Mozilla (Bert) * [1.x] Enhance the rudimentary run-type typing system to catch *************** *** 143,146 **** --- 140,152 ---- FIXED BUGS / IMPLEMENTED ENHANCEMENTS ------------------------------------- + + * [1.0] dt_password: Add LANMAN hash for completeness. + + * [1.0] Make ALL LDAP operations referral-safe (that is, change all ldap_* to + ldap_*_ext and set ManageDSAit iff necessary) + - Done for ldap_search + - Done for ldap_rename + + Some probably still missing, but... * [1.0] Re-introduce the Export to LDIF functionality for servers |
From: <sta...@us...> - 2003-10-27 22:22:20
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv3301 Modified Files: gq.spec.in Log Message: * Fixed a typo Index: gq.spec.in =================================================================== RCS file: /cvsroot/gqclient/gq/gq.spec.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gq.spec.in 24 Oct 2003 19:21:04 -0000 1.9 --- gq.spec.in 27 Oct 2003 22:17:52 -0000 1.10 *************** *** 131,135 **** - Updated for I18N, added new enable arguments as a reminder ! * Mon Sep 25 2000 Bert Vermeulen <be...@bi... - changed RPM spec maintainer --- 131,135 ---- - Updated for I18N, added new enable arguments as a reminder ! * Mon Sep 25 2000 Bert Vermeulen <be...@bi...> - changed RPM spec maintainer |
From: <sta...@us...> - 2003-10-27 22:19:58
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv2505 Modified Files: input.c Log Message: * Restore the scrolled-window position in the right pane of browser tabs upon refresh Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** input.c 24 Oct 2003 19:17:47 -0000 1.77 --- input.c 27 Oct 2003 22:15:17 -0000 1.78 *************** *** 141,158 **** struct snapshot_info { struct inputform *iform; ! int x, y; }; ! static void vp_pos(GtkWidget *vp, struct snapshot_info *si) { GtkAdjustment *adj; adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(vp)); ! gtk_adjustment_set_value(adj, si->x * adj->upper / 100.0); adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(vp)); ! gtk_adjustment_set_value(adj, si->y * adj->upper / 100.0); ! gtk_signal_disconnect_by_func(GTK_OBJECT(vp), vp_pos, si); g_free(si); --- 141,162 ---- struct snapshot_info { struct inputform *iform; ! double x, y; }; ! static void vp_pos(GtkWidget *w, struct snapshot_info *si) { GtkAdjustment *adj; + GtkWidget *vp = GTK_BIN(si->iform->scwin)->child; adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(vp)); ! gtk_adjustment_set_value(adj, si->x * adj->upper); adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(vp)); ! gtk_adjustment_set_value(adj, si->y * adj->upper); ! if (w) { ! gtk_signal_disconnect_by_func(GTK_OBJECT(w), ! GTK_SIGNAL_FUNC(vp_pos), si); ! } g_free(si); *************** *** 189,196 **** si = g_malloc0(sizeof(struct snapshot_info)); si->iform = iform; ! si->x = x; ! si->y = y; ! gtk_signal_connect(GTK_OBJECT(w), "realize", vp_pos, si); } } --- 193,201 ---- si = g_malloc0(sizeof(struct snapshot_info)); si->iform = iform; ! si->x = x / 100.0; ! si->y = y / 100.0; ! gtk_signal_connect(GTK_OBJECT(w), "realize", ! GTK_SIGNAL_FUNC(vp_pos), si); } } *************** *** 995,998 **** --- 1000,1017 ---- { GList *oldlist, *newlist, *children; + double frac_x = 0.0, frac_y = 0.0; + GtkWidget *w; + + w = iform->scwin; + if (w) { + GtkAdjustment *adj; + + w = GTK_BIN(w)->child; + adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(w)); + frac_x = adj->value / adj->upper; + + adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(w)); + frac_y = adj->value / adj->upper; + } while ((children = gtk_container_children(GTK_CONTAINER(iform->target_vbox))) != NULL) { *************** *** 1022,1030 **** create_form_content(iform); build_inputform(iform); } ! } void edit_entry(struct ldapserver *server, const char *dn) --- 1041,1066 ---- create_form_content(iform); + build_inputform(iform); } ! /* let the main loop run to get all the geometry sorted out for ! the new inputform, afterwards restore the previously set ! viewport position */ + while(gtk_events_pending()) + gtk_main_iteration(); + + if (iform->scwin) { + struct snapshot_info *si; + + si = g_malloc0(sizeof(struct snapshot_info)); + si->iform = iform; + si->x = frac_x; + si->y = frac_y; + + vp_pos(NULL, si); + } + } void edit_entry(struct ldapserver *server, const char *dn) |
From: <sta...@us...> - 2003-10-27 22:18:44
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv2011 Modified Files: prefs.c Log Message: * Fixed SF bugs 830376 and 830377 Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** prefs.c 23 Oct 2003 05:31:34 -0000 1.50 --- prefs.c 27 Oct 2003 22:12:23 -0000 1.51 *************** *** 1100,1116 **** ! void serverstab_editbutton_callback(GtkWidget *widget, ! struct prefs_windata *pw) { GtkWidget *clist = pw->serverstab_server_clist; void *data = gtk_object_get_data(GTK_OBJECT(clist), "selected-row"); ! if (data) { ! gint row = GPOINTER_TO_INT(data); ! struct ldapserver *server = gtk_clist_get_row_data(GTK_CLIST(clist), ! row); ! /* quietly ignore editbutton if no server selected */ ! if(server) create_edit_server_window(server, pw->prefswindow); ! } } --- 1100,1115 ---- ! static void serverstab_editbutton_callback(GtkWidget *widget, ! struct prefs_windata *pw) { GtkWidget *clist = pw->serverstab_server_clist; void *data = gtk_object_get_data(GTK_OBJECT(clist), "selected-row"); ! ! gint row = GPOINTER_TO_INT(data); ! struct ldapserver *server = gtk_clist_get_row_data(GTK_CLIST(clist), ! row); ! /* quietly ignore editbutton if no server selected */ ! if(server) create_edit_server_window(server, pw->prefswindow); } *************** *** 2028,2032 **** return; ! create_template_edit_window(server, NULL); } --- 2027,2031 ---- return; ! create_template_edit_window(server, NULL, pw->prefswindow); } *************** *** 2052,2056 **** return; ! create_template_edit_window(server, templatename); } --- 2051,2055 ---- return; ! create_template_edit_window(server, templatename, pw->prefswindow); } *************** *** 2060,2067 **** GdkEventButton *event, struct prefs_windata *data) { ! ! if(event && event->type != GDK_BUTTON_PRESS) ! template_edit_callback(NULL, data); ! } --- 2059,2067 ---- GdkEventButton *event, struct prefs_windata *data) { ! if (event) { ! if(event->type == GDK_2BUTTON_PRESS) { ! template_edit_callback(NULL, data); ! } ! } } |
From: <sta...@us...> - 2003-10-27 22:15:44
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv1318 Modified Files: template.c template.h Log Message: * Fix SF bug 830376 - Made template window modal for preferences window * Did I18N for the template window Index: template.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/template.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** template.c 18 Oct 2003 08:27:00 -0000 1.12 --- template.c 27 Oct 2003 22:10:26 -0000 1.13 *************** *** 48,51 **** --- 48,52 ---- #include "errorchain.h" #include "debug.h" + #include "i18n.h" *************** *** 78,82 **** void create_template_edit_window(struct ldapserver *server, ! const char *templatename) { GList *list; --- 79,84 ---- void create_template_edit_window(struct ldapserver *server, ! const char *templatename, ! GtkWidget *modalFor) { GList *list; *************** *** 87,94 **** struct server_schema *ss; struct gq_template *tmpl; ! char *otitle[1] = { "Available objectclasses" }; ! char *ttitle[1] = { "Template objectclasses" }; ! char *rtitle[1] = { "Required attributes" }; ! char *atitle[1] = { "Allowed attributes" }; gmessage = NULL; --- 89,96 ---- struct server_schema *ss; struct gq_template *tmpl; ! char *otitle[1] = { _("Available objectclasses") }; ! char *ttitle[1] = { _("Template objectclasses") }; ! char *rtitle[1] = { _("Required attributes") }; ! char *atitle[1] = { _("Allowed attributes") }; gmessage = NULL; *************** *** 96,115 **** if(ss == NULL) { gmessage = g_string_sized_new(64); ! g_string_sprintf(gmessage, "no schema information found for server %s", server->name); } else if(ss->oc == NULL) { gmessage = g_string_sized_new(64); ! g_string_sprintf(gmessage, "no objectclass information found for server %s", server->name); } else if(ss->at == NULL) { gmessage = g_string_sized_new(64); ! g_string_sprintf(gmessage, "no attribute type information found for server %s", server->name); } if(gmessage) { ! error_popup("Error getting schema", gmessage->str); g_string_free(gmessage, TRUE); return; --- 98,120 ---- if(ss == NULL) { gmessage = g_string_sized_new(64); ! g_string_sprintf(gmessage, ! _("No schema information found for server %s"), server->name); } else if(ss->oc == NULL) { gmessage = g_string_sized_new(64); ! g_string_sprintf(gmessage, ! _("No objectclass information found for server %s"), server->name); } else if(ss->at == NULL) { gmessage = g_string_sized_new(64); ! g_string_sprintf(gmessage, ! _("No attribute type information found for server %s"), server->name); } if(gmessage) { ! error_popup(_("Error getting schema"), gmessage->str); g_string_free(gmessage, TRUE); return; *************** *** 117,120 **** --- 122,133 ---- templatewin = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + if (modalFor) { + assert(GTK_IS_WINDOW(modalFor)); + gtk_window_set_modal(GTK_WINDOW(templatewin), TRUE); + gtk_window_set_transient_for(GTK_WINDOW(templatewin), + GTK_WINDOW(modalFor)); + } + gtk_object_set_data_full(GTK_OBJECT(templatewin), "server", server, (GtkDestroyNotify) ldapserver_unref); *************** *** 282,286 **** /* Template name */ ! label = gtk_label_new("Template name"); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox3), label, FALSE, FALSE, 0); --- 295,299 ---- /* Template name */ ! label = gtk_label_new(_("Template name")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(hbox3), label, FALSE, FALSE, 0); *************** *** 300,304 **** /* Save */ ! button = gtk_button_new_with_label(" Save "); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_signal_connect(GTK_OBJECT(button), "pressed", --- 313,321 ---- /* Save */ ! #if GTK_MAJOR >= 2 ! button = gtk_button_new_from_stock(GTK_STOCK_SAVE); ! #else ! button = gq_button_new_with_label(_("_Save")); ! #endif GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_signal_connect(GTK_OBJECT(button), "pressed", *************** *** 310,314 **** /* Cancel */ ! button = gtk_button_new_with_label(" Cancel "); GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); gtk_signal_connect_object(GTK_OBJECT(button), "pressed", --- 327,335 ---- /* Cancel */ ! #if GTK_MAJOR >= 2 ! button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); ! #else ! button = gq_button_new_with_label(_("_Cancel")); ! #endif GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS); gtk_signal_connect_object(GTK_OBJECT(button), "pressed", *************** *** 324,332 **** /* default title, in case editing doesn't work out */ ! gtk_window_set_title(GTK_WINDOW(templatewin), "GQ: create new template"); if(templatename) { ! gtk_window_set_title(GTK_WINDOW(templatewin), "GQ: edit template"); ! gtk_object_set_data(GTK_OBJECT(templatewin), "templatename", g_strdup(templatename)); tmpl = find_template_by_name(templatename); if(tmpl) { --- 345,356 ---- /* default title, in case editing doesn't work out */ ! gtk_window_set_title(GTK_WINDOW(templatewin), ! _("GQ: create new template")); if(templatename) { ! gtk_window_set_title(GTK_WINDOW(templatewin), ! _("GQ: edit template")); ! gtk_object_set_data(GTK_OBJECT(templatewin), ! "templatename", g_strdup(templatename)); tmpl = find_template_by_name(templatename); if(tmpl) { *************** *** 566,571 **** if(strlen(tmpl->name) == 0) { /* need a name for this template, warning popup */ ! list = g_list_append(NULL, "You need to enter a name for the new template."); ! list = g_list_append(list, "Please enter one and try again."); warning_popup(list); return; --- 590,595 ---- if(strlen(tmpl->name) == 0) { /* need a name for this template, warning popup */ ! list = g_list_append(NULL, _("You need to enter a name for the new template.")); ! list = g_list_append(list, _("Please enter one and try again.")); warning_popup(list); return; *************** *** 578,584 **** } else { ! list = g_list_append(NULL, "A template by that name already exists!"); ! list = g_list_append(list, "Please choose another name, or delete " ! "the existing template"); warning_popup(list); return; --- 602,608 ---- } else { ! list = g_list_append(NULL, _("A template by that name already exists!")); ! list = g_list_append(list, _("Please choose another name, or delete " ! "the existing template")); warning_popup(list); return; Index: template.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/template.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** template.h 5 Oct 2003 13:49:29 -0000 1.4 --- template.h 27 Oct 2003 22:10:26 -0000 1.5 *************** *** 39,43 **** void create_template_edit_window(struct ldapserver *server, ! const char *template_name); gboolean delete_edit_window(GtkWidget *window); void fill_new_template(GtkWidget *window); --- 39,44 ---- void create_template_edit_window(struct ldapserver *server, ! const char *template_name, ! GtkWidget *parent); gboolean delete_edit_window(GtkWidget *window); void fill_new_template(GtkWidget *window); |
From: <sta...@us...> - 2003-10-27 22:13:57
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv32616 Modified Files: formfill.h dt_password.c Log Message: * Added Lanman Hash to the list of hashing algorithms (Just for completeness) * The combo box now can be focused Index: formfill.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** formfill.h 21 Oct 2003 04:46:41 -0000 1.27 --- formfill.h 27 Oct 2003 22:08:03 -0000 1.28 *************** *** 78,81 **** --- 78,82 ---- #define FLAG_ENCODE_SSHA 0x50 #define FLAG_ENCODE_NTHASH 0x60 + #define FLAG_ENCODE_LMHASH 0x70 #define ENCODING_MASK ( FLAG_ENCODE_CRYPT | FLAG_ENCODE_MD5 | FLAG_ENCODE_SHA ) Index: dt_password.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_password.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dt_password.c 18 Oct 2003 08:26:59 -0000 1.19 --- dt_password.c 27 Oct 2003 22:08:03 -0000 1.20 *************** *** 34,37 **** --- 34,38 ---- #include <fcntl.h> #include <unistd.h> + #include <ctype.h> #include <glib.h> *************** *** 64,67 **** --- 65,72 ---- #if defined(HAVE_LIBCRYPTO) + + + /* NOTE: The password-hash generating functions may change the data + in-place. They are explicitly permitted to do so. */ static GByteArray *dt_password_encode_password_crypt(char *data, int len); static GByteArray *dt_password_encode_password_md5(char *data, int len); *************** *** 70,73 **** --- 75,79 ---- static GByteArray *dt_password_encode_password_smd5(char *data, int len); static GByteArray *dt_password_encode_password_nthash(char *data, int len); + static GByteArray *dt_password_encode_password_lmhash(char *data, int len); typedef GByteArray *(CryptFunc)(char *data, int len); *************** *** 85,88 **** --- 91,95 ---- { FLAG_ENCODE_SHA, "SHA", dt_password_encode_password_sha1 }, { FLAG_ENCODE_NTHASH, "NTHASH", dt_password_encode_password_nthash }, + { FLAG_ENCODE_LMHASH, "LMHASH", dt_password_encode_password_lmhash }, #endif { 0, "", NULL }, *************** *** 305,308 **** --- 312,372 ---- + /* FIXME: silently assumes US-ASCII (or a single-byte encoding to be + handled by toupper) */ + + static des_cblock *lm_make_key(const char *pw, des_cblock *key) + { + int i; + char *k = (char *) key; + + k[0] = 0; + for ( i = 0 ; i < 7 ; i++ ) { + k[i] |= (pw[i] >> i) & 0xff; + k[i+1] = (pw[i] << (7 - i)) & 0xff; + } + + des_set_odd_parity(key); + } + + static const char *lmhash_key = "KGS!@#$%"; + static GByteArray *dt_password_encode_password_lmhash(char *data, int len) + { + int i; + char hex[2]; + char plain[15]; + des_key_schedule schedule; + GByteArray *gb = NULL; + des_cblock ckey1, ckey2; + des_cblock bin1, bin2; + + memset(plain, 0, sizeof(plain)); + + for (i = 0 ; i < len && i < 14 ; i++) { + plain[i] = toupper(data[i]); + } + + lm_make_key(plain, &ckey1); + des_set_key_unchecked(&ckey1, schedule); + des_ecb_encrypt((des_cblock*)lmhash_key, &bin1, schedule, DES_ENCRYPT); + + lm_make_key(plain + 7, &ckey2); + des_set_key_unchecked(&ckey2, schedule); + des_ecb_encrypt((des_cblock*)lmhash_key, &bin2, schedule, DES_ENCRYPT); + + gb = g_byte_array_new(); + + for(i = 0 ; i < sizeof(bin1) ; i++) { + hex[0] = hexdigit[bin1[i] / 16]; + hex[1] = hexdigit[bin1[i] % 16]; + g_byte_array_append(gb, hex, 2); + } + for(i = 0 ; i < sizeof(bin2) ; i++) { + hex[0] = hexdigit[bin2[i] / 16]; + hex[1] = hexdigit[bin2[i] % 16]; + g_byte_array_append(gb, hex, 2); + } + return gb; + } + #endif /* HAVE_LIBCRYPTO */ *************** *** 336,340 **** --- 400,408 ---- combo = gtk_combo_new(); + #ifdef OLD_FOCUS_HANDLING GTK_WIDGET_UNSET_FLAGS(GTK_COMBO(combo)->entry, GTK_CAN_FOCUS); + #endif + gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO(combo)->entry), FALSE); + style = gtk_widget_get_style(GTK_COMBO(combo)->entry); *************** *** 422,425 **** --- 490,495 ---- if (cryptfunc != NULL) { GByteArray *crypted = cryptfunc(data->data, data->len); + /* overwrite plain-text */ + memset(data->data, 0, data->len); g_byte_array_free(data, TRUE); data = crypted; |
From: <sta...@us...> - 2003-10-24 21:36:49
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv16986 Modified Files: TODO Log Message: * Updated TODO - very few left for 1.0! Index: TODO =================================================================== RCS file: /cvsroot/gqclient/gq/TODO,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** TODO 23 Oct 2003 11:24:46 -0000 1.42 --- TODO 24 Oct 2003 19:21:52 -0000 1.43 *************** *** 10,17 **** ---------------- - * [1.0] Make ALL LDAP operations referral-safe (that is, change all ldap_* to - ldap_*_ext and set ManageDSAit iff necessary) - - Done for ldap_search - * [1.0] SASL / GSSAPI support is badly broken right now (it seems) - there are several bug reports pending. If this cannot be done for --- 10,13 ---- *************** *** 79,82 **** --- 75,85 ---- ENHANCEMENTS ------------ + + * [1.0] Make ALL LDAP operations referral-safe (that is, change all ldap_* to + ldap_*_ext and set ManageDSAit iff necessary) + - Done for ldap_search + - Done for ldap_rename + + Some probably still missing, but... * [1.x] Enhance the rudimentary run-type typing system to catch |
From: <sta...@us...> - 2003-10-24 19:27:33
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv17161 Modified Files: ChangeLog Log Message: * Updated log for the last few days Index: ChangeLog =================================================================== RCS file: /cvsroot/gqclient/gq/ChangeLog,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** ChangeLog 21 Oct 2003 06:36:00 -0000 1.48 --- ChangeLog 24 Oct 2003 19:22:51 -0000 1.49 *************** *** 1,2 **** --- 1,22 ---- + 2003-10-24 Peter Stamfest <pe...@st...> + * More referral changes + * Save/Restore input form settings of browse tabs + * Configure fixes for libxml/libxml2 detection, seems to work on older + SUSE distros now + 2003-10-23 Peter Stamfest <pe...@st...> + * Applied a patch to gq.spec.in by Simon Matter + 2003-10-22 Peter Stamfest <pe...@st...> + * LDAP cleanups + * Fixed some memory leaks + * Allow to turn off clever credential guessing when following + referrals + * Got rid of sort searching preference + 2003-10-21 Peter Stamfest <pe...@st...> + * Referral handling & drag'n'drop fixes + * Can delete referrals now + * Browsing of referrals now works independently of the "hide + internal attributes" setting + * Fixed a compile error reported by Jean-Baptiste Quenot + <jb.quenot at caraldi.com> (forgotten glib.h inclusion) 2003-10-21 Peter Stamfest <pe...@st...> * Fixed minor bugs found while testing for release |
From: <sta...@us...> - 2003-10-24 19:25:07
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv16826 Modified Files: gq.spec.in Log Message: * Applied a patch by Simon Matter <sim...@in...> * Some small changes by me Index: gq.spec.in =================================================================== RCS file: /cvsroot/gqclient/gq/gq.spec.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gq.spec.in 28 Sep 2003 23:46:28 -0000 1.8 --- gq.spec.in 24 Oct 2003 19:21:04 -0000 1.9 *************** *** 1,2 **** --- 1,3 ---- + # -*- mode: rpm-spec -*- # # $Id$ *************** *** 30,38 **** %define _langpackversion_ %{!?langpackversion:@VERSION@}%{?langpackversion:%{langpackversion}} ! Name: %name Summary: Interactive graphical LDAP browser ! Version: %version ! Release: %release ! Copyright: GPL Group: Networking/Utilities URL: http://biot.com/gq/ --- 31,39 ---- %define _langpackversion_ %{!?langpackversion:@VERSION@}%{?langpackversion:%{langpackversion}} ! Name: %{name} Summary: Interactive graphical LDAP browser ! Version: %{version} ! Release: %{release} ! Copyright: GPL with OpenSSL excemption Group: Networking/Utilities URL: http://biot.com/gq/ *************** *** 44,55 **** %endif ! BuildRoot: /tmp/gq-%{version}-%{release} Requires: gtk+ >= 1.2.0 %description ! GQ is GTK+ LDAP client and browser utility. It can be used for searching a LDAP directory as well as browsing it using a tree view. Furthermore, it lets you inspect the LDAP schema a ! server is using. %prep --- 45,59 ---- %endif ! BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: gtk+ >= 1.2.0 %description ! GQ is a GTK+ LDAP client and browser utility. It can be used for searching a LDAP directory as well as browsing it using a tree view. Furthermore, it lets you inspect the LDAP schema a ! server is using. ! ! Install gq if you need a graphical tool to manage the contents ! of a LDAP server. %prep *************** *** 57,70 **** %if "%{_langpack_}" != "no" ! tar -xzf %{SOURCE1} ./gq-%{_langpackversion_}-langpack-%{_langpack_}/langpack . %endif %build ! ./configure --with-included-gettext --prefix=%{prefix} # --enable-cache --enable-browser-dnd ! make %install ! make DESTDIR=$RPM_BUILD_ROOT install-strip --- 61,75 ---- %if "%{_langpack_}" != "no" ! %setup -T -D -a 1 ./gq-%{_langpackversion_}-langpack-%{_langpack_}/langpack . %endif %build ! %{configure} --with-included-gettext # --enable-cache --enable-browser-dnd ! %{__make} %install ! [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} ! %{makeinstall} *************** *** 80,101 **** # by Simon Matter ! if [ "$RPM_BUILD_ROOT" != "/" ]; then ! rm -rf $RPM_BUILD_ROOT/%{prefix}/share/locale fi ! %endif %clean ! rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) ! %{prefix}/bin/gq ! %{prefix}/share/gnome/apps/Internet/gq.desktop ! %dir %{prefix}/share/pixmaps/gq ! %{prefix}/share/pixmaps/gq/* %if "%{_langpack_}" != "no" ! %{prefix}/share/locale/*/LC_MESSAGES/*.mo %endif --- 85,112 ---- # by Simon Matter ! if [ "%{buildroot}" != "/" ]; then ! %{__rm} -rf %{buildroot}%{_datadir}/locale fi ! %else ! ! # this file belongs to glibc-common, so we don't package it ! ! %{__rm} -f %{buildroot}%{_datadir}/locale/locale.alias ! ! %endif %clean ! [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %defattr(-, root, root) ! %{_bindir}/* ! %{_datadir}/gnome/apps/Internet/%{name}.desktop ! %dir %{_datadir}/pixmaps/%{name} ! %{_datadir}/pixmaps/%{name}/* %if "%{_langpack_}" != "no" ! %{_datadir}/locale/*/LC_MESSAGES/*.mo %endif *************** *** 114,119 **** %changelog * Thu Apr 25 2002 Peter Stamfest <pe...@st...> ! - Updated for I18N, added new enable arguments as a remainder * Mon Sep 25 2000 Bert Vermeulen <be...@bi... --- 125,133 ---- %changelog + * Wed Oct 22 2003 Simon Matter <sim...@in...> + - replaced several values by corresponding RPM macros + * Thu Apr 25 2002 Peter Stamfest <pe...@st...> ! - Updated for I18N, added new enable arguments as a reminder * Mon Sep 25 2000 Bert Vermeulen <be...@bi... |
From: <sta...@us...> - 2003-10-24 19:24:28
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv16553 Modified Files: configure.in Log Message: * libxml/libxml2 detection fixes - should work on older SuSE distros * Bumped version to 1.0alpha4 - might be released as beta1 instead Index: configure.in =================================================================== RCS file: /cvsroot/gqclient/gq/configure.in,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** configure.in 19 Oct 2003 12:02:43 -0000 1.54 --- configure.in 24 Oct 2003 19:19:52 -0000 1.55 *************** *** 30,34 **** AC_INIT(src/gq.c) ! AM_INIT_AUTOMAKE(gq, 1.0alpha3) LANGPACK_VERSION=1 --- 30,34 ---- AC_INIT(src/gq.c) ! AM_INIT_AUTOMAKE(gq, 1.0alpha4) LANGPACK_VERSION=1 *************** *** 195,200 **** AC_CHECK_LIB(xml2, xmlCreateIOParserCtxt, [AC_DEFINE(HAVE_LIBXML2,,[Define if libxml2 is available on your system]) ! XML_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0` ! XML_LIBS=`$PKG_CONFIG --libs libxml-2.0` LIBS="$LIBS $XML_LIBS" CFLAGS="$CFLAGS $XML_CFLAGS" --- 195,207 ---- AC_CHECK_LIB(xml2, xmlCreateIOParserCtxt, [AC_DEFINE(HAVE_LIBXML2,,[Define if libxml2 is available on your system]) ! if test "x$PKG_CONFIG" = x ! then ! XML_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0` ! XML_LIBS=`$PKG_CONFIG --libs libxml-2.0` ! else ! AC_PATH_PROG(XML2_CONFIG, xml2-config,,$PATH) ! XML_CFLAGS=`$XML2_CONFIG --cflags` ! XML_LIBS=`$XML2_CONFIG --libs` ! fi LIBS="$LIBS $XML_LIBS" CFLAGS="$CFLAGS $XML_CFLAGS" *************** *** 202,213 **** ]) ! AC_CHECK_LIB(xml, xmlSAXUserParseFile, ! [AC_DEFINE(HAVE_LIBXML,,[Define if libxml is available on your system]) - if test "x$XML_OK" = "x" ; then - LIBS="-lxml $LIBS" - XML_OK=1 - fi - ]) DEBUG=1 --- 209,233 ---- ]) ! if test "x$XML_OK" = "x" ; then ! AC_CHECK_LIB(xml, xmlSAXUserParseFile, ! [AC_DEFINE(HAVE_LIBXML,,[Define if libxml is available on your system]) ! ! if test "x$PKG_CONFIG" = x ! then ! XML_CFLAGS=`$PKG_CONFIG --cflags libxml-1.0` ! XML_LIBS=`$PKG_CONFIG --libs libxml-1.0` ! else ! AC_PATH_PROG(XML_CONFIG, xml-config,,$PATH) ! XML_CFLAGS=`$XML_CONFIG --cflags` ! XML_LIBS=`$XML_CONFIG --libs` ! fi ! ! LIBS="$LIBS $XML_LIBS" ! CFLAGS="$CFLAGS $XML_CFLAGS" ! XML_OK=1 ! ]) ! fi ! DEBUG=1 |
From: <sta...@us...> - 2003-10-24 19:19:50
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv16177 Modified Files: browse.c input.c input.h Log Message: * Save/Restore the state of the input form in the right pane of browse tabs Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** browse.c 23 Oct 2003 05:46:23 -0000 1.88 --- browse.c 24 Oct 2003 19:17:47 -0000 1.89 *************** *** 398,401 **** --- 398,402 ---- static void browse_save_snapshot(char *state_name, struct tab *tab) { + char *tmp; state_value_set_list(state_name, "open-path", BROWSETAB(tab)->cur_path); *************** *** 405,408 **** --- 406,423 ---- gtk_paned_get_position(GTK_PANED(BROWSETAB(tab)->mainpane))); #endif + /* the state of the show empty attributes toggle button */ + + + tmp = g_malloc(strlen(state_name) + 10); + strcpy(tmp, state_name); + strcat(tmp, ".input"); + + if (BROWSETAB(tab)->inputform) { + save_input_snapshot(BROWSETAB(tab)->inputform, tmp); + } else { + rm_value(tmp); + } + + g_free(tmp); } *************** *** 425,428 **** --- 440,444 ---- int gutter = state_value_get_int(state_name, "gutter-pos", -1); const GList *path = state_value_get_list(state_name, "open-path"); + char *tmp; struct ldapserver *server = NULL; *************** *** 480,483 **** --- 496,509 ---- gtk_paned_set_position(GTK_PANED(BROWSETAB(tab)->mainpane), gutter); } + + tmp = g_malloc(strlen(state_name) + 10); + strcpy(tmp, state_name); + strcat(tmp, ".input"); + + if (BROWSETAB(tab)->inputform) { + restore_input_snapshot(BROWSETAB(tab)->inputform, tmp); + } + + g_free(tmp); } Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** input.c 24 Oct 2003 19:15:34 -0000 1.76 --- input.c 24 Oct 2003 19:17:47 -0000 1.77 *************** *** 104,110 **** --- 104,199 ---- } + void save_input_snapshot(struct inputform *iform, const char *state_name) + { + int hide; + GtkWidget *w; + + assert(iform); + assert(state_name); + + hide = iform->hide_status; + state_value_set_int(state_name, "hide-empty-attributes", hide); + + w = iform->scwin; + if (w) { + GtkAdjustment *adj; + int percent; + + /* saving and restoring the "upper" value works around a + problem due to the fact that when restoring the inputfrom + in the usual case (during mainwin init) the widgets are + not yet shown and the upper value of the adjustments are + not set yet (= still zero). In order to be able to + restore a value it must be between the lower and upper + values. If both are zero this cannot work. */ + adj = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(w)); + percent = adj->value / adj->upper * 100.0; + state_value_set_int(state_name, "scrolled-window-x", percent); + /* state_value_set_int(state_name, "scrolled-window-x-upper", adj->upper); */ + + adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(w)); + percent = adj->value / adj->upper * 100.0; + state_value_set_int(state_name, "scrolled-window-y", percent); + /* state_value_set_int(state_name, "scrolled-window-y-upper", adj->upper); */ + } + } + + struct snapshot_info { + struct inputform *iform; + int x, y; + }; + + static void vp_pos(GtkWidget *vp, struct snapshot_info *si) + { + GtkAdjustment *adj; + + adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(vp)); + gtk_adjustment_set_value(adj, si->x * adj->upper / 100.0); + + adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(vp)); + gtk_adjustment_set_value(adj, si->y * adj->upper / 100.0); + + gtk_signal_disconnect_by_func(GTK_OBJECT(vp), vp_pos, si); + g_free(si); + } + void restore_input_snapshot(struct inputform *iform, const char *state_name) + { + int hide; + GtkWidget *w; + + assert(iform); + assert(state_name); + + hide = state_value_get_int(state_name, "hide-empty-attributes", 0); + + w = iform->hide_attr_button; + if (w) { + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(w), hide); + } + w = iform->scwin; + if (w) { + GtkAdjustment *adj; + int x, y; + struct snapshot_info *si; + + w = GTK_BIN(w)->child; + adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(w)); + x = state_value_get_int(state_name, "scrolled-window-x", 0); + + adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(w)); + y = state_value_get_int(state_name, "scrolled-window-y", 0); + + si = g_malloc0(sizeof(struct snapshot_info)); + si->iform = iform; + si->x = x; + si->y = y; + + gtk_signal_connect(GTK_OBJECT(w), "realize", vp_pos, si); + } + } + void create_form_window(struct inputform *iform) { *************** *** 291,294 **** --- 380,384 ---- /* scrolled window with vbox2 inside */ scwin = gtk_scrolled_window_new(NULL, NULL); + iform->scwin = scwin; gtk_container_border_width(GTK_CONTAINER(scwin), 0); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scwin), Index: input.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** input.h 11 Oct 2003 21:35:29 -0000 1.16 --- input.h 24 Oct 2003 19:17:47 -0000 1.17 *************** *** 32,35 **** --- 32,36 ---- GtkWidget *parent_window; GtkWidget *target_vbox; + GtkWidget *scwin; GtkWidget *new_attr_button; GtkWidget *hide_attr_button; *************** *** 63,66 **** --- 64,69 ---- #define inputform_free free_inputform + void save_input_snapshot(struct inputform *iform, const char *state_name); + void restore_input_snapshot(struct inputform *iform, const char *state_name); /* Maybe we will align attribute labels differently in the future.. */ |
From: <sta...@us...> - 2003-10-24 19:18:24
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv15807 Modified Files: input.c ldapops.c Log Message: * Referral support fixes Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** input.c 23 Oct 2003 05:53:24 -0000 1.75 --- input.c 24 Oct 2003 19:15:34 -0000 1.76 *************** *** 760,765 **** gtk_table_attach(GTK_TABLE(iform->table), ff->event_box, 0, 1, row, row + 1, ! /* GTK_FILL| */ GTK_FILL|GTK_EXPAND, ! GTK_FILL|GTK_EXPAND, 0, 0); --- 760,765 ---- gtk_table_attach(GTK_TABLE(iform->table), ff->event_box, 0, 1, row, row + 1, ! /* GTK_FILL| */ GTK_FILL, ! GTK_FILL, 0, 0); *************** *** 1501,1504 **** --- 1501,1516 ---- LDAPMessage *res = NULL; + #if defined(HAVE_LDAP_RENAME) + LDAPControl cc, *ctrls[2] = { NULL, NULL } ; + + /* prepare ManageDSAit in case we deal with referrals */ + cc.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; + cc.ldctl_value.bv_val = NULL; + cc.ldctl_value.bv_len = 0; + cc.ldctl_iscritical = 1; + + ctrls[0] = &cc; + #endif + server = iform->server; if( (ld = open_connection(server)) == NULL) *************** *** 1566,1570 **** #if defined(HAVE_LDAP_RENAME) ! rc = ldap_rename_s(ld, olddn, rdn[0], NULL, remove_flag, NULL, NULL); #else rc = ldap_modrdn2_s(ld, olddn, rdn[0], remove_flag); --- 1578,1591 ---- #if defined(HAVE_LDAP_RENAME) ! /* see draft-ietf-ldapext-ldap-c-api-xx.txt for details */ ! rc = ldap_rename_s(ld, ! olddn, /* dn */ ! rdn[0], /* newrdn */ ! NULL, /* newparent */ ! remove_flag, /* deleteoldrdn */ ! ctrls, /* serverctrls */ ! NULL /* clientctrls */ ! ); ! #else rc = ldap_modrdn2_s(ld, olddn, rdn[0], remove_flag); *************** *** 2033,2037 **** the next LDAP object to be shown in this browser */ iform->hide_status = hidden; - } --- 2054,2057 ---- Index: ldapops.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldapops.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ldapops.c 23 Oct 2003 05:46:23 -0000 1.19 --- ldapops.c 24 Oct 2003 19:15:35 -0000 1.20 *************** *** 185,190 **** if (sld == tld && (flags & MOVE_DELETE_MOVED) && source_server->version == LDAP_VERSION3) { ! rc = ldap_rename_s(sld, source_dn, sdn[0], target_dn, 1, ! NULL, NULL); if (rc == LDAP_SUCCESS) { --- 185,206 ---- if (sld == tld && (flags & MOVE_DELETE_MOVED) && source_server->version == LDAP_VERSION3) { ! LDAPControl cc, *ctrls[2] = { NULL, NULL } ; ! ! /* prepare ManageDSAit in case we deal with referrals */ ! cc.ldctl_oid = LDAP_CONTROL_MANAGEDSAIT; ! cc.ldctl_value.bv_val = NULL; ! cc.ldctl_value.bv_len = 0; ! cc.ldctl_iscritical = 1; ! ! ctrls[0] = &cc; ! ! rc = ldap_rename_s(sld, ! source_dn, /* dn */ ! sdn[0], /* newrdn */ ! target_dn, /* newparent */ ! 1, /* deleteoldrdn */ ! ctrls, /* serverctrls */ ! NULL /* clientctrls */ ! ); if (rc == LDAP_SUCCESS) { |
From: <sta...@us...> - 2003-10-24 19:11:35
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv15065 Modified Files: utf8-compat.h Log Message: * Fix some stupid double-definitions Index: utf8-compat.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/utf8-compat.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** utf8-compat.h 21 Oct 2003 04:53:50 -0000 1.4 --- utf8-compat.h 24 Oct 2003 19:10:25 -0000 1.5 *************** *** 36,41 **** # define g_utf8_get_char(p) (*(p)) # define g_utf8_next_char(p) (((char*)(p))+1) - # define g_unichar_isdigit(c) isdigit(c) - # define g_string_append_unichar(s,c) g_string_append_c((s),(c)) # define g_strcompress(x) g_strdup(x) #else --- 36,39 ---- *************** *** 46,50 **** # include <ctype.h> # define g_unichar_isspace isspace ! # define g_unichar_isdigit isdigit #endif --- 44,48 ---- # include <ctype.h> # define g_unichar_isspace isspace ! # define g_unichar_isdigit(c) isdigit(c) #endif *************** *** 54,58 **** #ifndef HAVE_G_STRING_APPEND_UNICHAR ! # define g_string_append_unichar g_string_append_c #endif --- 52,56 ---- #ifndef HAVE_G_STRING_APPEND_UNICHAR ! # define g_string_append_unichar(s,c) g_string_append_c((s),(c)) #endif |
From: <sta...@us...> - 2003-10-24 19:10:59
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv14869 Modified Files: dt_clist.c Log Message: * Streamlined container layout Index: dt_clist.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/dt_clist.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dt_clist.c 12 Oct 2003 06:14:18 -0000 1.6 --- dt_clist.c 24 Oct 2003 19:09:30 -0000 1.7 *************** *** 52,55 **** --- 52,56 ---- #include "common.h" #include "util.h" + #include "input.h" /* CONTAINER_BORDER_WIDTH */ #include "formfill.h" #include "dt_clist.h" *************** *** 175,179 **** window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_container_border_width(GTK_CONTAINER(window), 12); gtk_window_set_title(GTK_WINDOW(window), _("Attribute Details")); gtk_window_set_default_size(GTK_WINDOW(window), 670, 560); --- 176,181 ---- window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ! gtk_container_border_width(GTK_CONTAINER(window), ! CONTAINER_BORDER_WIDTH); gtk_window_set_title(GTK_WINDOW(window), _("Attribute Details")); gtk_window_set_default_size(GTK_WINDOW(window), 670, 560); *************** *** 193,198 **** hbox1 = gtk_hbutton_box_new(); gtk_widget_show(hbox1); ! gtk_container_border_width(GTK_CONTAINER(hbox1), 12); ! gtk_box_pack_end(GTK_BOX(vbox), hbox1, FALSE, FALSE, 0); #if GTK_MAJOR >= 2 --- 195,200 ---- hbox1 = gtk_hbutton_box_new(); gtk_widget_show(hbox1); ! /* gtk_container_border_width(GTK_CONTAINER(hbox1), 12); */ ! gtk_box_pack_end(GTK_BOX(vbox), hbox1, FALSE, FALSE, 5); #if GTK_MAJOR >= 2 |
From: <sta...@us...> - 2003-10-24 19:10:57
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv14807 Modified Files: browse-export.c Log Message: * Fix a compile-time warning Index: browse-export.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-export.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** browse-export.c 23 Oct 2003 05:18:36 -0000 1.1 --- browse-export.c 24 Oct 2003 19:09:04 -0000 1.2 *************** *** 256,260 **** "clicked", (GtkSignalFunc) dump_subtree_ok_callback, ! ex); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", --- 256,260 ---- "clicked", (GtkSignalFunc) dump_subtree_ok_callback, ! (gpointer) ex); gtk_signal_connect_object(GTK_OBJECT(GTK_FILE_SELECTION(filesel)->cancel_button), "clicked", |