Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/exhibit/src/bin


Modified Files:
        exhibit.h exhibit_comment.c exhibit_main.c exhibit_menus.c 
        exhibit_tab.c 


Log Message:
- remove our own notebook like logic and use a tab-less notebook when in single 
view. show tabs when in tabbed view. note: tab deletion still not done

===================================================================
RCS file: /cvs/e/e17/proto/exhibit/src/bin/exhibit.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- exhibit.h   1 Sep 2006 21:51:38 -0000       1.33
+++ exhibit.h   1 Sep 2006 23:39:22 -0000       1.34
@@ -206,7 +206,7 @@
    Etk_Widget    *app3_menu;
    Etk_Widget    *app4_menu;
    Etk_Widget    *submenu;
-
+   
    int            zoom;
    int            brightness;
    int            contrast;
===================================================================
RCS file: /cvs/e/e17/proto/exhibit/src/bin/exhibit_comment.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- exhibit_comment.c   15 Aug 2006 18:45:51 -0000      1.11
+++ exhibit_comment.c   1 Sep 2006 23:39:22 -0000       1.12
@@ -10,17 +10,8 @@
 _ex_comment_show(Exhibit *e)
 {
    e->cur_tab->comment.vbox = etk_vbox_new(ETK_FALSE, 0);
-   if(evas_list_count(e->tabs) == 1)
-     {
-       /* we only have 1 tab, ie, no notebook */
-       etk_paned_child2_set(ETK_PANED(e->hpaned), e->cur_tab->comment.vbox, 
ETK_TRUE);
-     }
-   else
-     {
-       /* we have multiple tabs */
-       etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), e->cur_tab->num, 
e->cur_tab->comment.vbox);
-     }
-
+   etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), e->cur_tab->num, 
e->cur_tab->comment.vbox);
+   
    if (e->cur_tab->fit_window)
      etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), e->cur_tab->alignment, 
ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
    else
@@ -59,22 +50,10 @@
    if(!e->cur_tab->comment.visible)
      return;
 
-   if(evas_list_count(e->tabs) == 1)
-     {
-       /* we only have 1 tab, ie, no notebook */
-       if (e->cur_tab->fit_window)
-         etk_paned_child2_set(ETK_PANED(e->hpaned), e->cur_tab->alignment, 
ETK_TRUE);
-       else
-         etk_paned_child2_set(ETK_PANED(e->hpaned), e->cur_tab->scrolled_view, 
ETK_TRUE);
-     }
+   if (e->cur_tab->fit_window)
+     etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), e->cur_tab->num, 
e->cur_tab->alignment);
    else
-     {
-       /* we have multiple tabs */
-       if (e->cur_tab->fit_window)
-         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->alignment);
-       else
-         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);
-     }   
+     etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), e->cur_tab->num, 
e->cur_tab->scrolled_view);
    
    etk_object_destroy(ETK_OBJECT(e->cur_tab->comment.textview));
    etk_object_destroy(ETK_OBJECT(e->cur_tab->comment.save));
===================================================================
RCS file: /cvs/e/e17/proto/exhibit/src/bin/exhibit_main.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- exhibit_main.c      1 Sep 2006 22:41:37 -0000       1.72
+++ exhibit_main.c      1 Sep 2006 23:39:22 -0000       1.73
@@ -2,7 +2,6 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 #include "exhibit.h"
-#include <Ecore_File.h>
 
 extern pid_t pid;
 extern Evas_List *thumb_list;
@@ -84,7 +83,8 @@
    etk_window_title_set(ETK_WINDOW(e->win), title);
 
    /* Save the path of where the image really is in case
-      we browse more in the dtree */
+    * we browse more in the dtree 
+    */
    e->cur_tab->set_img_path = malloc(PATH_MAX);
    memset(e->cur_tab->set_img_path, 0, PATH_MAX);
    e->cur_tab->cur_file = malloc(PATH_MAX);
@@ -96,7 +96,7 @@
    e->cur_tab->image_loaded = ETK_TRUE;
    etk_widget_show(ETK_WIDGET(e->cur_tab->image));
    
-   if(_ex_file_is_ebg(image))
+   if (_ex_file_is_ebg(image))
      {
        /* can we do this without the size request? it doesnt look good */
        etk_widget_size_request_set(ETK_WIDGET(e->cur_tab->image), 800, 600);   
@@ -182,7 +182,7 @@
    etk_tree_freeze(ETK_TREE(e->cur_tab->dtree));
    
    getcwd(e->cur_tab->cur_path, PATH_MAX);
-   if(strlen(e->cur_tab->cur_path) < PATH_MAX - 2)
+   if (strlen(e->cur_tab->cur_path) < PATH_MAX - 2)
      {
        int len = strlen(e->cur_tab->cur_path);
        e->cur_tab->cur_path[len] = '/';
@@ -255,9 +255,9 @@
              _ex_main_monitor_dir, NULL);
      }
 
