changeset 1678:1e3bbaa772b9

cleanup: remove some disabled code
author nadvornik
date Sun, 28 Jun 2009 09:25:47 +0000
parents c5c7e19fbb23
children 1867687f2fcb
files src/advanced_exif.c src/img-view.c src/layout_util.c src/preferences.c src/view_file_icon.c
diffstat 5 files changed, 0 insertions(+), 250 deletions(-) [+]
line wrap: on
line diff
--- a/src/advanced_exif.c	Sun Jun 28 09:08:25 2009 +0000
+++ b/src/advanced_exif.c	Sun Jun 28 09:25:47 2009 +0000
@@ -165,67 +165,6 @@
 	advanced_exif_update(ew);
 }
 
-#if 0
-static void advanced_exif_row_toggled_cb(GtkCellRendererToggle *toggle, const gchar *path, gpointer data)
-{
-	GtkWidget *listview = data;
-	GtkTreeModel *store;
-	GtkTreeIter iter;
-	GtkTreePath *tpath;
-	gchar *name = NULL;
-	gboolean active;
-
-	store = gtk_tree_view_get_model(GTK_TREE_VIEW(listview));
-
-	tpath = gtk_tree_path_new_from_string(path);
-	gtk_tree_model_get_iter(store, &iter, tpath);
-	gtk_tree_path_free(tpath);
-
-	gtk_tree_model_get(store, &iter, EXIF_ADVCOL_ENABLED, &active,
-					 EXIF_ADVCOL_NAME, &name, -1);
-	active = (!active);
-
-	if (active &&
-	    g_list_length(history_list_get_by_key("exif_extras")) >= EXIF_BAR_CUSTOM_COUNT)
-		{
-		active = FALSE;
-		}
-
-	gtk_list_store_set(GTK_LIST_STORE(store), &iter, EXIF_ADVCOL_ENABLED, active, -1);
-
-	if (active)
-		{
-		history_list_add_to_key("exif_extras", name, EXIF_BAR_CUSTOM_COUNT);
-		}
-	else
-		{
-		history_list_item_change("exif_extras", name, NULL);
-		}
-
-	g_free(name);
-}
-#endif 
-
-#if 0
-static void advanced_exif_add_column_check(GtkWidget *listview, const gchar *title, gint n)
-{
-	GtkTreeViewColumn *column;
-	GtkCellRenderer *renderer;
-
-	column = gtk_tree_view_column_new();
-	gtk_tree_view_column_set_title(column, title);
-	gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
-
-	renderer = gtk_cell_renderer_toggle_new();
-	gtk_tree_view_column_pack_start(column, renderer, TRUE);
-	gtk_tree_view_column_add_attribute(column, renderer, "active", n);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
-
-	g_signal_connect(G_OBJECT(renderer), "toggled",
-			 G_CALLBACK(advanced_exif_row_toggled_cb), listview);
-}
-#endif
-
 static GtkTargetEntry advanced_exif_drag_types[] = {
 	{ "text/plain", 0, TARGET_TEXT_PLAIN }
 };
--- a/src/img-view.c	Sun Jun 28 09:08:25 2009 +0000
+++ b/src/img-view.c	Sun Jun 28 09:25:47 2009 +0000
@@ -430,17 +430,6 @@
 				stop_signal = FALSE;
 				break;
 			}
-#if 0
-		if (n != -1)
-			{
-			if (!editor_window_flag_set(n))
-				{
-				view_fullscreen_toggle(vw, TRUE);
-				}
-			imd = view_window_active_image(vw);
-			file_util_start_editor_from_file(n, image_get_fd(imd), imd->widget);
-			}
-#endif
 		}
 	else if (event->state & GDK_SHIFT_MASK)
 		{
--- a/src/layout_util.c	Sun Jun 28 09:08:25 2009 +0000
+++ b/src/layout_util.c	Sun Jun 28 09:25:47 2009 +0000
@@ -1066,63 +1066,6 @@
 	file_util_start_editor_from_filelist(key, layout_selection_list(lw), layout_get_path(lw), lw->window);
 }
 
-#if 0
-static void layout_menu_edit_update(LayoutWindow *lw)
-{
-	gint i;
-
-	/* main edit menu */
-
-	if (!lw->action_group) return;
-
-	for (i = 0; i < GQ_EDITOR_GENERIC_SLOTS; i++)
-		{
-		gchar *key;
-		GtkAction *action;
-		const gchar *name;
-	
-		key = g_strdup_printf("Editor%d", i);
-
-		action = gtk_action_group_get_action(lw->action_group, key);
-		g_object_set_data(G_OBJECT(action), "edit_index", GINT_TO_POINTER(i));
-
-		name = editor_get_name(i);
-		if (name)
-			{
-			gchar *text = g_strdup_printf(_("_%d %s..."), i, name);
-
-			g_object_set(action, "label", text,
-					     "sensitive", TRUE, NULL);
-			g_free(text);
-			}
-		else
-			{
-			gchar *text;
-
-			text = g_strdup_printf(_("_%d empty"), i);
-			g_object_set(action, "label", text, "sensitive", FALSE, NULL);
-			g_free(text);
-			}
-
-		g_free(key);
-		}
-}
-
-void layout_edit_update_all(void)
-{
-	GList *work;
-
-	work = layout_window_list;
-	while (work)
-		{
-		LayoutWindow *lw = work->data;
-		work = work->next;
-
-		layout_menu_edit_update(lw);
-		}
-}
-
-#endif
 
 static void layout_menu_metadata_write_cb(GtkAction *action, gpointer data)
 {
--- a/src/preferences.c	Sun Jun 28 09:08:25 2009 +0000
+++ b/src/preferences.c	Sun Jun 28 09:25:47 2009 +0000
@@ -168,54 +168,6 @@
 		}
 }
 
