gimp-gap r792 - in trunk: . vid_common



Author: wolfgangh
Date: Sun Nov  2 15:38:54 2008
New Revision: 792
URL: http://svn.gnome.org/viewvc/gimp-gap?rev=792&view=rev

Log:
fix for sporadic invisble Encoder Page in the video master encoder dialog

Modified:
   trunk/ChangeLog
   trunk/vid_common/gap_cme_callbacks.c
   trunk/vid_common/gap_cme_gui.c

Modified: trunk/vid_common/gap_cme_callbacks.c
==============================================================================
--- trunk/vid_common/gap_cme_callbacks.c	(original)
+++ trunk/vid_common/gap_cme_callbacks.c	Sun Nov  2 15:38:54 2008
@@ -165,8 +165,7 @@
  * p_switch_gui_to_running_encoder_state
  * ------------------------------------------
  * disable video output entry and all existing notebook tabs,
- * and add the ncoder status frame
- * as last tab to the notebook
+ * except the last one (the encoder status frame)
  * (that is updated while encoder thread is running via polling)
  * then establish the encoding state.
  */
@@ -186,26 +185,14 @@
   notebook = gpp->cme__notebook;
 
   gtk_widget_show(frame);
-  
-  gtk_container_set_border_width (GTK_CONTAINER (gpp->cme__encoder_status_frame), 4);
-  gtk_widget_show(gpp->cme__encoder_status_frame);
-
   npages = gtk_notebook_get_n_pages(notebook);
-  for (idx = 0; idx < npages; idx++)
+  for (idx = 0; idx < npages -1; idx++)
   {
     gtk_widget_set_sensitive(gtk_notebook_get_nth_page(notebook, idx), FALSE);
   }
 
-  /* add the Encoding notebook tab */
-  label = gtk_label_new (_("Encoding"));
-  gtk_widget_show (label);
-  gtk_widget_show (frame);
-  gtk_container_add (GTK_CONTAINER (notebook), frame);
-  gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook)
-                            , gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), npages)
-			    , label);
-  gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), npages);
+  /* show last tab (-1) of the notbook */
+  gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), -1);
 
   gpp->video_encoder_run_state =  GAP_CME_ENC_RUN_STATE_RUNNING;
 }  /* end p_switch_gui_to_running_encoder_state */

Modified: trunk/vid_common/gap_cme_gui.c
==============================================================================
--- trunk/vid_common/gap_cme_gui.c	(original)
+++ trunk/vid_common/gap_cme_gui.c	Sun Nov  2 15:38:54 2008
@@ -2485,15 +2485,6 @@
   gtk_widget_show (cme__vbox_main);
   gtk_box_pack_start (GTK_BOX (cme__dialog_vbox1), cme__vbox_main, TRUE, TRUE, 0);
 
-  /* the encoder status frame is hidden until encoding starts
-   * it will be added as notebook tab later, when encoding is active.
-   * (see callback p_switch_gui_to_running_encoder_state)
-   */
-  frame = p_create_encoder_status_frame(gpp);
-  gpp->cme__encoder_status_frame = frame;
-  gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
-  gtk_widget_show (frame);
-  
 
   /* the notebook with encoding options */
   notebook = gtk_notebook_new ();
@@ -2550,6 +2541,17 @@
                              , gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 3)
 			     , label);
 
+  /* add the Encoding notebook tab */
+  label = gtk_label_new (_("Encoding"));
+  gtk_widget_show (label);
+  frame = p_create_encoder_status_frame(gpp);
+  gpp->cme__encoder_status_frame = frame;
+  gtk_widget_show (frame);
+  gtk_container_add (GTK_CONTAINER (notebook), frame);
+  gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook)
+                            , gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 4)
+			    , label);
 
 
   /* the output frame */



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