* src/Makefile.am

* src/stock_pixmap.c
	* src/stock_pixmap.h
	* src/pixmaps/quicksearch.xpm *ADDED*
		Add the quicksearch pixmap
	* src/mainwindow.c
	* src/summaryview.c
	* src/summaryview.h
		Make quicksearch bar visible/hidden via a button
This commit is contained in:
Colin Leroy 2002-08-22 14:35:57 +00:00
parent 22999b38b5
commit e538d7aecf
9 changed files with 128 additions and 27 deletions

View file

@ -1,3 +1,15 @@
2002-08-22 [colin] 0.8.1claws100
* src/Makefile.am
* src/stock_pixmap.c
* src/stock_pixmap.h
* src/pixmaps/quicksearch.xpm *ADDED*
Add the quicksearch pixmap
* src/mainwindow.c
* src/summaryview.c
* src/summaryview.h
Make quicksearch bar visible/hidden via a button
2002-08-22 [christoph] 0.8.1claws99
* src/folder.c

View file

@ -8,7 +8,7 @@ MINOR_VERSION=8
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=claws99
EXTRA_VERSION=claws100
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target

View file

@ -215,7 +215,8 @@ EXTRA_DIST = \
pixmaps/work_online.xpm \
pixmaps/notice_warn.xpm \
pixmaps/notice_error.xpm \
pixmaps/notice_note.xpm
pixmaps/notice_note.xpm \
pixmaps/quicksearch.xpm
INCLUDES = \
-DG_LOG_DOMAIN=\"Sylpheed\" \

View file

@ -175,9 +175,6 @@ static void toggle_toolbar_cb (MainWindow *mainwin,
static void toggle_statusbar_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
static void toggle_searchbar_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
static void separate_widget_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
@ -447,8 +444,6 @@ static GtkItemFactoryEntry mainwin_entries[] =
NULL, toggle_toolbar_cb, TOOLBAR_NONE, "/View/Show or hide/Toolbar/Icon and text"},
{N_("/_View/Show or hi_de/Status _bar"),
NULL, toggle_statusbar_cb, 0, "<ToggleItem>"},
{N_("/_View/Show or hi_de/Quick _search"),
NULL, toggle_searchbar_cb, 0, "<ToggleItem>"},
{N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View/Separate f_older tree"), NULL, separate_widget_cb, SEPARATE_FOLDER, "<ToggleItem>"},
{N_("/_View/Separate m_essage view"), NULL, separate_widget_cb, SEPARATE_MESSAGE, "<ToggleItem>"},
@ -927,12 +922,12 @@ MainWindow *main_window_create(SeparateType type)
(ifactory, "/View/Show or hide/Status bar");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
prefs_common.show_statusbar);
gtk_widget_hide(GTK_WIDGET(mainwin->summaryview->hbox_search));
if (prefs_common.show_searchbar)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mainwin->summaryview->toggle_search), TRUE);
gtk_widget_hide(mainwin->summaryview->hbox_search);
menuitem = gtk_item_factory_get_item
(ifactory, "/View/Show or hide/Quick search");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
prefs_common.show_searchbar);
/* set account selection menu */
ac_menu = gtk_item_factory_get_widget
@ -2128,18 +2123,6 @@ static void toggle_statusbar_cb(MainWindow *mainwin, guint action,
}
}
static void toggle_searchbar_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
if (GTK_CHECK_MENU_ITEM(widget)->active) {
gtk_widget_show(mainwin->summaryview->hbox_search);
prefs_common.show_searchbar = TRUE;
} else {
gtk_widget_hide(mainwin->summaryview->hbox_search);
prefs_common.show_searchbar = FALSE;
}
}
static void separate_widget_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{

View file

@ -0,0 +1,66 @@
/* XPM */
static char * quicksearch_xpm[] = {
"12 12 51 1",
" c None",
". c #B4B4A0",
"+ c #46463E",
"@ c #090908",
"# c #4A4A42",
"$ c #C1C1AD",
"% c #B0B09D",
"& c #33332D",
"* c #9D9D8D",
"= c #CFCFB9",
"- c #C4C4AF",
"; c #8D8D7F",
"> c #34342F",
", c #C3C3AF",
"' c #45453E",
") c #9C9C8C",
"! c #E2E2D0",
"~ c #EDEDE5",
"{ c #C0C0AC",
"] c #B2B29F",
"^ c #828274",
"/ c #4B4B43",
"( c #080807",
"_ c #D5D5BF",
": c #FBFBFA",
"< c #C3C3AE",
"[ c #B5B5A2",
"} c #A6A695",
"| c #959586",
"1 c #080808",
"2 c #CACAB5",
"3 c #DDDDD0",
"4 c #B7B7A4",
"5 c #AAAA98",
"6 c #9B9B8B",
"7 c #8C8C7D",
"8 c #46463F",
"9 c #929283",
"0 c #BABAA7",
"a c #ADAD9B",
"b c #9F9F8E",
"c c #909081",
"d c #727266",
"e c #4B4B44",
"f c #33332E",
"g c #878779",
"h c #A0A090",
"i c #737367",
"j c #000000",
"k c #BEBEAA",
"l c #404040",
" .+@@#$ ",
"%&*=-;>, ",
"')!~{]^/ ",
"(_:<[}|@ ",
"1234567@ ",
"890abcde ",
"0fgh9ijj ",
" k#@@ljjj ",
" jjj ",
" jjj ",
" jjj",
" jj"};

View file

@ -89,6 +89,7 @@
#include "pixmaps/notice_warn.xpm"
#include "pixmaps/notice_error.xpm"
#include "pixmaps/notice_note.xpm"
#include "pixmaps/quicksearch.xpm"
typedef struct _StockPixmapData StockPixmapData;
@ -180,6 +181,7 @@ static StockPixmapData pixmaps[] =
{notice_warn_xpm , NULL, NULL, "notice_warn", " "},
{notice_error_xpm , NULL, NULL, "notice_error", " "},
{notice_note_xpm , NULL, NULL, "notice_note", " "},
{quicksearch_xpm , NULL, NULL, "quicksearch", " "},
};
/* return newly constructed GtkPixmap from GdkPixmap */

