diff options
51 files changed, 185 insertions, 181 deletions
@@ -1,3 +1,8 @@ +2006-07-06 Matthias Clasen <mclasen@redhat.com> + + * gtk/*.c: Improve the -/_ consistency in signal and + property names, reducing the amount of near-duplicate strings. + 2006-07-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_set_enable_tree_lines): Don't diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7086438532..19afaef0fb 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-07-06 Matthias Clasen <mclasen@redhat.com> + + * gtk/*.c: Improve the -/_ consistency in signal and + property names, reducing the amount of near-duplicate strings. + 2006-07-05 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_set_enable_tree_lines): Don't diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 01c761c2d5..23f5aa4751 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -1885,13 +1885,13 @@ add_credits_page (GtkAboutDialog *about, gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 8); gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 8); - g_signal_connect (view, "key-press-event", + g_signal_connect (view, "key_press_event", G_CALLBACK (credits_key_press_event), about); - g_signal_connect (view, "event-after", + g_signal_connect (view, "event_after", G_CALLBACK (credits_event_after), about); - g_signal_connect (view, "motion-notify-event", + g_signal_connect (view, "motion_notify_event", G_CALLBACK (credits_motion_notify_event), about); - g_signal_connect (view, "visibility-notify-event", + g_signal_connect (view, "visibility_notify_event", G_CALLBACK (credits_visibility_notify_event), about); sw = gtk_scrolled_window_new (NULL, NULL); diff --git a/gtk/gtkaccelmap.c b/gtk/gtkaccelmap.c index c6d8748838..265585ed63 100644 --- a/gtk/gtkaccelmap.c +++ b/gtk/gtkaccelmap.c @@ -542,7 +542,7 @@ gtk_accel_map_load_scanner (GScanner *scanner) gchar *cpair_comment_single; gpointer saved_symbol; - g_return_if_fail (scanner != 0); + g_return_if_fail (scanner != NULL); /* configure scanner */ skip_comment_single = scanner->config->skip_comment_single; diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index c7e8331c99..07d827ff08 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -683,7 +683,7 @@ connect_proxy (GtkAction *action, if (!label) label = g_object_new (GTK_TYPE_ACCEL_LABEL, - "use_underline", TRUE, + "use-underline", TRUE, "xalign", 0.0, "visible", TRUE, "parent", proxy, @@ -691,7 +691,7 @@ connect_proxy (GtkAction *action, if (GTK_IS_ACCEL_LABEL (label) && action->private_data->accel_quark) g_object_set (label, - "accel_closure", action->private_data->accel_closure, + "accel-closure", action->private_data->accel_closure, NULL); gtk_label_set_label (GTK_LABEL (label), action->private_data->label); @@ -734,9 +734,9 @@ connect_proxy (GtkAction *action, /* toolbar item specific synchronisers ... */ g_object_set (proxy, - "visible_horizontal", action->private_data->visible_horizontal, - "visible_vertical", action->private_data->visible_vertical, - "is_important", action->private_data->is_important, + "visible-horizontal", action->private_data->visible_horizontal, + "visible-vertical", action->private_data->visible_vertical, + "is-important", action->private_data->is_important, NULL); gtk_action_sync_tooltip (action, proxy); @@ -784,7 +784,7 @@ connect_proxy (GtkAction *action, /* synchronise the label */ g_object_set (proxy, "label", action->private_data->short_label, - "use_underline", TRUE, + "use-underline", TRUE, NULL); } } diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index e616633d38..4ad8c08324 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -262,7 +262,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class) PROP_FONT, g_param_spec_string ("font", P_("Font"), - P_("Font description as a string"), + P_("Font description as a string, e.g. \"Sans Italic 12\""), NULL, GTK_PARAM_READWRITE)); @@ -1025,7 +1025,7 @@ gtk_cell_renderer_text_set_property (GObject *object, NULL, &error)) { - g_warning ("Failed to set cell text from markup due to error parsing markup: %s", + g_warning ("Failed to set text from markup due to error parsing markup: %s", error->message); g_error_free (error); return; diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index fef4b39f1a..6899a50440 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -117,7 +117,10 @@ gtk_check_button_new_with_label (const gchar *label) GtkWidget* gtk_check_button_new_with_mnemonic (const gchar *label) { - return g_object_new (GTK_TYPE_CHECK_BUTTON, "label", label, "use_underline", TRUE, NULL); + return g_object_new (GTK_TYPE_CHECK_BUTTON, + "label", label, + "use-underline", TRUE, + NULL); } diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c index 2a98515954..6a78b7f875 100644 --- a/gtk/gtkcombo.c +++ b/gtk/gtkcombo.c @@ -982,7 +982,7 @@ gtk_combo_init (GtkCombo * combo) gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (combo->popup))); gtk_widget_show (combo->list); - combo->list_change_id = g_signal_connect (combo->list, "selection_changed", + combo->list_change_id = g_signal_connect (combo->list, "selection-changed", G_CALLBACK (gtk_combo_selection_changed), combo); g_signal_connect (combo->popwin, "key_press_event", @@ -1038,12 +1038,12 @@ gtk_combo_set_value_in_list (GtkCombo * combo, gboolean val, gboolean ok_if_empt if (combo->value_in_list != val) { combo->value_in_list = val; - g_object_notify (G_OBJECT (combo), "value_in_list"); + g_object_notify (G_OBJECT (combo), "value-in-list"); } if (combo->ok_if_empty != ok_if_empty) { combo->ok_if_empty = ok_if_empty; - g_object_notify (G_OBJECT (combo), "allow_empty"); + g_object_notify (G_OBJECT (combo), "allow-empty"); } g_object_thaw_notify (G_OBJECT (combo)); } @@ -1057,7 +1057,7 @@ gtk_combo_set_case_sensitive (GtkCombo * combo, gboolean val) if (combo->case_sensitive != val) { combo->case_sensitive = val; - g_object_notify (G_OBJECT (combo), "case_sensitive"); + g_object_notify (G_OBJECT (combo), "case-sensitive"); } } @@ -1070,7 +1070,7 @@ gtk_combo_set_use_arrows (GtkCombo * combo, gboolean val) if (combo->use_arrows != val) { combo->use_arrows = val; - g_object_notify (G_OBJECT (combo), "enable_arrow_keys"); + g_object_notify (G_OBJECT (combo), "enable-arrow-keys"); } } @@ -1084,12 +1084,12 @@ gtk_combo_set_use_arrows_always (GtkCombo * combo, gboolean val) { g_object_freeze_notify (G_OBJECT (combo)); combo->use_arrows_always = val; - g_object_notify (G_OBJECT (combo), "enable_arrows_always"); + g_object_notify (G_OBJECT (combo), "enable-arrows-always"); if (combo->use_arrows != TRUE) { combo->use_arrows = TRUE; - g_object_notify (G_OBJECT (combo), "enable_arrow_keys"); + g_object_notify (G_OBJECT (combo), "enable-arrow-keys"); } g_object_thaw_notify (G_OBJECT (combo)); } diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 99ed8d0f43..17ad9e998b 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -2733,8 +2733,8 @@ gtk_combo_box_relayout_item (GtkComboBox *combo_box, { gtk_container_child_get (GTK_CONTAINER (menu), last, - "right_attach", ¤t_col, - "top_attach", ¤t_row, + "right-attach", ¤t_col, + "top-attach", ¤t_row, NULL); if (current_col + cols > combo_box->priv->wrap_width) { diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c index 2e691b1d31..6fbba7d6bd 100644 --- a/gtk/gtkcurve.c +++ b/gtk/gtkcurve.c @@ -713,7 +713,7 @@ gtk_curve_set_curve_type (GtkCurve *c, GtkCurveType new_type) gtk_curve_interpolate (c, width, height); } g_signal_emit (c, curve_type_changed_signal, 0); - g_object_notify (G_OBJECT (c), "curve_type"); + g_object_notify (G_OBJECT (c), "curve-type"); gtk_curve_draw (c, width, height); } } @@ -787,7 +787,7 @@ gtk_curve_reset (GtkCurve *c) if (old_type != GTK_CURVE_TYPE_SPLINE) { g_signal_emit (c, curve_type_changed_signal, 0); - g_object_notify (G_OBJECT (c), "curve_type"); + g_object_notify (G_OBJECT (c), "curve-type"); } } @@ -834,19 +834,19 @@ gtk_curve_set_range (GtkCurve *curve, g_object_freeze_notify (G_OBJECT (curve)); if (curve->min_x != min_x) { curve->min_x = min_x; - g_object_notify (G_OBJECT (curve), "min_x"); + g_object_notify (G_OBJECT (curve), "min-x"); } if (curve->max_x != max_x) { curve->max_x = max_x; - g_object_notify (G_OBJECT (curve), "max_x"); + g_object_notify (G_OBJECT (curve), "max-x"); } if (curve->min_y != min_y) { curve->min_y = min_y; - g_object_notify (G_OBJECT (curve), "min_y"); + g_object_notify (G_OBJECT (curve), "min-y"); } if (curve->max_y != max_y) { curve->max_y = max_y; - g_object_notify (G_OBJECT (curve), "max_y"); + g_object_notify (G_OBJECT (curve), "max-y"); } g_object_thaw_notify (G_OBJECT (curve)); @@ -892,7 +892,7 @@ gtk_curve_set_vector (GtkCurve *c, int veclen, gfloat vector[]) if (old_type != GTK_CURVE_TYPE_FREE) { g_signal_emit (c, curve_type_changed_signal, 0); - g_object_notify (G_OBJECT (c), "curve_type"); + g_object_notify (G_OBJECT (c), "curve-type"); } gtk_curve_draw (c, c->num_points, height); diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index b7a4cd821a..8129de9018 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -980,7 +980,7 @@ gtk_dialog_run (GtkDialog *dialog) delete_handler = g_signal_connect (dialog, - "delete_event", + "delete-event", G_CALLBACK (run_delete_handler), &ri); diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 0e11b9d767..7b008cd999 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -2311,7 +2311,7 @@ gtk_drag_begin_internal (GtkWidget *widget, info->start_x = info->cur_x; info->start_y = info->cur_y; - g_signal_connect (info->ipc_widget, "grab-broken-event", + g_signal_connect (info->ipc_widget, "grab_broken_event", G_CALLBACK (gtk_drag_grab_broken_event_cb), info); g_signal_connect (info->ipc_widget, "button_release_event", G_CALLBACK (gtk_drag_button_release_cb), info); diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 2f3bad7988..c64d657340 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -665,7 +665,7 @@ gtk_file_chooser_button_constructor (GType type, g_free (priv->backend); priv->backend = NULL; - g_signal_connect (priv->dialog, "delete-event", + g_signal_connect (priv->dialog, "delete_event", G_CALLBACK (dialog_delete_event_cb), object); g_signal_connect (priv->dialog, "response", G_CALLBACK (dialog_response_cb), object); diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 41b69a4b16..98c0aa18c3 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -2654,7 +2654,7 @@ shortcuts_drag_data_delete_cb (GtkWidget *widget, GdkDragContext *context, GtkFileChooserDefault *impl) { - g_signal_stop_emission_by_name (widget, "drag-data-delete"); + g_signal_stop_emission_by_name (widget, "drag_data_delete"); } #if 0 @@ -2841,7 +2841,7 @@ shortcuts_drag_leave_cb (GtkWidget *widget, NULL, GTK_TREE_VIEW_DROP_BEFORE); - g_signal_stop_emission_by_name (widget, "drag-leave"); + g_signal_stop_emission_by_name (widget, "drag_leave"); } /* Computes the appropriate row and position for dropping */ @@ -2947,7 +2947,7 @@ shortcuts_drag_motion_cb (GtkWidget *widget, out: - g_signal_stop_emission_by_name (widget, "drag-motion"); + g_signal_stop_emission_by_name (widget, "drag_motion"); if (action != 0) { @@ -2971,7 +2971,7 @@ shortcuts_drag_drop_cb (GtkWidget *widget, shortcuts_cancel_drag_outside_idle (impl); #endif - g_signal_stop_emission_by_name (widget, "drag-drop"); + g_signal_stop_emission_by_name (widget, "drag_drop"); return TRUE; } @@ -3120,7 +3120,7 @@ shortcuts_drag_data_received_cb (GtkWidget *widget, else if (selection_data->target == gdk_atom_intern_static_string ("GTK_TREE_MODEL_ROW")) shortcuts_reorder (impl, position); - g_signal_stop_emission_by_name (widget, "drag-data-received"); + g_signal_stop_emission_by_name (widget, "drag_data_received"); } /* Callback used when the selection in the shortcuts tree changes */ @@ -3385,11 +3385,11 @@ shortcuts_list_create (GtkFileChooserDefault *impl) #ifdef PROFILE_FILE_CHOOSER g_object_set_data (G_OBJECT (impl->browse_shortcuts_tree_view), "fmq-name", "shortcuts"); #endif - g_signal_connect (impl->browse_shortcuts_tree_view, "key-press-event", + g_signal_connect (impl->browse_shortcuts_tree_view, "key_press_event", G_CALLBACK (tree_view_keybinding_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "popup-menu", + g_signal_connect (impl->browse_shortcuts_tree_view, "popup_menu", G_CALLBACK (shortcuts_popup_menu_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "button-press-event", + g_signal_connect (impl->browse_shortcuts_tree_view, "button_press_event", G_CALLBACK (shortcuts_button_press_event_cb), impl); /* Accessible object name for the file chooser's shortcuts pane */ atk_object_set_name (gtk_widget_get_accessible (impl->browse_shortcuts_tree_view), _("Places")); @@ -3417,26 +3417,26 @@ shortcuts_list_create (GtkFileChooserDefault *impl) g_signal_connect (selection, "changed", G_CALLBACK (shortcuts_selection_changed_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "row-activated", + g_signal_connect (impl->browse_shortcuts_tree_view, "row_activated", G_CALLBACK (shortcuts_row_activated_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "key-press-event", + g_signal_connect (impl->browse_shortcuts_tree_view, "key_press_event", G_CALLBACK (shortcuts_key_press_event_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-begin", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_begin", G_CALLBACK (shortcuts_drag_begin_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-end", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_end", G_CALLBACK (shortcuts_drag_end_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-data-delete", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_data_delete", G_CALLBACK (shortcuts_drag_data_delete_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-leave", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_leave", G_CALLBACK (shortcuts_drag_leave_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-motion", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_motion", G_CALLBACK (shortcuts_drag_motion_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-drop", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_drop", G_CALLBACK (shortcuts_drag_drop_cb), impl); - g_signal_connect (impl->browse_shortcuts_tree_view, "drag-data-received", + g_signal_connect (impl->browse_shortcuts_tree_view, "drag_data_received", G_CALLBACK (shortcuts_drag_data_received_cb), impl); gtk_container_add (GTK_CONTAINER (swin), impl->browse_shortcuts_tree_view); @@ -3770,7 +3770,7 @@ file_list_drag_data_received_cb (GtkWidget *widget, g_strfreev (uris); out: - g_signal_stop_emission_by_name (widget, "drag-data-received"); + g_signal_stop_emission_by_name (widget, "drag_data_received"); } /* Don't do anything with the drag_drop signal */ @@ -3782,7 +3782,7 @@ file_list_drag_drop_cb (GtkWidget *widget, guint time_, GtkFileChooserDefault *impl) { - g_signal_stop_emission_by_name (widget, "drag-drop"); + g_signal_stop_emission_by_name (widget, "drag_drop"); return TRUE; } @@ -3796,7 +3796,7 @@ file_list_drag_motion_cb (GtkWidget *widget, guint time_, GtkFileChooserDefault *impl) { - g_signal_stop_emission_by_name (widget, "drag-motion"); + g_signal_stop_emission_by_name (widget, "drag_motion"); return TRUE; } @@ -3976,20 +3976,20 @@ create_file_list (GtkFileChooserDefault *impl) num_file_list_dest_targets, GDK_ACTION_COPY | GDK_ACTION_MOVE); - g_signal_connect (impl->browse_files_tree_view, "row-activated", + g_signal_connect (impl->browse_files_tree_view, "row_activated", G_CALLBACK (list_row_activated), impl); - g_signal_connect (impl->browse_files_tree_view, "key-press-event", + g_signal_connect (impl->browse_files_tree_view, "key_press_event", G_CALLBACK (trap_activate_cb), impl); - g_signal_connect (impl->browse_files_tree_view, "popup-menu", + g_signal_connect (impl->browse_files_tree_view, "popup_menu", G_CALLBACK (list_popup_menu_cb), impl); - g_signal_connect (impl->browse_files_tree_view, "button-press-event", + g_signal_connect (impl->browse_files_tree_view, "button_press_event", G_CALLBACK (list_button_press_event_cb), impl); - g_signal_connect (impl->browse_files_tree_view, "drag-data-received", + g_signal_connect (impl->browse_files_tree_view, "drag_data_received", G_CALLBACK (file_list_drag_data_received_cb), impl); - g_signal_connect (impl->browse_files_tree_view, "drag-drop", + g_signal_connect (impl->browse_files_tree_view, "drag_drop", G_CALLBACK (file_list_drag_drop_cb), impl); - g_signal_connect (impl->browse_files_tree_view, "drag-motion", + g_signal_connect (impl->browse_files_tree_view, "drag_motion", G_CALLBACK (file_list_drag_motion_cb), impl); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view)); @@ -4024,7 +4024,7 @@ create_file_list (GtkFileChooserDefault *impl) NULL); g_signal_connect (impl->list_name_renderer, "edited", G_CALLBACK (renderer_edited_cb), impl); - g_signal_connect (impl->list_name_renderer, "editing-canceled", + g_signal_connect (impl->list_name_renderer, "editing_canceled", G_CALLBACK (renderer_editing_canceled_cb), impl); gtk_tree_view_column_pack_start (impl->list_name_column, impl->list_name_renderer, TRUE); gtk_tree_view_column_set_cell_data_func (impl->list_name_column, impl->list_name_renderer, @@ -5172,7 +5172,7 @@ gtk_file_chooser_default_hierarchy_changed (GtkWidget *widget, toplevel = gtk_widget_get_toplevel (widget); if (GTK_IS_WINDOW (toplevel)) { - impl->toplevel_set_focus_id = g_signal_connect (toplevel, "set-focus", + impl->toplevel_set_focus_id = g_signal_connect (toplevel, "set_focus", G_CALLBACK (toplevel_set_focus_cb), impl); impl->toplevel_last_focus_widget = gtk_window_get_focus (GTK_WINDOW (toplevel)); } @@ -5599,7 +5599,7 @@ load_set_model (GtkFileChooserDefault *impl) impl->list_sort_ascending = TRUE; profile_msg (" gtk_tree_model_sort_new_with_model end", NULL); - g_signal_connect (impl->sort_model, "sort-column-changed", + g_signal_connect (impl->sort_model, "sort_column_changed", G_CALLBACK (list_sort_column_changed_cb), impl); profile_msg (" gtk_tree_view_set_model start", NULL); diff --git a/gtk/gtkfilechooserembed.c b/gtk/gtkfilechooserembed.c index 1402a4a093..b3d4414f91 100644 --- a/gtk/gtkfilechooserembed.c +++ b/gtk/gtkfilechooserembed.c @@ -81,9 +81,9 @@ _gtk_file_chooser_embed_set_delegate (GtkFileChooserEmbed *receiver, g_object_set_data (G_OBJECT (receiver), I_("gtk-file-chooser-embed-delegate"), delegate); - g_signal_connect (delegate, "default_size_changed", + g_signal_connect (delegate, "default-size-changed", G_CALLBACK (delegate_default_size_changed), receiver); - g_signal_connect (delegate, "response_requested", + g_signal_connect (delegate, "response-requested", G_CALLBACK (delegate_response_requested), receiver); } diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index c1d9661608..c4924542c0 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -157,7 +157,7 @@ _gtk_file_chooser_entry_init (GtkFileChooserEntry *chooser_entry) cell, "text", 0); - g_signal_connect (comp, "match-selected", + g_signal_connect (comp, "match_selected", G_CALLBACK (match_selected_callback), chooser_entry); gtk_entry_set_completion (GTK_ENTRY (chooser_entry), comp); diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 56d58d83ad..aa7fed04c3 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -1110,7 +1110,7 @@ gtk_file_selection_show_fileop_buttons (GtkFileSelection *filesel) gtk_file_selection_update_fileops (filesel); - g_object_notify (G_OBJECT (filesel), "show_fileops"); + g_object_notify (G_OBJECT (filesel), "show-fileops"); } void @@ -1135,7 +1135,7 @@ gtk_file_selection_hide_fileop_buttons (GtkFileSelection *filesel) gtk_widget_destroy (filesel->fileop_c_dir); filesel->fileop_c_dir = NULL; } - g_object_notify (G_OBJECT (filesel), "show_fileops"); + g_object_notify (G_OBJECT (filesel), "show-fileops"); } @@ -1406,8 +1406,8 @@ gtk_file_selection_create_dir_confirmed (GtkWidget *widget, if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) buf = g_strdup_printf (_("The folder name \"%s\" contains symbols that are not allowed in filenames"), dirname); else - buf = g_strdup_printf (_("Error creating folder \"%s\": %s\n%s"), dirname, error->message, - _("You probably used symbols not allowed in filenames.")); + buf = g_strdup_printf (_("Error creating directory '%s': %s"), + dirname, error->message); gtk_file_selection_fileop_error (fs, buf); g_error_free (error); goto out; @@ -1415,8 +1415,8 @@ gtk_file_selection_create_dir_confirmed (GtkWidget *widget, if (g_mkdir (sys_full_path, 0777) < 0) { - buf = g_strdup_printf (_("Error creating folder \"%s\": %s\n"), dirname, - g_strerror (errno)); + buf = g_strdup_printf (_("Error creating directory '%s': %s"), + dirname, g_strerror (errno)); gtk_file_selection_fileop_error (fs, buf); } @@ -1534,9 +1534,8 @@ gtk_file_selection_delete_file_response (GtkDialog *dialog, buf = g_strdup_printf (_("The filename \"%s\" contains symbols that are not allowed in filenames"), fs->fileop_file); else - buf = g_strdup_printf (_("Error deleting file \"%s\": %s\n%s"), - fs->fileop_file, error->message, - _("It probably contains symbols not allowed in filenames.")); + buf = g_strdup_printf (_("Error deleting file '%s': %s"), + fs->fileop_file, error->message); gtk_file_selection_fileop_error (fs, buf); g_error_free (error); @@ -1545,7 +1544,7 @@ gtk_file_selection_delete_file_response (GtkDialog *dialog, if (g_unlink (sys_full_path) < 0) { - buf = g_strdup_printf (_("Error deleting file \"%s\": %s"), + buf = g_strdup_printf (_("Error deleting file '%s': %s"), fs->fileop_file, g_strerror (errno)); gtk_file_selection_fileop_error (fs, buf); } @@ -1639,11 +1638,10 @@ gtk_file_selection_rename_file_confirmed (GtkWidget *widget, if (error) { if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) - buf = g_strdup_printf (_("The file name \"%s\" contains symbols that are not allowed in filenames"), new_filename); + buf = g_strdup_printf (_("The filename \"%s\" contains symbols that are not allowed in filenames"), new_filename); else - buf = g_strdup_printf (_("Error renaming file to \"%s\": %s\n%s"), - new_filename, error->message, - _("You probably used symbols not allowed in filenames.")); + buf = g_strdup_printf (_("Error renaming file to \"%s\": %s"), + new_filename, error->message); gtk_file_selection_fileop_error (fs, buf); g_error_free (error); goto out1; @@ -1653,11 +1651,10 @@ gtk_file_selection_rename_file_confirmed (GtkWidget *widget, if (error) { if (g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) - buf = g_strdup_printf (_("The file name \"%s\" contains symbols that are not allowed in filenames"), old_filename); + buf = g_strdup_printf (_("The filename \"%s\" contains symbols that are not allowed in filenames"), old_filename); else - buf = g_strdup_printf (_("Error renaming file \"%s\": %s\n%s"), - old_filename, error->message, - _("It probably contains symbols not allowed in filenames.")); + buf = g_strdup_printf (_("Error renaming file \"%s\": %s"), + old_filename, error->message); gtk_file_selection_fileop_error (fs, buf); g_error_free (error); goto out2; diff --git a/gtk/gtkfilesystemunix.c b/gtk/gtkfilesystemunix.c index 9b9218426d..73be26a9ef 100644 --- a/gtk/gtkfilesystemunix.c +++ b/gtk/gtkfilesystemunix.c @@ -2074,8 +2074,8 @@ file_info_for_root_with_error (const char *root_name, g_set_error (error, GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR_FAILED, - _("Error getting information for '/': %s"), - g_strerror (saved_errno)); + _("Error getting information for '%s': %s"), + "/", g_strerror (saved_errno)); return NULL; } diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index f6b6de3c77..8d9e79bd7d 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -388,7 +388,7 @@ gtk_font_button_new (void) GtkWidget * gtk_font_button_new_with_font (const gchar *fontname) { - return g_object_new (GTK_TYPE_FONT_BUTTON, "font_name", fontname, NULL); + return g_object_new (GTK_TYPE_FONT_BUTTON, "font-name", fontname, NULL); } /** diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index 1c2914793a..095f216ab6 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -351,7 +351,7 @@ gtk_font_selection_init (GtkFontSelection *fontsel) fontsel->family_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); g_object_unref (model); - g_signal_connect (fontsel->family_list, "row-activated", + g_signal_connect (fontsel->family_list, "row_activated", G_CALLBACK (list_row_activated), fontsel); column = gtk_tree_view_column_new_with_attributes ("Family", @@ -577,7 +577,7 @@ static void gtk_font_selection_preview_changed (GtkWidget *entry, GtkFontSelection *fontsel) { - g_object_notify (G_OBJECT (fontsel), "preview_text"); + g_object_notify (G_OBJECT (fontsel), "preview-text"); } static void @@ -1260,7 +1260,7 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel, gtk_font_selection_set_size (fontsel, pango_font_description_get_size (new_desc)); g_object_freeze_notify (G_OBJECT (fontsel)); - g_object_notify (G_OBJECT (fontsel), "font_name"); + g_object_notify (G_OBJECT (fontsel), "font-name"); g_object_notify (G_OBJECT (fontsel), "font"); g_object_thaw_notify (G_OBJECT (fontsel)); diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 5b55a2bfe5..d1fb4f6632 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -749,7 +749,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass) GTK_TYPE_TREE_PATH); icon_view_signals[SELECTION_CHANGED] = - g_signal_new (I_("selection_changed"), + g_signal_new (I_("selection-changed"), G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkIconViewClass, selection_changed), @@ -1649,7 +1649,7 @@ gtk_icon_view_start_editing (GtkIconView *icon_view, /* FIXME ugly special case */ if (GTK_IS_ENTRY (editable) || GTK_IS_COMBO_BOX (editable)) - g_object_set (editable, "has_frame", TRUE, NULL); + g_object_set (editable, "has-frame", TRUE, NULL); /* the rest corresponds to tree_view_real_start_editing... */ icon_view->priv->edited_item = item; @@ -4770,15 +4770,15 @@ update_text_cell (GtkIconView *icon_view) if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL) g_object_set (info->cell, - "wrap_mode", PANGO_WRAP_CHAR, - "wrap_width", icon_view->priv->item_width, + "wrap-mode", PANGO_WRAP_CHAR, + "wrap-width", icon_view->priv->item_width, "xalign", 0.5, "yalign", 0.0, NULL); else g_object_set (info->cell, - "wrap_mode", PANGO_WRAP_CHAR, - "wrap_width", icon_view->priv->item_width, + "wrap-mode", PANGO_WRAP_CHAR, + "wrap-width", icon_view->priv->item_width, "xalign", 0.0, "yalign", 0.0, NULL); @@ -4838,13 +4838,13 @@ update_pixbuf_cell (GtkIconView *icon_view) if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL) g_object_set (info->cell, - "follow_state", TRUE, + "follow-state", TRUE, "xalign", 0.5, "yalign", 1.0, NULL); else g_object_set (info->cell, - "follow_state", TRUE, + "follow-state", TRUE, "xalign", 0.0, "yalign", 0.0, NULL); @@ -8362,7 +8362,7 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model, AtkObject *atk_obj; atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data)); - g_signal_emit_by_name (atk_obj, "visible-data-changed"); + g_signal_emit_by_name (atk_obj, "visible_data_changed"); return; } @@ -8532,16 +8532,16 @@ gtk_icon_view_accessible_connect_model_signals (GtkIconView *icon_view) GObject *obj; obj = G_OBJECT (icon_view->priv->model); - g_signal_connect_data (obj, "row-changed", + g_signal_connect_data (obj, "row_changed", (GCallback) gtk_icon_view_accessible_model_row_changed, icon_view, NULL, 0); - g_signal_connect_data (obj, "row-inserted", + g_signal_connect_data (obj, "row_inserted", (GCallback) gtk_icon_view_accessible_model_row_inserted, icon_view, NULL, G_CONNECT_AFTER); - g_signal_connect_data (obj, "row-deleted", + g_signal_connect_data (obj, "row_deleted", (GCallback) gtk_icon_view_accessible_model_row_deleted, icon_view, NULL, G_CONNECT_AFTER); - g_signal_connect_data (obj, "rows-reordered", + g_signal_connect_data (obj, "rows_reordered", (GCallback) gtk_icon_view_accessible_model_rows_reordered, icon_view, NULL, G_CONNECT_AFTER); } diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 8931f95144..409bc18e53 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1304,7 +1304,7 @@ set_markup (GtkLabel *label, with_uline ? &accel_char : NULL, &error)) { - g_warning ("Failed to set label from markup due to error parsing markup: %s", + g_warning ("Failed to set text from markup due to error parsing markup: %s", error->message); g_error_free (error); return; @@ -3040,7 +3040,7 @@ gtk_label_motion (GtkWidget *widget, gtk_target_list_add_text_targets (target_list, 0); - g_signal_connect (widget, "drag-begin", + g_signal_connect (widget, "drag_begin", G_CALLBACK (drag_begin_cb), NULL); gtk_drag_begin (widget, target_list, GDK_ACTION_COPY, @@ -4114,7 +4114,7 @@ gtk_label_do_popup (GtkLabel *label, gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (label->select_info->popup_menu), menuitem); - menuitem = gtk_menu_item_new_with_label (_("Select All")); + menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_SELECT_ALL, NULL); g_signal_connect_swapped (menuitem, "activate", G_CALLBACK (gtk_label_select_all), label); gtk_widget_show (menuitem); diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index e742c69933..ca193481e0 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -153,11 +153,11 @@ gtk_link_button_init (GtkLinkButton *link_button) gtk_button_set_relief (GTK_BUTTON (link_button), GTK_RELIEF_NONE); - g_signal_connect (link_button, "enter-notify-event", + g_signal_connect (link_button, "enter_notify_event", G_CALLBACK (gtk_link_button_enter_cb), NULL); - g_signal_connect (link_button, "leave-notify-event", + g_signal_connect (link_button, "leave_notify_event", G_CALLBACK (gtk_link_button_leave_cb), NULL); - g_signal_connect (link_button, "drag-data-get", + g_signal_connect (link_button, "drag_data_get", G_CALLBACK (gtk_link_button_drag_data_get_cb), NULL); /* enable drag source */ diff --git a/gtk/gtklist.c b/gtk/gtklist.c index a1b8be585f..4c97eeb142 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -247,7 +247,7 @@ gtk_list_class_init (GtkListClass *class) class->unselect_child = gtk_real_list_unselect_child; list_signals[SELECTION_CHANGED] = - gtk_signal_new (I_("selection_changed"), + gtk_signal_new (I_("selection-changed"), GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (GtkListClass, selection_changed), diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index 503a1e61b4..84175b7c3e 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -223,8 +223,7 @@ gtk_list_store_new (gint n_columns, GType type = va_arg (args, GType); if (! _gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s passed to gtk_list_store_new\n", - G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); g_object_unref (retval); return NULL; } @@ -263,8 +262,7 @@ gtk_list_store_newv (gint n_columns, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s passed to gtk_list_store_newv\n", - G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); g_object_unref (retval); return NULL; } @@ -301,7 +299,7 @@ gtk_list_store_set_column_types (GtkListStore *list_store, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s passed to gtk_list_store_set_column_types\n", G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); continue; } gtk_list_store_set_column_type (list_store, i, types[i]); @@ -345,7 +343,7 @@ gtk_list_store_set_column_type (GtkListStore *list_store, { if (!_gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s passed to gtk_list_store_set_column_type\n", G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); return; } diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index 0280b2372c..911db07c5c 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -251,7 +251,7 @@ gtk_option_menu_set_menu (GtkOptionMenu *option_menu, gtk_option_menu_calc_size (option_menu); - g_signal_connect_after (option_menu->menu, "selection_done", + g_signal_connect_after (option_menu->menu, "selection-done", G_CALLBACK (gtk_option_menu_selection_done), option_menu); g_signal_connect_swapped (option_menu->menu, "size_request", @@ -394,11 +394,11 @@ gtk_option_menu_get_props (GtkOptionMenu *option_menu, GtkBorder *indicator_spacing; gtk_widget_style_get (GTK_WIDGET (option_menu), - "indicator_size", &indicator_size, - "indicator_spacing", &indicator_spacing, - "interior_focus", &props->interior_focus, - "focus_line_width", &props->focus_width, - "focus_padding", &props->focus_pad, + "indicator-size", &indicator_size, + "indicator-spacing", &indicator_spacing, + "interior-focus", &props->interior_focus, + "focus-line-width", &props->focus_width, + "focus-padding", &props->focus_pad, NULL); if (indicator_size) diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index 1e25b6b7cf..155f740a3e 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -1332,7 +1332,7 @@ make_directory_button (GtkPathBar *path_bar, targets, G_N_ELEMENTS (targets), GDK_ACTION_COPY); - g_signal_connect (button_data->button, "drag-data-get", + g_signal_connect (button_data->button, "drag_data_get", G_CALLBACK (button_drag_data_get_cb), button_data); return button_data; diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index c6cecce8dc..1b403d0d92 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -928,7 +928,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) PROP_CURRENT_PAGE, g_param_spec_int ("current-page", P_("Current Page"), - P_("The current page in the document."), + P_("The current page in the document"), -1, G_MAXINT, -1, @@ -1692,7 +1692,7 @@ gtk_print_operation_set_export_filename (GtkPrintOperation *op, g_free (priv->export_filename); priv->export_filename = g_strdup (filename); - g_object_notify (G_OBJECT (op), "export_filename"); + g_object_notify (G_OBJECT (op), "export-filename"); } /* Creates the initial page setup used for printing unless the diff --git a/gtk/gtkprogress.c b/gtk/gtkprogress.c index 023dcdd8e5..a9b8852565 100644 --- a/gtk/gtkprogress.c +++ b/gtk/gtkprogress.c @@ -98,7 +98,7 @@ gtk_progress_class_init (GtkProgressClass *class) PROP_ACTIVITY_MODE, g_param_spec_boolean ("activity-mode", P_("Activity mode"), - P_("If TRUE the GtkProgress is in activity mode, meaning that it signals something is happening, but not how much of the activity is finished. This is used when you're doing something that you don't know how long it will take"), + P_("If TRUE, the GtkProgress is in activity mode, meaning that it signals something is happening, but not how much of the activity is finished. This is used when you're doing something that you don't know how long it will take"), FALSE, GTK_PARAM_READWRITE)); diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index e972f9785d..3468bbb982 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -243,13 +243,14 @@ static const GScannerConfig gtk_rc_scanner_config = " \t\r\n" ) /* cset_skip_characters */, ( - G_CSET_a_2_z "_" + G_CSET_a_2_z G_CSET_A_2_Z ) /* cset_identifier_first */, ( + G_CSET_DIGITS + "-_" G_CSET_a_2_z - "_-0123456789" G_CSET_A_2_Z ) /* cset_identifier_nth */, ( "#\n" ) /* cpair_comment_single */, @@ -2388,7 +2389,10 @@ gtk_rc_parse_assignment (GScanner *scanner, scanner->config->numbers_2_int = TRUE; /* record location */ - prop->origin = g_strdup_printf ("%s:%u", scanner->input_name, scanner->line); + if (g_getenv ("GTK_DEBUG")) + prop->origin = g_strdup_printf ("%s:%u", scanner->input_name, scanner->line); + else + prop->origin = NULL; /* parse optional sign */ if (g_scanner_peek_next_token (scanner) == '-') @@ -2467,9 +2471,9 @@ is_c_identifier (const gchar *string) const gchar *p; gboolean is_varname; - is_varname = strchr (G_CSET_a_2_z G_CSET_A_2_Z "_", string[0]) != NULL; + is_varname = strchr ("_" G_CSET_a_2_z G_CSET_A_2_Z, string[0]) != NULL; for (p = string + 1; *p && is_varname; p++) - is_varname &= strchr (G_CSET_a_2_z G_CSET_A_2_Z G_CSET_DIGITS "_-", *p) != NULL; + is_varname &= strchr (G_CSET_DIGITS "-_" G_CSET_a_2_z G_CSET_A_2_Z, *p) != NULL; return is_varname; } @@ -2586,7 +2590,7 @@ gtk_rc_parse_statement (GtkRcContext *context, svalue.origin = prop.origin; memcpy (&svalue.value, &prop.value, sizeof (prop.value)); - g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); + g_strcanon (name, G_CSET_DIGITS "-_" G_CSET_a_2_z G_CSET_A_2_Z, '-'); _gtk_settings_set_property_value_from_rc (context->settings, name, &svalue); @@ -2885,14 +2889,14 @@ gtk_rc_parse_style (GtkRcContext *context, /* it's important that we do the same canonification as GParamSpecPool here */ name = g_strdup (scanner->value.v_identifier); - g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); + g_strcanon (name, G_CSET_DIGITS "-_" G_CSET_a_2_z G_CSET_A_2_Z, '-'); prop.property_name = g_quark_from_string (name); g_free (name); token = gtk_rc_parse_assignment (scanner, &prop); if (token == G_TOKEN_NONE) { - g_return_val_if_fail (prop.origin != NULL && G_VALUE_TYPE (&prop.value) != 0, G_TOKEN_ERROR); + g_return_val_if_fail (G_VALUE_TYPE (&prop.value) != 0, G_TOKEN_ERROR); insert_rc_property (rc_style, &prop, TRUE); } diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c index 3294d892a5..09f5b43e25 100644 --- a/gtk/gtkrecentchooserdefault.c +++ b/gtk/gtkrecentchooserdefault.c @@ -397,9 +397,9 @@ gtk_recent_chooser_default_constructor (GType type, G_CALLBACK (recent_view_popup_menu_cb), impl); g_signal_connect (impl->recent_view, "button-press-event", G_CALLBACK (recent_view_button_press_cb), impl); - g_signal_connect (impl->recent_view, "drag-begin", + g_signal_connect (impl->recent_view, "drag_begin", G_CALLBACK (recent_view_drag_begin_cb), impl); - g_signal_connect (impl->recent_view, "drag-data-get", + g_signal_connect (impl->recent_view, "drag_data_get", G_CALLBACK (recent_view_drag_data_get_cb), impl); g_object_set_data (G_OBJECT (impl->recent_view), "GtkRecentChooserDefault", impl); diff --git a/gtk/gtkrecentchooserdialog.c b/gtk/gtkrecentchooserdialog.c index 2c73c4b01d..474a1b0466 100644 --- a/gtk/gtkrecentchooserdialog.c +++ b/gtk/gtkrecentchooserdialog.c @@ -162,7 +162,7 @@ gtk_recent_chooser_dialog_constructor (GType type, else priv->chooser = g_object_new (GTK_TYPE_RECENT_CHOOSER_WIDGET, NULL); - g_signal_connect (priv->chooser, "item-activated", + g_signal_connect (priv->chooser, "item_activated", G_CALLBACK (gtk_recent_chooser_item_activated_cb), object); diff --git a/gtk/gtkrecentchoosermenu.c b/gtk/gtkrecentchoosermenu.c index e831a9959b..d90541cee9 100644 --- a/gtk/gtkrecentchoosermenu.c +++ b/gtk/gtkrecentchoosermenu.c @@ -318,8 +318,7 @@ gtk_recent_chooser_menu_set_property (GObject *object, menu->priv->show_icons = g_value_get_boolean (value); break; case GTK_RECENT_CHOOSER_PROP_SELECT_MULTIPLE: - g_warning ("%s: RecentChoosers of type `%s' do not support " - "selecting multiple items.", + g_warning ("%s: Choosers of type `%s' do not support selecting multiple items.", G_STRFUNC, G_OBJECT_TYPE_NAME (object)); break; @@ -376,8 +375,7 @@ gtk_recent_chooser_menu_get_property (GObject *object, g_value_set_boolean (value, menu->priv->show_icons); break; case GTK_RECENT_CHOOSER_PROP_SELECT_MULTIPLE: - g_warning ("%s: Recent Choosers of type `%s' do not support " - "selecting multiple items.", + g_warning ("%s: Choosers of type `%s' do not support selecting multiple items.", G_STRFUNC, G_OBJECT_TYPE_NAME (object)); break; diff --git a/gtk/gtkrecentchooserutils.c b/gtk/gtkrecentchooserutils.c index 328b3bbb57..366e8e648e 100644 --- a/gtk/gtkrecentchooserutils.c +++ b/gtk/gtkrecentchooserutils.c @@ -160,7 +160,7 @@ _gtk_recent_chooser_set_delegate (GtkRecentChooser *receiver, G_CALLBACK (delegate_notify), receiver); g_signal_connect (delegate, "selection-changed", G_CALLBACK (delegate_selection_changed), receiver); - g_signal_connect (delegate, "item-activated", + g_signal_connect (delegate, "item_activated", G_CALLBACK (delegate_item_activated), receiver); } diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c index 3929e4e565..9d47ab87c7 100644 --- a/gtk/gtkscrollbar.c +++ b/gtk/gtkscrollbar.c @@ -89,7 +89,7 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class) gtk_widget_class_install_style_property (widget_class, g_param_spec_boolean ("has-secondary-forward-stepper", P_("Secondary forward stepper"), - P_("Display a secondary forward arrow button on the opposite end of the scrollbar"), + P_("Display a second forward arrow button on the opposite end of the scrollbar"), FALSE, GTK_PARAM_READABLE)); diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index a7712ce213..5715b50f40 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -1275,8 +1275,8 @@ selection_set_text_plain (GtkSelectionData *selection_data, if (!result) { - g_warning ("Error converting from UTF-8 to %s: %s", - charset, error->message); + g_warning ("Error converting from %s to %s: %s", + "UTF-8", charset, error->message); g_error_free (error); return FALSE; @@ -1316,8 +1316,8 @@ selection_get_text_plain (GtkSelectionData *selection_data) if (!str) { - g_warning ("Error converting from %s to UTF-8: %s", - charset, error->message); + g_warning ("Error converting from %s to %s: %s", + charset, "UTF-8", error->message); g_error_free (error); return NULL; @@ -1325,7 +1325,8 @@ selection_get_text_plain (GtkSelectionData *selection_data) } else if (!g_utf8_validate (str, -1, NULL)) { - g_warning ("Error converting from text/plain;charset=utf-8 to UTF-8"); + g_warning ("Error converting from %s to %s: %s", + "text/plain;charset=utf-8", "UTF-8", "invalid UTF-8"); g_free (str); return NULL; diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index ed4f6019bb..8f1606583c 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -824,7 +824,7 @@ apply_queued_setting (GtkSettings *data, gchar *debug = g_strdup_value_contents (&qvalue->public.value); g_message ("%s: failed to retrieve property `%s' of type `%s' from rc file value \"%s\" of type `%s'", - qvalue->public.origin, + qvalue->public.origin ? qvalue->public.origin : "(for origin information, set GTK_DEBUG)", pspec->name, g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), debug, @@ -971,7 +971,7 @@ gtk_settings_set_property_value_internal (GtkSettings *settings, } name = g_strdup (prop_name); - g_strcanon (name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); + g_strcanon (name, G_CSET_DIGITS "-_" G_CSET_a_2_z G_CSET_A_2_Z, '-'); name_quark = g_quark_from_string (name); g_free (name); @@ -1003,7 +1003,6 @@ gtk_settings_set_property_value (GtkSettings *settings, g_return_if_fail (GTK_SETTINGS (settings)); g_return_if_fail (prop_name != NULL); g_return_if_fail (new_value != NULL); - g_return_if_fail (new_value->origin != NULL); gtk_settings_set_property_value_internal (settings, prop_name, new_value, GTK_SETTINGS_SOURCE_APPLICATION); @@ -1017,7 +1016,6 @@ _gtk_settings_set_property_value_from_rc (GtkSettings *settings, g_return_if_fail (GTK_SETTINGS (settings)); g_return_if_fail (prop_name != NULL); g_return_if_fail (new_value != NULL); - g_return_if_fail (new_value->origin != NULL); gtk_settings_set_property_value_internal (settings, prop_name, new_value, GTK_SETTINGS_SOURCE_RC_FILE); @@ -1034,7 +1032,6 @@ gtk_settings_set_string_property (GtkSettings *settings, g_return_if_fail (GTK_SETTINGS (settings)); g_return_if_fail (name != NULL); g_return_if_fail (v_string != NULL); - g_return_if_fail (origin != NULL); svalue.origin = (gchar*) origin; g_value_init (&svalue.value, G_TYPE_STRING); @@ -1053,7 +1050,6 @@ gtk_settings_set_long_property (GtkSettings *settings, g_return_if_fail (GTK_SETTINGS (settings)); g_return_if_fail (name != NULL); - g_return_if_fail (origin != NULL); svalue.origin = (gchar*) origin; g_value_init (&svalue.value, G_TYPE_LONG); @@ -1072,7 +1068,6 @@ gtk_settings_set_double_property (GtkSettings *settings, g_return_if_fail (GTK_SETTINGS (settings)); g_return_if_fail (name != NULL); - g_return_if_fail (origin != NULL); svalue.origin = (gchar*) origin; g_value_init (&svalue.value, G_TYPE_DOUBLE); diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c index 27a56511cf..ca7209491f 100755 --- a/gtk/gtkstatusicon.c +++ b/gtk/gtkstatusicon.c @@ -246,7 +246,7 @@ gtk_status_icon_class_init (GtkStatusIconClass *class) * Since: 2.10 */ status_icon_signals [POPUP_MENU_SIGNAL] = - g_signal_new (I_("popup-menu"), + g_signal_new (I_("popup_menu"), G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkStatusIconClass, popup_menu), @@ -272,7 +272,7 @@ gtk_status_icon_class_init (GtkStatusIconClass *class) * Since: 2.10 */ status_icon_signals [SIZE_CHANGED_SIGNAL] = - g_signal_new (I_("size-changed"), + g_signal_new (I_("size_changed"), G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkStatusIconClass, size_changed), diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index d7199df655..7c25358c7e 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -1739,7 +1739,7 @@ _gtk_style_peek_property_value (GtkStyle *style, gchar *contents = g_strdup_value_contents (&rcprop->value); g_message ("%s: failed to retrieve property `%s::%s' of type `%s' from rc file value \"%s\" of type `%s'", - rcprop->origin, + rcprop->origin ? rcprop->origin : "(for origin information, set GTK_DEBUG)", g_type_name (pspec->owner_type), pspec->name, g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), contents, diff --git a/gtk/gtktable.c b/gtk/gtktable.c index f34782331f..9002ad3c6c 100644 --- a/gtk/gtktable.c +++ b/gtk/gtktable.c @@ -162,8 +162,8 @@ gtk_table_class_init (GtkTableClass *class) g_object_class_install_property (gobject_class, PROP_HOMOGENEOUS, g_param_spec_boolean ("homogeneous", - P_("Homogenous"), - P_("If TRUE this means the table cells are all the same width/height"), + P_("Homogeneous"), + P_("If TRUE, the table cells are all the same width/height"), FALSE, GTK_PARAM_READWRITE)); diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 900601746b..6070b617dd 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -727,7 +727,7 @@ gtk_text_set_word_wrap (GtkText *text, gtk_widget_queue_draw (GTK_WIDGET (text)); } - g_object_notify (G_OBJECT (text), "word_wrap"); + g_object_notify (G_OBJECT (text), "word-wrap"); } void @@ -744,7 +744,7 @@ gtk_text_set_line_wrap (GtkText *text, gtk_widget_queue_draw (GTK_WIDGET (text)); } - g_object_notify (G_OBJECT (text), "line_wrap"); + g_object_notify (G_OBJECT (text), "line-wrap"); } void diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c index 8cad796bc6..017c7af53a 100644 --- a/gtk/gtktextbufferserialize.c +++ b/gtk/gtktextbufferserialize.c @@ -1350,7 +1350,7 @@ start_element_handler (GMarkupParseContext *context, if (info->parsed_tags) { set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, - _("A <tags> element has already been specified")); + _("A <%s> element has already been specified"), "tags"); return; } @@ -1366,7 +1366,7 @@ start_element_handler (GMarkupParseContext *context, if (info->parsed_text) { set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, - _("A <text> element has already been specified")); + _("A <%s> element has already been specified"), "text"); return; } else if (!info->parsed_tags) diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index 29da01fcc0..1a25f64a2b 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -123,7 +123,7 @@ text_renderer_get_error_color (GtkTextRenderer *text_renderer) if (!text_renderer->error_color) gtk_widget_style_get (text_renderer->widget, - "error-underline_color", &text_renderer->error_color, + "error-underline-color", &text_renderer->error_color, NULL); if (!text_renderer->error_color) diff --git a/gtk/gtktextsegment.c b/gtk/gtktextsegment.c index 71c4e16dd8..63f3781998 100644 --- a/gtk/gtktextsegment.c +++ b/gtk/gtktextsegment.c @@ -174,12 +174,12 @@ char_segment_self_check (GtkTextLineSegment *seg) if (seg->byte_count <= 0) { - g_error ("char_segment_check_func: segment has size <= 0"); + g_error ("segment has size <= 0"); } if (strlen (seg->body.chars) != seg->byte_count) { - g_error ("char_segment_check_func: segment has wrong size"); + g_error ("segment has wrong size"); } if (g_utf8_strlen (seg->body.chars, seg->byte_count) != seg->char_count) @@ -404,7 +404,7 @@ char_segment_check_func (segPtr, line) { if (segPtr->next->type == >k_text_char_type) { - g_error ("char_segment_check_func: adjacent character segments weren't merged"); + g_error ("adjacent character segments weren't merged"); } } } diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 45c250ccab..66232ca4da 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4474,7 +4474,7 @@ blink_cb (gpointer data) { g_warning ("GtkTextView - did not receive focus-out-event. If you\n" "connect a handler to this signal, it must return\n" - "FALSE so the entry gets the event as well"); + "FALSE so the text view gets the event as well"); } g_assert (text_view->layout); @@ -6013,7 +6013,7 @@ gtk_text_view_start_selection_dnd (GtkTextView *text_view, target_list = gtk_text_buffer_get_copy_target_list (get_buffer (text_view)); - g_signal_connect (text_view, "drag-begin", + g_signal_connect (text_view, "drag_begin", G_CALLBACK (drag_begin_cb), NULL); gtk_drag_begin (GTK_WIDGET (text_view), target_list, GDK_ACTION_COPY | GDK_ACTION_MOVE, diff --git a/gtk/gtktooltips.c b/gtk/gtktooltips.c index 7de05c9f24..af17f5547a 100644 --- a/gtk/gtktooltips.c +++ b/gtk/gtktooltips.c @@ -329,7 +329,7 @@ gtk_tooltips_set_tip (GtkTooltips *tooltips, tooltips->tips_data_list = g_list_append (tooltips->tips_data_list, tooltipsdata); - g_signal_connect_after (widget, "event-after", + g_signal_connect_after (widget, "event_after", G_CALLBACK (gtk_tooltips_event_handler), tooltipsdata); diff --git a/gtk/gtktree.c b/gtk/gtktree.c index c123c0deb1..72102f0ce6 100644 --- a/gtk/gtktree.c +++ b/gtk/gtktree.c @@ -143,7 +143,7 @@ gtk_tree_class_init (GtkTreeClass *class) class->unselect_child = gtk_real_tree_unselect_child; tree_signals[SELECTION_CHANGED] = - gtk_signal_new (I_("selection_changed"), + gtk_signal_new (I_("selection-changed"), GTK_RUN_FIRST, GTK_CLASS_TYPE (object_class), GTK_SIGNAL_OFFSET (GtkTreeClass, selection_changed), diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index f13c5ec74a..740b293f4d 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -248,8 +248,7 @@ gtk_tree_store_new (gint n_columns, GType type = va_arg (args, GType); if (! _gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s passed to gtk_tree_store_new_with_types\n", - G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); g_object_unref (retval); return NULL; } @@ -284,8 +283,7 @@ gtk_tree_store_newv (gint n_columns, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s passed to gtk_tree_store_new_with_types\n", - G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); g_object_unref (retval); return NULL; } @@ -322,7 +320,7 @@ gtk_tree_store_set_column_types (GtkTreeStore *tree_store, { if (! _gtk_tree_data_list_check_type (types[i])) { - g_warning ("%s: Invalid type %s passed to gtk_tree_store_set_column_types\n", G_STRLOC, g_type_name (types[i])); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i])); continue; } gtk_tree_store_set_column_type (tree_store, i, types[i]); @@ -378,7 +376,7 @@ gtk_tree_store_set_column_type (GtkTreeStore *tree_store, { if (!_gtk_tree_data_list_check_type (type)) { - g_warning ("%s: Invalid type %s passed to gtk_tree_store_new_with_types\n", G_STRLOC, g_type_name (type)); + g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type)); return; } tree_store->column_headers[column] = type; diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index e96c446699..6eb50303d9 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -10060,7 +10060,7 @@ gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view) "activate", G_CALLBACK (gtk_tree_view_search_activate), tree_view); g_signal_connect (GTK_ENTRY (tree_view->priv->search_entry)->im_context, - "preedit-changed", + "preedit_changed", G_CALLBACK (gtk_tree_view_search_preedit_changed), tree_view); gtk_container_add (GTK_CONTAINER (vbox), diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 3c6998ddca..5f82e2b435 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -2426,7 +2426,7 @@ update_node (GtkUIManager *self, /* don't show accels in popups */ GtkWidget *label = GTK_BIN (info->proxy)->child; g_object_set (label, - "accel_closure", NULL, + "accel-closure", NULL, NULL); } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 64e0e8034b..45b9376f38 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -745,7 +745,7 @@ gtk_widget_class_init (GtkWidgetClass *klass) G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); widget_signals[EVENT_AFTER] = - g_signal_new (I_("event-after"), + g_signal_new (I_("event_after"), G_TYPE_FROM_CLASS (gobject_class), 0, 0, |