2005-01-29 [paul] 1.0.0cvs23.2

* src/account.c
	* src/action.c
	* src/addressadd.c
	* src/addressbook.c
	* src/alertpanel.c
	* src/compose.c
	* src/editaddress.c
	* src/editbook.c
	* src/editgroup.c
	* src/editjpilot.c
	* src/editldap.c
	* src/editldap_basedn.c
	* src/editvcard.c
	* src/export.c
	* src/foldersel.c
	* src/grouplistdialog.c
	* src/import.c
	* src/importldif.c
	* src/inc.c
	* src/main.c
	* src/mainwindow.c
	* src/message_search.c
	* src/messageview.c
	* src/mimeview.c
	* src/prefs_actions.c
	* src/prefs_common.c
	* src/prefs_common.h
	* src/prefs_customheader.c
	* src/prefs_display_header.c
	* src/prefs_filtering.c
	* src/prefs_filtering_action.c
	* src/prefs_gtk.c
	* src/prefs_matcher.c
	* src/prefs_summary_column.c
	* src/prefs_template.c
	* src/sourcewindow.c
	* src/summary_search.c
	* src/summaryview.c
	* src/textview.c
	* src/gtk/about.c
	* src/gtk/description_window.c
	* src/gtk/gtkshruler.c
	* src/gtk/gtkutils.c
	* src/gtk/gtkutils.h
	* src/gtk/inputdialog.c
	* src/gtk/logwindow.c
	* src/gtk/prefswindow.c
	* src/gtk/progressdialog.c
	* src/gtk/progressdialog.h
		first part of initial sync with main-gtk2
		(more to follow)
This commit is contained in:
Paul Mangan 2005-01-29 16:53:23 +00:00
parent 5552d126b9
commit 360db791f8
52 changed files with 322 additions and 302 deletions

View file

@ -1,3 +1,57 @@
2005-01-29 [paul] 1.0.0cvs23.2
* src/account.c
* src/action.c
* src/addressadd.c
* src/addressbook.c
* src/alertpanel.c
* src/compose.c
* src/editaddress.c
* src/editbook.c
* src/editgroup.c
* src/editjpilot.c
* src/editldap.c
* src/editldap_basedn.c
* src/editvcard.c
* src/export.c
* src/foldersel.c
* src/grouplistdialog.c
* src/import.c
* src/importldif.c
* src/inc.c
* src/main.c
* src/mainwindow.c
* src/message_search.c
* src/messageview.c
* src/mimeview.c
* src/prefs_actions.c
* src/prefs_common.c
* src/prefs_common.h
* src/prefs_customheader.c
* src/prefs_display_header.c
* src/prefs_filtering.c
* src/prefs_filtering_action.c
* src/prefs_gtk.c
* src/prefs_matcher.c
* src/prefs_summary_column.c
* src/prefs_template.c
* src/sourcewindow.c
* src/summary_search.c
* src/summaryview.c
* src/textview.c
* src/gtk/about.c
* src/gtk/description_window.c
* src/gtk/gtkshruler.c
* src/gtk/gtkutils.c
* src/gtk/gtkutils.h
* src/gtk/inputdialog.c
* src/gtk/logwindow.c
* src/gtk/prefswindow.c
* src/gtk/progressdialog.c
* src/gtk/progressdialog.h
first part of initial sync with main-gtk2
(more to follow)
2005-01-28 [colin] 1.0.0cvs23.1
* src/folderview.c

View file

@ -349,3 +349,4 @@
( cvs diff -u -r 1.49.2.29 -r 1.49.2.30 src/procmime.c; ) > 1.0.0cvs19.1.patchset
( cvs diff -u -r 1.213.2.22 -r 1.213.2.23 src/folder.c; cvs diff -u -r 1.207.2.26 -r 1.207.2.27 src/folderview.c; ) > 1.0.0cvs21.1.patchset
( cvs diff -u -r 1.207.2.27 -r 1.207.2.28 src/folderview.c; ) > 1.0.0cvs23.1.patchset
( cvs diff -u -r 1.61.2.20 -r 1.61.2.21 src/account.c; cvs diff -u -r 1.12.2.18 -r 1.12.2.19 src/action.c; cvs diff -u -r 1.9.2.2 -r 1.9.2.3 src/addressadd.c; cvs diff -u -r 1.60.2.13 -r 1.60.2.14 src/addressbook.c; cvs diff -u -r 1.17.2.9 -r 1.17.2.10 src/alertpanel.c; cvs diff -u -r 1.382.2.90 -r 1.382.2.91 src/compose.c; cvs diff -u -r 1.14.2.4 -r 1.14.2.5 src/editaddress.c; cvs diff -u -r 1.5.12.1 -r 1.5.12.2 src/editbook.c; cvs diff -u -r 1.11.2.4 -r 1.11.2.5 src/editgroup.c; cvs diff -u -r 1.5.12.1 -r 1.5.12.2 src/editjpilot.c; cvs diff -u -r 1.8.2.2 -r 1.8.2.3 src/editldap.c; cvs diff -u -r 1.10.2.2 -r 1.10.2.3 src/editldap_basedn.c; cvs diff -u -r 1.5.12.1 -r 1.5.12.2 src/editvcard.c; cvs diff -u -r 1.8.2.4 -r 1.8.2.5 src/export.c; cvs diff -u -r 1.26.2.10 -r 1.26.2.11 src/foldersel.c; cvs diff -u -r 1.14.2.6 -r 1.14.2.7 src/grouplistdialog.c; cvs diff -u -r 1.13.2.5 -r 1.13.2.6 src/import.c; cvs diff -u -r 1.14.2.2 -r 1.14.2.3 src/importldif.c; cvs diff -u -r 1.149.2.19 -r 1.149.2.20 src/inc.c; cvs diff -u -r 1.115.2.26 -r 1.115.2.27 src/main.c; cvs diff -u -r 1.274.2.28 -r 1.274.2.29 src/mainwindow.c; cvs diff -u -r 1.3.12.6 -r 1.3.12.7 src/message_search.c; cvs diff -u -r 1.94.2.39 -r 1.94.2.40 src/messageview.c; cvs diff -u -r 1.83.2.26 -r 1.83.2.27 src/mimeview.c; cvs diff -u -r 1.60.2.10 -r 1.60.2.11 src/prefs_actions.c; cvs diff -u -r 1.204.2.28 -r 1.204.2.29 src/prefs_common.c; cvs diff -u -r 1.103.2.11 -r 1.103.2.12 src/prefs_common.h; cvs diff -u -r 1.16.2.6 -r 1.16.2.7 src/prefs_customheader.c; cvs diff -u -r 1.16.2.6 -r 1.16.2.7 src/prefs_display_header.c; cvs diff -u -r 1.59.2.13 -r 1.59.2.14 src/prefs_filtering.c; cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/prefs_filtering_action.c; cvs diff -u -r 1.10.2.9 -r 1.10.2.10 src/prefs_gtk.c; cvs diff -u -r 1.43.2.15 -r 1.43.2.16 src/prefs_matcher.c; cvs diff -u -r 1.10.2.4 -r 1.10.2.5 src/prefs_summary_column.c; cvs diff -u -r 1.12.2.6 -r 1.12.2.7 src/prefs_template.c; cvs diff -u -r 1.9.2.8 -r 1.9.2.9 src/sourcewindow.c; cvs diff -u -r 1.15.2.12 -r 1.15.2.13 src/summary_search.c; cvs diff -u -r 1.395.2.48 -r 1.395.2.49 src/summaryview.c; cvs diff -u -r 1.96.2.39 -r 1.96.2.40 src/textview.c; cvs diff -u -r 1.4.2.5 -r 1.4.2.6 src/gtk/about.c; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/gtk/description_window.c; cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/gtk/gtkshruler.c; cvs diff -u -r 1.5.2.7 -r 1.5.2.8 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.6 -r 1.4.2.7 src/gtk/gtkutils.h; cvs diff -u -r 1.2.2.3 -r 1.2.2.4 src/gtk/inputdialog.c; cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/gtk/logwindow.c; cvs diff -u -r 1.12.2.14 -r 1.12.2.15 src/gtk/prefswindow.c; cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/gtk/progressdialog.c; cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/gtk/progressdialog.h; ) > 1.0.0cvs23.2.patchset