View file

@ -99,6 +99,7 @@ typedef enum
STOCK_PIXMAP_NOTICE_WARN, /* small warning */
STOCK_PIXMAP_NOTICE_ERROR, /* small error */
STOCK_PIXMAP_NOTICE_NOTE, /* small message */
STOCK_PIXMAP_QUICKSEARCH, /* quicksearch pixmap */
N_STOCK_PIXMAPS
} StockPixmap;

View file

@ -372,6 +372,10 @@ static gint summary_cmp_by_label (GtkCList *clist,
static void news_flag_crosspost (MsgInfo *msginfo);
static void tog_searchbar_cb (GtkWidget *w,
gpointer data);
GtkTargetEntry summary_drag_types[1] =
{
{"text/plain", GTK_TARGET_SAME_APP, TARGET_DUMMY}
@ -462,7 +466,10 @@ SummaryView *summary_create(void)
GtkWidget *search_type_opt;
GtkWidget *search_type;
GtkWidget *search_string;
GtkWidget *search_pixmap;
GtkWidget *menuitem;
GtkWidget *toggle_search;
GtkTooltips *search_tip;
GtkItemFactory *popupfactory;
gint n_entries;
@ -473,15 +480,27 @@ SummaryView *summary_create(void)
/* create status label */
hbox = gtk_hbox_new(FALSE, 0);
search_pixmap = stock_pixmap_widget(hbox, STOCK_PIXMAP_QUICKSEARCH);
search_tip = gtk_tooltips_new();
toggle_search = gtk_toggle_button_new();
gtk_container_add (GTK_CONTAINER(toggle_search), search_pixmap);
gtk_tooltips_set_tip(GTK_TOOLTIPS(search_tip),
toggle_search,
_("Toggle quick-search bar"), NULL);
gtk_box_pack_start(GTK_BOX(hbox), toggle_search, FALSE, FALSE, 2);
hbox_l = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), hbox_l, TRUE, TRUE, 0);
statlabel_folder = gtk_label_new("");
gtk_box_pack_start(GTK_BOX(hbox_l), statlabel_folder, FALSE, FALSE, 2);
statlabel_select = gtk_label_new("");
gtk_box_pack_start(GTK_BOX(hbox_l), statlabel_select, FALSE, FALSE, 12);
/* toggle view button */
toggle_eventbox = gtk_event_box_new();
gtk_box_pack_end(GTK_BOX(hbox), toggle_eventbox, FALSE, FALSE, 4);
@ -490,7 +509,8 @@ SummaryView *summary_create(void)
gtk_signal_connect(GTK_OBJECT(toggle_eventbox), "button_press_event",
GTK_SIGNAL_FUNC(summary_toggle_pressed),
summaryview);
statlabel_msgs = gtk_label_new("");
gtk_box_pack_end(GTK_BOX(hbox), statlabel_msgs, FALSE, FALSE, 4);
@ -553,6 +573,9 @@ SummaryView *summary_create(void)
GTK_SIGNAL_FUNC(summary_searchbar_pressed),
summaryview);
gtk_signal_connect (GTK_OBJECT(toggle_search), "toggled",
GTK_SIGNAL_FUNC(tog_searchbar_cb), hbox_search);
/* create popup menu */
n_entries = sizeof(summary_popup_entries) /
sizeof(summary_popup_entries[0]);
@ -571,6 +594,7 @@ SummaryView *summary_create(void)
summaryview->statlabel_msgs = statlabel_msgs;
summaryview->toggle_eventbox = toggle_eventbox;
summaryview->toggle_arrow = toggle_arrow;
summaryview->toggle_search = toggle_search;
summaryview->popupmenu = popupmenu;
summaryview->popupfactory = popupfactory;
summaryview->lock_count = 0;
@ -4472,6 +4496,17 @@ static void summary_searchtype_changed(GtkMenuItem *widget, gpointer data)
summary_show(sw, sw->folder_item);
}
static void tog_searchbar_cb(GtkWidget *w, gpointer data)
{
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) {
prefs_common.show_searchbar = TRUE;
gtk_widget_show(GTK_WIDGET(data));
} else {
prefs_common.show_searchbar = FALSE;
gtk_widget_hide(GTK_WIDGET(data));
}
}
static void summary_open_row(GtkSCTree *sctree, SummaryView *summaryview)
{
if (summaryview->folder_item->stype == F_OUTBOX ||

View file

@ -100,6 +100,7 @@ struct _SummaryView
GtkWidget *statlabel_msgs;
GtkWidget *toggle_eventbox;
GtkWidget *toggle_arrow;
GtkWidget *toggle_search;
GtkWidget *popupmenu;
GtkWidget *colorlabel_menu;
GtkWidget *search_type_opt;