Commit 229402ac authored by Naba Kumar's avatar Naba Kumar

Fixed duplicate in compiler options bug



Fixed duplicate in compiler options bug
parent 43e1ba5c
2001-08-5 Naba Kumar <kh_naba@users.sourceforge.net>
2001-09-07 Johannes Schmid <clubfan@users.sourceforge.net>
* Fixed bug #445752
2001-09-07 Johannes Schmid <clubfan@users.sourceforge.net>
* Fixed bug #445752
2001-08-07 Naba Kumar <kh_naba@users.sourceforge.net>
* dnd.h, dnd.c: New files for drag n drop support.
* anjuta.h, anjuta_gui.c, anjuta_cbs.c:
Added drag and drop support for opening files.
Thanks to Jos Antonio Caminero Granja <JCamGra@alumnos.uva.es> and
Archit Baweja <bighead@crosswinds.net> for this idea.
* TODO: Added some more todos. :-(
2001-08-06 Naba Kumar <kh_naba@users.sourceforge.net>
* Fixed the goto line activate bug.
patch from: Martyn Bone <mbone@brightstar.u-net.com>
......
......@@ -80,6 +80,10 @@ Todo List:
> can add this feature!
So, watch out guys! Atleast don't miss the beer. :-)
o What would be cool is when I #include a header, anjuta parses
the headed and adds it to its tool tips, which is straight from
the heared file newt.h
BUGS:
-----
......@@ -89,3 +93,12 @@ BUGS:
4) For whatever reason db1-devel_1.85-4mdk was not installed by default and
ld gave me errors (can't find -ldb1). Checking for db1 dependency (both rpm and configure).
5) Can't copy and paste, either by Ctrl shortcuts or via the menu, either
within a source file or between source files. Middle mouse button paste
works fine.
6) Tooltips that pop up for a function (eg. "printf(") persist
onscreen when changing source files. If you edit file 2 and
return they disappear. Tooltips need to be tied to the present
editing panel.
......@@ -59,6 +59,8 @@ src/controls.c
src/controls.h
src/debugger.c
src/debugger.h
src/dnd.c
src/dnd.h
src/executer.c
src/executer.h
src/fileselection.c
......
......@@ -67,6 +67,8 @@ anjuta_SOURCES = \
controls.h\
debugger.c\
debugger.h\
dnd.h\
dnd.c\
executer.c\
executer.h\
fileselection.c\
......
......@@ -237,6 +237,8 @@ void
on_anjuta_notebook_switch_page (GtkNotebook * notebook,
GtkNotebookPage * page,
gint page_num, gpointer user_data);
void
on_anjuta_dnd_drop (gchar* filename, gpointer data);
void anjuta_refresh_breakpoints (TextEditor* te);
......
......@@ -163,6 +163,11 @@ on_anjuta_notebook_switch_page (GtkNotebook * notebook,
anjuta_grab_text_focus ();
}
void
on_anjuta_dnd_drop (gchar* filename, gpointer data)
{
anjuta_goto_file_line (filename, 0);
}
void
on_open_filesel_ok_clicked (GtkButton * button, gpointer user_data)
......
......@@ -29,6 +29,7 @@
#include "resources.h"
#include "main_menubar.h"
#include "notebook.h"
#include "dnd.h"
void
create_anjuta_gui (AnjutaApp * appl)
......@@ -75,6 +76,10 @@ create_anjuta_gui (AnjutaApp * appl)
gtk_window_set_default_size (GTK_WINDOW (anjuta_gui), 700, 400);
gtk_window_set_policy (GTK_WINDOW (anjuta_gui), FALSE, TRUE, FALSE);
gtk_window_set_wmclass (GTK_WINDOW (anjuta_gui), "mainide", "Anjuta");
/* Add file drag and drop support */
dnd_drop_init(anjuta_gui, on_anjuta_dnd_drop, NULL,
"text/plain", "text/html", "text/source", NULL);
dock1 = GNOME_APP (anjuta_gui)->dock;
gtk_widget_show (dock1);
......
......@@ -283,12 +283,27 @@ on_co_inc_add_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *dummy[1];
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.inc_entry));
if (strlen (text) == 0)
return;
dummy[0] = text;
max_rows = g_list_length (GTK_CLIST (co->widgets.inc_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.inc_clist), cur_row, 0, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */;
gtk_entry_set_text (GTK_ENTRY (co->widgets.inc_entry), "");
return;
}
}
gtk_clist_append (GTK_CLIST (co->widgets.inc_clist), dummy);
gtk_entry_set_text (GTK_ENTRY (co->widgets.inc_entry), "");
compiler_options_update_controls (co);
......@@ -298,6 +313,9 @@ void
on_co_inc_update_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.inc_clist)->row_list) < 1)
......@@ -305,8 +323,19 @@ on_co_inc_update_clicked (GtkButton * button, gpointer data)
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.inc_entry));
if (strlen (text) == 0)
return;
gtk_clist_set_text (GTK_CLIST (co->widgets.inc_clist), co->inc_index,
0, text);
max_rows = g_list_length (GTK_CLIST (co->widgets.inc_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.inc_clist), cur_row, 0, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.inc_entry), "");
return;
}
}
gtk_clist_set_text (GTK_CLIST (co->widgets.inc_clist), co->inc_index, 0, text);
}
void
......@@ -344,11 +373,27 @@ on_co_lib_add_clicked (GtkButton * button, gpointer data)
gchar *text;
gchar *dummy[2];
gchar dumtext[] = "";
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.lib_entry));
if (strlen (text) == 0)
return;
max_rows = g_list_length (GTK_CLIST (co->widgets.lib_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.lib_clist), cur_row, 1, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.lib_entry), "");
return;
}
}
dummy[0] = dumtext;
dummy[1] = text;
gtk_clist_append (GTK_CLIST (co->widgets.lib_clist), dummy);
......@@ -361,6 +406,9 @@ void
on_co_lib_update_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.lib_clist)->row_list) < 1)
......@@ -368,6 +416,17 @@ on_co_lib_update_clicked (GtkButton * button, gpointer data)
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.lib_entry));
if (strlen (text) == 0)
return;
max_rows = g_list_length (GTK_CLIST (co->widgets.lib_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.lib_clist), cur_row, 1, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.lib_entry), "");
return;
}
}
gtk_clist_set_text (GTK_CLIST (co->widgets.lib_clist), co->lib_index,
1, text);
}
......@@ -406,11 +465,26 @@ on_co_lib_paths_add_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *dummy[1];
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.lib_paths_entry));
if (strlen (text) == 0)
return;
max_rows = g_list_length (GTK_CLIST (co->widgets.lib_paths_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.lib_paths_clist), cur_row, 0, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.lib_paths_entry), "");
return;
}
}
dummy[0] = text;
gtk_clist_append (GTK_CLIST (co->widgets.lib_paths_clist), dummy);
gtk_entry_set_text (GTK_ENTRY (co->widgets.lib_paths_entry), "");
......@@ -421,6 +495,9 @@ void
on_co_lib_paths_update_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.lib_paths_clist)->row_list)
......@@ -429,6 +506,18 @@ on_co_lib_paths_update_clicked (GtkButton * button, gpointer data)
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.lib_paths_entry));
if (strlen (text) == 0)
return;
max_rows = g_list_length (GTK_CLIST (co->widgets.lib_paths_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.lib_paths_clist), cur_row, 0, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.lib_paths_entry), "");
return;
}
}
gtk_clist_set_text (GTK_CLIST (co->widgets.lib_paths_clist),
co->lib_paths_index, 0, text);
}
......@@ -469,13 +558,28 @@ void
on_co_def_add_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *row_text;
gchar *dummy[1];
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.def_entry));
if (strlen (text) == 0)
return;
dummy[0] = text;
max_rows = g_list_length (GTK_CLIST (co->widgets.def_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.def_clist), cur_row, 0, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.def_entry), "");
return;
}
}
gtk_clist_append (GTK_CLIST (co->widgets.def_clist), dummy);
gtk_entry_set_text (GTK_ENTRY (co->widgets.def_entry), "");
compiler_options_update_controls (co);
......@@ -485,12 +589,27 @@ void
on_co_def_update_clicked (GtkButton * button, gpointer data)
{
gchar *text;
gchar *row_text;
gint max_rows;
gint cur_row;
CompilerOptions *co = data;
if (g_list_length (GTK_CLIST (co->widgets.def_clist)->row_list) < 1)
return;
text = gtk_entry_get_text (GTK_ENTRY (co->widgets.def_entry));
if (strlen (text) == 0)
return;
max_rows = g_list_length (GTK_CLIST (co->widgets.def_clist)->row_list);
for (cur_row = 0; cur_row < max_rows; cur_row++)
{
gtk_clist_get_text(GTK_CLIST (co->widgets.def_clist), cur_row, 0, &row_text);
if (strcmp(text, row_text) == 0)
{
/* Maybe print a message here */
gtk_entry_set_text (GTK_ENTRY (co->widgets.def_entry), "");
return;
}
}
gtk_clist_set_text (GTK_CLIST (co->widgets.def_clist), co->def_index,
0, text);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment