aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-06-02 07:55:32 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-06-02 07:55:32 +0800
commit828df57f1f940bad350aada8d90e5f860fefc611 (patch)
tree8f1333d8af05daec5cf3378f7bc7df75f08afa04 /calendar/gui/gnome-cal.c
parentcfd8facc65f6c9d7d35355cd0ad88befd9bc6910 (diff)
downloadgsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.tar
gsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.tar.gz
gsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.tar.bz2
gsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.tar.lz
gsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.tar.xz
gsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.tar.zst
gsoc2013-evolution-828df57f1f940bad350aada8d90e5f860fefc611.zip
Change of plans. The toplevel GnomeApp is now generated with Glade instead
2000-06-01 Federico Mena Quintero <federico@helixcode.com> * gui/event-editor-dialog.glade: Change of plans. The toplevel GnomeApp is now generated with Glade instead of being created in the program code. Otherwise we can't migrate the accelerators to the new toplevel and they won't work. * gui/event-editor.[ch]: EventEditor now derives from GtkObject. This lets us use the GnomeApp created by libglade and still have signals and stuff. * gui/event-editor.c (create_menu): Tell the UI handler that the menubar is the GnomeApp's existing one, not to create a new one. (create_toolbar): Tell the UI handler to use the GnomeApp's existing toolbar. (event_editor_focus): New function to raise/focus an event editor. * gui/gnome-cal.c (gnome_calendar_edit_object): Use event_editor_focus(). svn path=/trunk/; revision=3348
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index e1e366885f..460e0151d6 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1307,15 +1307,6 @@ gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
gnome_calendar_update_gtk_calendar (gcal);
}
-/* Brings attention to a window by raising it and giving it focus */
-static void
-raise_and_focus (GtkWidget *widget)
-{
- g_assert (GTK_WIDGET_REALIZED (widget));
- gdk_window_show (widget->window);
- gtk_widget_grab_focus (widget);
-}
-
/* Callback used when an event editor finishes editing an object */
static void
ical_object_released_cb (EventEditor *ee, const char *uid, gpointer data)
@@ -1339,7 +1330,7 @@ ical_object_released_cb (EventEditor *ee, const char *uid, gpointer data)
void
gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico)
{
- GtkWidget *ee;
+ EventEditor *ee;
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
@@ -1348,7 +1339,7 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico)
ee = g_hash_table_lookup (gcal->object_editor_hash, ico->uid);
if (!ee) {
- ee = event_editor_new (gcal);
+ ee = event_editor_new ();
if (!ee) {
g_message ("gnome_calendar_edit_object(): Could not create the event editor");
return;
@@ -1365,8 +1356,7 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, iCalObject *ico)
event_editor_set_ical_object (EVENT_EDITOR (ee), ico);
}
- gtk_widget_show_now (ee);
- raise_and_focus (ee);
+ event_editor_focus (ee);
}
/* Returns the selected time range for the current view. Note that this may be