extern G_MODULE_EXPORT void presets_list_selection_changed_cb(void);
extern G_MODULE_EXPORT void presets_drag_cb(void);
extern G_MODULE_EXPORT void presets_drag_motion_cb(void);
+extern G_MODULE_EXPORT void preset_edited_cb(void);
extern void presets_row_expanded_cb(void);
// Create and bind the tree model to the tree view for the preset list
g_debug("bind_presets_tree_model ()\n");
treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "presets_list"));
selection = gtk_tree_view_get_selection (treeview);
- treestore = gtk_tree_store_new(5, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
- G_TYPE_STRING, G_TYPE_STRING);
+ treestore = gtk_tree_store_new(6, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Preset Name"), cell,
- "text", 0, "weight", 1, "style", 2, "foreground", 3, NULL);
+ "text", 0, "weight", 1, "style", 2,
+ "foreground", 3, "editable", 5, NULL);
+
+ g_signal_connect(cell, "edited", preset_edited_cb, ud);
+
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
gtk_tree_view_column_set_expand (column, TRUE);
gtk_tree_view_set_tooltip_column (treeview, 4);
{
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
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("<big><b>%s</b></big>", path);
+ ghb_ui_update(ud, "activity_location", ghb_string_value(str));
+ g_free(str);
g_free(path);
g_free(config);
// Set encoding to raw.
ghb_hal_init();
#endif
+ if (!ghb_lock_file("queue_lock"))
+ {
+ const gchar *markup =
+ N_("<b><big>Another instance of HandBrake is already running.</big></b>\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);
gtk_status_icon_set_tooltip(si, "HandBrake");
#endif
+ // Ugly hack to keep subtitle table from bouncing around as I change
+ // which set of controls are visible
+ GtkRequisition req;
+ GtkWidget *widget;
+ gint height;
+
+ widget = GHB_WIDGET(ud->builder, "SrtCodeset");
+ gtk_widget_size_request( widget, &req );
+ height = req.height;
+ widget = GHB_WIDGET(ud->builder, "srt_code_label");
+ gtk_widget_size_request( widget, &req );
+ height += req.height;
+ widget = GHB_WIDGET(ud->builder, "subtitle_table");
+ gtk_widget_set_size_request(widget, -1, height);
+
// Everything should be go-to-go. Lets rock!
gtk_main ();