X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;ds=inline;f=gtk%2Fsrc%2Fmain.c;h=e92f974d50234baf4e488e26cfe88782a9b9acc5;hb=9460d9624a5cf24126bc39605bc47d43330fcdf4;hp=efc2fbc996f50a6d1e8b5c7297a08b11c29555aa;hpb=019aa646f173cbd66cf9ac79e8139af1753149f2;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/gtk/src/main.c b/gtk/src/main.c
index efc2fbc9..e92f974d 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -342,32 +342,32 @@ bind_audio_tree_model (signal_user_data_t *ud)
column = gtk_tree_view_column_new_with_attributes(
_("Track"), cell, "text", 0, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 210);
- gtk_tree_view_column_set_max_width (column, 210);
+ gtk_tree_view_column_set_min_width (column, 200);
+ gtk_tree_view_column_set_max_width (column, 200);
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
_("Codec"), cell, "text", 1, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 130);
+ gtk_tree_view_column_set_min_width (column, 110);
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
_("Bitrate"), cell, "text", 2, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 60);
+ gtk_tree_view_column_set_min_width (column, 50);
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
_("Sample Rate"), cell, "text", 3, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 130);
+ gtk_tree_view_column_set_min_width (column, 100);
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
_("Mix"), cell, "text", 4, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 140);
+ gtk_tree_view_column_set_min_width (column, 115);
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
@@ -420,8 +420,8 @@ bind_subtitle_tree_model (signal_user_data_t *ud)
column = gtk_tree_view_column_new_with_attributes(
_("Track"), cell, "text", 0, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 210);
- gtk_tree_view_column_set_max_width (column, 210);
+ gtk_tree_view_column_set_min_width (column, 190);
+ gtk_tree_view_column_set_max_width (column, 190);
cell = gtk_cell_renderer_toggle_new();
column = gtk_tree_view_column_new_with_attributes(
@@ -447,8 +447,8 @@ bind_subtitle_tree_model (signal_user_data_t *ud)
column = gtk_tree_view_column_new_with_attributes(
_("Type"), cell, "text", 4, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
- gtk_tree_view_column_set_min_width (column, 240);
- gtk_tree_view_column_set_max_width (column, 240);
+ gtk_tree_view_column_set_min_width (column, 190);
+ gtk_tree_view_column_set_max_width (column, 190);
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
@@ -523,7 +523,7 @@ IoRedirect(signal_user_data_t *ud)
{
GIOChannel *channel;
gint pfd[2];
- gchar *config, *path;
+ gchar *config, *path, *str;
// I'm opening a pipe and attaching the writer end to stderr
// The reader end will be polled by main event loop and I'll get
@@ -539,7 +539,9 @@ IoRedirect(signal_user_data_t *ud)
path = g_strdup_printf("%s/%s", config, "Activity.log");
ud->activity_log = g_io_channel_new_file (path, "w", NULL);
ud->job_activity_log = NULL;
- ghb_ui_update(ud, "activity_location", ghb_string_value(path));
+ str = g_strdup_printf("%s", path);
+ ghb_ui_update(ud, "activity_location", ghb_string_value(str));
+ g_free(str);
g_free(path);
g_free(config);
// Set encoding to raw.
@@ -686,6 +688,8 @@ main (int argc, char *argv[])
gtk_set_locale ();
gtk_init (&argc, &argv);
gtk_rc_parse_string(hud_rcstyle);
+ g_type_class_unref(g_type_class_ref(GTK_TYPE_BUTTON));
+ g_object_set(gtk_settings_get_default(), "gtk-button-images", TRUE, NULL);
#if !defined(_WIN32)
notify_init("HandBrake");
#endif
@@ -697,6 +701,21 @@ main (int argc, char *argv[])
ghb_hal_init();
#endif
+ if (!ghb_lock_file("queue_lock"))
+ {
+ const gchar *markup =
+ N_("Another instance of HandBrake is already running.\n"
+ "\n"
+ "Only one instance of HandBrake may run.\n");
+ GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _(markup));
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ exit(EXIT_FAILURE);
+ }
ud = g_malloc0(sizeof(signal_user_data_t));
ud->debug = ghb_debug;
g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_log_handler, ud);