SF.net SVN: geany:[3570] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Feb 10 21:10:51 UTC 2009


Revision: 3570
          http://geany.svn.sourceforge.net/geany/?rev=3570&view=rev
Author:   eht16
Date:     2009-02-10 21:10:50 +0000 (Tue, 10 Feb 2009)

Log Message:
-----------
Add a clear icon to the used text entries all over the place (will be available with GTK >= 2.16).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/build.c
    trunk/src/dialogs.c
    trunk/src/prefs.c
    trunk/src/printing.c
    trunk/src/project.c
    trunk/src/search.c
    trunk/src/tools.c
    trunk/src/vte.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/ChangeLog	2009-02-10 21:10:50 UTC (rev 3570)
@@ -1,3 +1,11 @@
+2009-02-10  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/build.c, src/dialogs.c, src/prefs.c, src/printing.c,
+   src/project.c, src/search.c, src/tools.c, src/vte.c:
+   Add a clear icon to the used text entries all over the place
+   (will be available with GTK >= 2.16).
+
+
 2009-02-08  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * plugins/filebrowser.c:

Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/build.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -1274,6 +1274,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[0] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[0]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[0]), 30);
 		if (ft->programs->compiler)
 		{
@@ -1293,6 +1294,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[1] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[1]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[1]), 30);
 		if (ft->programs->linker)
 		{
@@ -1312,6 +1314,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[2] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[2]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[2]), 30);
 		if (ft->programs->run_cmd)
 		{
@@ -1331,6 +1334,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[3] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[3]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[3]), 30);
 		if (ft->programs->run_cmd2)
 		{
@@ -1456,6 +1460,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[0] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[0]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[0]), 30);
 		if (ft->programs->compiler)
 		{
@@ -1477,6 +1482,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[1] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[1]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[1]), 30);
 		if (ft->programs->linker)
 		{
@@ -1498,6 +1504,7 @@
 			GTK_FILL, GTK_FILL | GTK_EXPAND, 6, 0);
 
 		entries[2] = gtk_entry_new();
+		ui_entry_add_clear_icon(entries[2]);
 		gtk_entry_set_width_chars(GTK_ENTRY(entries[2]), 30);
 		if (ft->programs->run_cmd)
 		{

Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/dialogs.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -322,6 +322,7 @@
 	/* line 2 with filename entry and filetype combo */
 	file_entry = gtk_entry_new();
 	gtk_widget_show(file_entry);
+	ui_entry_add_clear_icon(file_entry);
 	/*gtk_editable_set_editable(GTK_EDITABLE(file_entry), FALSE);*/
 	gtk_entry_set_activates_default(GTK_ENTRY(file_entry), TRUE);
 	gtk_table_attach(GTK_TABLE(table), file_entry, 0, 1, 1, 2,
@@ -857,12 +858,14 @@
 		GtkWidget *combo = gtk_combo_box_entry_new_text();
 
 		entry = GTK_BIN(combo)->child;
+		ui_entry_add_clear_icon(entry);
 		g_object_set_data(G_OBJECT(dialog), "combo", combo);
 		gtk_container_add(GTK_CONTAINER(vbox), combo);
 	}
 	else
 	{
 		entry = gtk_entry_new();
+		ui_entry_add_clear_icon(entry);
 		gtk_container_add(GTK_CONTAINER(vbox), entry);
 	}
 
@@ -951,6 +954,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
 	spin = gtk_spin_button_new_with_range(min, max, step);
+	ui_entry_add_clear_icon(spin);
 	gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), *value);
 	g_signal_connect(spin, "activate", G_CALLBACK(on_input_numeric_activate), dialog);
 

Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/prefs.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -1456,6 +1456,34 @@
 		gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog,
 			"label_project_indent_warning")), label, FALSE, TRUE, 5);
 