-   /* Set the dir to the current dir at the end so we avoid
-      stepdown like ".." if we just call the refresh on
-      the listing like after a delete */
+   /* Set the dir to the current dir at the end so we avoid stepdown 
+    * like ".." if we just call the refresh on the listing like after a delete
+    */
    e->cur_tab->dir = strdup(".");
    
    closedir(dir);
@@ -364,7 +364,7 @@
 {
    Etk_Event_Key_Down *ev = event;
 
-   if(!strcmp(ev->key, "Tab"))
+   if (!strcmp(ev->key, "Tab"))
      {
        const char *path;
        const char *dir;
@@ -430,7 +430,7 @@
        
      }
    
-   if(!strcmp(ev->key, "Return") || !strcmp(ev->key, "KP_Enter"))
+   if (!strcmp(ev->key, "Return") || !strcmp(ev->key, "KP_Enter"))
      {
        _ex_slideshow_stop(e);
         e->cur_tab->dir = 
strdup((char*)etk_entry_text_get(ETK_ENTRY(e->entry[0])));
@@ -461,9 +461,9 @@
 {
    Etk_Event_Key_Down *ev = event;
 
-   if(ev->modifiers == ETK_MODIFIER_CTRL)
+   if (ev->modifiers == ETK_MODIFIER_CTRL)
      {
-       if(!strcmp(ev->key, "t"))
+       if (!strcmp(ev->key, "t"))
          {
             Ex_Tab *tab;
             
@@ -508,7 +508,6 @@
 static void
 _ex_main_window_resize_cb(Etk_Object *object, void *data)
 {
-
    etk_window_geometry_get(ETK_WINDOW(object), NULL, NULL, 
                           &e->options->last_w, &e->options->last_h);
 }
@@ -516,25 +515,25 @@
 void
 _ex_main_window_slideshow_toggle()
 {
-   if(e->slideshow.active)
-     {
-       _ex_slideshow_stop();
-     }
-   else
-     {
-       _ex_slideshow_start();
-     }
+   if (e->slideshow.active)     
+     _ex_slideshow_stop();     
+   else     
+     _ex_slideshow_start();
 }
 
 static void 
 _ex_main_window_tab_toggled_cb(Etk_Object *object, void *data)
 {     
    Ex_Tab  *tab;
+   int num;
    
    _ex_slideshow_stop();
 
-   tab = evas_list_nth(e->tabs, 
-        etk_notebook_current_page_get(ETK_NOTEBOOK(object)));
+   num = etk_notebook_current_page_get(ETK_NOTEBOOK(object));
+   if (num < 0)
+     return;
+   
+   tab = evas_list_nth(e->tabs, num);
 
    e->cur_tab = tab;
    D(("Toggeled tab %p number %d\n", tab, e->cur_tab->num));
@@ -547,38 +546,10 @@
 void
 _ex_main_window_tab_append(Ex_Tab *tab)
 {
-   if(evas_list_count(e->tabs) == 1)
-     {
-       /* adding first "real" tab, copy existing tab, and create new one */
-       e->notebook = etk_notebook_new();        
-       etk_paned_child2_set(ETK_PANED(e->hpaned), e->notebook, ETK_TRUE);
-       
-       if(e->cur_tab->fit_window)
-         {
-            if(e->cur_tab->comment.visible)
-              etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), 
-                                       _ex_file_get(e->cur_tab->dir), 
-                                       e->cur_tab->comment.vbox);
-            else
-              etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), 
-                                       _ex_file_get(e->cur_tab->dir), 
-                                       e->cur_tab->alignment);
-         }
-       else
-         {
-            if(e->cur_tab->comment.visible)
-              etk_notebook_page_append(ETK_NOTEBOOK(e->notebook),
-                                       _ex_file_get(e->cur_tab->dir),
-                                       e->cur_tab->comment.vbox);
-            else              
-              etk_notebook_page_append(ETK_NOTEBOOK(e->notebook), 
-                                       _ex_file_get(e->cur_tab->dir), 
-                                       e->cur_tab->scrolled_view);
-         }
-       
-       etk_signal_connect("current_page_changed", ETK_OBJECT(e->notebook), 
ETK_CALLBACK(_ex_main_window_tab_toggled_cb), e);
-       etk_widget_show(ETK_WIDGET(e->notebook));
-     }
+   if (evas_list_count(e->tabs) >= 1)
+     etk_notebook_tabs_visible_set(ETK_NOTEBOOK(e->notebook), ETK_TRUE);
+   else
+     etk_notebook_tabs_visible_set(ETK_NOTEBOOK(e->notebook), ETK_FALSE);     
 
    e->tabs = evas_list_append(e->tabs, tab);
    e->cur_tab = tab;
@@ -611,18 +582,16 @@
        char *dir;
        char *file;
        
-
        if ((file = strstr(files->files[i], "file://")) == NULL)
          continue;
-               
-       
+                       
        file += strlen("file://");      
        dir = ecore_file_get_dir(file);
        
        if(!ecore_file_is_dir(dir))
          continue;
        
-       if(!ecore_file_exists(file))
+       if (!ecore_file_exists(file))
          file = NULL;
        
        E_FREE(e->cur_tab->dir);
@@ -630,7 +599,7 @@
        etk_tree_clear(ETK_TREE(e->cur_tab->itree));
        etk_tree_clear(ETK_TREE(e->cur_tab->dtree));
        _ex_main_populate_files(ecore_file_get_file(file), EX_TREE_UPDATE_ALL);
-       if(ecore_file_exists(file) && !ecore_file_is_dir(file))
+       if (ecore_file_exists(file) && !ecore_file_is_dir(file))
          _ex_main_image_set(e, file);
        etk_notebook_page_tab_label_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, _ex_file_get(e->cur_tab->cur_path));
        break;
@@ -887,14 +856,11 @@
      }
    else
      tab = _ex_tab_new(e, ".");
-   
-       
-   e->cur_tab = tab;   
-   e->tabs = evas_list_append(e->tabs, tab);   
-   _ex_tab_select(tab);
-   etk_paned_child2_set(ETK_PANED(e->hpaned), tab->scrolled_view, ETK_TRUE);
-   
-   _ex_main_populate_files(file, EX_TREE_UPDATE_ALL);
+       
+   e->notebook = etk_notebook_new();
+   etk_notebook_tabs_visible_set(ETK_NOTEBOOK(e->notebook), ETK_FALSE);
+   etk_paned_child2_set(ETK_PANED(e->hpaned), e->notebook, ETK_TRUE);
+   etk_signal_connect("current_page_changed", ETK_OBJECT(e->notebook), 
ETK_CALLBACK(_ex_main_window_tab_toggled_cb), e);
       
    e->hbox = etk_hbox_new(ETK_TRUE, 0);   
    etk_box_append(ETK_BOX(e->vbox), e->hbox, ETK_BOX_END, ETK_BOX_NONE, 0);
@@ -935,6 +901,10 @@
    
    e->statusbar[3] = etk_statusbar_new();
    etk_box_append(ETK_BOX(e->hbox), e->statusbar[3], ETK_BOX_START, 
ETK_BOX_EXPAND_FILL, 0);
+
+   _ex_main_window_tab_append(tab);   
+   _ex_main_populate_files(file, EX_TREE_UPDATE_ALL);   
+   _ex_tab_select(tab);
    
    etk_widget_show_all(e->win);
 }
