seahorse r2051 - in trunk: . libseahorse



Author: nnielsen
Date: Mon Jan 28 21:19:21 2008
New Revision: 2051
URL: http://svn.gnome.org/viewvc/seahorse?rev=2051&view=rev

Log:
    * libseahorse/seahorse-prefs.glade:
    * libseahorse/seahorse-prefs-cache.c: Remove option to start agent 
    from preferences dialog.  


Modified:
   trunk/ChangeLog
   trunk/libseahorse/seahorse-prefs-cache.c
   trunk/libseahorse/seahorse-prefs.glade

Modified: trunk/libseahorse/seahorse-prefs-cache.c
==============================================================================
--- trunk/libseahorse/seahorse-prefs-cache.c	(original)
+++ trunk/libseahorse/seahorse-prefs-cache.c	Mon Jan 28 21:19:21 2008
@@ -214,83 +214,6 @@
     seahorse_gconf_set_integer (SETTING_TTL, ttl);
 }
 
-/* Start up the gnome-session-properties */
-static void
-show_session_properties (GtkWidget *widget, gpointer data)
-{
-    GError *err = NULL;
-
-    g_spawn_command_line_async ("gnome-session-properties", &err);
-
-    if (err)
-        seahorse_util_handle_error (err, _("Couldn't open the Session Properties"));
-}
-
-/* Startup our agent */ 	 
-static void 	 
-start_agent (GtkWidget *widget, gpointer data) 	 
-{ 	 
-    GError *err = NULL; 	 
-    gint status; 	 
- 	 
-    g_spawn_command_line_sync ("seahorse-agent", NULL, NULL, &status, &err); 	 
- 	 
-    if (err) 	 
-        seahorse_util_handle_error (err, _("Couldn't start the 'seahorse-agent' program")); 	 
-    else if (!(WIFEXITED (status) && WEXITSTATUS (status) == 0)) 	 
-        seahorse_util_handle_error (NULL, _("The 'seahorse-agent' program exited unsuccessfully.")); 	 
-    else { 	 
-        /* Show the next message about starting up automatically */ 	 
-        gtk_widget_hide (gtk_widget_get_parent (gtk_widget_get_parent (widget))); 	 
-        gtk_widget_show (GTK_WIDGET (data)); 	 
-    }
-}
-
-/* Generate the Hand Cursor */
-void
-set_hand_cursor_on_realize(GtkWidget *widget, gpointer user_data)
-{
-    GdkCursor *cursor;
-
-    cursor = gdk_cursor_new (GDK_HAND2);
-    gdk_window_set_cursor (GTK_BUTTON (widget)->event_window, cursor);
-    gdk_cursor_unref (cursor);
-}
-
-/* Find button label, underline and paint it blue. 
- * TODO: Get the system theme link color and use that instead of default blue.
- **/
-void
-paint_button_label_as_link (GtkButton *button, GtkLabel *label)
-{
-    const gchar * button_text;
-    gchar *markup;
-    
-    button_text = gtk_label_get_label (label);
-    
-    markup = g_strdup_printf ("<u>%s</u>", button_text);
-    gtk_label_set_markup (GTK_LABEL (label), markup);
-    g_free (markup);
-
-    GdkColor *link_color;
-    GdkColor blue = { 0, 0x0000, 0x0000, 0xffff }; /* Default color */
-
-    /* Could optionaly set link_color to the current theme color... */
-    link_color = &blue;
-
-    gtk_widget_modify_fg (GTK_WIDGET (label),
-                  GTK_STATE_NORMAL, link_color);
-    gtk_widget_modify_fg (GTK_WIDGET (label),
-                  GTK_STATE_ACTIVE, link_color);
-    gtk_widget_modify_fg (GTK_WIDGET (label),
-                  GTK_STATE_PRELIGHT, link_color);
-    gtk_widget_modify_fg (GTK_WIDGET (label),
-                  GTK_STATE_SELECTED, link_color);
-
-    if (link_color != &blue)
-        gdk_color_free (link_color);
-}
-
 /* Initialize the cache tab */
 void
 seahorse_prefs_cache (SeahorseWidget *swidget)
@@ -336,30 +259,16 @@
     g_return_if_fail (w != NULL);
     seahorse_check_button_gconf_attach (GTK_CHECK_BUTTON (w), SETTING_DISPLAY);
 
-    /* Setup daemon button visuals */
-    w = seahorse_widget_get_widget (swidget, "session-link");
-    g_return_if_fail (w != NULL);
-    
-    w2 = seahorse_widget_get_widget (swidget, "label-session-properties");
-    g_return_if_fail (w2 != NULL);
-    
-    paint_button_label_as_link (GTK_BUTTON (w), GTK_LABEL(w2));
-    g_signal_connect (GTK_WIDGET (w), "realize", G_CALLBACK (set_hand_cursor_on_realize), NULL);
-
     /* End -- Setup daemon button visuals */
