]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tray-monitor/tray-monitor.c
AIX also supports setmntent/getmntent so use that instead of much more complicated...
[bacula/bacula] / bacula / src / tray-monitor / tray-monitor.c
index dab4c2f5682ffba5ddcb2ad7e30e910494a246f2..4037272618160337acb7f11974e2ffa47bd37c6a 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2004-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2004-2009 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    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
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -99,6 +99,7 @@ static GtkWidget *window;
 static GtkWidget *textview;
 static GtkTextBuffer *buffer;
 static GtkWidget *timeoutspinner;
+static GtkWidget *scrolledWindow;
 char** xpm_generic_var;
 static gboolean blinkstate = TRUE;
 
@@ -417,9 +418,13 @@ int main(int argc, char *argv[])
    }
 
    gtk_box_pack_start(GTK_BOX(vbox), daemon_table, FALSE, FALSE, 0);
-
+  
    textview = gtk_text_view_new();
 
+   scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
+   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+   gtk_container_add(GTK_CONTAINER (scrolledWindow), textview);
+   
    buffer = gtk_text_buffer_new(NULL);
 
    gtk_text_buffer_set_text(buffer, "", -1);
@@ -464,7 +469,7 @@ int main(int argc, char *argv[])
 
    gtk_text_view_set_buffer(GTK_TEXT_VIEW(textview), buffer);
 
-   gtk_box_pack_start(GTK_BOX(vbox), textview, TRUE, TRUE, 0);
+   gtk_box_pack_start(GTK_BOX(vbox), scrolledWindow, TRUE, TRUE, 0);
 
    GtkWidget* hbox = gtk_hbox_new(FALSE, 10);
 
@@ -1073,7 +1078,7 @@ void trayMessage(const char *fmt,...)
    bvsnprintf(buf, sizeof(buf), (char *)fmt, arg_ptr);
    va_end(arg_ptr);
 
-   fprintf(stderr, buf);
+   fprintf(stderr, "%s", buf);
 
 // gtk_tray_icon_send_message(gtk_status_icon_get_tray_icon(mTrayIcon), 5000, (const char*)&buf, -1);
 }