===================================================================
RCS file: /cvs/e/e17/proto/exhibit/src/bin/exhibit_menus.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- exhibit_menus.c     1 Sep 2006 20:23:50 -0000       1.32
+++ exhibit_menus.c     1 Sep 2006 23:39:22 -0000       1.33
@@ -95,7 +95,7 @@
    EX_MENU_ITEM_GET_RETURN(obj);
 
    tab = _ex_tab_new(e, e->cur_tab->cur_path);
-   _ex_main_window_tab_append(e, tab);
+   _ex_main_window_tab_append(tab);
    _ex_main_populate_files(NULL, EX_TREE_UPDATE_ALL);
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/exhibit/src/bin/exhibit_tab.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- exhibit_tab.c       1 Sep 2006 20:23:50 -0000       1.29
+++ exhibit_tab.c       1 Sep 2006 23:39:22 -0000       1.30
@@ -65,7 +65,7 @@
    
etk_scrolled_view_policy_set(etk_tree_scrolled_view_get(ETK_TREE(tab->itree)), 
ETK_POLICY_AUTO, ETK_POLICY_SHOW);
    etk_tree_build(ETK_TREE(tab->itree));
 
-   if(dir)
+   if (dir)
      tab->dir = strdup(dir);
    else
      tab->dir = strdup(".");
