2006-07-06 [wwp] 2.3.1cvs63
* src/account.c * src/addressbook.c * src/addressitem.h * src/folderview.c * src/mainwindow.c * src/manual.c * src/manual.h * src/message_search.c * src/prefs_actions.c * src/prefs_filtering.c * src/prefs_filtering.h * src/prefs_template.c * src/summary_search.c * src/summaryview.c * src/gtk/gtkutils.c * src/gtk/gtkutils.h * src/gtk/pluginwindow.c add help buttons to some dialogs. Clicking such buttons opens a relevant manual page. Patch by Fabien Vantard <fzzzzz@gmail.com>.
This commit is contained in:
parent
ee01c2ac5b
commit
fefa13721e
20 changed files with 216 additions and 54 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
2006-07-06 [wwp] 2.3.1cvs63
|
||||
|
||||
* src/account.c
|
||||
* src/addressbook.c
|
||||
* src/addressitem.h
|
||||
* src/folderview.c
|
||||
* src/mainwindow.c
|
||||
* src/manual.c
|
||||
* src/manual.h
|
||||
* src/message_search.c
|
||||
* src/prefs_actions.c
|
||||
* src/prefs_filtering.c
|
||||
* src/prefs_filtering.h
|
||||
* src/prefs_template.c
|
||||
* src/summary_search.c
|
||||
* src/summaryview.c
|
||||
* src/gtk/gtkutils.c
|
||||
* src/gtk/gtkutils.h
|
||||
* src/gtk/pluginwindow.c
|
||||
add help buttons to some dialogs. Clicking such buttons opens a
|
||||
relevant manual page. Patch by Fabien Vantard <fzzzzz@gmail.com>.
|
||||
|
||||
2006-07-06 [paul] 2.3.1cvs62
|
||||
|
||||
* src/textview.c
|
||||
|
|
|
@ -1663,3 +1663,4 @@
|
|||
( cvs diff -u -r 1.2.2.24 -r 1.2.2.25 src/gtk/filesel.c; ) > 2.3.1cvs60.patchset
|
||||
( cvs diff -u -r 1.96.2.121 -r 1.96.2.122 src/textview.c; cvs diff -u -r 1.382.2.292 -r 1.382.2.293 src/compose.c; ) > 2.3.1cvs61.patchset
|
||||
( cvs diff -u -r 1.96.2.122 -r 1.96.2.123 src/textview.c; ) > 2.3.1cvs62.patchset
|
||||
( cvs diff -u -r 1.61.2.46 -r 1.61.2.47 src/account.c; cvs diff -u -r 1.60.2.58 -r 1.60.2.59 src/addressbook.c; cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/addressitem.h; cvs diff -u -r 1.207.2.108 -r 1.207.2.109 src/folderview.c; cvs diff -u -r 1.274.2.123 -r 1.274.2.124 src/mainwindow.c; cvs diff -u -r 1.11.2.8 -r 1.11.2.9 src/manual.c; cvs diff -u -r 1.8.2.3 -r 1.8.2.4 src/manual.h; cvs diff -u -r 1.3.12.15 -r 1.3.12.16 src/message_search.c; cvs diff -u -r 1.60.2.35 -r 1.60.2.36 src/prefs_actions.c; cvs diff -u -r 1.59.2.35 -r 1.59.2.36 src/prefs_filtering.c; cvs diff -u -r 1.6.2.3 -r 1.6.2.4 src/prefs_filtering.h; cvs diff -u -r 1.12.2.26 -r 1.12.2.27 src/prefs_template.c; cvs diff -u -r 1.15.2.29 -r 1.15.2.30 src/summary_search.c; cvs diff -u -r 1.395.2.222 -r 1.395.2.223 src/summaryview.c; cvs diff -u -r 1.5.2.32 -r 1.5.2.33 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.22 -r 1.4.2.23 src/gtk/gtkutils.h; cvs diff -u -r 1.5.2.30 -r 1.5.2.31 src/gtk/pluginwindow.c; ) > 2.3.1cvs63.patchset
|
||||
|
|
|
@ -11,7 +11,7 @@ MINOR_VERSION=3
|
|||
MICRO_VERSION=1
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=62
|
||||
EXTRA_VERSION=63
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "procheader.h"
|
||||
#include "customheader.h"
|
||||
#include "remotefolder.h"
|
||||
#include "manual.h"
|
||||
|
||||
enum {
|
||||
ACCOUNT_IS_DEFAULT, /* GDK_TYPE_PIXMAP! */
|
||||
|
@ -668,6 +669,7 @@ static void account_edit_create(void)
|
|||
GtkWidget *default_btn;
|
||||
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *close_btn;
|
||||
|
||||
static GdkGeometry geometry;
|
||||
|
@ -779,8 +781,9 @@ 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_stock_button_set_create(&hbbox, &close_btn, GTK_STOCK_CLOSE,
|
||||
NULL, NULL, NULL, NULL);
|
||||
gtkut_stock_button_set_create_with_help(&hbbox, &help_btn,
|
||||
&close_btn, GTK_STOCK_CLOSE,
|
||||
NULL, NULL, NULL, NULL);
|
||||
gtk_widget_show(hbbox);
|
||||
|
||||
gtk_box_pack_end (GTK_BOX (hbox), hbbox, FALSE, FALSE, 0);
|
||||
|
@ -789,6 +792,9 @@ static void account_edit_create(void)
|
|||
g_signal_connect (G_OBJECT (close_btn), "clicked",
|
||||
G_CALLBACK (account_edit_close),
|
||||
NULL);
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_ACCOUNTPREFS);
|
||||
|
||||
account_create_list_view_images(list_view);
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#include "importldif.h"
|
||||
#include "importmutt.h"
|
||||
#include "importpine.h"
|
||||
#include "manual.h"
|
||||
|
||||
#ifdef USE_JPILOT
|
||||
#include "jpilot.h"
|
||||
|
@ -806,6 +807,7 @@ static void addressbook_create(void)
|
|||
GtkWidget *statusbar;
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *hsbox;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *del_btn;
|
||||
GtkWidget *edit_btn;
|
||||
GtkWidget *reg_btn;
|
||||
|
@ -986,6 +988,8 @@ static void addressbook_create(void)
|
|||
gtk_container_set_border_width(GTK_CONTAINER(hbbox), 4);
|
||||
gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
|
||||
|
||||
gtkut_stock_button_add_help(hbbox, &help_btn);
|
||||
|
||||
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||
edit_btn = gtk_button_new_from_stock(GTK_STOCK_EDIT);
|
||||
#else
|
||||
|
@ -1005,6 +1009,10 @@ static void addressbook_create(void)
|
|||
GTK_WIDGET_SET_FLAGS(lup_btn, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), lup_btn, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_ADDRBOOK);
|
||||
|
||||
g_signal_connect(G_OBJECT(edit_btn), "clicked",
|
||||
G_CALLBACK(addressbook_edit_clicked), NULL);
|
||||
g_signal_connect(G_OBJECT(del_btn), "clicked",
|
||||
|
@ -1103,6 +1111,7 @@ static void addressbook_create(void)
|
|||
addrbook.status_cid = gtk_statusbar_get_context_id(
|
||||
GTK_STATUSBAR(statusbar), "Addressbook Window" );
|
||||
|
||||
addrbook.help_btn = help_btn;
|
||||
addrbook.edit_btn = edit_btn;
|
||||
addrbook.del_btn = del_btn;
|
||||
addrbook.reg_btn = reg_btn;
|
||||
|
|
|
@ -68,6 +68,7 @@ struct _AddressBook_win
|
|||
GtkWidget *label;
|
||||
GtkWidget *statusbar;
|
||||
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *edit_btn;
|
||||
GtkWidget *del_btn;
|
||||
GtkWidget *reg_btn;
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#include "partial_download.h"
|
||||
#include "prefs_folder_column.h"
|
||||
#include "filtering.h"
|
||||
#include "manual.h"
|
||||
|
||||
#define COL_FOLDER_WIDTH 150
|
||||
#define COL_NUM_WIDTH 32
|
||||
|
@ -2467,7 +2468,8 @@ static void folderview_processing_cb(FolderView *folderview, guint action,
|
|||
title = g_strdup_printf (_("Processing configuration for folder %s"), id);
|
||||
g_free (id);
|
||||
|
||||
prefs_filtering_open(&item->prefs->processing, title, NULL, NULL);
|
||||
prefs_filtering_open(&item->prefs->processing, title,
|
||||
MANUAL_ANCHOR_PROCESSING, NULL, NULL);
|
||||
g_free (title);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
#include "prefs_common.h"
|
||||
#include "manage_window.h"
|
||||
#include "base64.h"
|
||||
#include "manual.h"
|
||||
|
||||
gboolean gtkut_get_font_size(GtkWidget *widget,
|
||||
gint *width, gint *height)
|
||||
|
@ -104,6 +105,40 @@ void gtkut_convert_int_to_gdk_color(gint rgbvalue, GdkColor *color)
|
|||
color->blue = (int) (((gdouble) (rgbvalue & 0x0000ff) / 255.0) * 65535.0);
|
||||
}
|
||||
|
||||
void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn)
|
||||
{
|
||||
g_return_if_fail(bbox != NULL);
|
||||
|
||||
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||
*help_btn = gtk_button_new_from_stock(GTK_STOCK_HELP);
|
||||
#else
|
||||
*help_btn = gtk_button_new_with_label(_("Help"));
|
||||
#endif
|
||||
|
||||
GTK_WIDGET_SET_FLAGS(*help_btn, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_end(GTK_BOX (bbox), *help_btn, TRUE, TRUE, 0);
|
||||
gtk_button_box_set_child_secondary(GTK_BUTTON_BOX (bbox),
|
||||
*help_btn, TRUE);
|
||||
gtk_widget_set_sensitive(*help_btn,
|
||||
manual_available(MANUAL_MANUAL_LOCAL));
|
||||
gtk_widget_show(*help_btn);
|
||||
}
|
||||
|
||||
void gtkut_stock_button_set_create_with_help(GtkWidget **bbox,
|
||||
GtkWidget **help_button,
|
||||
GtkWidget **button1, const gchar *label1,
|
||||
GtkWidget **button2, const gchar *label2,
|
||||
GtkWidget **button3, const gchar *label3)
|
||||
{
|
||||
g_return_if_fail(bbox != NULL);
|
||||
g_return_if_fail(button1 != NULL);
|
||||
|
||||
gtkut_stock_button_set_create(bbox, button1, label1,
|
||||
button2, label2, button3, label3);
|
||||
|
||||
gtkut_stock_button_add_help(*bbox, help_button);
|
||||
}
|
||||
|
||||
void gtkut_stock_button_set_create(GtkWidget **bbox,
|
||||
GtkWidget **button1, const gchar *label1,
|
||||
GtkWidget **button2, const gchar *label2,
|
||||
|
|
|
@ -96,6 +96,14 @@ gboolean gtkut_get_font_size (GtkWidget *widget,
|
|||
void gtkut_convert_int_to_gdk_color (gint rgbvalue,
|
||||
GdkColor *color);
|
||||
|
||||
void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn);
|
||||
|
||||
void gtkut_stock_button_set_create_with_help(GtkWidget **bbox,
|
||||
GtkWidget **help_button,
|
||||
GtkWidget **button1, const gchar *label1,
|
||||
GtkWidget **button2, const gchar *label2,
|
||||
GtkWidget **button3, const gchar *label3);
|
||||
|
||||
void gtkut_stock_button_set_create (GtkWidget **bbox,
|
||||
GtkWidget **button1,
|
||||
const gchar *label1,
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "alertpanel.h"
|
||||
#include "prefs_common.h"
|
||||
#include "../inc.h"
|
||||
#include "manual.h"
|
||||
|
||||
enum {
|
||||
PLUGINWINDOW_NAME, /*<! plugin name */
|
||||
|
@ -266,6 +267,7 @@ void pluginwindow_create()
|
|||
GtkWidget *scrolledwindow3;
|
||||
GtkWidget *plugin_desc;
|
||||
GtkWidget *hbuttonbox1, *hbox3;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *load_btn;
|
||||
GtkWidget *unload_btn;
|
||||
GtkWidget *close_btn;
|
||||
|
@ -339,30 +341,21 @@ void pluginwindow_create()
|
|||
gtk_box_pack_start(GTK_BOX(hbox3), get_more_btn, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox3), hbuttonbox1, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(vbox1), hbox3, FALSE, FALSE, 0);
|
||||
gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox1),
|
||||
GTK_BUTTONBOX_END);
|
||||
|
||||
gtkut_stock_button_set_create_with_help(&hbuttonbox1, &help_btn,
|
||||
&load_btn, _("Load Plugin..."),
|
||||
&unload_btn, _("Unload Plugin"),
|
||||
&close_btn, GTK_STOCK_CLOSE);
|
||||
gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox1), 6);
|
||||
|
||||
load_btn = gtk_button_new_with_label(_("Load Plugin..."));
|
||||
gtk_widget_show(load_btn);
|
||||
gtk_container_add(GTK_CONTAINER(hbuttonbox1), load_btn);
|
||||
GTK_WIDGET_SET_FLAGS(load_btn, GTK_CAN_DEFAULT);
|
||||
|
||||
unload_btn = gtk_button_new_with_label(_("Unload Plugin"));
|
||||
gtk_widget_show(unload_btn);
|
||||
gtk_container_add(GTK_CONTAINER(hbuttonbox1), unload_btn);
|
||||
GTK_WIDGET_SET_FLAGS(unload_btn, GTK_CAN_DEFAULT);
|
||||
|
||||
close_btn = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
|
||||
gtk_widget_show(close_btn);
|
||||
gtk_container_add(GTK_CONTAINER(hbuttonbox1), close_btn);
|
||||
GTK_WIDGET_SET_FLAGS(close_btn, GTK_CAN_DEFAULT);
|
||||
/* ----------------------------------------------------------- */
|
||||
gtk_widget_show(hbuttonbox1);
|
||||
gtk_box_pack_end (GTK_BOX (hbox3), hbuttonbox1, FALSE, FALSE, 0);
|
||||
|
||||
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(plugin_desc), GTK_WRAP_WORD);
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(unload_btn), FALSE);
|
||||
|
||||
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_PLUGINS);
|
||||
g_signal_connect(G_OBJECT(load_btn), "clicked",
|
||||
G_CALLBACK(load_cb), pluginwindow);
|
||||
g_signal_connect(G_OBJECT(unload_btn), "clicked",
|
||||
|
|
|
@ -3567,6 +3567,7 @@ static void prefs_pre_processing_open_cb(MainWindow *mainwin, guint action,
|
|||
{
|
||||
prefs_filtering_open(&pre_global_processing,
|
||||
_("Processing rules to apply before folder rules"),
|
||||
MANUAL_ANCHOR_PROCESSING,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -3575,6 +3576,7 @@ static void prefs_post_processing_open_cb(MainWindow *mainwin, guint action,
|
|||
{
|
||||
prefs_filtering_open(&post_global_processing,
|
||||
_("Processing rules to apply after folder rules"),
|
||||
MANUAL_ANCHOR_PROCESSING,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -3583,6 +3585,7 @@ static void prefs_filtering_open_cb(MainWindow *mainwin, guint action,
|
|||
{
|
||||
prefs_filtering_open(&filtering_rules,
|
||||
_("Filtering configuration"),
|
||||
MANUAL_ANCHOR_FILTERING,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -3672,7 +3675,7 @@ static void plugins_open_cb(GtkMenuItem *menuitem, gpointer data)
|
|||
static void manual_open_cb(MainWindow *mainwin, guint action,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
manual_open((ManualType)action);
|
||||
manual_open((ManualType)action, NULL);
|
||||
}
|
||||
|
||||
static void legend_open_cb(GtkMenuItem *menuitem, gpointer data)
|
||||
|
|
16
src/manual.c
16
src/manual.c
|
@ -111,7 +111,7 @@ gboolean manual_available(ManualType type)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void manual_open(ManualType type)
|
||||
void manual_open(ManualType type, gchar *url_anchor)
|
||||
{
|
||||
gchar *uri = NULL;
|
||||
gchar *dir;
|
||||
|
@ -120,7 +120,14 @@ void manual_open(ManualType type)
|
|||
case MANUAL_MANUAL_LOCAL:
|
||||
dir = get_local_path_with_locale(MANUALDIR);
|
||||
if (dir != NULL) {
|
||||
uri = g_strconcat("file://", dir, G_DIR_SEPARATOR_S, MANUAL_HTML_INDEX, NULL);
|
||||
gchar *tmp_anchor = NULL;
|
||||
if (url_anchor && *url_anchor != '\0')
|
||||
tmp_anchor = g_strconcat("#", url_anchor, NULL);
|
||||
uri = g_strconcat("file://",
|
||||
dir, G_DIR_SEPARATOR_S, MANUAL_HTML_INDEX,
|
||||
tmp_anchor,
|
||||
NULL);
|
||||
g_free(tmp_anchor);
|
||||
g_free(dir);
|
||||
}
|
||||
break;
|
||||
|
@ -134,3 +141,8 @@ void manual_open(ManualType type)
|
|||
open_uri(uri, prefs_common.uri_cmd);
|
||||
g_free(uri);
|
||||
}
|
||||
|
||||
void manual_open_with_anchor_cb(GtkWidget *widget, gchar *url_anchor)
|
||||
{
|
||||
manual_open(MANUAL_MANUAL_LOCAL, url_anchor);
|
||||
}
|
||||
|
|
13
src/manual.h
13
src/manual.h
|
@ -26,7 +26,18 @@ typedef enum
|
|||
MANUAL_FAQ_CLAWS,
|
||||
} ManualType;
|
||||
|
||||
#define MANUAL_ANCHOR_WIZARD "start_wizard"
|
||||
#define MANUAL_ANCHOR_FILTERING "handling_filters"
|
||||
#define MANUAL_ANCHOR_SEARCHING "handling_searching"
|
||||
#define MANUAL_ANCHOR_ACCOUNTPREFS "ch_account"
|
||||
#define MANUAL_ANCHOR_ADDRBOOK "ch_addrbook"
|
||||
#define MANUAL_ANCHOR_ACTIONS "adv_actions"
|
||||
#define MANUAL_ANCHOR_TEMPLATES "adv_templates"
|
||||
#define MANUAL_ANCHOR_PROCESSING "adv_processing"
|
||||
#define MANUAL_ANCHOR_PLUGINS "adv_plugins"
|
||||
|
||||
gboolean manual_available (ManualType type);
|
||||
void manual_open (ManualType type);
|
||||
void manual_open (ManualType type, gchar *url_anchor);
|
||||
void manual_open_with_anchor_cb(GtkWidget *widget, gchar *url_anchor);
|
||||
|
||||
#endif /* __MANUAL_H__ */
|
||||
|
|
|
@ -49,11 +49,13 @@
|
|||
#include "gtkutils.h"
|
||||
#include "manage_window.h"
|
||||
#include "alertpanel.h"
|
||||
#include "manual.h"
|
||||
|
||||
static struct MessageSearchWindow {
|
||||
GtkWidget *window;
|
||||
GtkWidget *body_entry;
|
||||
GtkWidget *case_checkbtn;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *prev_btn;
|
||||
GtkWidget *next_btn;
|
||||
GtkWidget *close_btn;
|
||||
|
@ -119,6 +121,7 @@ static void message_search_create(void)
|
|||
GtkWidget *case_checkbtn;
|
||||
|
||||
GtkWidget *confirm_area;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *prev_btn;
|
||||
GtkWidget *next_btn;
|
||||
GtkWidget *close_btn;
|
||||
|
@ -163,14 +166,17 @@ static void message_search_create(void)
|
|||
gtk_box_pack_start (GTK_BOX (checkbtn_hbox), case_checkbtn,
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
gtkut_stock_button_set_create(&confirm_area,
|
||||
&prev_btn, GTK_STOCK_GO_BACK,
|
||||
&next_btn, GTK_STOCK_GO_FORWARD,
|
||||
&close_btn, GTK_STOCK_CLOSE);
|
||||
gtkut_stock_button_set_create_with_help(&confirm_area, &help_btn,
|
||||
&prev_btn, GTK_STOCK_GO_BACK,
|
||||
&next_btn, GTK_STOCK_GO_FORWARD,
|
||||
&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(next_btn);
|
||||
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_SEARCHING);
|
||||
g_signal_connect(G_OBJECT(prev_btn), "clicked",
|
||||
G_CALLBACK(message_search_prev_clicked), NULL);
|
||||
g_signal_connect(G_OBJECT(next_btn), "clicked",
|
||||
|
@ -184,6 +190,7 @@ static void message_search_create(void)
|
|||
search_window.window = window;
|
||||
search_window.body_entry = body_entry;
|
||||
search_window.case_checkbtn = case_checkbtn;
|
||||
search_window.help_btn = help_btn;
|
||||
search_window.prev_btn = prev_btn;
|
||||
search_window.next_btn = next_btn;
|
||||
search_window.close_btn = close_btn;
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "action.h"
|
||||
#include "description_window.h"
|
||||
#include "gtkutils.h"
|
||||
#include "manual.h"
|
||||
|
||||
enum {
|
||||
PREFS_ACTIONS_STRING, /*!< string pointer managed by list store,
|
||||
|
@ -76,7 +77,7 @@ static void prefs_actions_set_dialog (void);
|
|||
static gint prefs_actions_clist_set_row (GtkTreeIter *row);
|
||||
|
||||
/* callback functions */
|
||||
static void prefs_actions_help_cb (GtkWidget *w,
|
||||
static void prefs_actions_info_cb (GtkWidget *w,
|
||||
GtkWidget *window);
|
||||
static void prefs_actions_register_cb (GtkWidget *w,
|
||||
gpointer data);
|
||||
|
@ -145,6 +146,7 @@ static void prefs_actions_create(MainWindow *mainwin)
|
|||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *ok_btn;
|
||||
GtkWidget *cancel_btn;
|
||||
GtkWidget *confirm_area;
|
||||
|
@ -169,7 +171,7 @@ static void prefs_actions_create(MainWindow *mainwin)
|
|||
GtkWidget *cond_scrolledwin;
|
||||
GtkWidget *cond_list_view;
|
||||
|
||||
GtkWidget *help_button;
|
||||
GtkWidget *info_btn;
|
||||
|
||||
GtkWidget *btn_vbox;
|
||||
GtkWidget *up_btn;
|
||||
|
@ -189,9 +191,10 @@ static void prefs_actions_create(MainWindow *mainwin)
|
|||
gtk_widget_show(vbox);
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
|
||||
gtkut_stock_button_set_create(&confirm_area, &cancel_btn, GTK_STOCK_CANCEL,
|
||||
&ok_btn, GTK_STOCK_OK,
|
||||
NULL, NULL);
|
||||
gtkut_stock_button_set_create_with_help(&confirm_area, &help_btn,
|
||||
&cancel_btn, GTK_STOCK_CANCEL,
|
||||
&ok_btn, GTK_STOCK_OK,
|
||||
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);
|
||||
|
@ -208,6 +211,9 @@ static void prefs_actions_create(MainWindow *mainwin)
|
|||
G_CALLBACK(prefs_actions_ok), mainwin);
|
||||
g_signal_connect(G_OBJECT(cancel_btn), "clicked",
|
||||
G_CALLBACK(prefs_actions_cancel), NULL);
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_ACTIONS);
|
||||
|
||||
vbox1 = gtk_vbox_new(FALSE, 8);
|
||||
gtk_widget_show(vbox1);
|
||||
|
@ -271,11 +277,11 @@ static void prefs_actions_create(MainWindow *mainwin)
|
|||
g_signal_connect(G_OBJECT(del_btn), "clicked",
|
||||
G_CALLBACK(prefs_actions_delete_cb), NULL);
|
||||
|
||||
help_button = gtk_button_new_from_stock(GTK_STOCK_INFO);
|
||||
gtk_widget_show(help_button);
|
||||
gtk_box_pack_end(GTK_BOX(reg_hbox), help_button, FALSE, FALSE, 0);
|
||||
g_signal_connect(G_OBJECT(help_button), "clicked",
|
||||
G_CALLBACK(prefs_actions_help_cb), GTK_WINDOW(window));
|
||||
info_btn = gtk_button_new_from_stock(GTK_STOCK_INFO);
|
||||
gtk_widget_show(info_btn);
|
||||
gtk_box_pack_end(GTK_BOX(reg_hbox), info_btn, FALSE, FALSE, 0);
|
||||
g_signal_connect(G_OBJECT(info_btn), "clicked",
|
||||
G_CALLBACK(prefs_actions_info_cb), GTK_WINDOW(window));
|
||||
|
||||
cond_hbox = gtk_hbox_new(FALSE, 8);
|
||||
gtk_widget_show(cond_hbox);
|
||||
|
@ -821,7 +827,7 @@ static DescriptionWindow actions_desc_win = {
|
|||
};
|
||||
|
||||
|
||||
static void prefs_actions_help_cb(GtkWidget *w, GtkWidget *window)
|
||||
static void prefs_actions_info_cb(GtkWidget *w, GtkWidget *window)
|
||||
{
|
||||
actions_desc_win.parent = window;
|
||||
description_window_create(&actions_desc_win);
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "filtering.h"
|
||||
#include "addr_compl.h"
|
||||
#include "colorlabel.h"
|
||||
#include "manual.h"
|
||||
|
||||
#include "matcher_parser.h"
|
||||
#include "matcher.h"
|
||||
|
@ -65,6 +66,7 @@ enum {
|
|||
static struct Filtering {
|
||||
GtkWidget *window;
|
||||
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *ok_btn;
|
||||
GtkWidget *name_entry;
|
||||
GtkWidget *cond_entry;
|
||||
|
@ -135,8 +137,11 @@ static gboolean prefs_filtering_selected (GtkTreeSelection *selector,
|
|||
gboolean currently_selected,
|
||||
gpointer data);
|
||||
|
||||
static gulong signal_id = 0; /* filtering.help_btn clicked signal */
|
||||
|
||||
void prefs_filtering_open(GSList ** p_processing,
|
||||
const gchar * title,
|
||||
const gchar *title,
|
||||
const gchar *help_url_anchor,
|
||||
const gchar *header,
|
||||
const gchar *key)
|
||||
{
|
||||
|
@ -157,7 +162,23 @@ void prefs_filtering_open(GSList ** p_processing,
|
|||
else
|
||||
gtk_window_set_title (GTK_WINDOW(filtering.window),
|
||||
_("Filtering/Processing configuration"));
|
||||
|
||||
|
||||
if (help_url_anchor != NULL) {
|
||||
if (signal_id != 0) {
|
||||
g_signal_handler_disconnect(
|
||||
G_OBJECT(filtering.help_btn),
|
||||
signal_id);
|
||||
}
|
||||
|
||||
signal_id = g_signal_connect(G_OBJECT(filtering.help_btn),
|
||||
"clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
(gchar*)help_url_anchor);
|
||||
}
|
||||
else {
|
||||
gtk_widget_set_sensitive(filtering.help_btn, FALSE);
|
||||
}
|
||||
|
||||
p_processing_list = p_processing;
|
||||
|
||||
prefs_filtering_set_dialog(header, key);
|
||||
|
@ -189,8 +210,9 @@ static void prefs_filtering_create(void)
|
|||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *ok_btn;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *cancel_btn;
|
||||
GtkWidget *ok_btn;
|
||||
GtkWidget *confirm_area;
|
||||
|
||||
GtkWidget *vbox1;
|
||||
|
@ -236,8 +258,10 @@ static void prefs_filtering_create(void)
|
|||
gtk_widget_show (vbox);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtkut_stock_button_set_create(&confirm_area, &cancel_btn, GTK_STOCK_CANCEL,
|
||||
&ok_btn, GTK_STOCK_OK, NULL, NULL);
|
||||
gtkut_stock_button_set_create_with_help(&confirm_area, &help_btn,
|
||||
&cancel_btn, GTK_STOCK_CANCEL,
|
||||
&ok_btn, GTK_STOCK_OK,
|
||||
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);
|
||||
|
@ -419,6 +443,7 @@ static void prefs_filtering_create(void)
|
|||
gtk_widget_show_all(window);
|
||||
|
||||
filtering.window = window;
|
||||
filtering.help_btn = help_btn;
|
||||
filtering.ok_btn = ok_btn;
|
||||
|
||||
filtering.name_entry = name_entry;
|
||||
|
|
|
@ -39,7 +39,8 @@ typedef enum
|
|||
#include "folder.h"
|
||||
|
||||
void prefs_filtering_open(GSList ** p_processing,
|
||||
const gchar * title,
|
||||
const gchar *title,
|
||||
const gchar *help_url_anchor,
|
||||
const gchar *header,
|
||||
const gchar *key);
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "addr_compl.h"
|
||||
#include "quote_fmt.h"
|
||||
#include "prefs_common.h"
|
||||
#include "manual.h"
|
||||
|
||||
enum {
|
||||
TEMPL_TEXT,
|
||||
|
@ -160,8 +161,9 @@ static void prefs_template_window_create(void)
|
|||
GtkWidget *scroll1;
|
||||
GtkWidget *list_view;
|
||||
GtkWidget *confirm_area;
|
||||
GtkWidget *ok_btn;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *cancel_btn;
|
||||
GtkWidget *ok_btn;
|
||||
static GdkGeometry geometry;
|
||||
|
||||
debug_print("Creating templates configuration window...\n");
|
||||
|
@ -291,9 +293,11 @@ static void prefs_template_window_create(void)
|
|||
gtk_widget_set_size_request(scroll1, -1, 140);
|
||||
gtk_container_add(GTK_CONTAINER(scroll1), list_view);
|
||||
|
||||
/* ok | cancel */
|
||||
gtkut_stock_button_set_create(&confirm_area, &cancel_btn, GTK_STOCK_CANCEL,
|
||||
&ok_btn, GTK_STOCK_OK, NULL, NULL);
|
||||
/* help | cancel | ok */
|
||||
gtkut_stock_button_set_create_with_help(&confirm_area, &help_btn,
|
||||
&cancel_btn, GTK_STOCK_CANCEL,
|
||||
&ok_btn, GTK_STOCK_OK,
|
||||
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);
|
||||
|
@ -311,6 +315,9 @@ static void prefs_template_window_create(void)
|
|||
G_CALLBACK(prefs_template_ok_cb), NULL);
|
||||
g_signal_connect(G_OBJECT(cancel_btn), "clicked",
|
||||
G_CALLBACK(prefs_template_cancel_cb), NULL);
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_TEMPLATES);
|
||||
|
||||
address_completion_start(window);
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "matcher.h"
|
||||
#include "matcher_parser.h"
|
||||
#include "prefs_matcher.h"
|
||||
#include "manual.h"
|
||||
|
||||
static struct SummarySearchWindow {
|
||||
GtkWidget *window;
|
||||
|
@ -74,6 +75,7 @@ static struct SummarySearchWindow {
|
|||
GtkWidget *case_checkbtn;
|
||||
|
||||
GtkWidget *clear_btn;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *all_btn;
|
||||
GtkWidget *prev_btn;
|
||||
GtkWidget *next_btn;
|
||||
|
@ -159,6 +161,7 @@ static void summary_search_create(void)
|
|||
GtkWidget *case_checkbtn;
|
||||
|
||||
GtkWidget *confirm_area;
|
||||
GtkWidget *help_btn;
|
||||
GtkWidget *all_btn;
|
||||
GtkWidget *prev_btn;
|
||||
GtkWidget *next_btn;
|
||||
|
@ -307,6 +310,8 @@ static void summary_search_create(void)
|
|||
GTK_BUTTONBOX_END);
|
||||
gtk_box_set_spacing(GTK_BOX(confirm_area), 5);
|
||||
|
||||
gtkut_stock_button_add_help(confirm_area, &help_btn);
|
||||
|
||||
all_btn = gtk_button_new_with_mnemonic(_("Find _all"));
|
||||
GTK_WIDGET_SET_FLAGS(all_btn, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start(GTK_BOX(confirm_area), all_btn, TRUE, TRUE, 0);
|
||||
|
@ -345,6 +350,9 @@ static void summary_search_create(void)
|
|||
SET_TOGGLE_SENSITIVITY(adv_search_checkbtn, adv_condition_btn)
|
||||
SET_TOGGLE_SENSITIVITY_REVERSE(adv_search_checkbtn, case_checkbtn)
|
||||
|
||||
g_signal_connect(G_OBJECT(help_btn), "clicked",
|
||||
G_CALLBACK(manual_open_with_anchor_cb),
|
||||
MANUAL_ANCHOR_SEARCHING);
|
||||
g_signal_connect(G_OBJECT(clear_btn), "clicked",
|
||||
G_CALLBACK(summary_search_clear), NULL);
|
||||
g_signal_connect(G_OBJECT(all_btn), "clicked",
|
||||
|
@ -371,6 +379,7 @@ static void summary_search_create(void)
|
|||
search_window.case_checkbtn = case_checkbtn;
|
||||
search_window.adv_search_checkbtn = adv_search_checkbtn;
|
||||
search_window.clear_btn = clear_btn;
|
||||
search_window.help_btn = help_btn;
|
||||
search_window.all_btn = all_btn;
|
||||
search_window.prev_btn = prev_btn;
|
||||
search_window.next_btn = next_btn;
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
#include "timing.h"
|
||||
#include "gedit-print.h"
|
||||
#include "log.h"
|
||||
#include "manual.h"
|
||||
|
||||
#define SUMMARY_COL_MARK_WIDTH 10
|
||||
#define SUMMARY_COL_STATUS_WIDTH 13
|
||||
|
@ -4524,16 +4525,19 @@ void summary_msginfo_filter_open(FolderItem * item, MsgInfo *msginfo,
|
|||
if (item == NULL)
|
||||
prefs_filtering_open(&pre_global_processing,
|
||||
_("Processing rules to apply before folder rules"),
|
||||
MANUAL_ANCHOR_PROCESSING,
|
||||
header, key);
|
||||
else
|
||||
prefs_filtering_open(&item->prefs->processing,
|
||||
_("Processing configuration"),
|
||||
MANUAL_ANCHOR_PROCESSING,
|
||||
header, key);
|
||||
}
|
||||
else {
|
||||
prefs_filtering_open(&filtering_rules,
|
||||
_("Filtering configuration"),
|
||||
header, key);
|
||||
_("Filtering configuration"),
|
||||
MANUAL_ANCHOR_FILTERING,
|
||||
header, key);
|
||||
}
|
||||
|
||||
g_free(header);
|
||||
|
|
Loading…
Reference in a new issue