From: Kern Sibbald Date: Mon, 20 Oct 2003 08:44:22 +0000 (+0000) Subject: Tweak gnome2 console + documentation X-Git-Tag: Release-1.34.0~378 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ee45a71e90dae0f15c7ff7ce1a8b901a6959d207;p=bacula%2Fbacula Tweak gnome2 console + documentation git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@755 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index b1250f39e3..b273b52d87 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -13,6 +13,7 @@ Documentation to do: (any release a little bit at a time) hours of operation. - Lookup HP cleaning recommendations. - Lookup HP tape replacement recommendations (see trouble shooting autochanger) +- Create a man page for each binary (Debian package requirement). Testing to do: (painful) - that ALL console command line options work and are always implemented @@ -36,12 +37,11 @@ For 1.33 Testing/Documentation: SuSE. For 1.33 -- Limit the number of block checksum/header BB01, ... errors - printed. +- Limit the number of block checksum/header BB01, ... errors printed. - Add VerifyJob to "run" summary (yes/mod/no) prompt. - Add device name to "Current Volume not acceptable because ..." - Make sure that Bacula rechecks the tape after the 20 min wait. -- Set IO_NOWAIT on Bacula packets +- Set IO_NOWAIT on Bacula TCP/IP packets. - Try doing a raw partition backup and restore by mounting a Windows partition. - Implement Verify=DiskToCatalog diff --git a/bacula/src/dird/fd_cmds.c b/bacula/src/dird/fd_cmds.c index 0756292270..ce37b34777 100644 --- a/bacula/src/dird/fd_cmds.c +++ b/bacula/src/dird/fd_cmds.c @@ -250,7 +250,7 @@ static int send_list(JCR *jcr, int list) } else { bstrncpy(buf, "0 ", sizeof(buf)); } - Dmsg1(000, "Opts=%s\n", buf); + Dmsg1(100, "Opts=%s\n", buf); optlen = strlen(buf); while (fgets(buf+optlen, sizeof(buf)-optlen, bpipe->rfd)) { fd->msglen = Mmsg(&fd->msg, "%s", buf); @@ -280,7 +280,7 @@ static int send_list(JCR *jcr, int list) } else { bstrncpy(buf, "0 ", sizeof(buf)); } - Dmsg1(000, "Opts=%s\n", buf); + Dmsg1(100, "Opts=%s\n", buf); optlen = strlen(buf); while (fgets(buf+optlen, sizeof(buf)-optlen, ffd)) { fd->msglen = Mmsg(&fd->msg, "%s", buf); diff --git a/bacula/src/gnome2-console/console.c b/bacula/src/gnome2-console/console.c index 56b5253aed..04214bde87 100644 --- a/bacula/src/gnome2-console/console.c +++ b/bacula/src/gnome2-console/console.c @@ -54,7 +54,6 @@ GtkAdjustment *vadj; pthread_mutex_t cmd_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cmd_wait; char cmd[1000]; -int cmd_ready = FALSE; int reply; BSOCK *UA_sock = NULL; GList *job_list, *client_list, *fileset_list; @@ -72,9 +71,9 @@ static DIRRES *dir; static CONRES *con; static int ndir; static int director_reader_running = FALSE; -static int at_prompt = FALSE; -static int ready = FALSE; -static int quit = FALSE; +static bool at_prompt = false; +static bool ready = false; +static bool quit = false; static guint initial; #define CONFIG_FILE "./gnome-console.conf" /* default configuration file */ @@ -243,7 +242,7 @@ Without that I don't how to speak to the Director :-(\n"), configfile); initial = gtk_timeout_add(100, initial_connect_to_director, (gpointer)NULL); gtk_main(); - quit = TRUE; + quit = true; disconnect_from_director((gpointer)NULL); return 0; } @@ -439,7 +438,7 @@ int connect_to_director(gpointer data) void write_director(gchar *msg) { if (UA_sock) { - at_prompt = FALSE; + at_prompt = false; set_status(_(" Processing command ...")); UA_sock->msglen = strlen(msg); pm_strcpy(&UA_sock->msg, msg); @@ -462,7 +461,7 @@ void read_director(gpointer data, gint fd, GdkInputCondition condition) if (stat >= 0) { if (at_prompt) { set_text("\n", 1); - at_prompt = FALSE; + at_prompt = false; } set_text(UA_sock->msg, UA_sock->msglen); return; @@ -473,7 +472,7 @@ void read_director(gpointer data, gint fd, GdkInputCondition condition) } /* Must be a signal -- either do something or ignore it */ if (UA_sock->msglen == BNET_PROMPT) { - at_prompt = TRUE; + at_prompt = true; set_status(_(" At prompt waiting for input ...")); } if (UA_sock->msglen == BNET_EOD) { @@ -539,13 +538,6 @@ static void truncate_text_chars() text_chars -= del_chars; len = gtk_text_buffer_get_char_count(textbuf); gtk_text_iter_set_offset(&iter, len); - -/* - gtk_text_set_point(GTK_TEXT(text1), del_chars); - gtk_text_backward_delete(GTK_TEXT(text1), del_chars); - text_chars -= del_chars; - gtk_text_set_point(GTK_TEXT(text1), text_chars); - */ } void set_textf(char *fmt, ...) @@ -568,21 +560,21 @@ void set_text(char *buf, int len) buf_len = gtk_text_buffer_get_char_count(textbuf); gtk_text_buffer_get_iter_at_offset(textbuf, &iter, buf_len - 1); gtk_text_buffer_insert(textbuf, &iter, buf, -1); -/* - gtk_text_insert(GTK_TEXT(text1), text_font, NULL, NULL, buf, -1); - */ text_chars += len; if (text_chars > MAX_TEXT_CHARS) { truncate_text_chars(); } buf_len = gtk_text_buffer_get_char_count(textbuf); + gtk_text_buffer_get_iter_at_offset(textbuf, &iter, buf_len - 1); gtk_text_iter_set_offset(&iter, buf_len); /* * Force the scroll bars to the bottom so that most * recent text is on screen. */ - vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scroll1)); - gtk_adjustment_set_value(vadj, vadj->upper); + if (ready || at_prompt) { + vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scroll1)); + gtk_adjustment_set_value(vadj, vadj->upper); + } } void set_statusf(char *fmt, ...) @@ -593,17 +585,23 @@ void set_statusf(char *fmt, ...) va_start(arg_ptr, fmt); len = bvsnprintf(buf, sizeof(buf), fmt, arg_ptr); gtk_label_set_text(GTK_LABEL(status1), buf); - ready = FALSE; + ready = false; } void set_status_ready() { + GtkTextBuffer *textbuf; gtk_label_set_text(GTK_LABEL(status1), " Ready"); - ready = TRUE; + if (!ready) { + textbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text1)); + vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scroll1)); + gtk_adjustment_set_value(vadj, vadj->upper); + } + ready = true; } void set_status(char *buf) { gtk_label_set_text(GTK_LABEL(status1), buf); - ready = FALSE; + ready = false; } diff --git a/bacula/src/version.h b/bacula/src/version.h index 331206d2b8..8dbfcbbc6e 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,8 +2,8 @@ #undef VERSION #define VERSION "1.32c" #define VSTRING "1" -#define BDATE "18 Oct 2003" -#define LSMDATE "18Oct03" +#define BDATE "20 Oct 2003" +#define LSMDATE "20Oct03" /* Debug flags */ #undef DEBUG