@@ -96,24 +96,20 @@
 void
 _ex_tab_delete()
 {
-   if (!e->cur_tab) {
+   if (!e->cur_tab) 
+     {
        D(("No currently selected TAB!!\n"));
        return;
-   }
-
-   if (e->cur_tab->num == 0)
-     return;
-
+     }
    
    D(("Number of tabs: %d\n", evas_list_count(e->tabs)));
 
-   if(evas_list_count(e->tabs) < 1)
+   if (evas_list_count(e->tabs) < 1)
      {
        D(("Cannot remove the last tab\n"));
        return;
      }
      
-
    D(("Delete tab %d\n", e->cur_tab->num));
 
    D(("Remove from list\n"));
@@ -124,6 +120,9 @@
    /* Set the cur_tab on the new one */
    e->cur_tab = evas_list_nth(e->tabs, 
etk_notebook_current_page_get(ETK_NOTEBOOK(e->notebook)));
 //   E_FREE(e->cur_tab);
+
+   if (evas_list_count(e->tabs) == 1)
+     etk_notebook_tabs_visible_set(ETK_NOTEBOOK(e->notebook), ETK_FALSE);
 }
 
 void
@@ -134,16 +133,13 @@
    D(("_ex_tab_select: changed dir to %s\n", tab->cur_path));
    D(("_ex_tab_select: selecting tab num %d\n", e->cur_tab->num));
 
-   if (!e->notebook) 
-     {
-       if(tab->comment.visible)
-         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), tab->num, 
-               tab->comment.vbox);
-       else if(tab->fit_window)
-         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), tab->num, 
-               tab->alignment);
-     }
-   
+   if (tab->comment.visible)
+     etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), tab->num, 
+                                tab->comment.vbox);
+   else if (tab->fit_window)
+     etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), tab->num, 
+                                tab->alignment);
+      
    etk_table_attach(ETK_TABLE(e->table), tab->dtree,
                    0, 3, 3, 3,
                    0, 0, ETK_TABLE_VEXPAND | ETK_TABLE_FILL);
@@ -163,40 +159,24 @@
 _ex_tab_current_zoom_in(Exhibit *e)
 {
    if (e->cur_tab->fit_window)
-     {
-       if(evas_list_count(e->tabs) == 1)
+     {   
+       if (e->cur_tab->comment.visible)
          {
-            if(e->cur_tab->comment.visible)
-              {
-                 etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->comment.vbox, ETK_TRUE);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-              }
-            else
-              etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->scrolled_view, ETK_TRUE);
+            etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
+            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
+            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
+            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
+            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
          }
        else
-         {
-            if(e->cur_tab->comment.visible)
-              {
-                 etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-              }
-            else
-              etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);
-         }
-         
+         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);
+                 
         etk_widget_size_request_set(e->cur_tab->alignment, -1, -1);
         
etk_scrolled_view_add_with_viewport(ETK_SCROLLED_VIEW(e->cur_tab->scrolled_view),
 e->cur_tab->alignment);
         e->cur_tab->fit_window = ETK_FALSE;
      }
    
-   if(e->zoom == ZOOM_MAX)
+   if (e->zoom == ZOOM_MAX)
      e->zoom = ZOOM_MAX;
    else
      e->zoom += 2;
@@ -210,39 +190,23 @@
 {
    if (e->cur_tab->fit_window)
      {
-       if(evas_list_count(e->tabs) == 1)
+       if (e->cur_tab->comment.visible)
          {
-            if(e->cur_tab->comment.visible)
-              {
-                 etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->comment.vbox, ETK_TRUE);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-              }
-            else
-              etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->scrolled_view, ETK_TRUE);
+            etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
+            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
+            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
+            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
+            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
          }
-       else
-         {
-            if(e->cur_tab->comment.visible)
-              {
-                 etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-              }
             else            
-              etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);
-         }
+         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);     
        
         etk_widget_size_request_set(e->cur_tab->alignment, -1, -1);
         
etk_scrolled_view_add_with_viewport(ETK_SCROLLED_VIEW(e->cur_tab->scrolled_view),
 e->cur_tab->alignment);
         e->cur_tab->fit_window = ETK_FALSE;
      }
    
-   if(e->zoom <= ZOOM_MIN)
+   if (e->zoom <= ZOOM_MIN)
      e->zoom = ZOOM_MIN;
    else
      e->zoom -= 2;
@@ -255,34 +219,18 @@
 _ex_tab_current_zoom_one_to_one(Exhibit *e)
 {
    if (e->cur_tab->fit_window)
-     {
-       if(evas_list_count(e->tabs) == 1)
-         {
-            if(e->cur_tab->comment.visible)
-              {
-                 etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->comment.vbox, ETK_TRUE);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);          
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-              }
-            else                    
-              etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->scrolled_view, ETK_TRUE);
-         }
-       else
+     { 
+       if (e->cur_tab->comment.visible)
          {
-            if(e->cur_tab->comment.visible)
-              {
-                 etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
-                 etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-                 etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-              }
-            else            
-              etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);
+            etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
+            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->alignment);
+            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
+            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
+            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
          }
