Re: [evolution-patches] Network Manager support for Evolution
- From: Srinivasa Ragavan <sragavan novell com>
- To: Shreyas Srinivasan <sshreyas novell com>
- Cc: evolution-patches gnome org
- Subject: Re: [evolution-patches] Network Manager support for Evolution
- Date: Tue, 13 Dec 2005 12:50:46 +0530
Few comments on the Shell code. Looks like you have got a chance to
challenge your intellect ;-). Dude you have missed to diff the new
files.
On Mon, 2005-12-12 at 13:53 +0530, Shreyas Srinivasan wrote:
> 2005-11-14 Harish Krishnaswamy <kharish novell com>
>
> * e-shell-settings-dialog.c: (set_dialog_size),
> Index: shell/Evolution-Component.idl
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/Evolution-Component.idl,v
> retrieving revision 1.18
> diff -u -p -r1.18 Evolution-Component.idl
> --- shell/Evolution-Component.idl 18 Aug 2005 04:35:30
> -0000 1.18
> +++ shell/Evolution-Component.idl 12 Dec 2005 07:46:27 -0000
> @@ -28,6 +28,11 @@ module Evolution {
> CREATABLE_OBJECT,
> CREATABLE_FOLDER
> };
> + enum ShellState {
> + USER_OFFLINE,
> + FORCED_OFFLINE,
> + USER_ONLINE
> + };
>
> /* A type of item that the component can create when asked by
> the user,
> e.g. a mail message or an appointment. */
> @@ -114,7 +119,7 @@ module Evolution {
>
> /* Set the online status of the component
> asynchronously */
>
> - void setLineStatus(in boolean online, in Listener
> listener);
> + void setLineStatus(in ShellState shell_state, in
> Listener listener);
> };
>
> };
> Index: shell/Makefile.am
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/Makefile.am,v
> retrieving revision 1.212
> diff -u -p -r1.212 Makefile.am
> --- shell/Makefile.am 18 Aug 2005 04:35:30 -0000 1.212
> +++ shell/Makefile.am 12 Dec 2005 07:46:28 -0000
> @@ -90,6 +90,7 @@ eshellinclude_HEADERS = \
>
> libeshell_la_SOURCES = \
> $(IDL_GENERATED) \
> +
> $(MARSHAL_GENERATED) \
> evolution-component.c \
> evolution-listener.c \
> @@ -108,6 +109,14 @@ libeshell_la_LIBADD
> = \
>
> # Evolution executable
>
> +if NM_SUPPORT_GLIB
> + NM_SUPPORT_FILES = e-shell-nm-glib.c
> +else
> +if NM_SUPPORT
> + NM_SUPPORT_FILES = e-shell-nm.c
> +endif
> +endif
I couldn't find these file in the diff Since they are new, it might not
come on a cvs diff :-). Please rediff and send again.
> +
> evolution_SOURCES = \
> $(DATASERVER_IDL_GENERATED) \
> e-component-registry.c \
> @@ -135,7 +144,8 @@ evolution_SOURCES = \
> e-sidebar.h \
> es-event.c \
> es-menu.c \
> - main.c
> + main.c \
> + $(NM_SUPPORT_FILES)
>
> evolution_LDADD
> = \
> libeshell.la \
> Index: shell/e-shell-window-commands.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/e-shell-window-commands.c,v
> retrieving revision 1.43
> diff -u -p -r1.43 e-shell-window-commands.c
> --- shell/e-shell-window-commands.c 23 Sep 2005 09:44:58
> -0000 1.43
> +++ shell/e-shell-window-commands.c 12 Dec 2005 07:46:28 -0000
> @@ -637,7 +637,7 @@ command_work_offline (BonoboUIComponent
> EShellWindow *window,
> const char *path)
> {
> - e_shell_go_offline (e_shell_window_peek_shell (window),
> window);
> + e_shell_go_offline (e_shell_window_peek_shell (window),
> window, GNOME_Evolution_USER_OFFLINE);
> }
>
> static void
> @@ -645,7 +645,7 @@ command_work_online (BonoboUIComponent *
> EShellWindow *window,
> const char *path)
> {
> - e_shell_go_online (e_shell_window_peek_shell (window),
> window);
> + e_shell_go_online (e_shell_window_peek_shell (window), window,
> GNOME_Evolution_USER_ONLINE);
> }
>
> static void
> Index: shell/e-shell-window.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/e-shell-window.c,v
> retrieving revision 1.39
> diff -u -p -r1.39 e-shell-window.c
> --- shell/e-shell-window.c 23 Sep 2005 09:44:58 -0000 1.39
> +++ shell/e-shell-window.c 12 Dec 2005 07:46:28 -0000
> @@ -422,10 +422,10 @@ offline_toggle_clicked_callback (GtkButt
>
> switch (e_shell_get_line_status (priv->shell)) {
> case E_SHELL_LINE_STATUS_ONLINE:
> - e_shell_go_offline (priv->shell, window);
> + e_shell_go_offline (priv->shell, window,
> GNOME_Evolution_USER_OFFLINE);
> break;
> case E_SHELL_LINE_STATUS_OFFLINE:
> - e_shell_go_online (priv->shell, window);
> + e_shell_go_online (priv->shell, window,
> GNOME_Evolution_USER_ONLINE);
> break;
> default:
> g_assert_not_reached ();
> @@ -556,6 +556,16 @@ setup_statusbar_notebook (EShellWindow *
> }
>
> static void
> +setup_nm_support (EShellWindow *window)
> +{
> + #ifdef NM_SUPPORT_GLIB
> + e_shell_nm_glib_initialise (window);
> + #elif NM_SUPPORT
> + e_shell_dbus_initialise (window);
> + #endif
> +}
> +
> +static void
> setup_status_bar (EShellWindow *window)
> {
> EShellWindowPrivate *priv;
> @@ -566,6 +576,9 @@ setup_status_bar (EShellWindow *window)
> priv->status_bar = gtk_hbox_new (FALSE, 2);
> if(gconf_client_get_bool
> (gconf_client_get_default(),"/apps/evolution/shell/view_defaults/statusbar_visible",NULL))
> gtk_widget_show (priv->status_bar);
> +
> + /* setup dbus interface here*/
> + setup_nm_support (window);
>
> setup_offline_toggle (window);
> setup_menu_hint_label (window);
> Index: shell/e-shell.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
> retrieving revision 1.267
> diff -u -p -r1.267 e-shell.c
> --- shell/e-shell.c 18 Aug 2005 04:35:31 -0000 1.267
> +++ shell/e-shell.c 12 Dec 2005 07:46:28 -0000
> @@ -298,9 +298,9 @@ impl_Shell_setLineStatus (PortableServer
> e_passwords_set_online(online);
>
> if (online)
> - e_shell_go_online (shell, NULL);
> + e_shell_go_online (shell, NULL,
> GNOME_Evolution_USER_ONLINE);
> else
> - e_shell_go_offline (shell, NULL);
> + e_shell_go_offline (shell, NULL,
> GNOME_Evolution_USER_OFFLINE);
> }
>
> static GNOME_Evolution_Component
> @@ -697,7 +697,7 @@ e_shell_construct (EShell *shell,
> e_passwords_set_online(start_online);
>
> if (start_online)
> - e_shell_go_online (shell, NULL);
> + e_shell_go_online (shell, NULL,
> GNOME_Evolution_USER_ONLINE);
>
> return E_SHELL_CONSTRUCT_RESULT_OK;
> }
> @@ -1111,7 +1111,7 @@ set_line_status_complete(EvolutionListen
> }
>
> static void
> -set_line_status(EShell *shell, gboolean status)
> +set_line_status(EShell *shell, gboolean status,
> GNOME_Evolution_ShellState shell_state)
Do you still require the boolean status ?
> {
> EShellPrivate *priv;
> GSList *component_infos;
> @@ -1144,7 +1144,7 @@ set_line_status(EShell *shell, gboolean
>
> CORBA_exception_init (&ev);
>
> - GNOME_Evolution_Component_setLineStatus(info->iface,
> status, bonobo_object_corba_objref((BonoboObject
> *)priv->line_status_listener), &ev);
> + GNOME_Evolution_Component_setLineStatus(info->iface,
> shell_state, bonobo_object_corba_objref((BonoboObject
> *)priv->line_status_listener), &ev);
> if (ev._major == CORBA_NO_EXCEPTION)
> priv->line_status_pending++;
>
> @@ -1165,14 +1165,14 @@ set_line_status(EShell *shell, gboolean
> **/
> void
> e_shell_go_offline (EShell *shell,
> - EShellWindow *action_window)
> + EShellWindow *action_window,
> GNOME_Evolution_ShellState shell_state)
> {
> g_return_if_fail (shell != NULL);
> g_return_if_fail (E_IS_SHELL (shell));
> g_return_if_fail (action_window != NULL);
> g_return_if_fail (action_window == NULL || E_IS_SHELL_WINDOW
> (action_window));
>
> - set_line_status(shell, FALSE);
> + set_line_status(shell, FALSE, shell_state);
Same as above.
> }
>
> /**
> @@ -1184,13 +1184,13 @@ e_shell_go_offline (EShell *shell,
> **/
> void
> e_shell_go_online (EShell *shell,
> - EShellWindow *action_window)
> + EShellWindow *action_window,
> GNOME_Evolution_ShellState shell_state)
> {
> g_return_if_fail (shell != NULL);
> g_return_if_fail (E_IS_SHELL (shell));
> g_return_if_fail (action_window == NULL || E_IS_SHELL_WINDOW
> (action_window));
>
> - set_line_status(shell, TRUE);
> + set_line_status(shell, TRUE, shell_state);
again here ^^^^
> }
>
> void
> Index: shell/e-shell.h
> ===================================================================
> RCS file: /cvs/gnome/evolution/shell/e-shell.h,v
> retrieving revision 1.69
> diff -u -p -r1.69 e-shell.h
> --- shell/e-shell.h 18 Aug 2005 04:35:31 -0000 1.69
> +++ shell/e-shell.h 12 Dec 2005 07:46:28 -0000
> @@ -119,9 +119,9 @@ void e_shell_close_all_wi
>
> EShellLineStatus e_shell_get_line_status (EShell *shell);
> void e_shell_go_offline (EShell *shell,
> - EShellWindow
> *action_window);
> + EShellWindow
> *action_window, GNOME_Evolution_ShellState shell_state);
> void e_shell_go_online (EShell *shell,
> - EShellWindow
> *action_window);
> + EShellWindow
> *action_window, GNOME_Evolution_ShellState shell_state);
>
> void e_shell_send_receive (EShell *shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]