gqclient-commit Mailing List for GQ LDAP client (Page 7)
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-10-17 07:11:10
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv356 Modified Files: Makefile.am Log Message: * Added Copyright notice + $Id$ * COPYING.c should get distributed now * Strip everything including and below "END OF TERMS AND CONDITIONS" from COPYING when creating COPYING.c Index: Makefile.am =================================================================== RCS file: /cvsroot/gqclient/gq/src/Makefile.am,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.am 17 Oct 2003 07:07:05 -0000 1.28 --- Makefile.am 17 Oct 2003 07:10:51 -0000 1.29 *************** *** 1,2 **** --- 1,27 ---- + # + # 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 + # the additional exemption that compiling, linking, and/or using + # OpenSSL is allowed. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + # $Id$ + ## Process this file with automake to produce Makefile.in *************** *** 95,99 **** EXTRA_DIST = \ ! gq.desktop sysdir = $(datadir)/gnome/apps/Internet --- 120,124 ---- EXTRA_DIST = \ ! gq.desktop COPYING.c sysdir = $(datadir)/gnome/apps/Internet *************** *** 117,120 **** COPYING.c: $(top_srcdir)/COPYING ( echo "const char *license =" ; \ ! sed -e 's/\(["\\]\)/\\\1/g' -e 's/^/ "/' -e 's/$$/\\n"/' < $< ;\ echo ";" ) > $@ --- 142,146 ---- COPYING.c: $(top_srcdir)/COPYING ( echo "const char *license =" ; \ ! sed '/END OF TERMS AND CONDITIONS/,$$d' < $< | tr -cd "\t\n[:print:]" | \ ! sed -e 's/\(["\\]\)/\\\1/g' -e 's/^/ "/' -e 's/$$/\\n"/' ;\ echo ";" ) > $@ |
From: <sta...@us...> - 2003-10-17 07:08:54
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv32408 Modified Files: Makefile.am browse.c mainwin.c search.c Log Message: * Added a progress bar window during GUI restoration to avoid long delays without visual feedback during startup. Index: Makefile.am =================================================================== RCS file: /cvsroot/gqclient/gq/src/Makefile.am,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Makefile.am 5 Oct 2003 22:25:07 -0000 1.27 --- Makefile.am 17 Oct 2003 07:07:05 -0000 1.28 *************** *** 44,47 **** --- 44,48 ---- xmlparse.c \ xmlutil.c \ + progress.c \ state.c *************** *** 90,93 **** --- 91,95 ---- state.h \ xmlutil.h \ + progress.h \ COPYING.h Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** browse.c 13 Oct 2003 08:43:13 -0000 1.82 --- browse.c 17 Oct 2003 07:07:05 -0000 1.83 *************** *** 1,6 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! Parts: Copyright (C) 2002 Peter Stamfest <pe...@st...> 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 ! Parts: Copyright (C) 2002-2003 Peter Stamfest <pe...@st...> This program is released under the Gnu General Public License with *************** *** 53,56 **** --- 53,58 ---- #include "state.h" #include "utf8-compat.h" + #include "progress.h" + #include "prefs.h" #ifdef BROWSER_DND *************** *** 1549,1553 **** } ! static void browse_restore_snapshot(char *state_name, struct tab *tab) { GtkCTree *ctree = BROWSETAB(tab)->ctreeroot; --- 1551,1556 ---- } ! static void browse_restore_snapshot(char *state_name, struct tab *tab, ! struct pbar_win *progress) { GtkCTree *ctree = BROWSETAB(tab)->ctreeroot; *************** *** 1567,1574 **** long type = strtol(s, &ep, 10); if (c == ep) { switch(type) { case DN_BROWSE_ENTRY: ! node = show_dn(ctree, node, c + 1, TRUE); break; case REF_BROWSE_ENTRY: --- 1570,1583 ---- long type = strtol(s, &ep, 10); + if (progress->cancelled) break; + + if (progress) { + update_progress(progress, _("Opening %s"), c + 1); + } + if (c == ep) { switch(type) { case DN_BROWSE_ENTRY: ! node = show_dn(ctree, node, c + 1, FALSE); break; case REF_BROWSE_ENTRY: *************** *** 1582,1591 **** case SERVER_BROWSE_ENTRY: server = server_by_name(c + 1); ! node = tree_node_from_server_dn(ctree, server, ""); break; default: break; } } } if (node) gtk_ctree_select(ctree, node); --- 1591,1608 ---- case SERVER_BROWSE_ENTRY: server = server_by_name(c + 1); ! if (server != NULL) { ! node = tree_node_from_server_dn(ctree, server, ! ""); ! } else { ! /* FIXME - popup error? */ ! node = NULL; ! } break; default: + node = NULL; break; } } + if (node == NULL) break; } if (node) gtk_ctree_select(ctree, node); *************** *** 2042,2045 **** --- 2059,2070 ---- close_connection(server, FALSE); + } else { + /* ERROR - cannot open connection to server, + either it was just restarted or the server is + down. In order to not prolong the time for + deeply nested DNs to finally fail just break + out of this DN parts loop. + */ + break; } } Index: mainwin.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/mainwin.c,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** mainwin.c 12 Oct 2003 06:22:57 -0000 1.44 --- mainwin.c 17 Oct 2003 07:07:06 -0000 1.45 *************** *** 47,50 **** --- 47,51 ---- #include "input.h" #include "state.h" + #include "progress.h" #include "../icons/logo.xpm" *************** *** 116,124 **** int i, type; char tmp[32]; if (!config->restore_tabs) return FALSE; - if (!exists_entity("mainwin.tabs")) return FALSE; for (i = 0 ; ; i++) { snprintf(tmp, sizeof(tmp), "mainwin.tabs.%d", i); --- 117,128 ---- int i, type; char tmp[32]; + struct pbar_win *pw = NULL; if (!config->restore_tabs) return FALSE; if (!exists_entity("mainwin.tabs")) return FALSE; + pw = create_progress_bar_in_window(_("Restoring last GUI state")); + update_progress(pw, _("Restoring tabs")); + for (i = 0 ; ; i++) { snprintf(tmp, sizeof(tmp), "mainwin.tabs.%d", i); *************** *** 129,136 **** if (tab->vtab && tab->vtab->restore_snapshot) { ! tab->vtab->restore_snapshot(tmp, tab); } } ! } --- 133,141 ---- if (tab->vtab && tab->vtab->restore_snapshot) { ! tab->vtab->restore_snapshot(tmp, tab, pw); } } ! update_progress(pw, NULL); ! if (pw->cancelled) break; } *************** *** 138,144 **** type = state_value_get_int("mainwin.tabs", "active", -1); gtk_notebook_set_page(GTK_NOTEBOOK(win->mainbook), type); - return TRUE; } ! return FALSE; } --- 143,152 ---- type = state_value_get_int("mainwin.tabs", "active", -1); gtk_notebook_set_page(GTK_NOTEBOOK(win->mainbook), type); } ! ! update_progress(pw, _("Restoring tabs")); ! free_progress(pw); ! ! return i > 0; } Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** search.c 17 Oct 2003 05:26:23 -0000 1.52 --- search.c 17 Oct 2003 07:07:07 -0000 1.53 *************** *** 76,80 **** ! static void search_restore_snapshot(char *state_name, struct tab *tab) { struct ldapserver *server; --- 76,81 ---- ! static void search_restore_snapshot(char *state_name, struct tab *tab, ! struct pbar_win *progress) { struct ldapserver *server; |
From: <sta...@us...> - 2003-10-17 07:08:19
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv32275 Added Files: progress.c progress.h Log Message: * Added a progress bar window during GUI restoration to avoid long delays without visual feedback during startup. --- NEW FILE: progress.c --- /* GQ -- a GTK-based LDAP client is Copyright (C) 1998-2003 Bert Vermeulen Copyright (C) 2002-2003 Peter Stamfest This file is Copyright (c) 2003 by Peter Stamfest <pe...@st...> This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: progress.c,v 1.1 2003/10/17 07:07:00 stamfest Exp $ */ #include "config.h" #include <stdio.h> #include <stdarg.h> #include "common.h" #include "progress.h" #include "util.h" #include "i18n.h" #include "input.h" static void pbar_cancelled(GtkWidget *button, struct pbar_win *w) { w->cancelled = TRUE; gtk_widget_destroy(w->win); } static void pbar_destroyed(GtkWidget *button, struct pbar_win *w) { w->destroyed = TRUE; } struct pbar_win *create_progress_bar_in_window(const char *title) { GtkWidget *popupwin, *vbox1, *vbox2, *pbar, *label; GtkWidget *hbox0, *hbox1, *button; #if GTK_MAJOR >= 2 GtkWidget *image; GtkIconSet *iconset; #endif struct pbar_win *w = g_malloc0(sizeof(struct pbar_win)); /* FIXME: free me */ w->win = popupwin = gtk_dialog_new(); /* gtk_window_set_default_size(popupwin, 500, 50); */ gtk_signal_connect(GTK_OBJECT(popupwin), "destroy", GTK_SIGNAL_FUNC(pbar_destroyed), w); gtk_widget_realize(popupwin); gtk_window_set_title(GTK_WINDOW(popupwin), title); gtk_window_set_policy(GTK_WINDOW(popupwin), FALSE, FALSE, FALSE); vbox1 = GTK_DIALOG(popupwin)->vbox; gtk_widget_show(vbox1); hbox1 = gtk_hbox_new(FALSE, 0); gtk_container_border_width(GTK_CONTAINER(hbox1), CONTAINER_BORDER_WIDTH); gtk_widget_show(hbox1); gtk_box_pack_start(GTK_BOX(vbox1), hbox1, FALSE, FALSE, 0); #if GTK_MAJOR >= 2 iconset = gtk_style_lookup_icon_set(gtk_widget_get_style(popupwin), GTK_STOCK_DIALOG_INFO); image = gtk_image_new_from_icon_set(iconset, GTK_ICON_SIZE_DIALOG); gtk_widget_show(image); gtk_box_pack_start(GTK_BOX(hbox1), image, FALSE, FALSE, 0); #endif vbox1 = gtk_vbox_new(FALSE, 0); gtk_box_pack_end(GTK_BOX(hbox1), vbox1, TRUE, TRUE, 0); gtk_widget_show(vbox1); w->pbar = pbar = gtk_progress_bar_new(); gtk_box_pack_start(GTK_BOX(vbox1), pbar, FALSE, FALSE, 0); gtk_progress_set_activity_mode(GTK_PROGRESS(pbar), TRUE); #if GTK_MAJOR >= 2 gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(pbar), 0.333333333333); #else gtk_progress_bar_set_activity_step(GTK_PROGRESS_BAR(pbar), 30); #endif gtk_widget_show(pbar); w->label = label = gtk_label_new(""); gtk_box_pack_start(GTK_BOX(vbox1), label, FALSE, FALSE, 0); gtk_widget_show(label); vbox2 = GTK_DIALOG(popupwin)->action_area; gtk_widget_show(vbox2); hbox0 = gtk_hbutton_box_new(); gtk_container_border_width(GTK_CONTAINER(hbox0), 0); gtk_box_pack_end(GTK_BOX(vbox2), hbox0, TRUE, FALSE, 0); gtk_widget_show(hbox0); #if GTK_MAJOR >= 2 button = gtk_button_new_from_stock(GTK_STOCK_CANCEL); #else button = gq_button_new_with_label(_("_Cancel")); #endif gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pbar_cancelled), w); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_box_pack_start(GTK_BOX(hbox0), button, TRUE, TRUE, 0); gtk_widget_grab_default(button); gtk_widget_show(button); gtk_widget_show(popupwin); return w; } void update_progress(struct pbar_win *w, const char *msg_fmt, ...) { if (!w->destroyed) { if (msg_fmt) { char msg[1024]; va_list ap; va_start(ap, msg_fmt); vsnprintf(msg, sizeof(msg), msg_fmt, ap); va_end(ap); gtk_label_set_text(GTK_LABEL(w->label), msg); } #if GTK_MAJOR >= 2 gtk_progress_bar_pulse(GTK_PROGRESS_BAR(w->pbar)); #else gtk_progress_set_percentage(GTK_PROGRESS(w->pbar), 0.5); #endif while (gtk_events_pending()) { gtk_main_iteration(); } } } void free_progress(struct pbar_win *w) { if (!w->destroyed) { gtk_widget_destroy(w->win); /* FIXME: first check if destroyed */ } g_free(w); } --- NEW FILE: progress.h --- /* GQ -- a GTK-based LDAP client Copyright (C) 1998-2003 Bert Vermeulen Copyright (C) 2002-2003 by Peter Stamfest This program is released under the Gnu General Public License with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: progress.h,v 1.1 2003/10/17 07:07:01 stamfest Exp $ */ #ifndef GQ_PROGRESS_H_INCLUDED #define GQ_PROGRESS_H_INCLUDED #include "config.h" #include <gtk/gtk.h> struct pbar_win { GtkWidget *win; GtkWidget *pbar; GtkWidget *label; gboolean destroyed; gboolean cancelled; }; struct pbar_win *create_progress_bar_in_window(const char *title); void update_progress(struct pbar_win *w, const char *msg_fmt, ...); void free_progress(struct pbar_win *w); #endif /* Local Variables: c-basic-offset: 4 End: */ |
From: <sta...@us...> - 2003-10-17 06:52:50
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv30556 Modified Files: common.h configfile.c configfile.h gq-xml.c prefs.c util.c util.h Log Message: * Added a "canonical name" to the struct ldapserver. This is the LDAP URL of the server inclluding the port. It is always possible to generate such a canonical name. This makes it possible to find the proper user settings for a server a referral points to if the referred-to server is one that is used by the user anyway. To maintain the internal state of the ldapserver struct the canonicalize_ldapserver function should be called whenever the data concerning the ldapserver change. Index: common.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/common.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** common.h 17 Oct 2003 05:47:49 -0000 1.28 --- common.h 17 Oct 2003 06:52:39 -0000 1.29 *************** *** 1,5 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 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 *************** *** 89,92 **** --- 90,101 ---- int show_ref; int hide_internal; + + /* the canonical name of the host. Essentially this is the + corresponding LDAP URI for the ldaphost/port combination - + maintained through canonicalize_ldapserver() */ + char *canon_name; + + /* a flag indicating if ldaphost seems to be a URI or not */ + int is_uri; LDAP *connection; Index: configfile.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.c,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** configfile.c 17 Oct 2003 06:40:25 -0000 1.43 --- configfile.c 17 Oct 2003 06:52:39 -0000 1.44 *************** *** 101,104 **** --- 101,109 ---- newserver->hide_internal = DEFAULT_HIDE_INTERNAL; newserver->show_ref = DEFAULT_SHOW_REF; + + /* dynamic information */ + newserver->canon_name = g_strdup(""); + newserver->is_uri = 0; + newserver->connection = NULL; newserver->incarnation = 0; *************** *** 112,115 **** --- 117,175 ---- } + /* saves typing */ + #define DEEPCOPY(t,s,n) t->n = s->n ? g_strdup(s->n) : NULL + #define SHALLOWCOPY(t,s,n) t->n = s->n + void copy_ldapserver(struct ldapserver *target, + const struct ldapserver *source) + { + DEEPCOPY (target, source, name); + DEEPCOPY (target, source, ldaphost); + SHALLOWCOPY(target, source, ldapport); + DEEPCOPY (target, source, basedn); + DEEPCOPY (target, source, binddn); + DEEPCOPY (target, source, bindpw); + DEEPCOPY (target, source, pwencoding); + DEEPCOPY (target, source, enteredpw); + SHALLOWCOPY(target, source, bindtype); + DEEPCOPY (target, source, saslmechanism); + DEEPCOPY (target, source, searchattr); + SHALLOWCOPY(target, source, maxentries); + SHALLOWCOPY(target, source, cacheconn); + SHALLOWCOPY(target, source, enabletls); + SHALLOWCOPY(target, source, local_cache_timeout); + SHALLOWCOPY(target, source, ask_pw); + SHALLOWCOPY(target, source, hide_internal); + SHALLOWCOPY(target, source, show_ref); + + DEEPCOPY (target, source, canon_name); + SHALLOWCOPY(target, source, is_uri); + + target->connection = NULL; + target->incarnation = 0; + target->missing_closes = 0; + target->ss = NULL; + target->flags = 0; + target->version = LDAP_VERSION2; + target->server_down = 0; + } + + void canonicalize_ldapserver(struct ldapserver *server) + { + /* FIXME: should use better URI check */ + server->is_uri = g_utf8_strchr(server->ldaphost, -1, ':') != NULL; + + if (server->is_uri) { + g_free_and_dup(server->canon_name, server->ldaphost); + } else { + /* construct an LDAP URI */ + GString *str = g_string_sized_new(100); + g_string_sprintf(str, "ldap://%s:%d/", + server->ldaphost, server->ldapport); + g_free_if(server->canon_name); + server->canon_name = str->str; + g_string_free(str, FALSE); + } + } + void free_ldapserver(struct ldapserver *server) { *************** *** 127,130 **** --- 187,192 ---- g_free_if(server->saslmechanism); g_free_if(server->searchattr); + + g_free_if(server->canon_name); g_free(server); Index: configfile.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** configfile.h 17 Oct 2003 06:40:27 -0000 1.30 --- configfile.h 17 Oct 2003 06:52:39 -0000 1.31 *************** *** 152,156 **** --- 152,167 ---- struct ldapserver *new_ldapserver(void); + void copy_ldapserver(struct ldapserver *target, + const struct ldapserver *source); void free_ldapserver(struct ldapserver *server); + + /* canonicalize_ldapserver - to be called whenever the server-related + information gets changed for the server in order to recalculate + some dependent information. Eg. a change to the ldaphost might + change the fact that a server get specified via an ldap URI or + not. Another example is the change of the ldaphost causing a change + to the canonical name of the server. This is where the name + originated. */ + void canonicalize_ldapserver(struct ldapserver *server); char *homedir(void); Index: gq-xml.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/gq-xml.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gq-xml.c 11 Oct 2003 21:47:51 -0000 1.5 --- gq-xml.c 17 Oct 2003 06:52:39 -0000 1.6 *************** *** 291,295 **** } ! c->servers = g_list_append(c->servers, e->data); e->data = NULL; --- 291,296 ---- } ! canonicalize_ldapserver(server); ! c->servers = g_list_append(c->servers, server); e->data = NULL; Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** prefs.c 13 Oct 2003 07:31:45 -0000 1.42 --- prefs.c 17 Oct 2003 06:52:39 -0000 1.43 *************** *** 327,330 **** --- 327,331 ---- cached connection */ close_connection(server, TRUE); + canonicalize_ldapserver(server); if(server_name_changed) { Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** util.c 17 Oct 2003 05:26:23 -0000 1.72 --- util.c 17 Oct 2003 06:52:39 -0000 1.73 *************** *** 1,7 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! Parts: Copyright (C) 2002 Bert Vermeulen and ! Peter Stamfest <pe...@st...> 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 *************** *** 842,845 **** --- 841,867 ---- } + + /* + * return pointer to (struct ldapserver *) matching the canonical name + */ + struct ldapserver *server_by_canon_name(const char *name) + { + struct ldapserver *server; + GList *I; + + if(name == NULL || name[0] == '\0') + return NULL; + + for (I = config->servers ; I ; I = g_list_next(I)) { + server = (struct ldapserver *) I->data; + if(!strcmp(server->canon_name, name)) + return(server); + } + return NULL; + } + + gboolean is_transient_server(const struct ldapserver *server) { + return g_list_find(config->servers, server) == NULL; + } /* Index: util.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** util.h 9 Oct 2003 05:26:20 -0000 1.24 --- util.h 17 Oct 2003 06:52:39 -0000 1.25 *************** *** 1,6 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 Bert Vermeulen ! Copyright (C) 2002 Bert Vermeulen and Peter Stamfest <pe...@st...> 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 *************** *** 82,85 **** --- 82,90 ---- struct ldapserver *server_by_name(const char *name); + struct ldapserver *server_by_canon_name(const char *name); + + /* returns TRUE if server is NOT in the config ldapserver list */ + gboolean is_transient_server(const struct ldapserver *server); + int is_leaf_entry(struct ldapserver *server, char *dn); gboolean is_direct_parent(char *child, char *possible_parent); |
From: <sta...@us...> - 2003-10-17 06:40:37
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv28868 Modified Files: configfile.c configfile.h ldif.c Log Message: * Made some static, global and unchangeable data const to express this more clearly. * Compress some data by using char (usually one byte) instead of int (4 bytes) Index: configfile.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.c,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** configfile.c 12 Oct 2003 11:10:41 -0000 1.42 --- configfile.c 17 Oct 2003 06:40:25 -0000 1.43 *************** *** 53,57 **** struct gq_config *config; ! struct tokenlist token_searchargument[] = { { SEARCHARG_BEGINS_WITH, "Begins with" }, { SEARCHARG_ENDS_WITH, "Ends with" }, --- 53,57 ---- struct gq_config *config; ! const struct tokenlist token_searchargument[] = { { SEARCHARG_BEGINS_WITH, "Begins with" }, { SEARCHARG_ENDS_WITH, "Ends with" }, *************** *** 61,65 **** }; ! struct tokenlist token_bindtype[] = { { BINDTYPE_SIMPLE, "Simple" }, { BINDTYPE_KERBEROS, "Kerberos"}, --- 61,65 ---- }; ! const struct tokenlist token_bindtype[] = { { BINDTYPE_SIMPLE, "Simple" }, { BINDTYPE_KERBEROS, "Kerberos"}, *************** *** 68,72 **** }; ! struct tokenlist token_ldifformat[] = { { LDIF_UMICH, "UMich" }, { LDIF_V1, "Version1" }, --- 68,72 ---- }; ! const struct tokenlist token_ldifformat[] = { { LDIF_UMICH, "UMich" }, { LDIF_V1, "Version1" }, Index: configfile.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/configfile.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** configfile.h 12 Oct 2003 05:30:41 -0000 1.29 --- configfile.h 17 Oct 2003 06:40:27 -0000 1.30 *************** *** 168,174 **** extern struct gq_config *config; ! extern struct tokenlist token_bindtype[]; ! extern struct tokenlist token_ldifformat[]; ! extern struct tokenlist token_searchargument[]; #endif --- 168,174 ---- extern struct gq_config *config; ! extern const struct tokenlist token_bindtype[]; ! extern const struct tokenlist token_ldifformat[]; ! extern const struct tokenlist token_searchargument[]; #endif Index: ldif.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/ldif.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ldif.c 28 Sep 2003 23:13:09 -0000 1.14 --- ldif.c 17 Oct 2003 06:40:27 -0000 1.15 *************** *** 1,5 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 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 *************** *** 183,191 **** } void b64_encode(GString *out, char *value, int vlen) { int i,j; - char ch[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char chin[4], chout[5]; --- 184,192 ---- } + static const char ch[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; void b64_encode(GString *out, char *value, int vlen) { int i,j; char chin[4], chout[5]; *************** *** 206,210 **** j = 0; } - } --- 207,210 ---- *************** *** 214,222 **** chout[3] = '='; g_string_append(out, chout); - } ! static int decode[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, --- 214,221 ---- chout[3] = '='; g_string_append(out, chout); } ! static const signed char decode[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, *************** *** 242,262 **** 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, -1, -1, -1, -1, -1, - - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, }; --- 241,244 ---- *************** *** 288,292 **** for (i = 0 ; i < vlen ; i++) { ! c = value[i]; if (c == '=') eq++; --- 270,275 ---- for (i = 0 ; i < vlen ; i++) { ! if (value[i] & 0x80) continue; ! c = value[i] & 0x7f; if (c == '=') eq++; |
From: <sta...@us...> - 2003-10-17 06:31:21
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv27821 Modified Files: debug.c debug.h errorchain.c Log Message: * Added a new debug flag GQ_DEBUG_ERROR_TRACE (64) to be used together with GQ_DEBUG_ERROR_LINE (1) to include a stack trace with error messages. Convenient to to used for debugging using the -d commandline switch Index: debug.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/debug.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** debug.c 13 Oct 2003 07:30:19 -0000 1.8 --- debug.c 17 Oct 2003 06:31:16 -0000 1.9 *************** *** 1,5 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 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 *************** *** 26,29 **** --- 27,32 ---- #include <stdio.h> + #include "config.h" + #ifdef HAVE_BACKTRACE # include <execinfo.h> *************** *** 167,175 **** #endif /* HAVE_MALLINFO */ /* taken from the documentation of the GNU libc */ void print_trace(void) { - #ifdef HAVE_BACKTRACE void *array[200]; size_t size; --- 170,198 ---- #endif /* HAVE_MALLINFO */ + #ifdef HAVE_BACKTRACE + + /* taken from the documentation of the GNU libc */ + void sprint_trace(GString *str) + { + void *array[200]; + size_t size; + char **strings; + size_t i; + + size = backtrace(array, (sizeof(array) / sizeof(array[0])) ); + strings = backtrace_symbols(array, size); + + if (strings) { + for (i = 0; i < size; i++) { + g_string_append(str, strings[i]); + g_string_append(str, "\n"); + } + free(strings); + } + } /* taken from the documentation of the GNU libc */ void print_trace(void) { void *array[200]; size_t size; *************** *** 188,199 **** free(strings); } - #endif /* BACKTRACE */ } ! #else void print_trace(void) { } #endif /* DEBUG */ --- 211,226 ---- free(strings); } } + #else /* BACKTRACE */ ! void sprint_trace(GString *str) ! { ! } void print_trace(void) { } + + #endif /* BACKTRACE */ #endif /* DEBUG */ Index: debug.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/debug.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** debug.h 13 Oct 2003 07:30:19 -0000 1.6 --- debug.h 17 Oct 2003 06:31:16 -0000 1.7 *************** *** 1,5 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 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,43 **** --- 41,45 ---- #define GQ_DEBUG_ENCODE 16 #define GQ_DEBUG_SIGNALS 32 + #define GQ_DEBUG_ERROR_TRACE 64 #endif *************** *** 71,74 **** --- 73,77 ---- void print_trace(void); + void sprint_trace(GString *s); #endif Index: errorchain.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/errorchain.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** errorchain.c 9 Oct 2003 05:15:06 -0000 1.16 --- errorchain.c 17 Oct 2003 06:31:16 -0000 1.17 *************** *** 1,5 **** /* GQ -- a GTK-based LDAP client ! Copyright (C) 1998-2001 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 *************** *** 91,107 **** n = vsnprintf(str->str, a - 1, fmt, ap); ! #ifdef HAVE_C99_SNPRINTF if (n > a - 1) { g_string_free(str, TRUE); a = n + 2; str = g_string_sized_new(a); ! } ! #else ! if (n == -1) { g_string_free(str, TRUE); a *= 2; str = g_string_sized_new(a); } - #endif } while (n > (a - 1) || n == -1); --- 92,105 ---- n = vsnprintf(str->str, a - 1, fmt, ap); ! /* await both n==-1 and n > a -1 for not enough free space */ if (n > a - 1) { g_string_free(str, TRUE); a = n + 2; str = g_string_sized_new(a); ! } else if (n == -1) { g_string_free(str, TRUE); a *= 2; str = g_string_sized_new(a); } } while (n > (a - 1) || n == -1); *************** *** 129,140 **** if (debug & GQ_DEBUG_ERROR_LINE) { ! /* Is it allowed to change the fmt? */ ! int len = strlen(fmt) + strlen(file) + 100; ! char *s = g_malloc(len); ! snprintf(s, len, "%s:%d %s", file, line, fmt); ! error_push_production_v(context, s, ap); ! g_free(s); } else { error_push_production_v(context, fmt, ap); --- 127,141 ---- if (debug & GQ_DEBUG_ERROR_LINE) { + GString *s = g_string_sized_new(200); + g_string_sprintf(s, "%s:%d %s", file, line, fmt); ! if (debug & GQ_DEBUG_ERROR_TRACE) { ! g_string_append(s, "\n*** TRACE ***:\n"); ! sprint_trace(s); ! } ! /* Is it allowed to change the fmt? */ ! error_push_production_v(context, s->str, ap); ! g_string_free(s, TRUE); } else { error_push_production_v(context, fmt, ap); |
From: <sta...@us...> - 2003-10-17 06:29:29
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv27591 Modified Files: formfill.c input.c Log Message: * Statusbar messages start with an uppercase letter now Index: formfill.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/formfill.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** formfill.c 8 Oct 2003 22:01:08 -0000 1.38 --- formfill.c 17 Oct 2003 06:28:59 -0000 1.39 *************** *** 183,191 **** #if GTK_MAJOR >= 2 ! statusbar_msg(_("fetching %1$s from %2$s"), dn, server->name); #else { char *c = NULL; ! statusbar_msg(_("fetching %1$s from %2$s"), c = decoded_string(dn), server->name); if (c) free(c); --- 183,191 ---- #if GTK_MAJOR >= 2 ! statusbar_msg(_("Fetching %1$s from %2$s"), dn, server->name); #else { char *c = NULL; ! statusbar_msg(_("Fetching %1$s from %2$s"), c = decoded_string(dn), server->name); if (c) free(c); Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** input.c 13 Oct 2003 08:43:13 -0000 1.70 --- input.c 17 Oct 2003 06:28:59 -0000 1.71 *************** *** 1429,1436 **** #if GTK_MAJOR >= 2 ! statusbar_msg(_("modified %s"), olddn); #else c = decoded_string(olddn); ! statusbar_msg(_("modified %s"), c); if(c) free(c); #endif --- 1429,1436 ---- #if GTK_MAJOR >= 2 ! statusbar_msg(_("Modified %s"), olddn); #else c = decoded_string(olddn); ! statusbar_msg(_("Modified %s"), c); if(c) free(c); #endif *************** *** 1509,1515 **** if(!error) { #if GTK_MAJOR >= 2 ! statusbar_msg(_("modifying RDN to %s"), rdn[0]); #else ! statusbar_msg(_("modifying RDN to %s"), c = decoded_string(rdn[0])); if (c) free(c); --- 1509,1515 ---- if(!error) { #if GTK_MAJOR >= 2 ! statusbar_msg(_("Modifying RDN to %s"), rdn[0]); #else ! statusbar_msg(_("Modifying RDN to %s"), c = decoded_string(rdn[0])); if (c) free(c); |
From: <sta...@us...> - 2003-10-17 05:53:01
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv22151 Modified Files: browse-dnd.h browse.h common.h mainwin.h schemabrowse.h search.h Log Message: * Further cleanups - move the struct tab from common.h to mainwin.h (after all: tabs belong to the main window and nowhere else) Index: browse-dnd.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-dnd.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** browse-dnd.h 29 Sep 2003 19:24:15 -0000 1.4 --- browse-dnd.h 17 Oct 2003 05:47:49 -0000 1.5 *************** *** 33,36 **** --- 33,38 ---- #include "common.h" + #include "mainwin.h" /* struct tab */ + /* Flags used in new_dnd_refresh on top of the options for refresh_subtree_with_options. Thus these option values share the Index: browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** browse.h 13 Oct 2003 07:38:41 -0000 1.31 --- browse.h 17 Oct 2003 05:47:49 -0000 1.32 *************** *** 29,32 **** --- 29,33 ---- #include "common.h" + #include "mainwin.h" /* struct tab */ #define BROWSETAB(tab) (assert(tab->type == BROWSE_MODE), ((struct tab_browse *)tab->modeinfo)) Index: common.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/common.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** common.h 11 Oct 2003 21:47:51 -0000 1.27 --- common.h 17 Oct 2003 05:47:49 -0000 1.28 *************** *** 64,93 **** }; - #define SEARCH_MODE 1 - #define BROWSE_MODE 2 - #define SCHEMA_MODE 3 - - /* fwd decl */ - struct mainwin_data; - - struct tab; - - struct tab_vtab { - void (*save_snapshot)(char *state_name, struct tab *); - void (*restore_snapshot)(char *state_name, struct tab *); - }; - - struct tab { - int type; - struct mainwin_data *win; /* what window does this tab - belong to */ - GtkWidget *focus; - GtkWidget *content; /* what is the "content" - widget of the tab */ - void *modeinfo; - - struct tab_vtab *vtab; - }; - #define SERVER_HAS_NO_SCHEMA 1 --- 64,67 ---- Index: mainwin.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/mainwin.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mainwin.h 11 Oct 2003 21:35:29 -0000 1.20 --- mainwin.h 17 Oct 2003 05:47:49 -0000 1.21 *************** *** 48,51 **** --- 48,76 ---- }; + #define SEARCH_MODE 1 + #define BROWSE_MODE 2 + #define SCHEMA_MODE 3 + + struct tab; + struct pbar_win; + + struct tab_vtab { + void (*save_snapshot)(char *state_name, struct tab *); + void (*restore_snapshot)(char *state_name, struct tab *, + struct pbar_win *progress); + }; + + struct tab { + int type; + struct mainwin_data *win; /* what window does this tab + belong to */ + GtkWidget *focus; + GtkWidget *content; /* what is the "content" + widget of the tab */ + void *modeinfo; + + struct tab_vtab *vtab; + }; + extern struct mainwin_data mainwin; *************** *** 56,70 **** void fill_serverlist_combo(GtkWidget *combo); void cleanup(struct mainwin_data *win); - void gq_exit(GtkWidget *widget, struct mainwin_data *win); void create_mainwin(struct mainwin_data *); struct tab *new_modetab(struct mainwin_data *, int mode); - void switchpage_refocus(GtkNotebook *notebook, GtkNotebookPage *page, - int pagenum, struct mainwin_data *win); void cleanup_all_tabs(struct mainwin_data *win); - void close_current_tab(struct mainwin_data *win); void cleanup_tab(struct tab *tab); void update_serverlist(struct mainwin_data *win); void create_license_window(void); - /* void close_license_window(GtkWidget *widget); */ GtkWidget *create_about_window(void); /* gboolean ctrl_b_hack(GtkWidget *widget, GdkEventKey *event, gpointer obj); */ --- 81,90 ---- Index: schemabrowse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/schemabrowse.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** schemabrowse.h 11 Oct 2003 21:35:30 -0000 1.11 --- schemabrowse.h 17 Oct 2003 05:47:49 -0000 1.12 *************** *** 31,34 **** --- 31,35 ---- #include "common.h" + #include "mainwin.h" /* struct tab */ #define SCHEMATAB(tab) (assert(tab->type == SCHEMA_MODE), (struct tab_schema *)tab->modeinfo) Index: search.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** search.h 11 Oct 2003 22:37:09 -0000 1.12 --- search.h 17 Oct 2003 05:47:49 -0000 1.13 *************** *** 28,31 **** --- 28,32 ---- #include "common.h" + #include "mainwin.h" #define SEARCHTAB(tab) (assert(tab->type == SEARCH_MODE), (struct tab_search *)tab->modeinfo) |
From: <sta...@us...> - 2003-10-17 05:51:57
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv21992 Modified Files: schema.c Log Message: * Statusbar message now all start with an uppercase letter Index: schema.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/schema.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** schema.c 13 Oct 2003 07:27:44 -0000 1.21 --- schema.c 17 Oct 2003 05:46:07 -0000 1.22 *************** *** 137,141 **** if(res == NULL) { ! statusbar_msg("%s", _("no schema information found")); close_connection(server, FALSE); return(NULL); --- 137,141 ---- if(res == NULL) { ! statusbar_msg("%s", _("No schema information found")); close_connection(server, FALSE); return(NULL); *************** *** 158,162 **** if(subschema == NULL) { ! statusbar_msg("%s", _("no schema information found")); close_connection(server, FALSE); return(NULL); --- 158,162 ---- if(subschema == NULL) { ! statusbar_msg("%s", _("No schema information found")); close_connection(server, FALSE); return(NULL); *************** *** 180,184 **** if(res == NULL) { ! statusbar_msg("%s", _("no schema information found")); close_connection(server, FALSE); return(NULL); --- 180,184 ---- if(res == NULL) { ! statusbar_msg("%s", _("No schema information found")); close_connection(server, FALSE); return(NULL); |
From: <sta...@us...> - 2003-10-17 05:29:49
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv20193 Modified Files: browse-dnd.c search.c util.c Log Message: * Improved error messages. Many messages now contain the name of the server for which an operation failed * Implemented proper server_by_name return value handling outside of server_by_name Index: browse-dnd.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse-dnd.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** browse-dnd.c 8 Oct 2003 22:01:04 -0000 1.14 --- browse-dnd.c 17 Oct 2003 05:26:23 -0000 1.15 *************** *** 535,539 **** printf("do_move_after_reception selhash=%08lx server=%s dn=%s\n", (unsigned long) selhash, ! (char*)g_hash_table_lookup(selhash, "nickname"), dn); } #endif --- 535,539 ---- printf("do_move_after_reception selhash=%08lx server=%s dn=%s\n", (unsigned long) selhash, ! (const char*)g_hash_table_lookup(selhash, "nickname"), dn); } #endif *************** *** 541,545 **** source_server = server_by_name(g_hash_table_lookup(selhash, "nickname")); if (source_server == NULL) { ! statusbar_msg(_("Could not find source server by its nickname!")); return; } --- 541,546 ---- source_server = server_by_name(g_hash_table_lookup(selhash, "nickname")); if (source_server == NULL) { ! statusbar_msg(_("Could not find source server by its nickname ('%s')!"), ! (const char*)g_hash_table_lookup(selhash, "nickname")); return; } *************** *** 722,731 **** { GtkCTreeNode *ctree_node; ! char *server = NULL, *dn = NULL; GHashTable *selhash = gtk_object_get_data(GTK_OBJECT(widget), "drag-and-selection-data"); ! server = g_hash_table_lookup(selhash, "nickname"); dn = g_hash_table_lookup(selhash, "dn"); --- 723,733 ---- { GtkCTreeNode *ctree_node; ! char *s = NULL, *dn = NULL; ! struct ldapserver *server; GHashTable *selhash = gtk_object_get_data(GTK_OBJECT(widget), "drag-and-selection-data"); ! s = g_hash_table_lookup(selhash, "nickname"); dn = g_hash_table_lookup(selhash, "dn"); *************** *** 736,746 **** drag_context->suggested_action, drag_context->action, ! server, dn ); } #endif ctree_node = tree_node_from_server_dn(GTK_CTREE(widget), ! server_by_name(server), dn); if (ctree_node) { --- 738,752 ---- drag_context->suggested_action, drag_context->action, ! s, dn ); } #endif + server = server_by_name(s); + if (!server) { + return; + } ctree_node = tree_node_from_server_dn(GTK_CTREE(widget), ! server, dn); if (ctree_node) { *************** *** 869,872 **** --- 875,884 ---- #endif + if (server == NULL) { + error_push(ctx, + _("Cannot find server by its nickname ('%s')"), + g_hash_table_lookup(selhash, "nickname")); + goto done; + } /* retrieve from server ... */ *************** *** 921,925 **** if (msg) ldap_msgfree(msg); close_connection(server, FALSE); ! error_flush(ctx); return; --- 933,937 ---- if (msg) ldap_msgfree(msg); close_connection(server, FALSE); ! done: error_flush(ctx); return; Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** search.c 14 Oct 2003 22:36:26 -0000 1.51 --- search.c 17 Oct 2003 05:26:23 -0000 1.52 *************** *** 538,547 **** cur_servername = gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(servcombo)->entry), 0, -1); server = server_by_name(cur_servername); - g_free(cur_servername); if(!server) { ! statusbar_msg(_("Oops! No server found!")); SEARCHTAB(tab)->search_lock = 0; return; } if( (ld = open_connection(server)) == NULL) { --- 538,548 ---- cur_servername = gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(servcombo)->entry), 0, -1); server = server_by_name(cur_servername); if(!server) { ! statusbar_msg(_("Oops! Server '%s' not found!"), cur_servername); ! g_free(cur_servername); SEARCHTAB(tab)->search_lock = 0; return; } + g_free(cur_servername); if( (ld = open_connection(server)) == NULL) { *************** *** 553,557 **** free(querystring); ! statusbar_msg(_("searching for %s"), filter); searchbase_combo = SEARCHTAB(tab)->searchbase_combo; --- 554,558 ---- free(querystring); ! statusbar_msg(_("Searching for %s"), filter); searchbase_combo = SEARCHTAB(tab)->searchbase_combo; Index: util.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/util.c,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** util.c 12 Oct 2003 11:10:41 -0000 1.71 --- util.c 17 Oct 2003 05:26:23 -0000 1.72 *************** *** 110,114 **** if(!ld) { error_push(open_context, ! _("Failed to initialize LDAP structure: %s."), ldap_err2string(rc)); } --- 110,115 ---- if(!ld) { error_push(open_context, ! _("Failed to initialize LDAP structure for server '%1$s': %2$s."), ! server->name, ldap_err2string(rc)); } *************** *** 116,120 **** ld = NULL; error_push(open_context, ! _("Sorry. No URI support available. Your LDAP toolkit does not support LDAP URIs.")); #endif } else { --- 117,122 ---- ld = NULL; error_push(open_context, ! _("Cannot connect to '%s'. No URI support available. Your LDAP toolkit does not support LDAP URIs."), ! server->name); #endif } else { *************** *** 122,126 **** if(!ld) { error_push(open_context, ! _("Failed to initialize LDAP structure: %s."), strerror(errno)); } --- 124,128 ---- if(!ld) { error_push(open_context, ! _("Failed to initialize LDAP structure for server %1$s: %2$s."), strerror(errno)); } *************** *** 161,165 **** if (server->version != LDAP_VERSION3) { error_push(open_context, ! _("Couldn't set protocol version to LDAPv3.")); } } --- 163,168 ---- if (server->version != LDAP_VERSION3) { error_push(open_context, ! _("Server '%s': Couldn't set protocol version to LDAPv3."), ! server->name); } } *************** *** 169,173 **** if(rc != LDAP_SUCCESS) { error_push(open_context, ! _("Couldn't enable TLS on the LDAP connection: %s"), ldap_err2string(rc)); push_ldap_addl_error(ld, open_context); --- 172,177 ---- if(rc != LDAP_SUCCESS) { error_push(open_context, ! _("Couldn't enable TLS on the LDAP connection to '%1$s': %2$s"), ! server->name, ldap_err2string(rc)); push_ldap_addl_error(ld, open_context); *************** *** 178,183 **** #else error_push(open_context, ! _("TLS was not found to be supported by your LDAP libraries.\n" ! "See README.TLS for more information.\n")); #endif /* defined(HAVE_TLS) */ } --- 182,188 ---- #else error_push(open_context, ! _("Cannot use TLS with server '%s'. TLS was not found to be supported by your LDAP libraries.\n" ! "See README.TLS for more information.\n"), ! server->name); #endif /* defined(HAVE_TLS) */ } *************** *** 189,194 **** #else error_push(open_context, ! _("OpenLDAP client-side caching was not enabled.\n" ! "See configure --help for more information.\n")); #endif } --- 194,201 ---- #else error_push(open_context, ! _("Cannot cache LDAP objects for server '%s'.\n" ! "OpenLDAP client-side caching was not enabled.\n" ! "See configure --help for more information.\n"), ! server->name); #endif } *************** *** 226,231 **** # else error_push(open_context, ! _("GQ was compiled without Kerberos support.\n" ! "Run 'configure --help' for more information\n")); statusbar_msg_clear(); ldap_unbind(ld); --- 233,240 ---- # else error_push(open_context, ! _("Cannot use Kerberos bind with '%s'.\n" ! "GQ was compiled without Kerberos support.\n" ! "Run 'configure --help' for more information\n"), ! server->name); statusbar_msg_clear(); ldap_unbind(ld); *************** *** 238,243 **** # else error_push(open_context, ! _("GQ was compiled without SASL support.\n" ! "Run 'configure --help' for more information\n")); statusbar_msg_clear(); ldap_unbind(ld); --- 247,254 ---- # else error_push(open_context, ! _("Cannot use SASL bind with '%s'.\n" ! "GQ was compiled without SASL support.\n" ! "Run 'configure --help' for more information\n"), ! server->name); statusbar_msg_clear(); ldap_unbind(ld); *************** *** 259,264 **** error_push(open_context, ! _("Couldn't bind LDAP connection: %s"), ! ldap_err2string(rc)); push_ldap_addl_error(ld, open_context); statusbar_msg_clear(); --- 270,275 ---- error_push(open_context, ! _("Couldn't bind LDAP connection to '%1$s': %2$s"), ! server->name, ldap_err2string(rc)); push_ldap_addl_error(ld, open_context); statusbar_msg_clear(); *************** *** 292,296 **** if (rc != LDAP_OPT_SUCCESS ) { error_push(open_context, ! _("Could not set critical ManageDSAit control")); push_ldap_addl_error(ld, open_context); --- 303,307 ---- if (rc != LDAP_OPT_SUCCESS ) { error_push(open_context, ! _("Could not set critical ManageDSAit control on connection to server '%s'."), server->name); push_ldap_addl_error(ld, open_context); *************** *** 340,344 **** message = g_string_sized_new(128); g_string_sprintf(message, ! _("Password for server %s"), server->ldaphost); if (query_popup(message->str, &ret, TRUE /* is_password */)) { --- 351,355 ---- message = g_string_sized_new(128); g_string_sprintf(message, ! _("Password for server %s"), server->name); if (query_popup(message->str, &ret, TRUE /* is_password */)) { *************** *** 358,364 **** if(server->ldapport == 389) { ! statusbar_msg(_("connecting to %s"), server->ldaphost); } else { ! statusbar_msg(_("connecting to %1$s port %2$d"), server->ldaphost, server->ldapport); } --- 369,375 ---- if(server->ldapport == 389) { ! statusbar_msg(_("Connecting to %s"), server->ldaphost); } else { ! statusbar_msg(_("Connecting to %1$s port %2$d"), server->ldaphost, server->ldapport); } *************** *** 533,537 **** } ! statusbar_msg(_("deleting: %s"), dn); msg = ldap_delete_s(ld, dn); --- 544,548 ---- } ! statusbar_msg(_("Deleting: %s"), dn); msg = ldap_delete_s(ld, dn); *************** *** 543,547 **** GString *message = g_string_sized_new(128); g_string_sprintf(message, ! "%s: %s", dn, ldap_err2string(msg)); error_popup(_("Error deleting entry"), message->str); g_string_free(message, TRUE); --- 554,559 ---- GString *message = g_string_sized_new(128); g_string_sprintf(message, ! "Error deleting DN '%1$s' on '%2$s': %3$s", ! dn, server->name, ldap_err2string(msg)); error_popup(_("Error deleting entry"), message->str); g_string_free(message, TRUE); *************** *** 549,553 **** } else { ! statusbar_msg(_("deleted %s"), dn); } --- 561,565 ---- } else { ! statusbar_msg(_("Deleted %s"), dn); } *************** *** 827,836 **** } - /* XXX - This needs to be gotten rid of, and instead have the appropriate - errors generated in the code that depends on server_by_name. - -- a7r - */ - error_popup(_("Error finding server"), _("Server not configured.")); - return(NULL); } --- 839,842 ---- *************** *** 855,859 **** } ! statusbar_msg(_("checking subtree for %s"), dn); msg = ldap_search(ld, dn, LDAP_SCOPE_ONELEVEL, "(objectclass=*)", --- 861,865 ---- } ! statusbar_msg(_("Checking subtree for %s"), dn); msg = ldap_search(ld, dn, LDAP_SCOPE_ONELEVEL, "(objectclass=*)", *************** *** 1548,1552 **** /* try LDAP V3 style config */ ! statusbar_msg(_("base search on NULL DN")); msg = ldap_search_s(ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", ldapv3_config, 0, &res); --- 1554,1558 ---- /* try LDAP V3 style config */ ! statusbar_msg(_("Base search on NULL DN")); msg = ldap_search_s(ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", ldapv3_config, 0, &res); *************** *** 1573,1577 **** if(num_suffixes == 0) { /* try Umich style config */ ! statusbar_msg(_("base search on cn=config")); msg = ldap_search_s(ld, "cn=config", LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, &res); --- 1579,1583 ---- if(num_suffixes == 0) { /* try Umich style config */ ! statusbar_msg(_("Base search on cn=config")); msg = ldap_search_s(ld, "cn=config", LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, &res); |
From: <sta...@us...> - 2003-10-16 21:30:09
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv16279 Modified Files: utf8-compat.h Log Message: * Fixed a very stupid typo causing .gq and .gq-state to be non-UTF-8 after writing, causing problems when reading those files later on. Index: utf8-compat.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/utf8-compat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utf8-compat.h 5 Oct 2003 13:50:24 -0000 1.2 --- utf8-compat.h 16 Oct 2003 21:30:05 -0000 1.3 *************** *** 50,55 **** #endif ! ! #ifndef HAVE_G_STRING_APPEND_UNICODE # define g_string_append_unichar g_string_append_c #endif --- 50,54 ---- #endif ! #ifndef HAVE_G_STRING_APPEND_UNICHAR # define g_string_append_unichar g_string_append_c #endif |
From: <bi...@us...> - 2003-10-14 22:36:29
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv16194 Modified Files: search.c Log Message: also fix today's sloppiness. compiles now. doh. Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** search.c 14 Oct 2003 22:28:39 -0000 1.50 --- search.c 14 Oct 2003 22:36:26 -0000 1.51 *************** *** 62,68 **** { GList *hist; ! const char *tmp; ! *hist = SEARCHTAB(tab)->history; if (hist) { state_value_set_list(state_name, "history", hist); --- 62,68 ---- { GList *hist; ! char *tmp; ! hist = SEARCHTAB(tab)->history; if (hist) { state_value_set_list(state_name, "history", hist); |
From: <bi...@us...> - 2003-10-14 22:28:45
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv14250 Modified Files: search.c state.c state.h Log Message: fix yesterday's sloppiness :) Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** search.c 14 Oct 2003 07:33:25 -0000 1.49 --- search.c 14 Oct 2003 22:28:39 -0000 1.50 *************** *** 61,70 **** static void search_save_snapshot(char *state_name, struct tab *tab) { ! GList *hist = SEARCHTAB(tab)->history; if (hist) { state_value_set_list(state_name, "history", hist); } ! state_value_set_string(state_name, "lastserver", gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(SEARCHTAB(tab)->serverlist_combo)->entry), 0, -1)); } --- 61,75 ---- static void search_save_snapshot(char *state_name, struct tab *tab) { ! GList *hist; ! const char *tmp; ! ! *hist = SEARCHTAB(tab)->history; if (hist) { state_value_set_list(state_name, "history", hist); } ! tmp = gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(SEARCHTAB(tab)->serverlist_combo)->entry), 0, -1); ! state_value_set_string(state_name, "lastserver", tmp); ! g_free(tmp); } *************** *** 76,80 **** GList *searchhist, *list; int i; ! char *lastserver; lastserver = state_value_get_string(state_name, "lastserver", NULL); --- 81,85 ---- GList *searchhist, *list; int i; ! const char *lastserver; lastserver = state_value_get_string(state_name, "lastserver", NULL); Index: state.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/state.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** state.c 14 Oct 2003 07:33:25 -0000 1.6 --- state.c 14 Oct 2003 22:28:39 -0000 1.7 *************** *** 261,265 **** } ! char *state_value_get_string(const char *state_name, const char *value_name, const char *def) --- 261,265 ---- } ! const char *state_value_get_string(const char *state_name, const char *value_name, const char *def) Index: state.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/state.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** state.h 14 Oct 2003 07:33:26 -0000 1.4 --- state.h 14 Oct 2003 22:28:39 -0000 1.5 *************** *** 48,52 **** int n); ! char *state_value_get_string(const char *state_name, const char *value_name, const char *def); --- 48,52 ---- int n); ! const char *state_value_get_string(const char *state_name, const char *value_name, const char *def); |
From: <bi...@us...> - 2003-10-14 07:33:30
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv10434 Modified Files: search.c state.c state.h Log Message: save/restore last used server in search mode Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** search.c 13 Oct 2003 22:18:31 -0000 1.48 --- search.c 14 Oct 2003 07:33:25 -0000 1.49 *************** *** 65,68 **** --- 65,71 ---- state_value_set_list(state_name, "history", hist); } + + state_value_set_string(state_name, "lastserver", gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(SEARCHTAB(tab)->serverlist_combo)->entry), 0, -1)); + } *************** *** 70,74 **** static void search_restore_snapshot(char *state_name, struct tab *tab) { ! GList *searchhist; if (config->restore_search_history) { --- 73,95 ---- static void search_restore_snapshot(char *state_name, struct tab *tab) { ! struct ldapserver *server; ! GList *searchhist, *list; ! int i; ! char *lastserver; ! ! lastserver = state_value_get_string(state_name, "lastserver", NULL); ! if(lastserver && lastserver[0]) { ! i = 0; ! list = config->servers; ! while(list) { ! server = (struct ldapserver *) list->data; ! if(!strcasecmp(server->name, lastserver)) { ! gtk_list_select_item(GTK_LIST(GTK_COMBO(SEARCHTAB(tab)->serverlist_combo)->list), i); ! break; ! } ! i++; ! list = list->next; ! } ! } if (config->restore_search_history) { Index: state.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/state.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** state.c 12 Oct 2003 05:30:41 -0000 1.5 --- state.c 14 Oct 2003 07:33:25 -0000 1.6 *************** *** 261,265 **** } ! const char *state_value_get_string(const char *state_name, const char *value_name, const char *def) --- 261,265 ---- } ! char *state_value_get_string(const char *state_name, const char *value_name, const char *def) Index: state.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/state.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** state.h 11 Oct 2003 22:34:18 -0000 1.3 --- state.h 14 Oct 2003 07:33:26 -0000 1.4 *************** *** 48,52 **** int n); ! const char *state_value_get_string(const char *state_name, const char *value_name, const char *def); --- 48,52 ---- int n); ! char *state_value_get_string(const char *state_name, const char *value_name, const char *def); |
From: <bi...@us...> - 2003-10-13 22:19:18
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv24583/src Modified Files: search.c Log Message: if a searchterm already exists in search history, move it up start with a blank search entry box, not the last query Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** search.c 12 Oct 2003 06:14:18 -0000 1.47 --- search.c 13 Oct 2003 22:18:31 -0000 1.48 *************** *** 70,87 **** static void search_restore_snapshot(char *state_name, struct tab *tab) { if (config->restore_search_history) { const GList *hist = state_value_get_list(state_name, "history"); if (hist) { const GList *I; for (I = hist ; I ; I = g_list_next(I)) { ! SEARCHTAB(tab)->history = ! g_list_append(SEARCHTAB(tab)->history, ! g_strdup(I->data)); } ! gtk_combo_set_popdown_strings(GTK_COMBO(SEARCHTAB(tab)->search_combo), ! SEARCHTAB(tab)->history); ! } } } --- 70,91 ---- static void search_restore_snapshot(char *state_name, struct tab *tab) { + GList *searchhist; + if (config->restore_search_history) { const GList *hist = state_value_get_list(state_name, "history"); if (hist) { const GList *I; + + searchhist = SEARCHTAB(tab)->history; for (I = hist ; I ; I = g_list_next(I)) { ! searchhist = g_list_append(searchhist, g_strdup(I->data)); } ! searchhist = g_list_insert(searchhist, "", 0); ! gtk_combo_set_popdown_strings(GTK_COMBO(SEARCHTAB(tab)->search_combo), searchhist); ! searchhist = g_list_remove(searchhist, searchhist->data); ! SEARCHTAB(tab)->history = searchhist; } } + } *************** *** 440,444 **** { gchar *searchterm; ! GList *list, *last; list = SEARCHTAB(tab)->history; --- 444,448 ---- { gchar *searchterm; ! GList *list, *last, *item; list = SEARCHTAB(tab)->history; *************** *** 448,451 **** --- 452,462 ---- } else { + /* if this searchterm is already in history, delete it first */ + item = g_list_find_custom(list, searchterm, (GCompareFunc) strcasecmp); + if(item) { + g_free(item->data); + list = g_list_remove(list, item->data); + } + list = g_list_insert(list, searchterm, 0); if(g_list_length(list) > MAX_SEARCH_HISTORY_LENGTH) { |
From: <sta...@us...> - 2003-10-13 08:43:17
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv29583 Modified Files: browse.c input.c Log Message: * gtk 1 compilation fixes Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** browse.c 13 Oct 2003 07:38:40 -0000 1.81 --- browse.c 13 Oct 2003 08:43:13 -0000 1.82 *************** *** 52,55 **** --- 52,56 ---- #include "i18n.h" #include "state.h" + #include "utf8-compat.h" #ifdef BROWSER_DND Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** input.c 13 Oct 2003 07:29:18 -0000 1.69 --- input.c 13 Oct 2003 08:43:13 -0000 1.70 *************** *** 939,942 **** --- 939,945 ---- struct inputform *iform; GtkWidget* edit_window; + #if GTK_MAJOR < 2 + char *name; + #endif edit_window = stateful_gtk_window_new(GTK_WINDOW_TOPLEVEL, *************** *** 946,951 **** gtk_window_set_title(GTK_WINDOW(edit_window), dn); #else - char *name; - name = decoded_string(dn); gtk_window_set_title(GTK_WINDOW(edit_window), name); --- 949,952 ---- |
From: <sta...@us...> - 2003-10-13 07:49:20
|
Update of /cvsroot/gqclient/gq/po In directory sc8-pr-cvs1:/tmp/cvs-serv19652 Modified Files: de.po Log Message: * New translations Index: de.po =================================================================== RCS file: /cvsroot/gqclient/gq/po/de.po,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** de.po 11 Oct 2003 22:41:40 -0000 1.22 --- de.po 13 Oct 2003 07:49:16 -0000 1.23 *************** *** 6,11 **** msgstr "" "Project-Id-Version: gq 1.0\n" ! "POT-Creation-Date: 2003-10-11 23:55+0200\n" ! "PO-Revision-Date: 2003-10-11 23:57+0200\n" "Last-Translator: Peter Stamfest <pe...@st...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" --- 6,11 ---- msgstr "" "Project-Id-Version: gq 1.0\n" ! "POT-Creation-Date: 2003-10-13 09:41+0200\n" ! "PO-Revision-Date: 2003-10-13 09:47+0200\n" "Last-Translator: Peter Stamfest <pe...@st...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" *************** *** 34,37 **** --- 34,40 ---- msgstr "Suche Einträge direkt unter %s" + msgid "Showing referrals" + msgstr "Weiterleitungen _zeigen" + #, c-format msgid "One entry found (running)" *************** *** 116,119 **** --- 119,126 ---- msgstr "LDAP Protokoll Version" + #. URI + msgid "Referral URI" + msgstr "Weiterleitungs URI" + #, c-format msgid "One server found" *************** *** 943,947 **** msgid "If set then save and restore the state of the main window tabs." ! msgstr "Sollen die Registerkarten über Programmneustarts hinweg wiederhergestellt werden." msgid "subschemaSubentry search on root DSE" --- 950,967 ---- msgid "If set then save and restore the state of the main window tabs." ! msgstr "" ! "Sollen die Registerkarten über Programmneustarts hinweg wiederhergestellt " ! "werden." ! ! #. server didn't publish a schema, try the last resort ! #. schemaserver ! msgid "Using schema from last-resort schemaserver" ! msgstr "Benutze Schema von Fallback Server" ! ! msgid "Cannot find last-resort schema server" ! msgstr "Kann Fallback Schema Server nicht finden" ! ! msgid "Cannot obtain schema from last-resort schema server" ! msgstr "Kann Schema vom Fallback-Server nicht laden" msgid "subschemaSubentry search on root DSE" *************** *** 1093,1096 **** --- 1113,1120 ---- msgstr "Kein Browser verfügbar." + #, c-format + msgid "Failed to initialize LDAP structure: %s." + msgstr "Fehler bei der Initialisierung der LDAP Datenstruktur: %s" + msgid "" "Sorry. No URI support available. Your LDAP toolkit does not support LDAP " *************** *** 1099,1105 **** "Keine URI Unterstützung vorhanden. Das benutzte LDAP Toolkit unterstützt " "keine LDAP URIs." - - msgid "Failed to initialize LDAP structure." - msgstr "Fehler bei der Initialisierung der LDAP Datenstruktur" msgid "Couldn't set protocol version to LDAPv3." --- 1123,1126 ---- |
From: <sta...@us...> - 2003-10-13 07:48:53
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv19567 Modified Files: TODO Log Message: * Approaching 1.0! Only a few really important things are left. Index: TODO =================================================================== RCS file: /cvsroot/gqclient/gq/TODO,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** TODO 12 Oct 2003 05:51:41 -0000 1.38 --- TODO 13 Oct 2003 07:48:48 -0000 1.39 *************** *** 24,30 **** pool of free memory itself). ! * search mode: (peter) ! Take displaytypes into account when building the search result list. It does ! not make sense to show a jpegPhoto as a string... * Proper OpenLDAP 2.1 support, taking care of all DN-related issues wrt --- 24,29 ---- pool of free memory itself). ! * [1.x] search mode: (peter) - improve display type support. Will be ! done when the CList gets replaced with a gtk2 widget. * Proper OpenLDAP 2.1 support, taking care of all DN-related issues wrt *************** *** 68,71 **** --- 67,72 ---- an extensibleObject + * [1.x] Split browse.c into several files - it is > 2500 lines long now + ------------ ENHANCEMENTS *************** *** 78,83 **** * [1.0] Referral support ! - somehow indicate a referral in the browse tree and allow to ! follow it, maybe through the context menu? Configurable? * templates: allow defaults? --- 79,87 ---- * [1.0] Referral support ! - allow to specify bind dn/pw/method for followed referrals, currently ! only anonymous binds get used ! - Make context menu in browse mode node-type specify. Eg. the ! current context menu does not make sense for referral nodes or ! server nodes. * templates: allow defaults? *************** *** 140,143 **** --- 144,155 ---- FIXED BUGS / IMPLEMENTED ENHANCEMENTS ------------------------------------- + + * [1.0] Referral support + - somehow indicate a referral in the browse tree and allow to + follow it, maybe through the context menu? Configurable? + + * search mode: (peter) + Take displaytypes into account when building the search result list. It does + not make sense to show a jpegPhoto as a string... [rudimentary support] * [1.0] work towards gtk2 - mostly done, need the XML parser change |
From: <sta...@us...> - 2003-10-13 07:48:20
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv19467 Modified Files: ChangeLog Log Message: * Recent Changes Index: ChangeLog =================================================================== RCS file: /cvsroot/gqclient/gq/ChangeLog,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ChangeLog 11 Oct 2003 22:41:17 -0000 1.45 --- ChangeLog 13 Oct 2003 07:48:15 -0000 1.46 *************** *** 1,2 **** --- 1,12 ---- + 2003-10-12 Peter Stamfest <pe...@st...> + * Fixed color/style handling for gtk2 + * Made XML writing attribute aware + * Asure it compiles/works with gtk1 + * Initial support for referrals in browse mode + * Fixed state-persistency in browse mode to work through ref nodes + * dt_text: Fixed some crashing bugs and added code to specify the + number of lines shown + * Added some error diagnostics and debug stuff for development + (print_trace) 2003-10-11 Peter Stamfest <pe...@st...> * Fixed several search related bug reported by Bert through TODO |
From: <sta...@us...> - 2003-10-13 07:41:54
|
Update of /cvsroot/gqclient/gq In directory sc8-pr-cvs1:/tmp/cvs-serv18186 Modified Files: configure.in Log Message: * Added checks for the backtrace* functions needed to implement print_trace Index: configure.in =================================================================== RCS file: /cvsroot/gqclient/gq/configure.in,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** configure.in 11 Oct 2003 22:40:59 -0000 1.52 --- configure.in 13 Oct 2003 07:41:50 -0000 1.53 *************** *** 219,222 **** --- 219,223 ---- if test "$DEBUG" = "1" ; then AC_DEFINE(DEBUG,1,[Define if you want to enable some debugging features]) + AC_CHECK_FUNCS(backtrace backtrace_symbols) fi |
From: <sta...@us...> - 2003-10-13 07:38:45
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv17456 Modified Files: browse.c browse.h Log Message: * Implement persistency for browse tabs even through ref-nodes along the way by keeping the entire path to the currently opened node in the .gq-state file Index: browse.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.c,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** browse.c 12 Oct 2003 11:10:40 -0000 1.80 --- browse.c 13 Oct 2003 07:38:40 -0000 1.81 *************** *** 69,72 **** --- 69,106 ---- GtkCTreeNode *node); + static void record_path(struct tab *tab, browse_entry *entry, + GtkCTree *ctreeroot, GtkCTreeNode *node) + { + GtkCTreeRow *row; + browse_entry *e; + int type = -1; + + if (BROWSETAB(tab)->cur_path) { + g_list_foreach(BROWSETAB(tab)->cur_path, (GFunc) g_free, NULL); + g_list_free(BROWSETAB(tab)->cur_path); + } + + BROWSETAB(tab)->cur_path = NULL; + + for ( ; node ; node = row->parent ) { + row = GTK_CTREE_ROW(node); + e = (browse_entry *) gtk_ctree_node_get_row_data(ctreeroot, node); + + /* currently it is sufficient to keep changes in entry types only */ + if (e && e->type != type) { + GString *str = g_string_sized_new(128); + g_string_sprintf(str, "%d:%s", + e->type, e->base_methods->get_name(e, TRUE)); + + BROWSETAB(tab)->cur_path = + g_list_insert(BROWSETAB(tab)->cur_path, str->str, 0); + + g_string_free(str, FALSE); + + type = e->type; + } + } + } + /* A GtkDestroyNotify callback to be used as a destroy function for browse_entry objects attached to gtk objects */ *************** *** 409,416 **** dn = entry->dn; ! g_string_assign(BROWSETAB(tab)->cur_dn, dn); ctreeroot = BROWSETAB(tab)->ctreeroot; - BROWSETAB(tab)->cur_server = server; /* delete old struct inputform (if any) */ --- 443,449 ---- dn = entry->dn; ! record_path(tab, (browse_entry *) entry, ctreeroot, ctreenode); ctreeroot = BROWSETAB(tab)->ctreeroot; /* delete old struct inputform (if any) */ *************** *** 496,515 **** assert(IS_DN_ENTRY(entry)); ! exploded_dn = gq_ldap_explode_dn(entry->dn, FALSE); ! #if GTK_MAJOR >= 2 ! g = g_strdup(exploded_dn[0]); #else ! l = decoded_string(exploded_dn[0]); ! /* impedance match -> malloc to g_malloc */ ! g = g_strdup(l); ! free(l); #endif ! gq_exploded_free(exploded_dn); ! return g; } static struct browse_entry_vtab dn_vtab = { (browse_entry_destructor) destroy_dn_browse_entry, /* destroy */ --- 529,553 ---- assert(IS_DN_ENTRY(entry)); ! if (long_form) { ! return g_strdup(entry->dn); ! } else { ! exploded_dn = gq_ldap_explode_dn(entry->dn, FALSE); ! #if GTK_MAJOR >= 2 ! g = g_strdup(exploded_dn[0]); #else ! l = decoded_string(exploded_dn[0]); ! /* impedance match -> malloc to g_malloc */ ! g = g_strdup(l); ! free(l); #endif ! gq_exploded_free(exploded_dn); ! return g; ! } } + static struct browse_entry_vtab dn_vtab = { (browse_entry_destructor) destroy_dn_browse_entry, /* destroy */ *************** *** 632,637 **** server_name = entry->server->name; /* dn_by_node(node); */ ! g_string_assign(BROWSETAB(tab)->cur_dn, server_name); ! BROWSETAB(tab)->cur_server = NULL; pane2_scrwin = BROWSETAB(tab)->pane2_scrwin; --- 670,674 ---- server_name = entry->server->name; /* dn_by_node(node); */ ! record_path(tab, (browse_entry *) entry, ctree, node); pane2_scrwin = BROWSETAB(tab)->pane2_scrwin; *************** *** 1077,1082 **** assert(IS_REF_ENTRY(entry)); ! g_string_assign(BROWSETAB(tab)->cur_dn, entry->uri); ! BROWSETAB(tab)->cur_server = NULL; pane2_scrwin = BROWSETAB(tab)->pane2_scrwin; --- 1114,1118 ---- assert(IS_REF_ENTRY(entry)); ! record_path(tab, (browse_entry *) entry, ctree, node); pane2_scrwin = BROWSETAB(tab)->pane2_scrwin; *************** *** 1491,1501 **** static void browse_save_snapshot(char *state_name, struct tab *tab) { ! if (BROWSETAB(tab)->cur_dn) ! state_value_set_string(state_name, "dn", ! BROWSETAB(tab)->cur_dn->str); ! ! if (BROWSETAB(tab)->cur_server) ! state_value_set_string(state_name, "server", ! BROWSETAB(tab)->cur_server->name); #if GTK_MAJOR >= 2 --- 1527,1531 ---- static void browse_save_snapshot(char *state_name, struct tab *tab) { ! state_value_set_list(state_name, "open-path", BROWSETAB(tab)->cur_path); #if GTK_MAJOR >= 2 *************** *** 1506,1523 **** } static void browse_restore_snapshot(char *state_name, struct tab *tab) { GtkCTree *ctree = BROWSETAB(tab)->ctreeroot; - const char *dn = state_value_get_string(state_name, "dn", NULL); - const char *s = state_value_get_string(state_name, "server", NULL); int gutter = state_value_get_int(state_name, "gutter-pos", -1); ! if (dn && s) { ! struct ldapserver *server = server_by_name(s); ! if (server && !server->ask_pw) { ! show_server_dn(ctree, server, dn, TRUE); } } --- 1536,1592 ---- } + static int cmp_name(browse_entry *entry, const char *name) + { + gchar *c; + int rc; + + if (entry == NULL) return -1; + c = entry->base_methods->get_name(entry, TRUE); + rc = strcasecmp(name, c); + g_free(c); + return rc; + } static void browse_restore_snapshot(char *state_name, struct tab *tab) { GtkCTree *ctree = BROWSETAB(tab)->ctreeroot; int gutter = state_value_get_int(state_name, "gutter-pos", -1); + const GList *path = state_value_get_list(state_name, "open-path"); ! struct ldapserver *server = NULL; ! GtkCTreeNode *node = gtk_ctree_node_nth(GTK_CTREE(ctree), 0); ! ! if (path) { ! const GList *I; ! for (I = path ; I ; I = g_list_next(I)) { ! const char *s = I->data; ! const char *c = g_utf8_strchr(s, -1, ':'); ! char *ep; ! long type = strtol(s, &ep, 10); ! ! if (c == ep) { ! switch(type) { ! case DN_BROWSE_ENTRY: ! node = show_dn(ctree, node, c + 1, TRUE); ! break; ! case REF_BROWSE_ENTRY: ! gtk_ctree_expand(ctree, node); ! node = ! gtk_ctree_find_by_row_data_custom(ctree, ! node, ! (gpointer) (c + 1), ! (GCompareFunc) cmp_name); ! break; ! case SERVER_BROWSE_ENTRY: ! server = server_by_name(c + 1); ! node = tree_node_from_server_dn(ctree, server, ""); ! break; ! default: ! break; ! } ! } } + if (node) gtk_ctree_select(ctree, node); } *************** *** 1608,1614 **** gtk_widget_show(browsemode_vbox); - modeinfo->cur_dn = g_string_sized_new(128); - g_string_assign(modeinfo->cur_dn, ""); - /* prepare for proper cleanup */ gtk_signal_connect(GTK_OBJECT(browsemode_vbox), "destroy", --- 1677,1680 ---- *************** *** 1661,1664 **** --- 1727,1740 ---- } + GtkCTreeNode *node_from_entry(GtkCTree *ctreeroot, + GtkCTreeNode *top, + browse_entry *e) + { + return gtk_ctree_find_by_row_data(GTK_CTREE(ctreeroot), + top, e); + } + + + struct server_dn { const struct ldapserver *server; *************** *** 1748,1754 **** assert(tab); ! if(BROWSETAB(tab)->cur_dn) { ! g_string_free(BROWSETAB(tab)->cur_dn, TRUE); ! BROWSETAB(tab)->cur_dn = NULL; } --- 1824,1830 ---- assert(tab); ! if(BROWSETAB(tab)->cur_path) { ! g_list_foreach(BROWSETAB(tab)->cur_path, (GFunc) g_free, NULL); ! g_list_free(BROWSETAB(tab)->cur_path); } *************** *** 1898,1914 **** } ! void show_server_dn(GtkCTree *tree, ! struct ldapserver *server, const char *dn, ! gboolean select_node) { GtkCTreeNode *node = tree_node_from_server_dn(tree, server, ""); if (node) { gtk_ctree_expand(tree, node); ! show_dn(tree, node, dn, select_node); } } ! void show_dn(GtkCTree *tree, GtkCTreeNode *node, const char *dn, ! gboolean select_node) { char **dnparts; --- 1974,1991 ---- } ! GtkCTreeNode *show_server_dn(GtkCTree *tree, ! struct ldapserver *server, const char *dn, ! gboolean select_node) { GtkCTreeNode *node = tree_node_from_server_dn(tree, server, ""); 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) { char **dnparts; *************** *** 1918,1923 **** char *attrs[] = { LDAP_NO_ATTRS, NULL }; ! if (!dn) return; ! if (!tree) return; s = g_string_new(""); --- 1995,2000 ---- char *attrs[] = { LDAP_NO_ATTRS, NULL }; ! if (!dn) return NULL; ! if (!tree) return NULL; s = g_string_new(""); *************** *** 1981,1984 **** --- 2058,2064 ---- 0.5, 0); } + + if (found) return found; + return NULL; } Index: browse.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/browse.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** browse.h 12 Oct 2003 11:10:41 -0000 1.30 --- browse.h 13 Oct 2003 07:38:41 -0000 1.31 *************** *** 32,37 **** #define BROWSETAB(tab) (assert(tab->type == BROWSE_MODE), ((struct tab_browse *)tab->modeinfo)) struct tab_browse { ! GString *cur_dn; ! struct ldapserver *cur_server; GtkCTree *ctreeroot; --- 32,36 ---- #define BROWSETAB(tab) (assert(tab->type == BROWSE_MODE), ((struct tab_browse *)tab->modeinfo)) struct tab_browse { ! GList *cur_path; GtkCTree *ctreeroot; *************** *** 83,87 **** gboolean long_form); - #define IS_ENTRY(o,t) ((o) && (((browse_entry *)(o))->type == t)) --- 82,85 ---- *************** *** 89,105 **** struct browse_entry_vtab { /* destructor */ ! browse_entry_destructor destroy; /* expansion callback of corresponding GtkCtreeNode */ ! browse_entry_expand expand; /* select callback of corresponding GtkCtreeNode */ ! browse_entry_select select; /* refresh callback of corresponding GtkCtreeNode */ ! browse_entry_refresh refresh; /* Gets the user visible name of the node, must be freed using g_free */ ! browse_entry_get_name get_name; }; --- 87,103 ---- struct browse_entry_vtab { /* destructor */ ! browse_entry_destructor destroy; /* expansion callback of corresponding GtkCtreeNode */ ! browse_entry_expand expand; /* select callback of corresponding GtkCtreeNode */ ! browse_entry_select select; /* refresh callback of corresponding GtkCtreeNode */ ! browse_entry_refresh refresh; /* Gets the user visible name of the node, must be freed using g_free */ ! browse_entry_get_name get_name; }; *************** *** 189,197 **** GtkCTreeNode *node); ! void show_server_dn(GtkCTree *tree, ! struct ldapserver *server, const char *dn, ! gboolean select_node); ! void show_dn(GtkCTree *tree, GtkCTreeNode *node, const char *dn, ! gboolean select_node); GtkCTreeNode *node_from_dn(GtkCTree *ctreeroot, --- 187,195 ---- 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); GtkCTreeNode *node_from_dn(GtkCTree *ctreeroot, |
From: <sta...@us...> - 2003-10-13 07:31:54
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv16538 Modified Files: prefs.c Log Message: * Minor indentation glitch Index: prefs.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/prefs.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** prefs.c 12 Oct 2003 06:22:57 -0000 1.41 --- prefs.c 13 Oct 2003 07:31:45 -0000 1.42 *************** *** 1220,1224 **** prefswindow = stateful_gtk_window_new(GTK_WINDOW_TOPLEVEL, ! "prefswindow", 520, 470); pw->prefswindow = prefswindow; --- 1220,1224 ---- prefswindow = stateful_gtk_window_new(GTK_WINDOW_TOPLEVEL, ! "prefswindow", 520, 470); pw->prefswindow = prefswindow; |
From: <sta...@us...> - 2003-10-13 07:30:25
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv16039 Modified Files: debug.c debug.h Log Message: * Added the print_trace fuction to help with debugging non-crashing situations where the control flow is hard to figure out using a debugger. Index: debug.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/debug.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** debug.c 5 Oct 2003 13:35:20 -0000 1.7 --- debug.c 13 Oct 2003 07:30:19 -0000 1.8 *************** *** 25,34 **** #include <stdio.h> #include "debug.h" #include "configfile.h" #include "common.h" ! int num_mallocs = 0; ! int max_mallocs = 0; #ifdef DEBUG --- 25,42 ---- #include <stdio.h> + + #ifdef HAVE_BACKTRACE + # include <execinfo.h> + # include <stdlib.h> + #endif /* HAVE_BACKTRACE */ + #include "debug.h" #include "configfile.h" #include "common.h" ! ! ! static int num_mallocs = 0; ! static int max_mallocs = 0; #ifdef DEBUG *************** *** 158,162 **** --- 166,206 ---- } #endif /* HAVE_MALLINFO */ + + + /* taken from the documentation of the GNU libc */ + void print_trace(void) + { + #ifdef HAVE_BACKTRACE + void *array[200]; + size_t size; + char **strings; + size_t i; + + size = backtrace(array, (sizeof(array) / sizeof(array[0])) ); + strings = backtrace_symbols(array, size); + + if (strings) { + fprintf(stderr, "----------------------------------------\n"); + + for (i = 0; i < size; i++) { + fprintf(stderr, "%s\n", strings[i]); + } + free(strings); + } + #endif /* BACKTRACE */ + } + + #else + + void print_trace(void) + { + } + #endif /* DEBUG */ + + + + + /* Index: debug.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/debug.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** debug.h 5 Sep 2002 19:27:42 -0000 1.5 --- debug.h 13 Oct 2003 07:30:19 -0000 1.6 *************** *** 70,73 **** --- 70,74 ---- void dump_ldapservers(void); + void print_trace(void); #endif |
From: <sta...@us...> - 2003-10-13 07:29:24
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv15958 Modified Files: input.c Log Message: * keep state for single-entry windows as well. Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** input.c 12 Oct 2003 06:22:57 -0000 1.68 --- input.c 13 Oct 2003 07:29:18 -0000 1.69 *************** *** 49,52 **** --- 49,53 ---- #include "schema.h" #include "schemabrowse.h" + #include "state.h" #include "../icons/line.xpm" *************** *** 105,111 **** GtkWidget *edit_window, *vbox; ! edit_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(edit_window), _("New entry")); ! gtk_widget_set_usize(edit_window, 500, 450); gtk_widget_show(edit_window); gtk_signal_connect_object(GTK_OBJECT(edit_window), "key_press_event", --- 106,113 ---- GtkWidget *edit_window, *vbox; ! edit_window = stateful_gtk_window_new(GTK_WINDOW_TOPLEVEL, ! "inputform", 500, 450); gtk_window_set_title(GTK_WINDOW(edit_window), _("New entry")); ! gtk_widget_show(edit_window); gtk_signal_connect_object(GTK_OBJECT(edit_window), "key_press_event", *************** *** 936,940 **** GtkWidget *vbox; struct inputform *iform; ! GtkWidget* edit_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); #if GTK_MAJOR >= 2 --- 938,945 ---- GtkWidget *vbox; struct inputform *iform; ! GtkWidget* edit_window; ! ! edit_window = stateful_gtk_window_new(GTK_WINDOW_TOPLEVEL, ! "entry-window", 500, 450); #if GTK_MAJOR >= 2 *************** *** 947,952 **** free(name); #endif ! ! gtk_widget_set_usize(edit_window, 500, 450); gtk_widget_show(edit_window); gtk_signal_connect_object(GTK_OBJECT(edit_window), "key_press_event", --- 952,956 ---- free(name); #endif ! gtk_widget_show(edit_window); gtk_signal_connect_object(GTK_OBJECT(edit_window), "key_press_event", |
From: <sta...@us...> - 2003-10-13 07:27:48
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv15612 Modified Files: schema.c Log Message: * Introduced an error context during schema loading. That way there is at least a hint to WHAT the problem is. I ended up with dozens of error popups due to a missing default schema server without ANY indication of what the problem REALLY was. Index: schema.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/schema.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** schema.c 11 Oct 2003 09:14:07 -0000 1.20 --- schema.c 13 Oct 2003 07:27:44 -0000 1.21 *************** *** 41,44 **** --- 41,45 ---- #include "i18n.h" #include "debug.h" + #include "errorchain.h" *************** *** 62,83 **** ss = get_server_schema(server); if(ss == NULL) { ! /* server didn't publish a schema, try the last resort schemaserver */ server = server_by_name(config->schemaserver); if(server == NULL) { ! set_normalcursor(); ! return(NULL); } if(server->ss) { ! set_normalcursor(); ! return(server->ss); } ss = get_server_schema(server); } set_normalcursor(); - return(ss); } --- 63,91 ---- ss = get_server_schema(server); if(ss == NULL) { + /* server didn't publish a schema, try the last resort + schemaserver */ ! int ec = error_new_context(_("Using schema from last-resort schemaserver")); server = server_by_name(config->schemaserver); if(server == NULL) { ! error_push(ec, _("Cannot find last-resort schema server")); ! ss = NULL; ! goto done; } if(server->ss) { ! ss = server->ss; ! goto done; } ss = get_server_schema(server); + if (ss == NULL) { + error_push(ec, _("Cannot obtain schema from last-resort schema server")); + } + done: + error_flush(ec); } set_normalcursor(); return(ss); } |