+		/* add the clear icon to GtkEntry widgets in the dialog */
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "startup_path_entry"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "project_file_path_entry"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_line_break"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_toggle_mark"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_indent_width"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_tab_width"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_symbol_complete_chars"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_symbollistheight"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_autocompletion_max_entries"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_long_line"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_mru"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "spin_disk_check"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_make"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_term"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_grep"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_developer"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_initial"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_mail"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_company"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_version"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_year"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_date"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_template_datetime"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_external_cmd"));
+		ui_entry_add_clear_icon(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_print_dateformat"));
 
 #ifdef HAVE_VTE
 		vte_append_preferences_tab();

Modified: trunk/src/printing.c
===================================================================
--- trunk/src/printing.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/printing.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -379,6 +379,7 @@
 	gtk_box_pack_start(GTK_BOX(hbox10), label203, FALSE, FALSE, 0);
 
 	w->entry_print_dateformat = gtk_entry_new();
+	ui_entry_add_clear_icon(w->entry_print_dateformat);
 	gtk_box_pack_start(GTK_BOX(hbox10), w->entry_print_dateformat, TRUE, TRUE, 0);
 	ui_widget_set_tooltip_text(w->entry_print_dateformat, _("Specify a format for the date and time stamp which is added to the page header on each page. You can use any conversion specifiers which can be used with the ANSI C strftime function."));
 	gtk_entry_set_text(GTK_ENTRY(w->entry_print_dateformat), printing_prefs.page_header_datefmt);

Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/project.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -141,6 +141,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), 1, 0);
 
 	e->name = gtk_entry_new();
+	ui_entry_add_clear_icon(e->name);
 	gtk_entry_set_max_length(GTK_ENTRY(e->name), MAX_NAME_LEN);
 
 	ui_table_add_row(GTK_TABLE(table), 0, label, e->name, NULL);
@@ -149,6 +150,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), 1, 0);
 
 	e->file_name = gtk_entry_new();
+	ui_entry_add_clear_icon(e->file_name);
 	gtk_entry_set_width_chars(GTK_ENTRY(e->file_name), 30);
 	button = gtk_button_new();
 	g_signal_connect(button, "clicked", G_CALLBACK(on_file_save_button_clicked), e);
@@ -164,6 +166,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), 1, 0);
 
 	e->base_path = gtk_entry_new();
+	ui_entry_add_clear_icon(e->base_path);
 	ui_widget_set_tooltip_text(e->base_path,
 		_("Base directory of all files that make up the project. "
 		"This can be a new path, or an existing directory tree. "
@@ -363,6 +366,9 @@
 	gtk_window_set_destroy_with_parent(GTK_WINDOW(e->dialog), TRUE);
 	gtk_widget_set_name(e->dialog, "GeanyDialogProject");
 
+	ui_entry_add_clear_icon(ui_lookup_widget(e->dialog, "spin_indent_width"));
+	ui_entry_add_clear_icon(ui_lookup_widget(e->dialog, "spin_tab_width"));
+
 	table = gtk_table_new(6, 2, FALSE);
 	gtk_container_set_border_width(GTK_CONTAINER(table), 6);
 	gtk_table_set_row_spacings(GTK_TABLE(table), 5);
@@ -375,6 +381,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), -1, 0);
 
 	e->name = gtk_entry_new();
+	ui_entry_add_clear_icon(e->name);
 	gtk_entry_set_max_length(GTK_ENTRY(e->name), MAX_NAME_LEN);
 	gtk_table_attach(GTK_TABLE(table), e->name, 1, 2, 0, 1,
 					(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
@@ -387,6 +394,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), -1, 0);
 
 	e->file_name = gtk_entry_new();
+	ui_entry_add_clear_icon(e->file_name);
 	gtk_editable_set_editable(GTK_EDITABLE(e->file_name), FALSE);	/* read-only */
 	gtk_table_attach(GTK_TABLE(table), e->file_name, 1, 2, 1, 2,
 					(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
@@ -416,6 +424,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), -1, 0);
 
 	e->base_path = gtk_entry_new();
+	ui_entry_add_clear_icon(e->base_path);
 	ui_widget_set_tooltip_text(e->base_path,
 		_("Base directory of all files that make up the project. "
 		"This can be a new path, or an existing directory tree. "
@@ -438,6 +447,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), -1, 0);
 
 	e->run_cmd = gtk_entry_new();
