libmbca r6 - trunk/src



Author: kaijanma
Date: Fri Aug  1 07:20:22 2008
New Revision: 6
URL: http://svn.gnome.org/viewvc/libmbca?rev=6&view=rev

Log:
added mbca_assistant_present()

Modified:
   trunk/src/mbca_assistant.c
   trunk/src/mbca_assistant.h

Modified: trunk/src/mbca_assistant.c
==============================================================================
--- trunk/src/mbca_assistant.c	(original)
+++ trunk/src/mbca_assistant.c	Fri Aug  1 07:20:22 2008
@@ -1182,12 +1182,14 @@
 {
 	MBCAAssistantPrivate* priv = assistant->priv;
 	
-	if (priv->dispose_has_run) {
+	if (priv->dispose_has_run)
+	{
 	  /* Dispose has run. Data is not valid anymore. */
 	  return 0;
 	}
 
 	g_return_val_if_fail (priv->state == MBCA_STATE_READY, -1);
+	
 	priv->state = MBCA_STATE_RUNNING;
 	g_signal_emit (assistant,
 				MBCA_ASSISTANT_GET_CLASS (assistant)->state_changed_signal_id,
@@ -1247,7 +1249,8 @@
 enum MBCAAssistantState
 mbca_assistant_get_state (MBCAAssistant* assistant)
 {
-	if (assistant->priv->dispose_has_run) {
+	if (assistant->priv->dispose_has_run)
+	{
 	  /* Dispose has run. Data is not valid anymore. */
 	  return MBCA_STATE_ABORTED;
 	}
@@ -1261,7 +1264,8 @@
 	MBCAConfiguration* newconf;
 	MBCAConfiguration* conf;
 	
-	if (assistant->priv->dispose_has_run) {
+	if (assistant->priv->dispose_has_run)
+	{
 	  /* Dispose has run. Data is not valid anymore. */
 	  return NULL;
 	}
@@ -1283,7 +1287,8 @@
 void
 mbca_assistant_abort (MBCAAssistant* assistant)
 {
-	if (assistant->priv->dispose_has_run) {
+	if (assistant->priv->dispose_has_run)
+	{
 	  /* Dispose has run. Data is not valid anymore. */
 	  return;
 	}
@@ -1291,6 +1296,15 @@
 	/** @todo implement */
 }
 
+void
+mbca_assistant_present (MBCAAssistant* assistant)
+{
+	g_return_if_fail (assistant->priv->state == MBCA_STATE_RUNNING);
+
+	gtk_window_present (GTK_WINDOW (assistant->priv->assistant));
+	return;
+}
+
 /*******************************************************************************
  * Assistant callbacks *
  ***********************/

Modified: trunk/src/mbca_assistant.h
==============================================================================
--- trunk/src/mbca_assistant.h	(original)
+++ trunk/src/mbca_assistant.h	Fri Aug  1 07:20:22 2008
@@ -288,6 +288,15 @@
 void
 mbca_assistant_abort (MBCAAssistant* assistant);
 
+/**
+ * @brief presents assistant to user
+ *
+ * Presents an already running assistant to the user.
+ *
+ * @param assistant assistant to present
+ */
+void
+mbca_assistant_present (MBCAAssistant* assistant);
 
 G_END_DECLS
 



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