]> git.sur5r.net Git - bacula/bacula/commitdiff
Doc updates + fix Gnome2 scrolling + eliminate multiple JobIds in restore listing
authorKern Sibbald <kern@sibbald.com>
Fri, 24 Oct 2003 17:31:08 +0000 (17:31 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 24 Oct 2003 17:31:08 +0000 (17:31 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@771 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/sql_cmds.c
bacula/src/dird/ua_restore.c
bacula/src/gnome2-console/console.c

index 03d49766b7fb2a68029a82b548cf253e1befd82c..cc6998a743aa21facb502be8c8f1c968462127a0 100644 (file)
@@ -1067,3 +1067,5 @@ Done: (see kernsdone for more)
 - Document delete job command.
 - Document update volume pool and other command line keywords.
 - Add VerifyJob to "run" summary (yes/mod/no) prompt.
+- For listing, eliminate multiple JobIds in restore Jobs listing.
+
index 2ad029bb35ba6b4c9ed071d73ca8615fe65b8422..4d37d86e66c595120dbfa785915b617cd6b4f9b4 100644 (file)
@@ -223,7 +223,9 @@ char *uar_inc_dec =
 
 char *uar_list_temp = 
    "SELECT JobId,Level,JobFiles,StartTime,VolumeName,StartFile,"
-   "VolSessionId,VolSessionTime FROM temp";
+   "VolSessionId,VolSessionTime FROM temp "
+   "GROUP by JobId ORDER BY StartTime ASC";
+
 
 char *uar_sel_jobid_temp = "SELECT JobId FROM temp";
 
index 91d78a18c78bf7766a58463199d8786040fba161..0fcdea61774fc9f6696a1afc95c00acb3d18a4ec 100644 (file)
@@ -774,7 +774,7 @@ static int select_backups_before_date(UAContext *ua, RESTORE_CTX *rx, char *date
       bsendmsg(ua, "%s\n", db_strerror(ua->db));
       goto bail_out;
    }
-   /* Note, this is needed as I don't seem to get the callback
+   /* Note, this is needed because I don't seem to get the callback
     * from the call just above.
     */
    rx->JobTDate = 0;
index 1c5c0cc52d2f82b3c004a77967033617a680cd7d..39324a38dbee0e71b402dbca5527696ebd421a5d 100644 (file)
@@ -74,7 +74,6 @@ static int director_reader_running = FALSE;
 static bool at_prompt = false;
 static bool ready = false;
 static bool quit = false;
-static bool adjusted = false;
 static guint initial;
 
 #define CONFIG_FILE "./gnome-console.conf"   /* default configuration file */
@@ -568,7 +567,7 @@ 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_iter_set_offset(&iter, buf_len);
-   adjusted = false;
+   set_scroll_bar_to_end();
 }
 
 void set_statusf(char *fmt, ...)
@@ -599,15 +598,8 @@ void set_status(char *buf)
 
 static void set_scroll_bar_to_end(void)
 {
-   GtkAdjustment *vadj;
-   /*
-    * Force the scroll bars to the bottom so that most
-    * recent text is on screen.
-    */
-   if ((ready || at_prompt) && !adjusted) {
-      adjusted = true;
-      vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scroll1));
-      gtk_adjustment_set_value(vadj, vadj->upper);
-      gtk_widget_show(text1);
-   }
+   GtkTextBuffer* buffer = NULL;
+   buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text1));
+   gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW(text1),
+              gtk_text_buffer_get_mark (buffer, "insert"));
 }