-    
-    glade_xml_signal_connect_data (swidget->xml, "on_session_link",
-                                   G_CALLBACK (show_session_properties), NULL);
                                    
     /* Disable GPG agent prefs if another agent is running or error */
     switch (seahorse_passphrase_detect_agent (SKEY_PGP)) {
     case SEAHORSE_AGENT_NONE:
-        display_start = TRUE;
         break;
         
     case SEAHORSE_AGENT_UNKNOWN:
     case SEAHORSE_AGENT_OTHER:
-        g_warning ("Another GPG agent may be running. Disabling cache preferences.");
+        g_warning ("Invalid or no GPG agent is running. Disabling cache preferences.");
         w = seahorse_widget_get_widget (swidget, "pgp-area");
         if (w != NULL)
             gtk_widget_hide (w);
@@ -371,15 +280,4 @@
     default:
         break;
     };
-    
-    /* Show the start link */
-    if (display_start) {
-        w = seahorse_widget_get_widget (swidget, "agent-start");
-        g_return_if_fail (w != NULL);
-        gtk_widget_show (w);
-        w = seahorse_widget_get_widget (swidget, "agent-started");
-        g_return_if_fail (w != NULL);
-        glade_xml_signal_connect_data (swidget->xml, "on_start_link",
-                                       G_CALLBACK (start_agent), w);
-    }
 }

Modified: trunk/libseahorse/seahorse-prefs.glade
==============================================================================
--- trunk/libseahorse/seahorse-prefs.glade	(original)
+++ trunk/libseahorse/seahorse-prefs.glade	Mon Jan 28 21:19:21 2008
@@ -823,7 +823,7 @@
 		      <child>
 			<widget class="GtkLabel" id="label18">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">&lt;i&gt;A non-supported PGP passphrase caching agent is running.&lt;/i&gt;</property>
+			  <property name="label" translatable="yes">&lt;i&gt;A supported PGP passphrase caching agent is not running.&lt;/i&gt;</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">True</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1036,314 +1036,11 @@
 	      </child>
 
 	      <child>
-		<widget class="GtkVBox" id="agent-start">
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">6</property>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator2">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label7">
-		      <property name="width_request">407</property>
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;Warning:&lt;/b&gt; The 'seahorse-agent' program is not running. This program is necessary in order to cache passphrases. </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">True</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHButtonBox" id="hbuttonbox2">
-		      <property name="visible">True</property>
-		      <property name="layout_style">GTK_BUTTONBOX_END</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkButton" id="start-link">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NONE</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="pressed" handler="on_start_link"/>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment1">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">0</property>
-			      <property name="yscale">0</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkHBox" id="hbox4">
-				  <property name="visible">True</property>
-				  <property name="homogeneous">False</property>
-				  <property name="spacing">2</property>
-
-				  <child>
-				    <widget class="GtkImage" id="image1">
-				      <property name="visible">True</property>
-				      <property name="stock">gtk-execute</property>
-				      <property name="icon_size">4</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-
-				  <child>
-				    <widget class="GtkLabel" id="label-start-seahorse-daemon">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Start sea_horse-agent</property>
-				      <property name="use_underline">True</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				      <property name="width_chars">-1</property>
-				      <property name="single_line_mode">False</property>
-				      <property name="angle">0</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">6</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">12</property>
-		  <property name="expand">False</property>
-		  <property name="fill">True</property>
-		</packing>
+		<placeholder/>
 	      </child>
 
 	      <child>
-		<widget class="GtkVBox" id="agent-started">
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">6</property>
-
-		  <child>
-		    <widget class="GtkHSeparator" id="hseparator3">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label5">
-		      <property name="width_request">407</property>
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;Note:&lt;/b&gt; The 'seahorse-agent' program has been started. This program is necessary in order to cache passphrases. </property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">True</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">True</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox3">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label6">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">To avoid manually starting the 'seahorse-agent' in the future
-add it to the Session Manager. </property>
-			  <property name="use_underline">False</property>
-			  <property name="use_markup">False</property>
-			  <property name="justify">GTK_JUSTIFY_LEFT</property>
-			  <property name="wrap">False</property>
-			  <property name="selectable">False</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-			  <property name="width_chars">-1</property>
-			  <property name="single_line_mode">False</property>
-			  <property name="angle">0</property>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkHButtonBox" id="hbuttonbox3">
-		      <property name="visible">True</property>
-		      <property name="layout_style">GTK_BUTTONBOX_END</property>
-		      <property name="spacing">0</property>
-
-		      <child>
-			<widget class="GtkButton" id="session-link">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NONE</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="pressed" handler="on_session_link"/>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment2">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">0</property>
-			      <property name="yscale">0</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkHBox" id="hbox5">
-				  <property name="visible">True</property>
-				  <property name="homogeneous">False</property>
-				  <property name="spacing">2</property>
-
-				  <child>
-				    <widget class="GtkImage" id="image2">
-				      <property name="visible">True</property>
-				      <property name="stock">gtk-execute</property>
-				      <property name="icon_size">4</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-
-				  <child>
-				    <widget class="GtkLabel" id="label-session-properties">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Session _Properties</property>
-				      <property name="use_underline">True</property>
-				      <property name="use_markup">True</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-				      <property name="width_chars">-1</property>
-				      <property name="single_line_mode">False</property>
-				      <property name="angle">0</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-		      </child>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">False</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">True</property>
-		</packing>
+		<placeholder/>
 	      </child>
 	    </widget>
 	    <packing>



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