Author: colossus
Date: 2006-11-15 08:15:10 +0000 (Wed, 15 Nov 2006)
New Revision: 23884

Modified:
   xarchiver/trunk/src/callbacks.c
   xarchiver/trunk/src/interface.c
Log:
Xarchiver doesn't load the same archive in a new tab.
Added alignment of tab menu label.
Reduced size of close button in the tab.


Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c     2006-11-14 23:22:54 UTC (rev 23883)
+++ xarchiver/trunk/src/callbacks.c     2006-11-15 08:15:10 UTC (rev 23884)
@@ -307,7 +307,7 @@
 {
        gchar *path = NULL;
        gint current_page;
-
+       gint x;
        path = (gchar *)data;
        if ( path == NULL)
     {
@@ -316,6 +316,16 @@
                        return;
        }
 
+       /* Let's check if the archive is already opened */
+       for (x = 0; x < gtk_notebook_get_n_pages ( notebook) ; x++)
+       {
+               current_page = xa_find_archive_index ( x );
+               if (current_page == -1)
+                       break;
+               if (strstr (path,archive[current_page]->path) )
+                       return;
+       }
+
        current_page = xa_get_new_archive_idx();
        if (current_page == -1)
                return;
@@ -2219,7 +2229,6 @@
        gint idx;
 
        current_page = gtk_notebook_get_current_page (notebook);
-
        array = gtk_selection_data_get_uris ( data );
        if (array == NULL)
        {

Modified: xarchiver/trunk/src/interface.c
===================================================================
--- xarchiver/trunk/src/interface.c     2006-11-14 23:22:54 UTC (rev 23883)
+++ xarchiver/trunk/src/interface.c     2006-11-15 08:15:10 UTC (rev 23884)
@@ -519,10 +519,12 @@
 
        image = xa_main_window_find_image ("close.png", GTK_ICON_SIZE_MENU);
        gtk_container_add (GTK_CONTAINER(close_button), image);
+       gtk_widget_set_size_request(close_button, 19, 18);
        gtk_button_set_relief (GTK_BUTTON(close_button), GTK_RELIEF_NONE);
        gtk_box_pack_end (GTK_BOX(page_hbox), close_button, FALSE, FALSE, 0);
        gtk_widget_show_all (page_hbox);
 
+       gtk_misc_set_alignment(GTK_MISC(tab_label), 0.0, 0);
        gtk_notebook_append_page_menu (notebook, archive->scrollwindow, 
page_hbox, tab_label);
        gtk_notebook_set_current_page(notebook, -1);
 

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to