From: Kern Sibbald Date: Fri, 24 Oct 2003 17:31:08 +0000 (+0000) Subject: Doc updates + fix Gnome2 scrolling + eliminate multiple JobIds in restore listing X-Git-Tag: Release-1.34.0~369 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=191ca63808786e48ae5e6e22444ae739e29a6479;p=bacula%2Fbacula Doc updates + fix Gnome2 scrolling + eliminate multiple JobIds in restore listing git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@771 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 03d49766b7..cc6998a743 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -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. + diff --git a/bacula/src/dird/sql_cmds.c b/bacula/src/dird/sql_cmds.c index 2ad029bb35..4d37d86e66 100644 --- a/bacula/src/dird/sql_cmds.c +++ b/bacula/src/dird/sql_cmds.c @@ -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"; diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index 91d78a18c7..0fcdea6177 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -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; diff --git a/bacula/src/gnome2-console/console.c b/bacula/src/gnome2-console/console.c index 1c5c0cc52d..39324a38db 100644 --- a/bacula/src/gnome2-console/console.c +++ b/bacula/src/gnome2-console/console.c @@ -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")); }