+	ui_entry_add_clear_icon(e->run_cmd);
 	ui_widget_set_tooltip_text(e->run_cmd,
 		_("Command-line to run in the project base directory. "
 		"Options can be appended to the command. "

Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/search.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -381,6 +381,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
 	entry = gtk_combo_box_entry_new_text();
+	ui_entry_add_clear_icon(gtk_bin_get_child(GTK_BIN(entry)));
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
 	gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry))), 248);
 	gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry))), 50);
@@ -517,6 +518,7 @@
 	gtk_misc_set_alignment(GTK_MISC(label_replace), 0, 0.5);
 
 	entry_find = gtk_combo_box_entry_new_text();
+	ui_entry_add_clear_icon(gtk_bin_get_child(GTK_BIN(entry_find)));
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label_find), entry_find);
 	gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_find))), 248);
 	gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_find))), 50);
@@ -525,6 +527,7 @@
 	replace_dlg.find_entry = GTK_BIN(entry_find)->child;
 
 	entry_replace = gtk_combo_box_entry_new_text();
+	ui_entry_add_clear_icon(gtk_bin_get_child(GTK_BIN(entry_replace)));
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label_replace), entry_replace);
 	gtk_entry_set_max_length(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_replace))), 248);
 	gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(entry_replace))), 50);
@@ -671,6 +674,7 @@
 
 	dir_combo = gtk_combo_box_entry_new_text();
 	entry = gtk_bin_get_child(GTK_BIN(dir_combo));
+	ui_entry_add_clear_icon(entry);
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label1), entry);
 	gtk_entry_set_max_length(GTK_ENTRY(entry), 248);
 	gtk_entry_set_width_chars(GTK_ENTRY(entry), 50);
@@ -685,6 +689,7 @@
 
 	combo = gtk_combo_box_entry_new_text();
 	entry = gtk_bin_get_child(GTK_BIN(combo));
+	ui_entry_add_clear_icon(entry);
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
 	gtk_entry_set_max_length(GTK_ENTRY(entry), 248);
 	gtk_entry_set_width_chars(GTK_ENTRY(entry), 50);
@@ -788,6 +793,7 @@
 	gtk_button_set_focus_on_click(GTK_BUTTON(check_extra), FALSE);
 
 	entry_extra = gtk_entry_new();
+	ui_entry_add_clear_icon(entry_extra);
 	gtk_widget_set_sensitive(entry_extra, FALSE);
 	ui_widget_set_tooltip_text(entry_extra, _("Other options to pass to Grep"));
 	ui_hookup_widget(fif_dlg.dialog, entry_extra, "entry_extra");

Modified: trunk/src/tools.c
===================================================================
--- trunk/src/tools.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/tools.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -76,6 +76,7 @@
 	entry = gtk_entry_new();
 	if (idx >= 0)
 		gtk_entry_set_text(GTK_ENTRY(entry), ui_prefs.custom_commands[idx]);
+	ui_entry_add_clear_icon(entry);
 	gtk_entry_set_max_length(GTK_ENTRY(entry), 255);
 	gtk_entry_set_width_chars(GTK_ENTRY(entry), 30);
 	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);

Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c	2009-02-08 20:35:57 UTC (rev 3569)
+++ trunk/src/vte.c	2009-02-10 21:10:50 UTC (rev 3570)
@@ -781,6 +781,7 @@
 
 		spin_scrollback_adj = gtk_adjustment_new(500, 0, 5000, 1, 10, 0);
 		spin_scrollback = gtk_spin_button_new(GTK_ADJUSTMENT(spin_scrollback_adj), 1, 0);
+		ui_entry_add_clear_icon(spin_scrollback);
 		gtk_table_attach(GTK_TABLE(table), spin_scrollback, 1, 2, 3, 4,
 					(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
 					(GtkAttachOptions) (0), 0, 0);
@@ -795,6 +796,7 @@
 		gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
 		entry_shell = gtk_entry_new();
+		ui_entry_add_clear_icon(entry_shell);
 		ui_widget_set_tooltip_text(entry_shell, _("Sets the path to the shell which should be started inside the terminal emulation"));
 
 		button_shell = gtk_button_new();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list