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

[E-devel] small exhibit patch



Hi,

here again is a small patch for exhibit. It does the following three
things:
a) When starting exhibit, the initial thumbnail list is now sorted as
    saved in the preferences. 
b) After switching back from fullscreen mode to default view the
    thumbnail list gets the focus. So the UP and DOWN keys work
    again to walk through the pictures. Before you needed to click one
    time into the thumbnail list to make the keys working again.
c) I added a new key shortcut: Hitting "Delete" asks if you wanr to
    delete the actual selected picture, also added this in the shortcut
    list on about dialog. After deleting a picture (both from menu or
    shortcut) the next picture in list will be selected and shown.

Best regards,
Friedrich
diff -Naur CVS/e17/e17/proto/exhibit/src/bin/exhibit_image.c ./exhibit/src/bin/exhibit_image.c
--- CVS/e17/e17/proto/exhibit/src/bin/exhibit_image.c	2007-01-02 20:09:56.238863625 +0100
+++ ./exhibit/src/bin/exhibit_image.c	2007-01-05 12:55:21.618878884 +0100
@@ -711,10 +711,11 @@
    _ex_main_image_unset();
    etk_object_destroy(ETK_OBJECT(tab->dialog));
    D(("Deleted %s\n", string));
+	 _ex_slideshow_next(e);
 }
 
 static void
diff -Naur CVS/e17/e17/proto/exhibit/src/bin/exhibit_main.c ./exhibit/src/bin/exhibit_main.c
--- CVS/e17/e17/proto/exhibit/src/bin/exhibit_main.c	2007-01-02 22:58:36.286863625 +0100
+++ ./exhibit/src/bin/exhibit_main.c	2007-01-05 13:29:27.487878884 +0100
@@ -233,8 +233,10 @@
    etk_tree_thaw(ETK_TREE(e->cur_tab->itree));
    etk_tree_thaw(ETK_TREE(e->cur_tab->dtree));
 
-   if (update == EX_TREE_UPDATE_FILES)
-     {
+/* commented out for correct sorting on start and not only when 
+ * change the sort method */
+//   if (update == EX_TREE_UPDATE_FILES)
+//     {
 	if (e->options->default_sort == EX_SORT_BY_DATE)
 	  _ex_sort_date_cb(NULL, NULL);
 	else if (e->options->default_sort == EX_SORT_BY_SIZE)
@@ -243,7 +245,7 @@
 	  _ex_sort_name_cb(NULL, NULL);
 	else if (e->options->default_sort == EX_SORT_BY_RESOLUTION)
 	  _ex_sort_resol_cb(NULL, NULL);
-     }
+//     }
 
    if (update == EX_TREE_UPDATE_ALL || update == EX_TREE_UPDATE_DIRS)
 	etk_tree_sort(ETK_TREE(e->cur_tab->dtree), _ex_main_dtree_compare_cb, 
@@ -526,6 +529,11 @@
 	     _ex_main_window_fullscreen_toggle(e);
 	  }		   
      }
+	
+	if(!strcmp(ev->key, "Delete"))
+	  {
+	     _ex_image_delete(e);
+	  }		   
 
    /* only active when in full screen mode */
    if(etk_window_fullscreen_get(ETK_WINDOW(e->win)))
@@ -569,7 +577,8 @@
 	  etk_notebook_tabs_visible_set(ETK_NOTEBOOK(e->notebook), ETK_TRUE);
 	else
 	  etk_notebook_tabs_visible_set(ETK_NOTEBOOK(e->notebook), ETK_FALSE);
-	etk_window_fullscreen_set(ETK_WINDOW(e->win), ETK_FALSE);	
+	etk_window_fullscreen_set(ETK_WINDOW(e->win), ETK_FALSE);
+	etk_widget_focus(e->cur_tab->itree);
      }
    else
      {
diff -Naur CVS/e17/e17/proto/exhibit/src/bin/exhibit_menus.c ./exhibit/src/bin/exhibit_menus.c
--- CVS/e17/e17/proto/exhibit/src/bin/exhibit_menus.c	2007-01-02 20:09:56.303863625 +0100
+++ ./exhibit/src/bin/exhibit_menus.c	2007-01-05 13:16:34.658878884 +0100
@@ -547,6 +547,7 @@
 	 "<b>control-q:</b> exit program\n"
 	 "<b>control-f:</b> toggle fullscreen\n"
 	 "<b>control-s:</b> toggle slideshow\n"
+	 "<b>delete:</b> delete the picture\n"
          "\n"			  
 	 "<b>Fullscreen mode controls:</b>\n"
 	 "<b>control-f:</b> enter fullscreen mode\n"

Attachment: signature.asc
Description: PGP signature