-#if 0
-static void config_parse_editor_entries(GtkWidget **editor_name_entry, GtkWidget **editor_command_entry)
-{
-	gint i;
-	const gchar *buf;
-	GString *errmsg = g_string_new("");
-
-	for (i = 0; i < GQ_EDITOR_SLOTS; i++)
-		{
-		gchar *command = NULL;
-
-		if (i < GQ_EDITOR_GENERIC_SLOTS)
-			{
-			gchar *name = NULL;
-
-			buf = gtk_entry_get_text(GTK_ENTRY(editor_name_entry[i]));
-			if (buf && strlen(buf) > 0) name = g_strdup(buf);
-			editor_set_name(i, name);
-			g_free(name);
-			}
-
-		buf = gtk_entry_get_text(GTK_ENTRY(editor_command_entry[i]));
-		if (buf && strlen(buf) > 0)
-			{
-			gint flags = editor_command_parse(buf, NULL, NULL);
-		
-			if (EDITOR_ERRORS(flags))
-				{
-				if (errmsg->str[0]) g_string_append(errmsg, "\n\n");
-				g_string_append_printf(errmsg, _("%s\n#%d \"%s\":\n%s"), editor_get_error_str(flags),
-						       i+1, options->editor[i].name, buf);
-
-				}
-			command = g_strdup(buf);
-			}
-
-		editor_set_command(i, command);
-		g_free(command);
-		}
-	
-	if (errmsg->str[0])
-		{
-		file_util_warning_dialog(_("Invalid editor command"), errmsg->str, GTK_STOCK_DIALOG_ERROR, NULL);
-		}
-
-	g_string_free(errmsg, TRUE);
-}
-#endif
 
 static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 {
@@ -242,9 +194,6 @@
 	gint i;
 	gboolean refresh = FALSE;
 
-//	config_parse_editor_entries(editor_name_entry, editor_command_entry); 
-//	layout_edit_update_all();
-
 	config_entry_to_option(safe_delete_path_entry, &options->file_ops.safe_delete_path, remove_trailing_slash);
 	
 	if (options->file_filter.show_hidden_files != c_options->file_filter.show_hidden_files) refresh = TRUE;
--- a/src/view_file_icon.c	Sun Jun 28 09:08:25 2009 +0000
+++ b/src/view_file_icon.c	Sun Jun 28 09:25:47 2009 +0000
@@ -1744,76 +1744,6 @@
 	DEBUG_1("col tab pop cols=%d rows=%d", VFICON(vf)->columns, VFICON(vf)->rows);
 }
 
-#if 0
-static void vficon_sync(ViewFile *vf)
-{
-	GtkTreeModel *store;
-	GtkTreeIter iter;
-	GList *work;
-	gint r, c;
-	gint valid;
-
-	if (VFICON(vf)->rows == 0) return;
-
-	store = gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview));
-
-	r = -1;
-	c = 0;
-
-	valid = gtk_tree_model_iter_children(store, &iter, NULL);
-
-	work = vf->list;
-	while (work)
-		{
-		GList *list;
-		r++;
-		c = 0;
-		if (valid)
-			{
-			gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &list, -1);
-			gtk_list_store_set(GTK_LIST_STORE(store), &iter, FILE_COLUMN_POINTER, list, -1);
-			}
-		else
-			{
-			list = vficon_add_row(vf, &iter);
-			}
-
-		while (list)
-			{
-			IconData *id;
-
-			if (work)
-				{
-				id = work->data;
-				work = work->next;
-				c++;
-				}
-			else
-				{
-				id = NULL;
-				}
-
-			list->data = id;
-			list = list->next;
-			}
-		if (valid) valid = gtk_tree_model_iter_next(store, &iter);
-		}
-
-	r++;
-	while (valid)
-		{
-		GList *list;
-
-		gtk_tree_model_get(store, &iter, FILE_COLUMN_POINTER, &list, -1);
-		valid = gtk_list_store_remove(GTK_LIST_STORE(store), &iter);
-		g_list_free(list);
-		}
-
-	VFICON(vf)->rows = r;
-
-	vficon_update_focus(vf);
-}
-#endif
 
 #if 0
 static void vficon_sync_idle(ViewFile *vf)