[Xfce4-commits] r22674 - in xfburn/trunk: . xfburn
Jean-François Wauthy
pollux at xfce.org
Sun Aug 6 13:55:01 UTC 2006
Author: pollux
Date: 2006-08-06 13:55:00 +0000 (Sun, 06 Aug 2006)
New Revision: 22674
Modified:
xfburn/trunk/NEWS
xfburn/trunk/xfburn/xfburn-data-composition.c
Log:
Prevent having two 'New directory' entries in a data composition
Modified: xfburn/trunk/NEWS
===================================================================
--- xfburn/trunk/NEWS 2006-08-06 08:25:18 UTC (rev 22673)
+++ xfburn/trunk/NEWS 2006-08-06 13:55:00 UTC (rev 22674)
@@ -1,6 +1,7 @@
xfburn 0.x
==========
+- Prevent having two 'New directory' entries in a data composition
- Add support of SAO mode (bug #2121)
- Add create directory action in data composition
- Prevent usage of empty filename in data composition
Modified: xfburn/trunk/xfburn/xfburn-data-composition.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-data-composition.c 2006-08-06 08:25:18 UTC (rev 22673)
+++ xfburn/trunk/xfburn/xfburn-data-composition.c 2006-08-06 13:55:00 UTC (rev 22674)
@@ -115,6 +115,8 @@
{
gchar *filename;
gboolean modified;
+
+ guint n_new_directory;
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
@@ -631,7 +633,7 @@
path = (GtkTreePath *) list->data;
column = gtk_tree_view_get_column (GTK_TREE_VIEW (priv->content), DATA_COMPOSITION_COLUMN_CONTENT - 1);
/* -1 because of COLUMN_ICON */
-
+
gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->content), path, column, TRUE);
gtk_tree_path_free (path);
@@ -651,6 +653,9 @@
DataCompositionType type = -1;
gchar *humansize = NULL;
+ GtkTreePath *inserted_path = NULL;
+ gchar *directory_text = NULL;
+
GtkTreeViewColumn *column;
GtkTreePath *path = NULL;
@@ -681,15 +686,24 @@
humansize = xfburn_humanreadable_filesize (4);
+ inserted_path = gtk_tree_model_get_path (model, &iter_directory);
+ if (file_exists_on_same_level (model, inserted_path, TRUE, _("New directory")))
+ directory_text = g_strdup_printf ("%s %d", _("New directory"), ++(priv->n_new_directory));
+ else
+ directory_text = g_strdup (_("New directory"));
+ gtk_tree_path_free (inserted_path);
+
gtk_tree_store_set (GTK_TREE_STORE (model), &iter_directory,
DATA_COMPOSITION_COLUMN_ICON, icon_directory,
- DATA_COMPOSITION_COLUMN_CONTENT, _("New directory"),
+ DATA_COMPOSITION_COLUMN_CONTENT, directory_text,
DATA_COMPOSITION_COLUMN_HUMANSIZE, humansize,
DATA_COMPOSITION_COLUMN_SIZE, (guint64) 4,
DATA_COMPOSITION_COLUMN_TYPE, DATA_COMPOSITION_TYPE_DIRECTORY, -1);
-
+ g_free (directory_text);
g_free (humansize);
+ xfburn_data_disc_usage_add_size (XFBURN_DISC_USAGE (priv->disc_usage), 4);
+
gtk_widget_realize (priv->content);
/* put the cell renderer in edition mode */
@@ -862,7 +876,7 @@
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
GtkTreeModel *model;
GList *selected_rows;
- gchar *all_paths;
+ gchar *all_paths = NULL;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
@@ -1101,6 +1115,11 @@
}
static void
+copy_entry_to (XfburnDataComposition *dc, GtkTreeIter *src, GtkTreeIter *dest, GtkTreeViewDropPosition position)
+{
+}
+
+static void
cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guint y, GtkSelectionData * sd,
guint info, guint t, XfburnDataComposition * composition)
{
@@ -1123,6 +1142,7 @@
str_path = strtok ((gchar *) sd->data, "\n");
while (str_path) {
+ DBG ("%s", str_path);
str_path = strtok (NULL, "\n");
}
More information about the Xfce4-commits
mailing list