[Frugalware-darcs] fw-control-center: gnetconfig: support for editing profile description.

Priyank priyank at frugalware.org
Tue Jun 26 13:03:09 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070626104839-5ce2c-7f5edd12c81022c38645f0dcaa2fe74d282b2ab6.gz;

[gnetconfig: support for editing profile description.
Priyank <priyank at frugalware.org>**20070626104839] {
hunk ./gnetconfig/src/gnetconfig-interface.c 66
+GtkWidget *gn_profile_desc;
hunk ./gnetconfig/src/gnetconfig-interface.c 102
+static void cb_gn_profile_desc_save_clicked (GtkButton *button, gpointer data);
hunk ./gnetconfig/src/gnetconfig-interface.c 142
+	gn_profile_desc = glade_xml_get_widget (xml, "fwn_profile_desc");
hunk ./gnetconfig/src/gnetconfig-interface.c 278
+	widget = glade_xml_get_widget (xml, "fwn_profile_desc_save");
+	g_signal_connect (G_OBJECT(widget),
+			"clicked",
+			G_CALLBACK(cb_gn_profile_desc_save_clicked),
+			NULL);
hunk ./gnetconfig/src/gnetconfig-interface.c 467
+	/* read the profile desc */
+	if (strlen(active_profile->desc))
+		gtk_entry_set_text (GTK_ENTRY(gn_profile_desc), active_profile->desc);
+	else
+		gtk_entry_set_text (GTK_ENTRY(gn_profile_desc), "");
+
hunk ./gnetconfig/src/gnetconfig-interface.c 474
-	gnetconfig_read_hostname(hostname);
+	gnetconfig_read_hostname (hostname);
hunk ./gnetconfig/src/gnetconfig-interface.c 603
+	return;
+}
+
+static void
+cb_gn_profile_desc_save_clicked (GtkButton *button, gpointer data)
+{
+	char *desc = NULL;
+
+	desc = (char*) gtk_entry_get_text (GTK_ENTRY(gn_profile_desc));
+	if (desc == NULL)
+		*active_profile->desc = '\0';
+	else
+		snprintf (active_profile->desc, PATH_MAX, desc);
+	gnetconfig_save_profile (active_profile);
+
}


More information about the Frugalware-darcs mailing list