#include <gtk/gtkbutton.h>
#include <gtk/gtkctree.h>
#include <gtk/gtkcombo.h>
-#warning FIXME_GTK2
-/* #include <gtk/gtkthemes.h> */
#include <gtk/gtkbindings.h>
#include <gtk/gtkitemfactory.h>
#include <stdlib.h>
gtk_widget_set_style(widget, newstyle);
}
-#warning FIXME_GTK2
-#if 1 /* FIXME_GTK2 */
gboolean gtkut_text_buffer_match_string(GtkTextBuffer *textbuf, gint pos, gunichar *wcs,
gint len, gboolean case_sens)
{
else
return NULL;
}
-#endif /* FIXME_GTK2 */
g_string_append_c(out_str, '\n');
}
-#warning FIXME_GTK2
-#if 0
-GString *menu_factory_get_rc(const gchar *path)
-{
- GString *string;
- GtkPatternSpec *pspec;
- gchar pattern[256];
-
- pspec = g_new(GtkPatternSpec, 1);
- g_snprintf(pattern, sizeof(pattern), "%s*", path);
- gtk_pattern_spec_init(pspec, pattern);
- string = g_string_new("");
- gtk_item_factory_dump_items(pspec, FALSE, factory_print_func,
- string);
- gtk_pattern_spec_free_segs(pspec);
-
- return string;
-}
-
-void menu_factory_clear_rc(const gchar *rc_str)
-{
- GString *string;
- gchar *p;
- gchar *start, *end;
- guint pos = 0;
-
- string = g_string_new(rc_str);
- while ((p = strstr(string->str + pos, "(menu-path \"")) != NULL) {
- pos = p + 12 - string->str;
- p = strchr(p + 12, '"');
- if (!p) continue;
- start = strchr(p + 1, '"');
- if (!start) continue;
- end = strchr(start + 1, '"');
- if (!end) continue;
- pos = start + 1 - string->str;
- if (end > start + 1)
- g_string_erase(string, pos, end - (start + 1));
- }
-
- gtk_item_factory_parse_rc_string(string->str);
- g_string_free(string, TRUE);
-}
-
-void menu_factory_copy_rc(const gchar *src_path, const gchar *dest_path)
-{
- GString *string;
- gint src_path_len;
- gint dest_path_len;
- gchar *p;
- guint pos = 0;
-
- string = menu_factory_get_rc(src_path);
- src_path_len = strlen(src_path);
- dest_path_len = strlen(dest_path);
-
- while ((p = strstr(string->str + pos, src_path)) != NULL) {
- pos = p - string->str;
- g_string_erase(string, pos, src_path_len);
- g_string_insert(string, pos, dest_path);
- pos += dest_path_len;
- }
-
- pos = 0;
- while ((p = strchr(string->str + pos, ';')) != NULL) {
- pos = p - string->str;
- if (pos == 0 || *(p - 1) == '\n')
- g_string_erase(string, pos, 1);
- }
-
- menu_factory_clear_rc(string->str);
- gtk_item_factory_parse_rc_string(string->str);
- g_string_free(string, TRUE);
-}
-#endif
-
void menu_set_sensitive(GtkItemFactory *ifactory, const gchar *path,
gboolean sensitive)
{