View file

@ -13,7 +13,7 @@ INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=23
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=.1
EXTRA_GTK2_VERSION=.2
if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -715,7 +715,7 @@ static void account_edit_create(void)
gtk_button_box_set_layout(GTK_BUTTON_BOX(hbbox), GTK_BUTTONBOX_END);
gtk_box_set_spacing(GTK_BOX(hbbox), 5);
gtkut_button_set_create_stock(&hbbox, &close_btn, GTK_STOCK_CLOSE,
gtkut_stock_button_set_create(&hbbox, &close_btn, GTK_STOCK_CLOSE,
NULL, NULL, NULL, NULL);
gtk_widget_show(hbbox);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto & The Sylpheed Claws Team
* Copyright (C) 1999-2005 Hiroyuki Yamamoto & The Sylpheed Claws Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1101,18 +1101,18 @@ static void update_io_dialog(Children *children)
if (children->output) {
GtkWidget *text = children->text;
gchar *caption;
ChildInfo *child_info;
GtkTextBuffer *textbuf;
GtkTextIter iter, start_iter, end_iter;
gchar *caption;
ChildInfo *child_info;
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);
gtk_text_buffer_delete(textbuf, &start_iter, &end_iter);
gtk_text_buffer_get_start_iter(textbuf, &start_iter);
iter = start_iter;
gtk_text_buffer_get_start_iter(textbuf, &iter);
for (cur = children->list; cur; cur = cur->next) {
child_info = (ChildInfo *)cur->data;
if (child_info->pid)
@ -1124,8 +1124,7 @@ static void update_io_dialog(Children *children)
(_("--- Ended: %s\n"),
child_info->cmd);
gtk_text_buffer_insert(textbuf, &iter,
caption, -1);
gtk_text_buffer_insert(textbuf, &iter, caption, -1);
gtk_text_buffer_insert(textbuf, &iter,
child_info->output->str, -1);
g_free(caption);
@ -1233,7 +1232,7 @@ static void create_io_dialog(Children *children)
gtk_widget_show(progress_bar);
}
gtkut_button_set_create_stock(&hbox, &abort_button, GTK_STOCK_STOP,
gtkut_stock_button_set_create(&hbox, &abort_button, GTK_STOCK_STOP,
&close_button, GTK_STOCK_CLOSE, NULL, NULL);
g_signal_connect(G_OBJECT(abort_button), "clicked",
G_CALLBACK(kill_children_cb), children);
@ -1324,62 +1323,66 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond)
static void catch_output(gpointer data, gint source, GdkInputCondition cond)
{
ChildInfo *child_info = (ChildInfo *)data;
gint c, i;
gint c;
gchar buf[BUFFSIZE];
debug_print("Catching grand child's output.\n");
if (child_info->children->action_type &
(ACTION_PIPE_OUT | ACTION_INSERT)
&& source == child_info->chld_out) {
GtkTextView *text = GTK_TEXT_VIEW(child_info->children->msg_text);
GtkTextBuffer *textbuf = gtk_text_view_get_buffer(text);
GtkTextIter iter1, iter2;
GtkTextMark *mark;
mark = gtk_text_buffer_get_insert(textbuf);
gtk_text_buffer_get_iter_at_mark(textbuf, &iter1, mark);
gtk_text_buffer_get_iter_at_mark(textbuf, &iter2, mark);
GtkTextView *text =
GTK_TEXT_VIEW(child_info->children->msg_text);
GtkTextBuffer *textbuf = gtk_text_view_get_buffer(text);
GtkTextIter iter1, iter2;
GtkTextMark *mark;
mark = gtk_text_buffer_get_insert(textbuf);
gtk_text_buffer_get_iter_at_mark(textbuf, &iter1, mark);
gtk_text_buffer_get_iter_at_mark(textbuf, &iter2, mark);
while (TRUE) {
gsize bytes_read = 0, bytes_written = 0;
gchar *ret_str;
c = read(source, buf, sizeof(buf) - 1);
if (c == 0)
break;
else {
gssize by_read = 0, by_written = 0;
gchar *ret_str = g_locale_to_utf8(buf, c, &by_read,
&by_written, NULL);
if (ret_str && by_written) {
gtk_text_buffer_insert(textbuf, &iter2,
ret_str, by_written);
g_free(ret_str);
} else
gtk_text_buffer_insert(textbuf, &iter2, buf, c);
}
ret_str = g_locale_to_utf8
(buf, c, &bytes_read, &bytes_written, NULL);
if (ret_str && bytes_written > 0) {
gtk_text_buffer_insert
(textbuf, &iter2, ret_str,
bytes_written);
g_free(ret_str);
} else
gtk_text_buffer_insert(textbuf, &iter2, buf, c);
}
if (child_info->children->is_selection) {
gtk_text_buffer_place_cursor(textbuf, &iter1);
gtk_text_buffer_move_mark_by_name
(textbuf, "selection_bound", &iter2);
if (child_info->children->is_selection) {
gtk_text_buffer_place_cursor(textbuf, &iter1);
gtk_text_buffer_move_mark_by_name
(textbuf, "selection_bound", &iter2);
}
} else {
c = read(source, buf, sizeof(buf) - 1);
if (c > 0) {
gssize by_read = 0, by_written = 0;
gchar *ret_str = g_locale_to_utf8(buf, c, &by_read,
&by_written, NULL);
if (ret_str && by_written) {
g_string_append_len(child_info->output,
ret_str, by_written);
g_free(ret_str);
gsize bytes_read = 0, bytes_written = 0;
gchar *ret_str;
ret_str = g_locale_to_utf8
(buf, c, &bytes_read, &bytes_written, NULL);
if (ret_str && bytes_written > 0) {
g_string_append_len
(child_info->output, ret_str,
bytes_written);
g_free(ret_str);
} else
g_string_append_len(child_info->output, buf, c);
}
if (c > 0)
child_info->new_out = TRUE;
}
}
if (c == 0) {
if (source == child_info->chld_out) {

View file

@ -240,8 +240,9 @@ static void addressadd_create( void ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_container_set_border_width( GTK_CONTAINER(hbbox), 0 );
gtk_widget_grab_default(ok_btn);

View file

@ -1064,7 +1064,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
if( iface->readOnly ) {
alertpanel( _("Delete address(es)"),
_("This address data is readonly and cannot be deleted."),
_("Close"), NULL, NULL );
GTK_STOCK_CLOSE, NULL, NULL );
return;
}
@ -1087,7 +1087,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
/* Confirm deletion */
aval = alertpanel( _("Delete address(es)"),
_("Really delete the address(es)?"),
_("Yes"), _("No"), NULL );
GTK_STOCK_YES, GTK_STOCK_NO, NULL );
if( aval != G_ALERTDEFAULT ) return;
/* Process deletions */
@ -2367,7 +2367,7 @@ static void addressbook_treenode_delete_cb(
"results and addresses in `%s' ?" ),
obj->name );
aval = alertpanel( _("Delete"), message,
_("Yes"), _("No"), NULL );
GTK_STOCK_YES, GTK_STOCK_NO, NULL );
g_free(message);
if( aval == G_ALERTDEFAULT ) {
delType = ADDRTREE_DEL_FOLDER_ADDR;
@ -2383,7 +2383,7 @@ static void addressbook_treenode_delete_cb(
aval = alertpanel( _("Delete"), message,
_("Folder only"),
_("Folder and Addresses"),
_("Cancel") );
GTK_STOCK_CANCEL );
g_free(message);
if( aval == G_ALERTDEFAULT ) {
delType = ADDRTREE_DEL_FOLDER_ONLY;
@ -2395,7 +2395,7 @@ static void addressbook_treenode_delete_cb(
}
else {
message = g_strdup_printf(_("Really delete `%s' ?"), obj->name);
aval = alertpanel(_("Delete"), message, _("Yes"), _("No"), NULL);
aval = alertpanel(_("Delete"), message, GTK_STOCK_YES, GTK_STOCK_NO, NULL);
g_free(message);
if( aval == G_ALERTDEFAULT ) delType = ADDRTREE_DEL_DATA;
}
@ -3239,12 +3239,12 @@ static gboolean addressbook_convert( AddressIndex *addrIndex ) {
}
if( errFlag ) {
debug_print( "Error\n%s\n", msg );
alertpanel_with_type( _( "Addressbook conversion error" ), msg, _( "Close" ),
alertpanel_with_type( _( "Addressbook conversion error" ), msg, GTK_STOCK_CLOSE,
NULL, NULL, NULL, ALERT_ERROR );
}
else if( msg ) {
debug_print( "Warning\n%s\n", msg );
alertpanel_with_type( _( "Addressbook conversion" ), msg, _( "Close" ),
alertpanel_with_type( _( "Addressbook conversion" ), msg, GTK_STOCK_CLOSE,
NULL, NULL, NULL, ALERT_WARNING );
}
@ -3283,7 +3283,7 @@ void addressbook_read_file( void ) {
addrindex_print_index( addrIndex, stdout );
alertpanel_with_type( _( "Addressbook Error" ),
_( "Could not read address index" ),
_( "Close" ), NULL, NULL, NULL,
GTK_STOCK_CLOSE, NULL, NULL, NULL,
ALERT_ERROR);
}
debug_print( "done.\n" );

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2001 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -325,16 +325,16 @@ static void alertpanel_create(const gchar *title,
/* for button(s) */
if (!button1_label)
button1_label = _("OK");
button1_label = GTK_STOCK_OK;
label2 = button2_label;
label3 = button3_label;
if (label2 && *label2 == '+') label2++;
if (label3 && *label3 == '+') label3++;
gtkut_button_set_create(&confirm_area,
&button1, button1_label,
button2_label ? &button2 : NULL, label2,
button3_label ? &button3 : NULL, label3);
gtkut_stock_button_set_create(&confirm_area,
&button1, button1_label,
button2_label ? &button2 : NULL, label2,
button3_label ? &button3 : NULL, label3);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area), confirm_area, FALSE, FALSE, 12);
gtk_widget_grab_default(button1);

View file

@ -482,8 +482,6 @@ static void subject_activated (GtkWidget *widget,
Compose *compose);
#endif
static void text_activated (GtkWidget *widget,
Compose *compose);
static void text_inserted (GtkTextBuffer *buffer,
GtkTextIter *iter,
const gchar *text,
@ -512,7 +510,6 @@ static void compose_check_backwards (Compose *compose);
static void compose_check_forwards_go (Compose *compose);
#endif
static gboolean compose_send_control_enter (Compose *compose);
static gint compose_defer_auto_save_draft (Compose *compose);
static PrefsAccount *compose_guess_forward_account_from_msginfo (MsgInfo *msginfo);
@ -3321,7 +3318,7 @@ static gboolean compose_check_entries(Compose *compose, gboolean check_subject)
aval = alertpanel(_("Send"),
_("Subject is empty. Send it anyway?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (aval != G_ALERTDEFAULT)
return FALSE;
}
@ -4467,8 +4464,6 @@ static void compose_create_header_entry(Compose *compose)
g_signal_connect(G_OBJECT(entry), "changed",
G_CALLBACK(compose_headerentry_changed_cb),
headerentry);
g_signal_connect(G_OBJECT(entry), "activate",
G_CALLBACK(text_activated), compose);
g_signal_connect(G_OBJECT(entry), "grab_focus",
G_CALLBACK(compose_grab_focus_before_cb), compose);
g_signal_connect_after(G_OBJECT(entry), "grab_focus",
@ -4933,8 +4928,6 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
subject_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(subject), subject_entry, TRUE, TRUE, 2);
g_signal_connect(G_OBJECT(subject_entry), "activate",
G_CALLBACK(text_activated), compose);
g_signal_connect(G_OBJECT(subject_entry), "grab_focus",
G_CALLBACK(compose_grab_focus_before_cb), compose);
g_signal_connect_after(G_OBJECT(subject_entry), "grab_focus",
@ -4954,13 +4947,14 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
ruler = gtk_shruler_new();
gtk_ruler_set_range(GTK_RULER(ruler), 0.0, 100.0, 1.0, 100.0);
gtk_box_pack_start(GTK_BOX(ruler_hbox), ruler, TRUE, TRUE,
BORDER_WIDTH + 1);
gtk_widget_set_size_request(ruler_hbox, 1, -1);
BORDER_WIDTH);
/* text widget */
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_SHADOW_IN);
gtk_box_pack_start(GTK_BOX(edit_vbox), scrolledwin, TRUE, TRUE, 0);
gtk_widget_set_size_request(scrolledwin, prefs_common.compose_width, -1);
@ -4980,7 +4974,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
G_CALLBACK(compose_changed_cb), compose);
g_signal_connect(G_OBJECT(text), "grab_focus",
G_CALLBACK(compose_grab_focus_cb), compose);
g_signal_connect(G_OBJECT(buffer), "insert-text",
g_signal_connect(G_OBJECT(buffer), "insert_text",
G_CALLBACK(text_inserted), compose);
/* drag and drop */
@ -5901,8 +5895,8 @@ static void compose_attach_property_create(gboolean *cancelled)
SET_LABEL_AND_ENTRY(_("Path"), path_entry, 2);
SET_LABEL_AND_ENTRY(_("File name"), filename_entry, 3);
gtkut_button_set_create_stock(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
@ -6619,7 +6613,7 @@ static void compose_close_cb(gpointer data, guint action, GtkWidget *widget)
if (compose->modified) {
val = alertpanel(_("Discard message"),
_("This message has been modified. discard it?"),
_("Discard"), _("to Draft"), _("Cancel"));
_("Discard"), _("to Draft"), GTK_STOCK_CANCEL);
switch (val) {
case G_ALERTDEFAULT:
@ -6657,7 +6651,7 @@ static void compose_template_activate_cb(GtkWidget *widget, gpointer data)
msg = g_strdup_printf(_("Do you want to apply the template `%s' ?"),
tmpl->name);
val = alertpanel(_("Apply template"), msg,
_("Replace"), _("Insert"), _("Cancel"));
_("Replace"), _("Insert"), GTK_STOCK_CANCEL);
g_free(msg);
if (val == G_ALERTDEFAULT)
@ -7417,11 +7411,6 @@ static void compose_show_first_last_header(Compose *compose, gboolean show_first
gtk_adjustment_set_value(vadj, (show_first ? vadj->lower : vadj->upper));
}
static void text_activated(GtkWidget *widget, Compose *compose)
{
compose_send_control_enter(compose);
}
static void text_inserted(GtkTextBuffer *buffer, GtkTextIter *iter,
const gchar *text, gint len, Compose *compose)
{
@ -7474,45 +7463,6 @@ static gint compose_defer_auto_save_draft(Compose *compose)
return FALSE;
}
static gboolean compose_send_control_enter(Compose *compose)
{
GdkEvent *ev;
GdkEventKey *kev;
GtkItemFactory *ifactory;
GtkAccelKey *accel;
GtkWidget *send_menu;
GSList *list;
GdkModifierType ignored_mods =
(GDK_LOCK_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK |
GDK_MOD4_MASK | GDK_MOD5_MASK);
ev = gtk_get_current_event();
if (ev->type != GDK_KEY_PRESS) return FALSE;
kev = (GdkEventKey *)ev;
if (!(kev->keyval == GDK_Return && (kev->state & GDK_CONTROL_MASK)))
return FALSE;
if (compose->exteditor_tag != -1)
return FALSE;
ifactory = gtk_item_factory_from_widget(compose->menubar);
send_menu = gtk_item_factory_get_widget(ifactory, "/Message/Send");
list = gtk_accel_groups_from_object(G_OBJECT(send_menu));
if (!list)
return FALSE;
accel = (GtkAccelKey *)list->data;
if (accel && accel->accel_key == kev->keyval &&
(accel->accel_mods & ~ignored_mods) ==
(kev->state & ~ignored_mods)) {
compose_send_cb(compose, 0, NULL);
return TRUE;
}
return FALSE;
}
#if USE_ASPELL
static void compose_check_all(Compose *compose)
{

View file

@ -511,8 +511,9 @@ static void addressbook_edit_person_dialog_create( gboolean *cancelled ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vnbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);

View file

@ -202,8 +202,9 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_container_set_border_width( GTK_CONTAINER(hbbox), 0 );
gtk_widget_grab_default(ok_btn);

View file

@ -369,8 +369,9 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);

View file

@ -342,8 +342,9 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_container_set_border_width( GTK_CONTAINER(hbbox), 0 );
gtk_widget_grab_default(ok_btn);

View file

@ -339,8 +339,9 @@ static void addressbook_edit_ldap_dialog_create( gboolean *cancelled ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);

View file

@ -211,8 +211,9 @@ static void edit_ldap_bdn_create(void) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_container_set_border_width( GTK_CONTAINER(hbbox), 0 );
gtk_widget_grab_default(ok_btn);

View file

@ -237,8 +237,9 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
&cancel_btn, _("Cancel"), NULL, NULL);
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_container_set_border_width( GTK_CONTAINER(hbbox), 0 );
gtk_widget_grab_default(ok_btn);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2002 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -197,8 +197,8 @@ static void export_create(void)
g_signal_connect(G_OBJECT(file_button), "clicked",
G_CALLBACK(export_filesel_cb), NULL);
gtkut_button_set_create_stock(&confirm_area,
&ok_button, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area,
&ok_button, GTK_STOCK_OK,
&cancel_button, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);

View file

@ -395,9 +395,9 @@ static void foldersel_create(void)
g_signal_connect(G_OBJECT(entry), "activate",
G_CALLBACK(foldersel_activated), NULL);
gtkut_button_set_create_stock(&confirm_area,
&ok_button, GTK_STOCK_OK,
&cancel_button, GTK_STOCK_CANCEL,
gtkut_stock_button_set_create(&confirm_area,
&ok_button, GTK_STOCK_OK,
&cancel_button, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2003 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -38,8 +38,8 @@
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkbutton.h>
#include <gtk/gtkhbbox.h>
#include <gtk/gtkstock.h>
#include <string.h>
#include <fnmatch.h>
#include "intl.h"
#include "grouplistdialog.h"
@ -164,7 +164,8 @@ static void grouplist_dialog_create(void)
dialog = gtk_dialog_new();
gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE);
gtk_widget_set_size_request(dialog,
GROUPLIST_DIALOG_WIDTH, GROUPLIST_DIALOG_HEIGHT);
GROUPLIST_DIALOG_WIDTH,
GROUPLIST_DIALOG_HEIGHT);
gtk_container_set_border_width
(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
@ -233,10 +234,10 @@ static void grouplist_dialog_create(void)
status_label = gtk_label_new("");
gtk_box_pack_start(GTK_BOX(hbox), status_label, FALSE, FALSE, 0);
gtkut_button_set_create(&confirm_area,
&ok_button, _("OK"),
&cancel_button, _("Cancel"),
&refresh_button, _("Refresh"));
gtkut_stock_button_set_create(&confirm_area,
&ok_button, GTK_STOCK_OK,
&cancel_button, GTK_STOCK_CANCEL,
&refresh_button, GTK_STOCK_REFRESH);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
confirm_area);
gtk_widget_grab_default(ok_button);
@ -308,7 +309,7 @@ static GtkCTreeNode *grouplist_create_parent(const gchar *name,
node = gtk_ctree_insert_node(GTK_CTREE(ctree), parent, node,
cols, 0, NULL, NULL, NULL, NULL,
FALSE, FALSE);
if (parent && fnmatch(pattern, parent_name, 0) != 0)
if (parent && g_pattern_match_simple(pattern, parent_name) == FALSE)
gtk_ctree_expand(GTK_CTREE(ctree), parent);
gtk_ctree_node_set_selectable(GTK_CTREE(ctree), node, FALSE);
@ -360,7 +361,8 @@ static GtkCTreeNode *grouplist_create_branch(NewsGroupInfo *ginfo,
node = gtk_ctree_insert_node(GTK_CTREE(ctree), parent, node,
cols, 0, NULL, NULL, NULL, NULL,
TRUE, FALSE);
if (parent && fnmatch(pattern, parent_name, 0) != 0)
if (parent &&
g_pattern_match_simple(pattern, parent_name) == FALSE)
gtk_ctree_expand(GTK_CTREE(ctree), parent);
}
gtk_ctree_node_set_selectable(GTK_CTREE(ctree), node, TRUE);
@ -389,6 +391,7 @@ static void grouplist_dialog_set_list(const gchar *pattern, gboolean refresh)
{
GSList *cur;
GtkCTreeNode *node;
GPatternSpec *pspec;
if (locked) return;
locked = TRUE;
@ -417,22 +420,24 @@ static void grouplist_dialog_set_list(const gchar *pattern, gboolean refresh)
gtk_clist_freeze(GTK_CLIST(ctree));
pspec = g_pattern_spec_new(pattern);
for (cur = group_list; cur != NULL ; cur = cur->next) {
NewsGroupInfo *ginfo = (NewsGroupInfo *)cur->data;
if (fnmatch(pattern, ginfo->name, 0) == 0) {
if (g_pattern_match_string(pspec, ginfo->name)) {
node = grouplist_create_branch(ginfo, pattern);
if (g_slist_find_custom(subscribed, ginfo->name,
(GCompareFunc)g_ascii_strcasecmp)
!= NULL) {
(GCompareFunc)g_strcasecmp)
!= NULL)
gtk_ctree_select(GTK_CTREE(ctree), node);
}
}
}
for (cur = subscribed; cur; cur = g_slist_next(cur))
grouplist_expand_upwards(GTK_CTREE(ctree), (gchar *)cur->data);
g_pattern_spec_free(pspec);
gtk_clist_thaw(GTK_CLIST(ctree));
grouplist_hash_done();

View file

@ -192,11 +192,15 @@ static void about_create(void)
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_SHADOW_IN);
gtk_box_pack_start(GTK_BOX(vbox), scrolledwin, TRUE, TRUE, 0);
text = gtk_text_view_new();
gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 6);
gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 6);
gtk_container_add(GTK_CONTAINER(scrolledwin), text);
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
@ -220,7 +224,7 @@ static void about_create(void)
"Foundation, Inc., 59 Temple Place - Suite 330, Boston, "
"MA 02111-1307, USA."), -1);
gtkut_button_set_create_stock(&confirm_area, &ok_button, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area, &ok_button, GTK_STOCK_OK,
NULL, NULL, NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_button);
@ -228,6 +232,7 @@ static void about_create(void)
(G_OBJECT(ok_button), "clicked",
g_cclosure_new_swap(G_CALLBACK(gtk_widget_hide_on_delete),
window, NULL), FALSE);
gtk_widget_show_all(window);
}

View file

@ -117,7 +117,7 @@ static void description_create(DescriptionWindow * dwindow)
line++;
}
gtkut_button_set_create_stock(&hbbox, &ok_btn, GTK_STOCK_OK,
gtkut_stock_button_set_create(&hbbox, &ok_btn, GTK_STOCK_OK,
NULL, NULL, NULL, NULL);
gtk_widget_show(hbbox);

View file

@ -1,6 +1,6 @@
/* GtkSHRuler
*
* Copyright (C) 2000-2004 Alfons Hoogervorst & The Sylpheed Claws Team
* Copyright (C) 2000-2005 Alfons Hoogervorst & The Sylpheed Claws Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -156,18 +156,17 @@ gtk_shruler_draw_ticks(GtkRuler *ruler)
height + ythickness);
#endif
/* assume ruler->max_size has the char width */
/* assume ruler->max_size has the char width */
/* i is increment of char_width, pos is label number
* y position is based on height of widget itself
*/
* y position is based on height of widget itself */
for ( i = 0, pos = 0; i < widget->allocation.width - xthickness; i += ruler->max_size, pos++ ) {
int length = height / 4;
gint length = height / 8;
if ( pos % 10 == 0 ) length = ( 3 * height / 4 );
else if (pos % 5 == 0 ) length = ( height / 2 );
if ( pos % 10 == 0 ) length = ( 2 * height / 3 );
else if ( pos % 5 == 0 ) length = ( height / 3 );
gdk_draw_line(ruler->backing_store, gc,
i, height,
i, height + ythickness,
i, height - length);
if ( pos % 10 == 0 ) {
@ -176,16 +175,15 @@ gtk_shruler_draw_ticks(GtkRuler *ruler)
/* draw label */
g_snprintf(buf, sizeof buf, "%d", pos);
layout = gtk_widget_create_pango_layout
(GTK_WIDGET(ruler), buf);
(GTK_WIDGET(ruler), buf);
gdk_draw_layout(ruler->backing_store, gc, i + 2,
(height / 12),
layout);
0, layout);
g_object_unref(layout);
}
}
}
}

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -110,7 +110,7 @@ void gtkut_button_set_create(GtkWidget **bbox,
}
}
void gtkut_button_set_create_stock(GtkWidget **bbox,
void gtkut_stock_button_set_create(GtkWidget **bbox,
GtkWidget **button1, const gchar *label1,
GtkWidget **button2, const gchar *label2,
GtkWidget **button3, const gchar *label3)
@ -149,7 +149,8 @@ static void combo_button_size_request(GtkWidget *widget,
ComboButton *combo = (ComboButton *)data;
if (combo->arrow->allocation.height != requisition->height)
gtk_widget_set_usize(combo->arrow, -1, requisition->height);
gtk_widget_set_size_request(combo->arrow,
-1, requisition->height);
}
static void combo_button_enter(GtkWidget *widget, gpointer data)
@ -214,6 +215,7 @@ ComboButton *gtkut_combo_button_create(GtkWidget *button,
combo->arrow = gtk_button_new();
arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_OUT);
gtk_widget_set_size_request(arrow, 7, -1);
gtk_container_add(GTK_CONTAINER(combo->arrow), arrow);
GTK_WIDGET_UNSET_FLAGS(combo->arrow, GTK_CAN_FOCUS);
gtk_widget_show_all(combo->arrow);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -103,8 +103,8 @@ void gtkut_button_set_create (GtkWidget **bbox,
const gchar *label2,
GtkWidget **button3,
const gchar *label3);
void gtkut_button_set_create_stock (GtkWidget **bbox,
void gtkut_stock_button_set_create (GtkWidget **bbox,
GtkWidget **button1,
const gchar *label1,
GtkWidget **button2,

View file

@ -199,8 +199,8 @@ static void input_dialog_create(void)
g_signal_connect(G_OBJECT(GTK_COMBO(combo)->entry), "activate",
G_CALLBACK(combo_activated), NULL);
gtkut_button_set_create_stock(&confirm_area,
&ok_button, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area,
&ok_button, GTK_STOCK_OK,
&cancel_button, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),

View file

@ -74,6 +74,8 @@ LogWindow *log_window_create(void)
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_SHADOW_IN);
gtk_container_add(GTK_CONTAINER(window), scrolledwin);
gtk_widget_show(scrolledwin);

View file

@ -382,7 +382,7 @@ void prefswindow_open_full(const gchar *title, GSList *prefs_pages, gpointer dat
gtk_widget_grab_focus(prefswindow->tree_view);
gtkut_button_set_create_stock(&prefswindow->confirm_area,
gtkut_stock_button_set_create(&prefswindow->confirm_area,
&prefswindow->ok_btn, GTK_STOCK_OK,
&prefswindow->cancel_btn, GTK_STOCK_CANCEL,
&prefswindow->apply_btn, GTK_STOCK_APPLY);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2001 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -30,6 +30,7 @@
#include <gtk/gtkprogressbar.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkbutton.h>
#include <gtk/gtkstock.h>
#include "intl.h"
#include "progressdialog.h"
@ -92,9 +93,9 @@ ProgressDialog *progress_dialog_create(void)
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 8);
gtk_widget_show(label);
gtkut_button_set_create_stock(&cancel_area, &cancel_btn,
GTK_STOCK_CANCEL, NULL, NULL,
NULL, NULL);
gtkut_stock_button_set_create
(&cancel_area, &cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL, NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), cancel_area, FALSE, FALSE, 0);
gtk_widget_grab_default(cancel_btn);
gtk_widget_show_all(cancel_area);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2001 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2002 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -203,8 +203,8 @@ static void import_create(void)
g_signal_connect(G_OBJECT(dest_button), "clicked",
G_CALLBACK(import_destsel_cb), NULL);
gtkut_button_set_create_stock(&confirm_area,
&ok_button, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area,
&ok_button, GTK_STOCK_OK,
&cancel_button, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);

View file

@ -1031,9 +1031,9 @@ static void imp_ldif_dialog_create() {
gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
/* Button panel */
gtkut_button_set_create(&hbbox, &btnPrev, _( "Prev" ),
&btnNext, _( "Next" ),
&btnCancel, _( "Cancel" ) );
gtkut_stock_button_set_create(&hbbox, &btnPrev, _("Prev"),
&btnNext, _("Next"),
&btnCancel, GTK_STOCK_CANCEL);
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
gtk_container_set_border_width(GTK_CONTAINER(hbbox), 2);
gtk_widget_grab_default(btnNext);

View file

@ -706,8 +706,8 @@ static gint inc_start(IncProgressDialog *inc_dialog)
else {
gtk_window_set_title(GTK_WINDOW(inc_dialog->dialog->window),
fin_msg);
gtk_label_set_text(GTK_LABEL(GTK_BIN(inc_dialog->dialog->cancel_btn)->child),
_("Close"));
gtk_button_set_label(GTK_BUTTON(inc_dialog->dialog->cancel_btn),
GTK_STOCK_CLOSE);
}
g_free(fin_msg);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -729,7 +729,8 @@ void app_will_exit(GtkWidget *widget, gpointer data)
if (prefs_common.warn_queued_on_exit && get_queued_message_num() > 0) {
if (alertpanel(_("Queued messages"),
_("Some unsent messages are queued. Exit now?"),
_("OK"), _("Cancel"), NULL) != G_ALERTDEFAULT)
GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
!= G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1612,7 +1612,8 @@ void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
if (confirm) {
if (alertpanel(_("Empty trash"),
_("Empty all messages in trash?"),
_("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
GTK_STOCK_YES, GTK_STOCK_NO, NULL)
!= G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}
@ -2403,7 +2404,8 @@ static void app_exit_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
{
if (prefs_common.confirm_on_exit) {
if (alertpanel(_("Exit"), _("Exit this program?"),
_("OK"), _("Cancel"), NULL) != G_ALERTDEFAULT)
GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
!= G_ALERTDEFAULT)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
}

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2002 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -130,10 +130,10 @@ static void message_search_create(MessageView *messageview)
gtk_box_pack_start (GTK_BOX (checkbtn_hbox), backward_checkbtn,
FALSE, FALSE, 0);
gtkut_button_set_create_stock(&confirm_area,
gtkut_stock_button_set_create(&confirm_area,
&search_btn, GTK_STOCK_FIND,
&clear_btn, GTK_STOCK_CLEAR,
&close_btn, GTK_STOCK_CLOSE);
&clear_btn, GTK_STOCK_CLEAR,
&close_btn, GTK_STOCK_CLOSE);
gtk_widget_show (confirm_area);
gtk_box_pack_start (GTK_BOX (vbox1), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(search_btn);
@ -197,7 +197,7 @@ static void message_search_execute(GtkButton *button, gpointer data)
"continue from beginning?");
val = alertpanel(_("Search finished"), str,
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (G_ALERTDEFAULT == val) {
manage_window_focus_in(window, NULL, NULL);
messageview_set_position(messageview,

View file

@ -979,7 +979,7 @@ void messageview_save_as(MessageView *messageview)
aval = alertpanel(_("Overwrite"),
_("Overwrite existing file?"),
_("OK"), _("Cancel"), NULL);
GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL);
if (G_ALERTDEFAULT != aval) return;
}

View file

@ -1023,8 +1023,8 @@ static gboolean mimeview_write_part(const gchar *filename,
res = g_strdup_printf(_("Overwrite existing file '%s'?"),
filename);
aval = alertpanel(_("Overwrite"), res, _("OK"),
_("Cancel"), NULL);
aval = alertpanel(_("Overwrite"), res, GTK_STOCK_OK,
GTK_STOCK_CANCEL, NULL);
g_free(res);
if (G_ALERTDEFAULT != aval) return FALSE;
}

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2003 Hiroyuki Yamamoto & The Sylpheed Claws Team
* Copyright (C) 1999-2005 Hiroyuki Yamamoto & The Sylpheed Claws Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -174,8 +174,9 @@ static void prefs_actions_create(MainWindow *mainwin)
gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_widget_show(confirm_area);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
@ -569,7 +570,7 @@ static void prefs_actions_delete_cb(GtkWidget *w, gpointer data)
if (alertpanel(_("Delete action"),
_("Do you really want to delete this action?"),
_("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
return;
/* XXX: Here's the reason why we need to store the original

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -149,7 +149,6 @@ static struct Message {
GtkWidget *chkbtn_disphdr;
GtkWidget *spinbtn_linespc;
GtkObject *spinbtn_linespc_adj;
GtkWidget *chkbtn_headspc;
GtkWidget *chkbtn_smoothscroll;
GtkWidget *spinbtn_scrollstep;
@ -599,9 +598,6 @@ static PrefParam param[] = {
{"line_space", "2", &prefs_common.line_space, P_INT,
&message.spinbtn_linespc,
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
{"enable_head_space", "FALSE", &prefs_common.head_space, P_BOOL,
&message.chkbtn_headspc,
prefs_set_data_from_toggle, prefs_set_toggle},
{"enable_smooth_scroll", "FALSE",
&prefs_common.enable_smooth_scroll, P_BOOL,
@ -1749,7 +1745,6 @@ static void prefs_message_create(void)
GtkWidget *label_linespc;
GtkObject *spinbtn_linespc_adj;
GtkWidget *spinbtn_linespc;
GtkWidget *chkbtn_headspc;
GtkWidget *frame_scr;
GtkWidget *vbox_scr;
@ -1827,8 +1822,6 @@ static void prefs_message_create(void)
gtk_box_pack_start (GTK_BOX (hbox_linespc), label_linespc,
FALSE, FALSE, 0);
PACK_CHECK_BUTTON(hbox1, chkbtn_headspc, _("Indent text"));
PACK_FRAME(vbox1, frame_scr, _("Scroll"));
vbox_scr = gtk_vbox_new (FALSE, 0);
@ -1879,7 +1872,6 @@ static void prefs_message_create(void)
message.chkbtn_disphdrpane = chkbtn_disphdrpane;
message.chkbtn_disphdr = chkbtn_disphdr;
message.spinbtn_linespc = spinbtn_linespc;
message.chkbtn_headspc = chkbtn_headspc;
message.chkbtn_smoothscroll = chkbtn_smoothscroll;
message.spinbtn_scrollstep = spinbtn_scrollstep;
@ -2458,12 +2450,12 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
gtk_label_set_justify(GTK_LABEL(label3), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_widget_grab_default(ok_btn);
gtk_widget_show(confirm_area);
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_box_pack_start(GTK_BOX(vbox1), confirm_area, FALSE, FALSE, 0);
gtk_widget_show(confirm_area);
gtk_widget_grab_default(ok_btn);
/* set the current format */
gtk_entry_set_text(GTK_ENTRY(datefmt_entry), prefs_common.date_format);
@ -2553,8 +2545,9 @@ static void prefs_keybind_select(void)
hbox1 = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
gtkut_button_set_create_stock (&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtkut_stock_button_set_create (&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_box_pack_end (GTK_BOX (hbox1), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default (ok_btn);

View file

@ -225,7 +225,6 @@ struct _PrefsCommon
gboolean conv_mb_alnum;
gboolean display_header_pane;
gboolean display_header;
gboolean head_space;
gint line_space;
gboolean enable_smooth_scroll;
gint scroll_step;

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2003 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -168,8 +168,9 @@ static void prefs_custom_header_create(void)
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_widget_show (confirm_area);
gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default (ok_btn);
@ -545,7 +546,7 @@ static void prefs_custom_header_delete_cb(void)
if (alertpanel(_("Delete header"),
_("Do you really want to delete this header?"),
_("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
return;
gtk_tree_model_get(model, &sel,

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -216,8 +216,9 @@ static void prefs_display_header_create(void)
gtk_widget_show (btn_hbox);
gtk_box_pack_end (GTK_BOX (vbox), btn_hbox, FALSE, FALSE, 0);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_widget_show (confirm_area);
gtk_box_pack_end (GTK_BOX(btn_hbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default (ok_btn);

View file

@ -217,7 +217,7 @@ static void prefs_filtering_create(void)
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_widget_show (confirm_area);
gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);

View file

@ -290,7 +290,7 @@ static void prefs_filtering_action_create(void)
gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_widget_show(confirm_area);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2002 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -484,11 +484,11 @@ void prefs_dialog_create(PrefsDialog *dialog)
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
gtk_notebook_popup_enable (GTK_NOTEBOOK (notebook));
gtkut_button_set_create(&confirm_area,
&ok_btn, _("OK"),
&cancel_btn, _("Cancel"),
&apply_btn, _("Apply"));
gtkut_stock_button_set_create(&confirm_area,
&ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
&apply_btn, GTK_STOCK_APPLY);
gtk_widget_show(confirm_area);
gtk_box_pack_end (GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);

View file

@ -387,7 +387,7 @@ static void prefs_matcher_create(void)
gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_widget_show(confirm_area);
gtk_box_pack_end(GTK_BOX(vbox), confirm_area, FALSE, FALSE, 0);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2001 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -341,8 +341,9 @@ static void prefs_summary_column_create(void)
G_CALLBACK(prefs_summary_column_set_to_default),
NULL);
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL,
NULL, NULL);
gtk_widget_show(confirm_area);
gtk_box_pack_end(GTK_BOX(btn_hbox), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);

View file

@ -1,7 +1,7 @@
/*
* Sylpheed templates subsystem
* Copyright (C) 2001 Alexander Barinov
* Copyright (C) 2001-2002 Hiroyuki Yamamoto
* Copyright (C) 2001-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -266,8 +266,8 @@ static void prefs_template_window_create(void)
gtk_container_add(GTK_CONTAINER(scroll1), list_view);
/* ok | cancel */
gtkut_button_set_create_stock(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
gtk_widget_show(confirm_area);
gtk_box_pack_end(GTK_BOX(vbox2), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(ok_btn);
@ -549,7 +549,7 @@ static void prefs_template_delete_cb(void)
if (alertpanel(_("Delete template"),
_("Do you really want to delete this template?"),
_("Yes"), _("No"), NULL) != G_ALERTDEFAULT)
GTK_STOCK_YES, GTK_STOCK_NO, NULL) != G_ALERTDEFAULT)
return;
gtk_list_store_remove(GTK_LIST_STORE(model), &row);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2003 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -87,6 +87,8 @@ SourceWindow *source_window_create(void)
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_SHADOW_IN);
gtk_container_add(GTK_CONTAINER(window), scrolledwin);
gtk_widget_show(scrolledwin);

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -219,10 +219,10 @@ static void summary_search_create(SummaryView *summaryview)
g_signal_connect(G_OBJECT(all_checkbtn), "clicked",
G_CALLBACK(all_clicked), summaryview);
gtkut_button_set_create_stock(&confirm_area,
gtkut_stock_button_set_create(&confirm_area,
&search_btn, GTK_STOCK_FIND,
&clear_btn, GTK_STOCK_CLEAR,
&close_btn, GTK_STOCK_CLOSE);
&clear_btn, GTK_STOCK_CLEAR,
&close_btn, GTK_STOCK_CLOSE);
gtk_widget_show (confirm_area);
gtk_box_pack_start (GTK_BOX (vbox1), confirm_area, FALSE, FALSE, 0);
gtk_widget_grab_default(search_btn);
@ -328,7 +328,7 @@ static void summary_search_execute(GtkButton *button, gpointer data)
str = _("End of list reached; continue from beginning?");
val = alertpanel(_("Search finished"), str,
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (G_ALERTDEFAULT == val) {
if (backward)
node = GTK_CTREE_NODE

View file

@ -821,7 +821,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item)
val = alertpanel(_("Process mark"),
_("Some marks are left. Process it?"),
_("Yes"), _("No"), _("Cancel"));
GTK_STOCK_YES, GTK_STOCK_NO, GTK_STOCK_CANCEL);
if (G_ALERTDEFAULT == val) {
summary_unlock(summaryview);
summary_execute(summaryview);
@ -1284,7 +1284,7 @@ void summary_select_prev_unread(SummaryView *summaryview)
val = alertpanel(_("No more unread messages"),
_("No unread message found. "
"Search from the end?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTDEFAULT;
@ -1336,7 +1336,7 @@ void summary_select_next_unread(SummaryView *summaryview)
val = alertpanel(_("No more unread messages"),
_("No unread message found. "
"Go to next folder?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTDEFAULT;
@ -1376,7 +1376,7 @@ void summary_select_prev_new(SummaryView *summaryview)
val = alertpanel(_("No more new messages"),
_("No new message found. "
"Search from the end?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_NEW, FALSE);
@ -1400,7 +1400,8 @@ void summary_select_next_new(SummaryView *summaryview)
val = alertpanel(_("No more new messages"),
_("No new message found. "
"Go to next folder?"),
_("Yes"), _("Search again"), _("No"));
GTK_STOCK_YES, _("Search again"),
GTK_STOCK_NO);
if (val == G_ALERTDEFAULT) {
g_signal_stop_emission_by_name(G_OBJECT(ctree),"key_press_event");
folderview_select_next_unread(summaryview->folderview);
@ -1428,7 +1429,7 @@ void summary_select_prev_marked(SummaryView *summaryview)
val = alertpanel(_("No more marked messages"),
_("No marked message found. "
"Search from the end?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_MARKED, TRUE);
@ -1453,7 +1454,7 @@ void summary_select_next_marked(SummaryView *summaryview)
val = alertpanel(_("No more marked messages"),
_("No marked message found. "
"Search from the beginning?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_next_flagged_msg(summaryview, NULL,
MSG_MARKED, TRUE);
@ -1478,7 +1479,7 @@ void summary_select_prev_labeled(SummaryView *summaryview)
val = alertpanel(_("No more labeled messages"),
_("No labeled message found. "
"Search from the end?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_CLABEL_FLAG_MASK, TRUE);
@ -1503,7 +1504,7 @@ void summary_select_next_labeled(SummaryView *summaryview)
val = alertpanel(_("No more labeled messages"),
_("No labeled message found. "
"Search from the beginning?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (val != G_ALERTDEFAULT) return;
node = summary_find_next_flagged_msg(summaryview, NULL,
MSG_CLABEL_FLAG_MASK, TRUE);
@ -3042,7 +3043,7 @@ void summary_delete(SummaryView *summaryview)
aval = alertpanel(_("Delete message(s)"),
_("Do you really want to delete message(s) from the trash?"),
_("Yes"), _("No"), NULL);
GTK_STOCK_YES, GTK_STOCK_NO, NULL);
if (aval != G_ALERTDEFAULT) return;
for (cur = GTK_CLIST(ctree)->selection; cur != NULL; cur = cur->next) {
@ -3357,7 +3358,8 @@ void summary_save_as(SummaryView *summaryview)
if (is_file_exist(dest)) {
aval = alertpanel(_("Append or Overwrite"),
_("Append or overwrite existing file?"),
_("Append"), _("Overwrite"), _("Cancel"));
_("Append"), _("Overwrite"),
GTK_STOCK_CANCEL);
if (aval != 0 && aval != 1)
return;
}

View file

@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -219,9 +219,10 @@ TextView *textview_create(void)
scrolledwin = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_widget_set_size_request(scrolledwin, prefs_common.mainview_width, -1);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_SHADOW_IN);
gtk_widget_set_size_request
(scrolledwin, prefs_common.mainview_width, -1);
/* create GtkSText widgets for single-byte and multi-byte character */
text = gtk_text_view_new();
@ -230,6 +231,8 @@ TextView *textview_create(void)
gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD_CHAR);
gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text), FALSE);
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 6);
gtk_text_view_set_right_margin(GTK_TEXT_VIEW(text), 6);
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
@ -337,11 +340,9 @@ static void textview_create_tags(GtkTextView *text, TextView *textview)
void textview_init(TextView *textview)
{
gtkut_widget_disable_theme_engine(textview->text);
textview_update_message_colors();
textview_set_all_headers(textview, FALSE);
textview_set_font(textview, NULL);
textview_create_tags(GTK_TEXT_VIEW(textview->text), textview);
}
@ -1121,22 +1122,19 @@ static void textview_make_clickable_parts(TextView *textview,
last->ep);
uri->start = gtk_text_iter_get_offset(&iter);
gtk_text_buffer_insert_with_tags_by_name
(buffer, &iter,
last->bp, last->ep - last->bp,
uri_tag, NULL);
(buffer, &iter, last->bp, last->ep - last->bp,
uri_tag, fg_tag, NULL);
uri->end = gtk_text_iter_get_offset(&iter);
textview->uri_list =
g_slist_append(textview->uri_list, uri);
}
if (*normal_text)
gtk_text_buffer_insert_with_tags_by_name(buffer, &iter,
normal_text, -1,
fg_tag, NULL);
gtk_text_buffer_insert_with_tags_by_name
(buffer, &iter, normal_text, -1, fg_tag, NULL);
} else {
gtk_text_buffer_insert_with_tags_by_name(buffer, &iter,
linebuf, -1,
fg_tag, NULL);
gtk_text_buffer_insert_with_tags_by_name
(buffer, &iter, linebuf, -1, fg_tag, NULL);
}
}
@ -1164,7 +1162,7 @@ static void textview_write_line(TextView *textview, const gchar *str,
}
strcrchomp(buf);
if (prefs_common.conv_mb_alnum) conv_mb_alnum(buf);
//if (prefs_common.conv_mb_alnum) conv_mb_alnum(buf);
fg_color = NULL;
/* change color of quotation
@ -1253,8 +1251,8 @@ void textview_write_link(TextView *textview, const gchar *str,
r_uri = g_new(RemoteURI, 1);
r_uri->uri = g_strdup(uri);
r_uri->start = gtk_text_iter_get_offset(&iter);
gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, bufp, -1,
"link", NULL);
gtk_text_buffer_insert_with_tags_by_name
(buffer, &iter, bufp, -1, "link", NULL);
r_uri->end = gtk_text_iter_get_offset(&iter);
textview->uri_list = g_slist_append(textview->uri_list, r_uri);
}
@ -1304,11 +1302,6 @@ void textview_set_font(TextView *textview, const gchar *codeset)
prefs_common.line_space / 2);
gtk_text_view_set_pixels_below_lines(GTK_TEXT_VIEW(textview->text),
prefs_common.line_space / 2);
if (prefs_common.head_space) {
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(textview->text), 6);
} else {
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(textview->text), 0);
}
}
void textview_set_text(TextView *textview, const gchar *text)
@ -1606,19 +1599,15 @@ void textview_scroll_one_line(TextView *textview, gboolean up)
if (!up) {
upper = vadj->upper - vadj->page_size;
if (vadj->value < upper) {
vadj->value +=
vadj->step_increment * 4;
vadj->value =
MIN(vadj->value, upper);
vadj->value += vadj->step_increment;
vadj->value = MIN(vadj->value, upper);
g_signal_emit_by_name(G_OBJECT(vadj),
"value_changed", 0);
}
} else {
if (vadj->value > 0.0) {
vadj->value -=
vadj->step_increment * 4;
vadj->value =
MAX(vadj->value, 0.0);
vadj->value -= vadj->step_increment;
vadj->value = MAX(vadj->value, 0.0);
g_signal_emit_by_name(G_OBJECT(vadj),
"value_changed", 0);
}
@ -1702,8 +1691,7 @@ static void textview_smooth_scroll_one_line(TextView *textview, gboolean up)
upper = vadj->upper - vadj->page_size;
if (vadj->value < upper) {
old_value = vadj->value;
last_value = vadj->value +
vadj->step_increment * 4;
last_value = vadj->value + vadj->step_increment;
last_value = MIN(last_value, upper);
textview_smooth_scroll_do(textview, old_value,
@ -1713,8 +1701,7 @@ static void textview_smooth_scroll_one_line(TextView *textview, gboolean up)
} else {
if (vadj->value > 0.0) {
old_value = vadj->value;
last_value = vadj->value -
vadj->step_increment * 4;
last_value = vadj->value - vadj->step_increment;
last_value = MAX(last_value, 0.0);
textview_smooth_scroll_do(textview, old_value,
@ -2158,8 +2145,9 @@ static gboolean textview_uri_security_check(TextView *textview, RemoteURI *uri)
"the apparent URL (%s).\n"
"Open it anyway?"),
uri->uri, visible_str);
aval = alertpanel_with_type(_("Warning"), msg, _("Yes"), _("No"), NULL,
NULL, ALERT_WARNING);
aval = alertpanel_with_type(_("Warning"), msg,
GTK_STOCK_YES, GTK_STOCK_NO,
NULL, NULL, ALERT_WARNING);
g_free(msg);
if (aval == G_ALERTDEFAULT)
retval = TRUE;