OSDN Git Service

forgot to checkin the new icon for picutre settings
[handbrake-jp/handbrake-jp-git.git] / gtk / src / callbacks.c
index 0eeae27..d69992f 100644 (file)
@@ -1368,7 +1368,7 @@ submit_job(GValue *settings)
 {
        static gint unique_id = 1;
        gchar *type, *modified, *preset;
-       GValue *path;
+       const GValue *path;
        gboolean preset_modified;
 
        g_debug("submit_job");
@@ -1915,7 +1915,7 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
                buffer = gtk_text_view_get_buffer (textview);
                // I would like to auto-scroll the window when the scrollbar
                // is at the bottom, 
-               // must determining whether the insert point is at
+               // must determine whether the insert point is at
                // the bottom of the window 
                window = gtk_text_view_get_window(textview, GTK_TEXT_WINDOW_TEXT);
                if (window != NULL)
@@ -1938,15 +1938,20 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
                gtk_text_buffer_insert(buffer, &iter, text, -1);
                if (bottom)
                {
-                       //gtk_text_view_scroll_to_iter(textview, &iter, 0, FALSE, 0, 0);
-                       mark = gtk_text_buffer_get_insert (buffer);
+                       gtk_text_buffer_get_end_iter(buffer, &iter);
+                       mark = gtk_text_buffer_create_mark(buffer, NULL, &iter, FALSE);
                        gtk_text_view_scroll_mark_onscreen(textview, mark);
+                       gtk_text_buffer_delete_mark(buffer, mark);
                }
                g_io_channel_write_chars (ud->activity_log, text, 
                                                                length, &length, NULL);
+               g_io_channel_flush(ud->activity_log, NULL);
                if (ud->job_activity_log)
+               {
                        g_io_channel_write_chars (ud->job_activity_log, text, 
                                                                        length, &length, NULL);
+                       g_io_channel_flush(ud->job_activity_log, NULL);
+               }
                g_free(text);
        }
        if (status != G_IO_STATUS_NORMAL)
@@ -2179,7 +2184,7 @@ chapter_edited_cb(
                -1);
        gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 0, &index, -1);
 
-       GValue *chapters;
+       const GValue *chapters;
        GValue *chapter;
 
        chapters = ghb_settings_get_value(ud->settings, "chapter_list");