]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak gnome2 console + documentation
authorKern Sibbald <kern@sibbald.com>
Mon, 20 Oct 2003 08:44:22 +0000 (08:44 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 20 Oct 2003 08:44:22 +0000 (08:44 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@755 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/fd_cmds.c
bacula/src/gnome2-console/console.c
bacula/src/version.h

index b1250f39e3ac5f16d22dfc6b100c0a5adc716810..b273b52d8796b9c9727e204494ec9aa6ab28eb90 100644 (file)
@@ -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
index 0756292270cc6140a4ae2128e01bba59fcb4a7b6..ce37b347774dec2f90534c4962930280c68f2c93 100644 (file)
@@ -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);
index 56b5253aeda0f903374edfde7314d51bb13f0fe2..04214bde8758a09eb9fe94fa050abc00a5e1b320 100644 (file)
@@ -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;
 }
index 331206d2b8fcdf318db50482e5ed455e6d2f8c76..8dbfcbbc6ea37a703b5407f5ce9c334a137d11a8 100644 (file)
@@ -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