remove property editor for the deprecated GtkOptionMenu, now that all
2007-05-28 Jens Granseuer <jensgr@gmx.net> * gconf-property-editor.c: * gconf-property-editor.h: remove property editor for the deprecated GtkOptionMenu, now that all users are upgraded to GtkComboBox svn path=/trunk/; revision=7674
This commit is contained in:
parent
20f8aa0d5e
commit
8ad25db4a1
3 changed files with 6 additions and 130 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-05-28 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* gconf-property-editor.c:
|
||||
* gconf-property-editor.h: remove property editor for the deprecated
|
||||
GtkOptionMenu, now that all users are upgraded to GtkComboBox
|
||||
|
||||
2007-05-28 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* theme-thumbnail.c: (generate_theme_thumbnail): drop unnecessary strlen
|
||||
|
|
|
@ -871,122 +871,6 @@ peditor_enum_conv_from_widget (GConfPropertyEditor *peditor,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
peditor_select_menu_value_changed (GConfClient *client,
|
||||
guint cnxn_id,
|
||||
GConfEntry *entry,
|
||||
GConfPropertyEditor *peditor)
|
||||
{
|
||||
GConfValue *value, *value_wid;
|
||||
|
||||
if (peditor->p->changeset != NULL)
|
||||
gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
|
||||
|
||||
if (entry && (value = gconf_entry_get_value (entry))) {
|
||||
value_wid = peditor->p->conv_to_widget_cb (peditor, value);
|
||||
gtk_option_menu_set_history (GTK_OPTION_MENU (peditor->p->ui_control), gconf_value_get_int (value_wid));
|
||||
gconf_value_free (value_wid);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
peditor_select_menu_widget_changed (GConfPropertyEditor *peditor,
|
||||
GtkOptionMenu *option_menu)
|
||||
{
|
||||
GConfValue *value, *value_wid;
|
||||
|
||||
if (!peditor->p->inited) return;
|
||||
value_wid = gconf_value_new (GCONF_VALUE_INT);
|
||||
gconf_value_set_int (value_wid, gtk_option_menu_get_history (option_menu));
|
||||
value = peditor->p->conv_from_widget_cb (peditor, value_wid);
|
||||
peditor_set_gconf_value (peditor, peditor->p->key, value);
|
||||
g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
|
||||
gconf_value_free (value_wid);
|
||||
gconf_value_free (value);
|
||||
}
|
||||
|
||||
GObject *
|
||||
gconf_peditor_new_select_menu (GConfChangeSet *changeset,
|
||||
const gchar *key,
|
||||
GtkWidget *option_menu,
|
||||
const gchar *first_property_name,
|
||||
...)
|
||||
{
|
||||
GObject *peditor;
|
||||
va_list var_args;
|
||||
|
||||
g_return_val_if_fail (key != NULL, NULL);
|
||||
g_return_val_if_fail (option_menu != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), NULL);
|
||||
|
||||
va_start (var_args, first_property_name);
|
||||
|
||||
peditor = gconf_peditor_new
|
||||
(key,
|
||||
(GConfClientNotifyFunc) peditor_select_menu_value_changed,
|
||||
changeset,
|
||||
G_OBJECT (option_menu),
|
||||
first_property_name,
|
||||
var_args, NULL);
|
||||
|
||||
va_end (var_args);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (option_menu), "changed",
|
||||
(GCallback) peditor_select_menu_widget_changed, peditor);
|
||||
|
||||
return peditor;
|
||||
}
|
||||
|
||||
GObject *
|
||||
gconf_peditor_new_select_menu_with_enum (GConfChangeSet *changeset,
|
||||
const gchar *key,
|
||||
GtkWidget *option_menu,
|
||||
GType enum_type,
|
||||
gboolean use_nick,
|
||||
const gchar *first_property_name,
|
||||
...)
|
||||
{
|
||||
GObject *peditor;
|
||||
GConfPropertyEditorEnumData *data;
|
||||
va_list var_args;
|
||||
|
||||
g_return_val_if_fail (key != NULL, NULL);
|
||||
g_return_val_if_fail (option_menu != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), NULL);
|
||||
g_return_val_if_fail (enum_type != G_TYPE_NONE, NULL);
|
||||
|
||||
data = g_new0 (GConfPropertyEditorEnumData, 1);
|
||||
data->enum_type = enum_type;
|
||||
data->use_nick = use_nick;
|
||||
|
||||
va_start (var_args, first_property_name);
|
||||
|
||||
peditor = gconf_peditor_new
|
||||
(key,
|
||||
(GConfClientNotifyFunc) peditor_select_menu_value_changed,
|
||||
changeset,
|
||||
G_OBJECT (option_menu),
|
||||
first_property_name,
|
||||
var_args,
|
||||
"conv-to-widget-cb",
|
||||
peditor_enum_conv_to_widget,
|
||||
"conv-from-widget-cb",
|
||||
peditor_enum_conv_from_widget,
|
||||
"data",
|
||||
data,
|
||||
"data-free-cb",
|
||||
g_free,
|
||||
NULL
|
||||
);
|
||||
|
||||
va_end (var_args);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (option_menu), "changed",
|
||||
(GCallback) peditor_select_menu_widget_changed, peditor);
|
||||
|
||||
return peditor;
|
||||
}
|
||||
|
||||
static void
|
||||
peditor_combo_box_value_changed (GConfClient *client,
|
||||
guint cnxn_id,
|
||||
|
|
|
@ -98,20 +98,6 @@ GObject *gconf_peditor_new_color (GConfChangeSet *changeset,
|
|||
const gchar *first_property_name,
|
||||
...);
|
||||
|
||||
GObject *gconf_peditor_new_select_menu (GConfChangeSet *changeset,
|
||||
const gchar *key,
|
||||
GtkWidget *option_menu,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
|
||||
GObject *gconf_peditor_new_select_menu_with_enum (GConfChangeSet *changeset,
|
||||
const gchar *key,
|
||||
GtkWidget *option_menu,
|
||||
GType enum_type,
|
||||
gboolean use_nick,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
|
||||
GObject *gconf_peditor_new_combo_box (GConfChangeSet *changeset,
|
||||
const gchar *key,
|
||||
GtkWidget *combo_box,
|
||||
|
|
Loading…
Add table
Reference in a new issue