aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@ximian.com>2001-01-12 15:09:51 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2001-01-12 15:09:51 +0800
commit891d37dac8f9a80a8f007c825af2987692d1be63 (patch)
treea2027d66f0073b2cf00613350d80f166422ea4e6 /composer
parent5aa11827ce3c662631be7e0fd681394c7f179207 (diff)
downloadgsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.tar
gsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.tar.gz
gsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.tar.bz2
gsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.tar.lz
gsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.tar.xz
gsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.tar.zst
gsoc2013-evolution-891d37dac8f9a80a8f007c825af2987692d1be63.zip
Only attach to "changed" if the widget is an EEntry. The HEADER_COMBOBOX
2001-01-12 Miguel de Icaza <miguel@ximian.com> * e-msg-composer-hdrs.c (add_header): Only attach to "changed" if the widget is an EEntry. The HEADER_COMBOBOX and the HEADER_ADDRBOOK are a ComboBox and a remote Bonobo control respectively. * evolution-composer.c (get_object): Move getObject functionality here from e-msg-composer.c svn path=/trunk/; revision=7441
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog10
-rw-r--r--composer/e-msg-composer-hdrs.c5
-rw-r--r--composer/e-msg-composer.c50
-rw-r--r--composer/e-msg-composer.h1
-rw-r--r--composer/evolution-composer.c24
5 files changed, 31 insertions, 59 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 3b67096ed5..68208b057f 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,13 @@
+2001-01-12 Miguel de Icaza <miguel@ximian.com>
+
+ * e-msg-composer-hdrs.c (add_header): Only attach to "changed" if
+ the widget is an EEntry. The HEADER_COMBOBOX and the
+ HEADER_ADDRBOOK are a ComboBox and a remote Bonobo control
+ respectively.
+
+ * evolution-composer.c (get_object): Move getObject functionality
+ here from e-msg-composer.c
+
2001-01-11 Miguel de Icaza <miguel@ximian.com>
* e-msg-composer-hdrs.c (create_dropdown_entry): Only set the
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index 1e144e3cbc..bb1bbe1fec 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -274,6 +274,8 @@ add_header (EMsgComposerHdrs *hdrs,
"use_ellipsis", TRUE,
"allow_newlines", FALSE,
NULL);
+ gtk_signal_connect (GTK_OBJECT (entry), "changed",
+ GTK_SIGNAL_FUNC (entry_changed), hdrs);
}
if (entry != NULL) {
@@ -285,9 +287,6 @@ add_header (EMsgComposerHdrs *hdrs,
2, 2);
gtk_tooltips_set_tip (hdrs->priv->tooltips, entry, tip, tip_private);
-
- gtk_signal_connect (GTK_OBJECT (entry), "changed",
- GTK_SIGNAL_FUNC (entry_changed), hdrs);
}
priv->num_hdrs++;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index b75813f568..369b207dc2 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -37,7 +37,6 @@
#include <bonobo.h>
#include <bonobo/bonobo-stream-memory.h>
-#include <bonobo/bonobo-item-handler.h>
#include <glade/glade.h>
#include <gnome.h>
#include <libgnorba/gnorba.h>
@@ -1430,54 +1429,6 @@ e_msg_composer_construct (EMsgComposer *composer)
gtk_widget_grab_focus (composer->editor);
}
-static Bonobo_ItemContainer_ObjectList *
-msg_composer_enum_objects (BonoboItemHandler *handler, gpointer data, CORBA_Environment *ev)
-{
-#warning "This function is not implemented because enumObjects has a broken CORBA prototype"
- return NULL;
-}
-
-
-static Bonobo_Unknown
-msg_composer_get_object (BonoboItemHandler *h, const char *item_name,
- gboolean only_if_exists,
- gpointer data, CORBA_Environment *ev)
-{
- EMsgComposer *composer = data;
- GSList *options, *l;
-
- options = bonobo_item_option_parse (item_name);
- for (l = options; l; l = l->next){
- BonoboItemOption *option = l->data;
-
- if (strcmp (option->key, "visible")){
- gboolean show = 1;
-
- if (option->value)
- show = atoi (option->value);
-
- if (show)
- gtk_widget_show (GTK_WIDGET (composer));
- else
- gtk_widget_hide (GTK_WIDGET (composer));
- }
- }
- return bonobo_object_dup_ref (
- BONOBO_OBJECT (composer)->corba_objref, ev);
-}
-
-static void
-setup_item_container (EMsgComposer *composer)
-{
- composer->item_container = BONOBO_OBJECT (bonobo_item_handler_new (
- msg_composer_enum_objects,
- msg_composer_get_object, composer));
-
- bonobo_object_add_interface (
- BONOBO_OBJECT (composer),
- composer->item_container);
-}
-
static EMsgComposer *
create_composer (void)
{
@@ -1492,7 +1443,6 @@ create_composer (void)
return NULL;
}
prepare_engine (new);
- setup_item_container (new);
return new;
}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 069c45ab2f..f50832fd4c 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -68,7 +68,6 @@ struct _EMsgComposer {
GNOME_GtkHTML_Editor_Engine editor_engine;
BonoboObject *editor_listener;
GHashTable *inline_images;
- BonoboObject *item_container;
char *sig_file;
diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c
index 45a6949eb3..80311f3eff 100644
--- a/composer/evolution-composer.c
+++ b/composer/evolution-composer.c
@@ -258,12 +258,26 @@ get_object (BonoboItemHandler *h, const char *item_name, gboolean only_if_exists
gpointer data, CORBA_Environment *ev)
{
EvolutionComposer *composer = data;
+ GSList *options, *l;
- if (strcmp (item_name, "composer_window") == 0)
- return bonobo_object_dup_ref (
- BONOBO_OBJECT (composer->composer)->corba_objref, ev);
-
- return CORBA_OBJECT_NIL;
+ options = bonobo_item_option_parse (item_name);
+ for (l = options; l; l = l->next){
+ BonoboItemOption *option = l->data;
+
+ if (strcmp (option->key, "visible")){
+ gboolean show = 1;
+
+ if (option->value)
+ show = atoi (option->value);
+
+ if (show)
+ gtk_widget_show (GTK_WIDGET (composer->composer));
+ else
+ gtk_widget_hide (GTK_WIDGET (composer->composer));
+ }
+ }
+ return bonobo_object_dup_ref (
+ BONOBO_OBJECT (composer)->corba_objref, ev);
}
void