aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-12-25 01:39:04 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-12-25 01:39:04 +0800
commitb4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05 (patch)
treeb640ea2240743c4e0c6df3a9234c2650f2d4b4d6 /calendar/gui/dialogs
parent978af43d69587e93fba2e861e9fa33ffa198b0e0 (diff)
downloadgsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.tar
gsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.tar.gz
gsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.tar.bz2
gsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.tar.lz
gsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.tar.xz
gsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.tar.zst
gsoc2013-evolution-b4bd1b2b1e3c9fa91804c2a27eb3bd35171d8d05.zip
fix the signal name
2003-12-24 JP Rosevear <jpr@ximian.com> * gui/e-select-names-renderer.c (esnr_start_editing): fix the signal name * gui/dialogs/meeting-page.glade: add Add Attendee button * gui/dialogs/meeting-page.c (get_widgets): extract add button (add_clicked_cb): edit the attendee after we add it (init_widgets): listen for add clicked (meeting_page_construct): the add button is in the glade file now * gui/e-select-names-editable.c (esne_start_editing): activate the control (e_select_names_editable_get_address): handle null dest (e_select_names_editable_get_name): ditto * gui/e-meeting-store.h: add proto * gui/e-meeting-store.c (e_meeting_store_find_attendee_path): create the path to a given attendee * gui/e-meeting-list-view.h: add proto * gui/e-meeting-list-view.c (e_meeting_list_view_edit): start editing the address of a particular svn path=/trunk/; revision=24009
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/meeting-page.c47
-rw-r--r--calendar/gui/dialogs/meeting-page.glade18
2 files changed, 42 insertions, 23 deletions
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index fe4ade9363..d8b951e263 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -74,6 +74,7 @@ struct _MeetingPagePrivate {
GtkWidget *existing_organizer_table;
GtkWidget *existing_organizer;
GtkWidget *existing_organizer_btn;
+ GtkWidget *add;
GtkWidget *invite;
/* ListView stuff */
@@ -481,11 +482,15 @@ get_widgets (MeetingPage *mpage)
priv->existing_organizer_table = GW ("existing-organizer-table");
priv->existing_organizer = GW ("existing-organizer");
priv->existing_organizer_btn = GW ("existing-organizer-button");
+
+ /* Buttons */
+ priv->add = GW ("add-attendee");
priv->invite = GW ("invite");
#undef GW
return (priv->invite
+ && priv->add
&& priv->organizer_table
&& priv->organizer
&& priv->existing_organizer_table
@@ -542,6 +547,15 @@ change_clicked_cb (GtkWidget *widget, gpointer data)
priv->existing = FALSE;
}
+static void
+add_clicked_cb (GtkButton *btn, MeetingPage *mpage)
+{
+ EMeetingAttendee *attendee;
+
+ attendee = e_meeting_store_add_attendee_with_defaults (mpage->priv->model);
+ e_meeting_list_view_edit (mpage->priv->list_view, attendee);
+}
+
/* Function called to invite more people */
static void
invite_cb (GtkWidget *widget, gpointer data)
@@ -564,15 +578,17 @@ init_widgets (MeetingPage *mpage)
priv = mpage->priv;
/* Organizer */
- g_signal_connect((GTK_COMBO (priv->organizer)->entry), "changed",
- G_CALLBACK (org_changed_cb), mpage);
+ g_signal_connect (GTK_COMBO (priv->organizer)->entry, "changed",
+ G_CALLBACK (org_changed_cb), mpage);
- g_signal_connect((priv->existing_organizer_btn), "clicked",
- G_CALLBACK (change_clicked_cb), mpage);
+ g_signal_connect (priv->existing_organizer_btn, "clicked",
+ G_CALLBACK (change_clicked_cb), mpage);
+
+ /* Add attendee button */
+ g_signal_connect (priv->add, "clicked", G_CALLBACK (add_clicked_cb), mpage);
/* Invite button */
- g_signal_connect((priv->invite), "clicked",
- G_CALLBACK (invite_cb), mpage);
+ g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), mpage);
}
static void
@@ -671,12 +687,6 @@ right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer da
return TRUE;
}
#endif
-
-static void
-add_btn_clicked_cb (GtkButton *btn, MeetingPage *mpage)
-{
- e_meeting_store_add_attendee_with_defaults (mpage->priv->model);
-}
/**
* meeting_page_construct:
@@ -696,21 +706,19 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
EIterator *it;
EAccount *def_account;
GList *address_strings = NULL, *l;
- GtkWidget *sw, *btn;
+ GtkWidget *sw;
priv = mpage->priv;
priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
"/meeting-page.glade", NULL, NULL);
if (!priv->xml) {
- g_message ("meeting_page_construct(): "
- "Could not load the Glade XML file!");
+ g_message (G_STRLOC ": Could not load the Glade XML file!");
return NULL;
}
if (!get_widgets (mpage)) {
- g_message ("meeting_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (G_STRLOC ": Could not find all widgets in the XML file!");
return NULL;
}
@@ -758,11 +766,6 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
g_object_ref (ems);
priv->model = ems;
- btn = gtk_button_new_with_label ("Add Attendee");
- g_signal_connect(btn, "clicked", G_CALLBACK (add_btn_clicked_cb), mpage);
- gtk_widget_show (btn);
- gtk_box_pack_start (GTK_BOX (priv->main), btn, FALSE, FALSE, 6);
-
priv->list_view = e_meeting_list_view_new (priv->model);
#if 0
diff --git a/calendar/gui/dialogs/meeting-page.glade b/calendar/gui/dialogs/meeting-page.glade
index 3b72c37b47..808359ed81 100644
--- a/calendar/gui/dialogs/meeting-page.glade
+++ b/calendar/gui/dialogs/meeting-page.glade
@@ -2,6 +2,7 @@
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
+<requires lib="gnome"/>
<widget class="GtkWindow" id="meeting-toplevel">
<property name="title" translatable="yes">window1</property>
@@ -216,7 +217,18 @@
</child>
<child>
- <placeholder/>
+ <widget class="GtkButton" id="add-attendee">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Add A_ttendee</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
<child>
@@ -234,6 +246,10 @@
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
+
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>