};
static void action_update_menu (GtkItemFactory *ifactory,
- const gchar *branch_path,
+ gchar *branch_path,
gpointer callback,
gpointer data);
static void compose_actions_execute_cb (Compose *compose,
}
void action_update_mainwin_menu(GtkItemFactory *ifactory,
- const gchar *branch_path,
+ gchar *branch_path,
MainWindow *mainwin)
{
action_update_menu(ifactory, branch_path,
}
void action_update_msgview_menu(GtkItemFactory *ifactory,
- const gchar *branch_path,
+ gchar *branch_path,
MessageView *msgview)
{
action_update_menu(ifactory, branch_path,
}
void action_update_compose_menu(GtkItemFactory *ifactory,
- const gchar *branch_path,
+ gchar *branch_path,
Compose *compose)
{
action_update_menu(ifactory, branch_path,
}
static void action_update_menu(GtkItemFactory *ifactory,
- const gchar *branch_path,
+ gchar *branch_path,
gpointer callback, gpointer data)
{
GtkWidget *menuitem;
debug_print("Updating actions input/output dialog.\n");
- if (children->progress_bar) {
- gtk_progress_configure(GTK_PROGRESS(children->progress_bar),
- children->initial_nb -children->nb,
- 0.0, children->initial_nb);
- }
-
if (!children->nb) {
gtk_widget_set_sensitive(children->abort_btn, FALSE);
gtk_widget_set_sensitive(children->close_btn, TRUE);
ChildInfo *child_info;
GtkTextBuffer *textbuf;
GtkTextIter iter, start_iter, end_iter;
- GdkFont *font;
- font = g_object_get_data(G_OBJECT(children->dialog),
- "s_txtfont");
gtk_widget_show(children->scrolledwin);
- textbuf = gtk_text_view_get_buffer (GTK_TEXT_VIEW(text));
- gtk_text_buffer_get_start_iter (textbuf, &start_iter);
- gtk_text_buffer_get_end_iter (textbuf, &end_iter);
+ textbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+ gtk_text_buffer_get_start_iter(textbuf, &start_iter);
+ gtk_text_buffer_get_end_iter(textbuf, &end_iter);
+ gtk_text_buffer_delete(textbuf, &start_iter, &end_iter);
+ gtk_text_buffer_get_start_iter(textbuf, &start_iter);
iter = start_iter;
for (cur = children->list; cur; cur = cur->next) {
child_info = (ChildInfo *)cur->data;
GtkWidget *progress_bar = NULL;
GtkWidget *abort_button;
GtkWidget *close_button;
- GdkFont *output_font;
+ PangoFontDescription *text_font;
debug_print("Creating action IO dialog\n");
gtk_widget_hide(scrolledwin);
text = gtk_text_view_new();
+ if (prefs_common.textfont) {
+ if (NULL != (text_font = pango_font_description_from_string
+ (prefs_common.textfont))) {
+ gtk_widget_modify_font(text, text_font);
+ pango_font_description_free(text_font);
+ }
+ }
gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
gtk_container_add(GTK_CONTAINER(scrolledwin), text);
gtk_widget_show(text);
if (children->initial_nb > 1) {
progress_bar = gtk_progress_bar_new();
- gtk_progress_bar_set_bar_style(GTK_PROGRESS_BAR(progress_bar),
- GTK_PROGRESS_CONTINUOUS);
gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress_bar),
GTK_PROGRESS_LEFT_TO_RIGHT);
- gtk_progress_set_activity_mode(GTK_PROGRESS(progress_bar),
- FALSE);
- gtk_progress_set_format_string(GTK_PROGRESS(progress_bar),
- _("Completed %v/%u"));
- gtk_progress_set_show_text(GTK_PROGRESS(progress_bar), TRUE);
- gtk_progress_configure(GTK_PROGRESS(progress_bar),
- children->initial_nb -children->nb,
- 0.0, children->initial_nb);
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar),
+ _("Completed %v/%u"));
gtk_box_pack_start(GTK_BOX(vbox), progress_bar, FALSE, FALSE, 0);
gtk_widget_show(progress_bar);
children->abort_btn = abort_button;
children->close_btn = close_button;
-#warning FIXME_GTK2 convert to Pango / FontDesc?
-#if 0
- output_font = gtkut_font_load_from_fontset(prefs_common.textfont);
- gtk_object_set_data_full(GTK_OBJECT(dialog), "s_txtfont",
- output_font,
- (GtkDestroyNotify)gdk_font_unref);
-#endif
gtk_widget_show(dialog);
}