OSDN Git Service

add preference option to disable update checking
[handbrake-jp/handbrake-jp-git.git] / gtk / src / main.c
index 72deb03..a9dba9f 100644 (file)
@@ -36,7 +36,7 @@
 #include <gst/gst.h>
 #include <glib/gstdio.h>
 #include <gio/gio.h>
-#include "hbversion.h"
+#include "hb.h"
 #include "renderer_button.h"
 #include "hb-backend.h"
 #include "ghb-dvd.h"
@@ -207,17 +207,22 @@ bind_chapter_tree_model (signal_user_data_t *ud)
        g_debug("bind_chapter_tree_model ()\n");
        treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "chapters_list"));
        selection = gtk_tree_view_get_selection (treeview);
-       treestore = gtk_list_store_new(3, G_TYPE_INT, G_TYPE_STRING, G_TYPE_BOOLEAN);
+       treestore = gtk_list_store_new(4, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
        gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
 
        cell = ghb_cell_renderer_text_new();
        column = gtk_tree_view_column_new_with_attributes(
-                                                                       _("Chapter No."), cell, "text", 0, NULL);
+                                                                       _("Index"), cell, "text", 0, NULL);
     gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
 
        cell = ghb_cell_renderer_text_new();
        column = gtk_tree_view_column_new_with_attributes(
-                                       _("Chapter Title"), cell, "text", 1, "editable", 2, NULL);
+                                                                       _("Duration"), cell, "text", 1, NULL);
+    gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+
+       cell = ghb_cell_renderer_text_new();
+       column = gtk_tree_view_column_new_with_attributes(
+                                       _("Title"), cell, "text", 2, "editable", 3, NULL);
     gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
 
        g_signal_connect(cell, "key-press-event", chapter_keypress_cb, ud);
@@ -533,7 +538,8 @@ main (int argc, char *argv[])
        // Redirect stderr to the activity window
        ghb_preview_init(ud);
        IoRedirect(ud);
-       ghb_log("Handbrake Version: %s (%d)", HB_VERSION, HB_BUILD);
+    ghb_log( "%s - %s - %s",
+             HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE );
        ghb_init_dep_map();
 
        // Need to connect x264_options textview buffer to the changed signal
@@ -613,7 +619,13 @@ main (int argc, char *argv[])
        }
        // Reload and check status of the last saved queue
        g_idle_add((GSourceFunc)ghb_reload_queue, ud);
-       g_thread_create((GThreadFunc)ghb_check_update, ud, FALSE, NULL);
+       if (ghb_settings_get_boolean(ud->settings, "check_updates"))
+       {
+g_message("checking");
+               g_thread_create((GThreadFunc)ghb_check_update, ud, FALSE, NULL);
+       }
+else
+g_message("skipping");
        // Start timer for monitoring libhb status, 500ms
        g_timeout_add (500, ghb_timer_cb, (gpointer)ud);
        // Everything should be go-to-go.  Lets rock!