summaryrefslogtreecommitdiff
path: root/gtk/gtkitemfactory.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2001-04-03 13:18:00 +0000
committerTim Janik <timj@src.gnome.org>2001-04-03 13:18:00 +0000
commit748560e1fcccc046183f82818960ca53f0b69295 (patch)
tree0ca1f02f7507559371d48bcea85cb1e9647ef5be /gtk/gtkitemfactory.c
parent655abd087209e246966e68330f1b2f6861be8154 (diff)
downloadgtk+-748560e1fcccc046183f82818960ca53f0b69295.tar.gz
changed gtk_item_factory_dump_items() and gtk_item_factory_dump_rc()
Tue Apr 3 13:52:57 2001 Tim Janik <timj@gtk.org> * gtk/gtkitemfactory.[hc]: changed gtk_item_factory_dump_items() and gtk_item_factory_dump_rc() GtkPatternSpec argument to GPatternSpec. this is actually unlikely to cause breakage in third-party apps since except for gle, pretty much ever caller passes NULL here. * gtk/gtkbindings.[hc]: removed gtk_pattern_*() API. * *.c: use g_pattern_*() API. * docs/Changes-2.0.txt: GtkPatternSpec->GPatternSpec updates. * gtk/gtkstyle.c (gtk_default_draw_resize_grip): assert unhandled directions aren't passed in. * gtk/gtksettings.[hc] (_gtk_settings_parse_convert): export conversion functionality to be usable from gtkstyle.c as well, give precedence for conversion to user-supplied parsers. s/_gtk_rc_property_parser_for_type/_gtk_rc_property_parser_from_type/; * gtk/gtkstyle.c (_gtk_style_peek_property_value): use _gtk_settings_parse_convert() for rcporperty value conversion.
Diffstat (limited to 'gtk/gtkitemfactory.c')
-rw-r--r--gtk/gtkitemfactory.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c
index 5239421c3a..dc305332ba 100644
--- a/gtk/gtkitemfactory.c
+++ b/gtk/gtkitemfactory.c
@@ -78,10 +78,10 @@ struct _GtkIFCBData
};
struct _GtkIFDumpData
{
- GtkPrintFunc print_func;
- gpointer func_data;
- guint modified_only : 1;
- GtkPatternSpec *pspec;
+ GtkPrintFunc print_func;
+ gpointer func_data;
+ guint modified_only : 1;
+ GPatternSpec *pspec;
};
@@ -777,7 +777,7 @@ gtk_item_factory_foreach (gpointer hash_key,
item = value;
data = user_data;
- if (data->pspec && !gtk_pattern_match_string (data->pspec, item->path))
+ if (data->pspec && !g_pattern_match_string (data->pspec, item->path))
return;
comment_prefix[0] = gtk_item_factory_class->cpair_comment_single[0];
@@ -800,7 +800,7 @@ gtk_item_factory_foreach (gpointer hash_key,
}
void
-gtk_item_factory_dump_items (GtkPatternSpec *path_pspec,
+gtk_item_factory_dump_items (GPatternSpec *path_pspec,
gboolean modified_only,
GtkPrintFunc print_func,
gpointer func_data)
@@ -834,9 +834,9 @@ gtk_item_factory_print_func (gpointer FILE_pointer,
}
void
-gtk_item_factory_dump_rc (const gchar *file_name,
- GtkPatternSpec *path_pspec,
- gboolean modified_only)
+gtk_item_factory_dump_rc (const gchar *file_name,
+ GPatternSpec *path_pspec,
+ gboolean modified_only)
{
FILE *f_out;
@@ -1319,18 +1319,18 @@ void
gtk_item_factory_create_menu_entries (guint n_entries,
GtkMenuEntry *entries)
{
- static GtkPatternSpec pspec_separator = { 42, 0 };
- static GtkPatternSpec pspec_check = { 42, 0 };
+ static GPatternSpec *pspec_separator = NULL;
+ static GPatternSpec *pspec_check = NULL;
guint i;
if (!n_entries)
return;
g_return_if_fail (entries != NULL);
- if (pspec_separator.pattern_length == 0)
+ if (!pspec_separator)
{
- gtk_pattern_spec_init (&pspec_separator, "*<separator>*");
- gtk_pattern_spec_init (&pspec_check, "*<check>*");
+ pspec_separator = g_pattern_spec_new ("*<separator>*");
+ pspec_check = g_pattern_spec_new ("*<check>*");
}
for (i = 0; i < n_entries; i++)
@@ -1359,9 +1359,9 @@ gtk_item_factory_create_menu_entries (guint n_entries,
entry.accelerator = entries[i].accelerator;
entry.callback = entries[i].callback;
entry.callback_action = 0;
- if (gtk_pattern_match_string (&pspec_separator, path))
+ if (g_pattern_match_string (pspec_separator, path))
entry.item_type = "<Separator>";
- else if (!gtk_pattern_match_string (&pspec_check, path))
+ else if (!g_pattern_match_string (pspec_check, path))
entry.item_type = NULL;
else
{