-       
+       else         
+         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->scrolled_view);
+               
         etk_widget_size_request_set(e->cur_tab->alignment, -1, -1);
         
etk_scrolled_view_add_with_viewport(ETK_SCROLLED_VIEW(e->cur_tab->scrolled_view),
 e->cur_tab->alignment);
         e->cur_tab->fit_window = ETK_FALSE;
@@ -300,33 +248,18 @@
 _ex_tab_current_fit_to_window(Exhibit *e)
 {
    etk_widget_size_request_set(e->cur_tab->alignment, 10, 10);
-   if(evas_list_count(e->tabs) == 1)
-     {
-       if(e->cur_tab->comment.visible)
-         {
-            etk_paned_child2_set(ETK_PANED(e->hpaned), 
e->cur_tab->comment.vbox, ETK_TRUE);
-            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view);
-            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);       
-            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->alignment, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);        
-            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-         }
-       else
-         etk_paned_child2_set(ETK_PANED(e->hpaned), e->cur_tab->alignment, 
ETK_TRUE);
-     }
-   else
+     
+   if (e->cur_tab->comment.visible)
      {
-       if(e->cur_tab->comment.visible)
-         {
-            etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->comment.vbox);
-            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view);
-            etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
-            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->alignment, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
-            etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
-         }
-       else    
-         etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), 
e->cur_tab->num, e->cur_tab->alignment);
+       etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), e->cur_tab->num, 
e->cur_tab->comment.vbox);
+       etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->scrolled_view);
+       etk_container_remove(ETK_CONTAINER(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame);
+       etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->alignment, ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
+       etk_box_append(ETK_BOX(e->cur_tab->comment.vbox), 
e->cur_tab->comment.frame, ETK_BOX_START, ETK_BOX_NONE, 3);
      }
-     
+   else        
+     etk_notebook_page_child_set(ETK_NOTEBOOK(e->notebook), e->cur_tab->num, 
e->cur_tab->alignment);
+   
    etk_widget_size_request_set(e->cur_tab->image, -1, -1);
    
    e->cur_tab->fit_window = ETK_TRUE;
@@ -357,13 +290,13 @@
    num_types = 1;
    types[0] = strdup("text/uri-list");   
    
-   if(evas_list_count(rows) > 1)
+   if (evas_list_count(rows) > 1)
      {
        Evas_List *ll;
        Etk_Widget *table;
        int i = 0, l = 0, r = 0, t = 0, b = 0, row_num;
                
-       if(evas_list_count(rows) >= EX_DND_COL_NUM)
+       if (evas_list_count(rows) >= EX_DND_COL_NUM)
          row_num = evas_list_count(rows) / EX_DND_COL_NUM;
        else
          row_num = 1;
@@ -378,7 +311,7 @@
             etk_tree_row_fields_get(row, etk_tree_nth_col_get(tree, 0), 
&icol1_string, &icol2_string, etk_tree_nth_col_get(tree, 1),NULL);
             snprintf(tmp, PATH_MAX * sizeof(char), "file://%s%s\r\n", 
tab->cur_path, icol2_string);
             strncat(drag_data, tmp, PATH_MAX * evas_list_count(rows));
-            if(i <= EX_DND_MAX_NUM * EX_DND_MAX_NUM)
+            if (i <= EX_DND_MAX_NUM * EX_DND_MAX_NUM)
               {
                  image = etk_image_new_from_file(icol1_string);
                  etk_image_keep_aspect_set(ETK_IMAGE(image), ETK_TRUE);
@@ -388,7 +321,7 @@
                  
                  ++l; ++r;
                  
-                 if(l == EX_DND_COL_NUM)
+                 if (l == EX_DND_COL_NUM)
                    {
                       l = r = 0;
                       ++t; ++b;
@@ -464,7 +397,7 @@
    e = data;
    ev = event;
 
-   if(!strcmp(ev->key, "Return") || !strcmp(ev->key, "KP_Enter"))
+   if (!strcmp(ev->key, "Return") || !strcmp(ev->key, "KP_Enter"))
      {
         e->cur_tab->dir = 
strdup((char*)etk_entry_text_get(ETK_ENTRY(e->entry[0])));
         etk_tree_clear(ETK_TREE(e->cur_tab->itree));



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to