|
|
17133c6 |
Index: src/preferences.c
|
|
|
17133c6 |
===================================================================
|
|
|
17133c6 |
RCS file: /cvsroot/bluefish/bluefish-gtk2/src/preferences.c,v
|
|
|
17133c6 |
retrieving revision 1.120.2.10
|
|
|
17133c6 |
retrieving revision 1.120.2.11
|
|
|
17133c6 |
diff -u -r1.120.2.10 -r1.120.2.11
|
|
|
17133c6 |
--- src/preferences.c 12 Nov 2006 03:35:28 -0000 1.120.2.10
|
|
|
17133c6 |
+++ src/preferences.c 20 Jan 2008 04:26:25 -0000 1.120.2.11
|
|
|
17133c6 |
@@ -162,7 +162,7 @@
|
|
|
17133c6 |
GtkWidget *check;
|
|
|
17133c6 |
GtkWidget *radio[9];
|
|
|
17133c6 |
gchar **curstrarr;
|
|
|
17133c6 |
- const gchar *selected_filetype;
|
|
|
17133c6 |
+ gchar *selected_filetype;
|
|
|
17133c6 |
} Thighlightpatterndialog;
|
|
|
17133c6 |
|
|
|
17133c6 |
typedef struct {
|
|
|
17133c6 |
@@ -910,12 +910,12 @@
|
|
|
17133c6 |
}
|
|
|
17133c6 |
|
|
|
17133c6 |
static void highlightpattern_fill_from_selected_filetype(Tprefdialog *pd) {
|
|
|
17133c6 |
- DEBUG_MSG("highlightpattern_popmenu_activate, applied changes, about to clear liststore\n");
|
|
|
17133c6 |
+ DEBUG_MSG("highlightpattern_fill_from_selected_filetype, applied changes, about to clear liststore\n");
|
|
|
17133c6 |
gtk_list_store_clear(GTK_LIST_STORE(pd->hpd.lstore));
|
|
|
17133c6 |
if (pd->hpd.selected_filetype) {
|
|
|
17133c6 |
GList *tmplist;
|
|
|
17133c6 |
tmplist = g_list_first(pd->lists[highlight_patterns]);
|
|
|
17133c6 |
- DEBUG_MSG("highlightpattern_popmenu_activate, about to fill for filetype %s (tmplist=%p)\n",pd->hpd.selected_filetype,tmplist);
|
|
|
17133c6 |
+ DEBUG_MSG("highlightpattern_fill_from_selected_filetype, about to fill for filetype %s (tmplist=%p)\n",pd->hpd.selected_filetype,tmplist);
|
|
|
17133c6 |
/* fill list model here */
|
|
|
17133c6 |
while (tmplist) {
|
|
|
17133c6 |
gchar **strarr =(gchar **)tmplist->data;
|
|
|
17133c6 |
@@ -923,7 +923,7 @@
|
|
|
17133c6 |
DEBUG_MSG("found entry with filetype %s\n",strarr[0]);
|
|
|
17133c6 |
if (strcmp(strarr[0], pd->hpd.selected_filetype)==0) {
|
|
|
17133c6 |
GtkTreeIter iter;
|
|
|
17133c6 |
- DEBUG_MSG("highlightpattern_popmenu_activate, appending pattern %s with filetype %s\n",strarr[1],strarr[0]);
|
|
|
17133c6 |
+ DEBUG_MSG("highlightpattern_fill_from_selected_filetype, appending pattern %s with filetype %s\n",strarr[1],strarr[0]);
|
|
|
17133c6 |
gtk_list_store_append(GTK_LIST_STORE(pd->hpd.lstore), &iter);
|
|
|
17133c6 |
gtk_list_store_set(GTK_LIST_STORE(pd->hpd.lstore), &iter, 0, strarr[1], -1);
|
|
|
17133c6 |
}
|
|
|
17133c6 |
@@ -949,7 +949,9 @@
|
|
|
17133c6 |
highlightpattern_apply_changes(pd);
|
|
|
17133c6 |
pd->hpd.curstrarr = NULL;
|
|
|
17133c6 |
if (menuitem) {
|
|
|
17133c6 |
- pd->hpd.selected_filetype = gtk_label_get_text(GTK_LABEL(GTK_BIN(menuitem)->child));
|
|
|
17133c6 |
+ if (pd->hpd.selected_filetype)
|
|
|
17133c6 |
+ g_free (pd->hpd.selected_filetype);
|
|
|
17133c6 |
+ pd->hpd.selected_filetype = g_strdup (gtk_label_get_text(GTK_LABEL(GTK_BIN(menuitem)->child)));
|
|
|
17133c6 |
}
|
|
|
17133c6 |
highlightpattern_fill_from_selected_filetype(pd);
|
|
|
17133c6 |
}
|
|
|
17133c6 |
@@ -1209,6 +1211,7 @@
|
|
|
17133c6 |
|
|
|
17133c6 |
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(pd->hpd.lview));
|
|
|
17133c6 |
g_signal_connect(G_OBJECT(select), "changed",G_CALLBACK(highlightpattern_selection_changed_cb),pd);
|
|
|
17133c6 |
+ gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
|
|
|
17133c6 |
}
|
|
|
17133c6 |
|
|
|
17133c6 |
vbox3 = gtk_vbox_new(FALSE, 2);
|
|
|
17133c6 |
@@ -1807,6 +1810,9 @@
|
|
|
17133c6 |
pd->lists[browsers] = NULL;
|
|
|
17133c6 |
pd->lists[external_commands] = NULL;
|
|
|
17133c6 |
|
|
|
17133c6 |
+ if (pd->hpd.selected_filetype)
|
|
|
17133c6 |
+ g_free (pd->hpd.selected_filetype);
|
|
|
17133c6 |
+
|
|
|
17133c6 |
/* select = gtk_tree_view_get_selection(GTK_TREE_VIEW(pd->ftd.lview));
|
|
|
17133c6 |
g_signal_handlers_destroy(G_OBJECT(select));*/
|
|
|
17133c6 |
DEBUG_MSG("preferences_destroy_lcb, destroying handlers for lstore %p\n",pd->ftd.lstore);
|