Added libmenus.la.
2001-02-06 Christopher James Lahey <clahey@ximian.com> * Makefile.am (evolution_mail_LDADD): Added libmenus.la. * folder-browser-factory.c (control_activate): Added GalView menus here. * message-list.c, message-list.h (message_list_get_layout): Made message_list_get_layout export. svn path=/trunk/; revision=8041
This commit is contained in:
committed by
Chris Lahey
parent
8c88be844b
commit
71c965734e
@ -1,3 +1,13 @@
|
||||
2001-02-06 Christopher James Lahey <clahey@ximian.com>
|
||||
|
||||
* Makefile.am (evolution_mail_LDADD): Added libmenus.la.
|
||||
|
||||
* folder-browser-factory.c (control_activate): Added GalView menus
|
||||
here.
|
||||
|
||||
* message-list.c, message-list.h (message_list_get_layout): Made
|
||||
message_list_get_layout export.
|
||||
|
||||
2001-02-06 Iain Holmes <iain@ximian.com>
|
||||
|
||||
* mail-display.c (pixbuf_gen_idle): Set the size of the icon to 24x24
|
||||
|
||||
@ -120,11 +120,12 @@ evolution_mail_LDADD = \
|
||||
$(top_builddir)/filter/libfilter.la \
|
||||
$(top_builddir)/executive-summary/evolution-services/libevolution-services.la \
|
||||
$(top_builddir)/shell/importer/libevolution-importer.la \
|
||||
$(top_builddir)/widgets/menus/libmenus.la \
|
||||
$(BONOBO_VFS_GNOME_LIBS) \
|
||||
$(EXTRA_GNOME_LIBS) \
|
||||
$(GTKHTML_LIBS) \
|
||||
$(THREADS_LIBS) \
|
||||
$(UNICODE_LIBS)
|
||||
$(UNICODE_LIBS)
|
||||
|
||||
evolution_mail_LDFLAGS = \
|
||||
-export-dynamic
|
||||
|
||||
@ -20,6 +20,11 @@
|
||||
#include <gal/util/e-util.h>
|
||||
#include <gal/widgets/e-gui-utils.h>
|
||||
|
||||
#include "widgets/menus/gal-view-menus.h"
|
||||
|
||||
#include <gal/menus/gal-view-factory-etable.h>
|
||||
#include <gal/menus/gal-view-etable.h>
|
||||
|
||||
#include "folder-browser-factory.h"
|
||||
|
||||
#include "folder-browser.h"
|
||||
@ -150,6 +155,53 @@ update_pixmaps (BonoboUIComponent *uic)
|
||||
set_pixmap (uic, "/Toolbar/Copy", "buttons/copy-message.png");
|
||||
}
|
||||
|
||||
static void
|
||||
display_view(GalViewCollection *collection,
|
||||
GalView *view,
|
||||
gpointer data)
|
||||
{
|
||||
FolderBrowser *fb = data;
|
||||
if (GAL_IS_VIEW_ETABLE(view)) {
|
||||
e_table_set_state_object(e_table_scrolled_get_table(E_TABLE_SCROLLED(fb->message_list)), GAL_VIEW_ETABLE(view)->state);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
folder_browser_setup_menus (FolderBrowser *fb,
|
||||
BonoboUIComponent *uic)
|
||||
{
|
||||
GalViewCollection *collection;
|
||||
GalViewMenus *views;
|
||||
GalViewFactory *factory;
|
||||
ETableSpecification *spec;
|
||||
char *spec_string;
|
||||
|
||||
collection = gal_view_collection_new();
|
||||
/* FIXME: Memory leak. */
|
||||
gal_view_collection_set_storage_directories(collection,
|
||||
EVOLUTION_DATADIR "/evolution/views/mail/",
|
||||
gnome_util_prepend_user_home("/evolution/views/mail/"));
|
||||
|
||||
spec_string = message_list_get_layout(fb->message_list);
|
||||
spec = e_table_specification_new();
|
||||
e_table_specification_load_from_string(spec, spec_string);
|
||||
g_free(spec_string);
|
||||
|
||||
factory = gal_view_factory_etable_new(spec);
|
||||
gal_view_collection_add_factory(collection, factory);
|
||||
gtk_object_sink(GTK_OBJECT(factory));
|
||||
|
||||
gal_view_collection_load(collection);
|
||||
|
||||
views = gal_view_menus_new(collection);
|
||||
gal_view_menus_apply(views, uic, NULL); /* This function probably needs to sink the views object. */
|
||||
gtk_signal_connect(GTK_OBJECT(collection), "display_view",
|
||||
display_view, fb);
|
||||
/* gtk_object_sink(GTK_OBJECT(views)); */
|
||||
|
||||
gtk_object_sink(GTK_OBJECT(collection));
|
||||
}
|
||||
|
||||
static void
|
||||
control_activate (BonoboControl *control,
|
||||
BonoboUIComponent *uic,
|
||||
@ -197,6 +249,8 @@ control_activate (BonoboControl *control,
|
||||
bonobo_ui_component_add_listener (uic, "ViewSource",
|
||||
folder_browser_toggle_view_source,
|
||||
folder_browser);
|
||||
|
||||
folder_browser_setup_menus (fb, uic);
|
||||
|
||||
update_pixmaps (uic);
|
||||
|
||||
|
||||
@ -1155,7 +1155,7 @@ static char *list [] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static char *
|
||||
char *
|
||||
message_list_get_layout (MessageList *message_list)
|
||||
{
|
||||
/* Default: Status, Attachments, Priority, From, Subject, Date */
|
||||
|
||||
@ -124,6 +124,8 @@ void message_list_hide_clear(MessageList *ml);
|
||||
void message_list_set_threaded(MessageList *ml, gboolean threaded);
|
||||
void message_list_set_search(MessageList *ml, const char *search);
|
||||
|
||||
char *message_list_get_layout (MessageList *message_list);
|
||||
|
||||
#define MESSAGE_LIST_LOCK(m, l) g_mutex_lock(((MessageList *)m)->l)
|
||||
#define MESSAGE_LIST_UNLOCK(m, l) g_mutex_unlock(((MessageList *)m)->l)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user