Re: Making system scope the default one



Pazartesi 25 Ekim 2010 günü (saat 13:15:49) Jirka Klimes şunları yazmıştı:
> On Saturday 23 of October 2010 13:11:48 Ozan Çağlayan wrote:
> 
> diff --git a/src/connection-editor/ce-page.c
> b/src/connection-editor/ce-page.c index bcb90de..0fa1916 100644
> --- a/src/connection-editor/ce-page.c
> +++ b/src/connection-editor/ce-page.c
> @@ -407,7 +407,7 @@ ce_page_new_connection (const char *format,
>         GSList *connections;
> 
> 	connection = nm_connection_new ();
> -	nm_connection_set_scope (connection, NM_CONNECTION_SCOPE_USER);
> +	nm_connection_set_scope (connection, NM_CONNECTION_SCOPE_SYSTEM);
> 
> 	s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
> 	nm_connection_add_setting (connection, NM_SETTING (s_con));
> 

Ah, thanks this seems to fix the issue but a minor glitch stays. When we 
uncheck the system_checkbutton in a new connection window, the buttons stays 
polkit-aware, but actually the connection is added to user scope. I've done 
the following modification in nm-connection-editor.c but can't be sure if it 
is the correct place/way to handle this.


@@ -264,8 +264,7 @@ system_checkbutton_toggled_cb (GtkWidget
 ·   * original connection scope was USER and the "system" checkbutton is
 ·   * unchecked.
 ·   */
-·  if (   !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))
-·      && (editor->orig_scope == NM_CONNECTION_SCOPE_USER))
+·  if (   !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 ·  ·   use_polkit = FALSE;


---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]