diff options
Diffstat (limited to 'widgets/text')
-rw-r--r-- | widgets/text/e-completion-callbacks.c | 2 | ||||
-rw-r--r-- | widgets/text/e-completion-view.c | 4 | ||||
-rw-r--r-- | widgets/text/e-entry.c | 22 | ||||
-rw-r--r-- | widgets/text/e-text-model-uri.c | 6 | ||||
-rw-r--r-- | widgets/text/e-text.c | 28 |
5 files changed, 30 insertions, 32 deletions
diff --git a/widgets/text/e-completion-callbacks.c b/widgets/text/e-completion-callbacks.c index b819513141..229a28d760 100644 --- a/widgets/text/e-completion-callbacks.c +++ b/widgets/text/e-completion-callbacks.c @@ -92,7 +92,7 @@ e_completion_callbacks_new (ECompletionCallbacksRequestCompletionFn request_comp g_return_val_if_fail (request_completion != NULL, NULL); g_return_val_if_fail (end_completion != NULL, NULL); - cc = gtk_type_new (E_COMPLETION_CALLBACKS_TYPE); + cc = g_object_new (E_COMPLETION_CALLBACKS_TYPE, NULL); cc->request_completion = request_completion; cc->end_completion = end_completion; diff --git a/widgets/text/e-completion-view.c b/widgets/text/e-completion-view.c index 57d02bb865..0837160d6f 100644 --- a/widgets/text/e-completion-view.c +++ b/widgets/text/e-completion-view.c @@ -810,7 +810,7 @@ e_completion_view_set_width (ECompletionView *cv, gint width) w = GTK_WIDGET (cv); if (! GTK_WIDGET_REALIZED (w)) { - gtk_widget_set_usize (w, width, -1); + gtk_widget_set_size_request (w, width, -1); return; } @@ -841,7 +841,7 @@ e_completion_view_set_width (ECompletionView *cv, gint width) /* We reduce the total height by a bit; in practice, this seems to work out well. */ final_height = (gint) floor (line_height * (0.5 + (float)lines) * 0.97); - gtk_widget_set_usize (w, width, final_height); + gtk_widget_set_size_request (w, width, final_height); } void diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c index d5f7cb4fe9..979048671f 100644 --- a/widgets/text/e-entry.c +++ b/widgets/text/e-entry.c @@ -243,7 +243,7 @@ static void e_entry_text_keypress (EText *text, guint keyval, guint state, EEntry *entry) { if (entry->priv->changed_since_keypress_tag) { - gtk_timeout_remove (entry->priv->changed_since_keypress_tag); + g_source_remove (entry->priv->changed_since_keypress_tag); entry->priv->changed_since_keypress_tag = 0; } @@ -276,9 +276,9 @@ static void proxy_changed (EText *text, EEntry *entry) { if (entry->priv->changed_since_keypress_tag) - gtk_timeout_remove (entry->priv->changed_since_keypress_tag); + g_source_remove (entry->priv->changed_since_keypress_tag); entry->priv->changed_since_keypress = TRUE; - entry->priv->changed_since_keypress_tag = gtk_timeout_add (20, changed_since_keypress_timeout_fn, entry); + entry->priv->changed_since_keypress_tag = g_timeout_add (20, changed_since_keypress_timeout_fn, entry); g_signal_emit (entry, e_entry_signals [E_ENTRY_CHANGED], 0); } @@ -599,7 +599,7 @@ e_entry_start_delayed_completion (EEntry *entry, gint delay) return; e_entry_cancel_delayed_completion (entry); - entry->priv->completion_delay_tag = gtk_timeout_add (MAX (delay, 1), start_delayed_cb, entry); + entry->priv->completion_delay_tag = g_timeout_add (MAX (delay, 1), start_delayed_cb, entry); } static void @@ -609,7 +609,7 @@ e_entry_cancel_delayed_completion (EEntry *entry) return; if (entry->priv->completion_delay_tag) { - gtk_timeout_remove (entry->priv->completion_delay_tag); + g_source_remove (entry->priv->completion_delay_tag); entry->priv->completion_delay_tag = 0; } } @@ -778,8 +778,7 @@ e_entry_enable_completion_full (EEntry *entry, ECompletion *completion, gint del g_return_if_fail (entry->priv->completion == NULL); entry->priv->completion = completion; - g_object_ref (completion); - gtk_object_sink (GTK_OBJECT (completion)); + g_object_ref_sink (completion); entry->priv->completion_delay = delay; entry->priv->handler = handler; @@ -840,8 +839,7 @@ e_entry_enable_completion_full (EEntry *entry, ECompletion *completion, gint del e_completion_view_connect_keys (E_COMPLETION_VIEW (entry->priv->completion_view), GTK_WIDGET (entry->canvas)); - g_object_ref (entry->priv->completion_view_popup); - gtk_object_sink (GTK_OBJECT (entry->priv->completion_view_popup)); + g_object_ref_sink (entry->priv->completion_view_popup); gtk_window_set_policy (GTK_WINDOW (entry->priv->completion_view_popup), TRUE, TRUE, TRUE); gtk_container_add (GTK_CONTAINER (entry->priv->completion_view_popup), entry->priv->completion_view); gtk_widget_show (entry->priv->completion_view); @@ -1106,7 +1104,7 @@ e_entry_dispose (GObject *object) if (entry->priv) { if (entry->priv->completion_delay_tag) - gtk_timeout_remove (entry->priv->completion_delay_tag); + g_source_remove (entry->priv->completion_delay_tag); if (entry->priv->completion) g_object_unref (entry->priv->completion); @@ -1123,7 +1121,7 @@ e_entry_dispose (GObject *object) g_free (entry->priv->pre_browse_text); if (entry->priv->changed_since_keypress_tag) - gtk_timeout_remove (entry->priv->changed_since_keypress_tag); + g_source_remove (entry->priv->changed_since_keypress_tag); g_free (entry->priv); entry->priv = NULL; @@ -1201,7 +1199,7 @@ e_entry_class_init (GObjectClass *object_class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EEntryClass, completion_popup), NULL, NULL, - gtk_marshal_NONE__INT, + g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); g_object_class_install_property (object_class, PROP_MODEL, diff --git a/widgets/text/e-text-model-uri.c b/widgets/text/e-text-model-uri.c index 6736b41cde..95ce7cc076 100644 --- a/widgets/text/e-text-model-uri.c +++ b/widgets/text/e-text-model-uri.c @@ -96,7 +96,7 @@ e_text_model_uri_dispose (GObject *object) GList *iter; if (model_uri->objectify_idle) { - gtk_idle_remove (model_uri->objectify_idle); + g_source_remove (model_uri->objectify_idle); model_uri->objectify_idle = 0; } @@ -252,7 +252,7 @@ e_text_model_uri_objectify (ETextModel *model) ETextModelURI *model_uri = E_TEXT_MODEL_URI (model); if (model_uri->objectify_idle == 0) - model_uri->objectify_idle = gtk_idle_add (objectify_idle_cb, model); + model_uri->objectify_idle = g_idle_add (objectify_idle_cb, model); if (E_TEXT_MODEL_CLASS(parent_class)->objectify) E_TEXT_MODEL_CLASS(parent_class)->objectify (model); @@ -262,7 +262,7 @@ static void objectify_idle_flush (ETextModelURI *model_uri) { if (model_uri->objectify_idle) { - gtk_idle_remove (model_uri->objectify_idle); + g_source_remove (model_uri->objectify_idle); model_uri->objectify_idle = 0; objectify_uris (model_uri); } diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 0ae2d2203d..be81a88232 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -244,17 +244,17 @@ e_text_dispose (GObject *object) } if ( text->tooltip_timeout ) { - gtk_timeout_remove (text->tooltip_timeout); + g_source_remove (text->tooltip_timeout); text->tooltip_timeout = 0; } if ( text->dbl_timeout ) { - gtk_timeout_remove (text->dbl_timeout); + g_source_remove (text->dbl_timeout); text->dbl_timeout = 0; } if ( text->tpl_timeout ) { - gtk_timeout_remove (text->tpl_timeout); + g_source_remove (text->tpl_timeout); text->tpl_timeout = 0; } @@ -2093,9 +2093,9 @@ _do_tooltip (gpointer data) gtk_widget_show (canvas); gtk_widget_realize (tooltip_window); - gtk_widget_set_usize (tooltip_window, - tooltip_width + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0), - tooltip_height + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0)); + gtk_widget_set_size_request (tooltip_window, + tooltip_width + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0), + tooltip_height + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0)); gnome_canvas_set_scroll_region (GNOME_CANVAS(canvas), 0.0, 0.0, tooltip_width + (text->draw_borders ? BORDER_INDENT * 2 : 0), (double)tooltip_height + (text->draw_borders ? BORDER_INDENT * 2 : 0)); @@ -2295,7 +2295,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) text->tooltip_count --; if ( text->tooltip_count == 0 && text->clip) { if ( text->tooltip_timeout ) { - gtk_timeout_remove (text->tooltip_timeout); + g_source_remove (text->tooltip_timeout); text->tooltip_timeout = 0; } } @@ -2344,7 +2344,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_BUTTON_PRESS: /* Fall Through */ case GDK_BUTTON_RELEASE: if (text->tooltip_timeout) { - gtk_timeout_remove (text->tooltip_timeout); + g_source_remove (text->tooltip_timeout); text->tooltip_timeout = 0; } e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(text)->canvas)); @@ -2394,13 +2394,13 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) if (event->type == GDK_BUTTON_PRESS) { if (text->dbl_timeout == 0 && text->tpl_timeout == 0) { - text->dbl_timeout = gtk_timeout_add (200, - _click, - &(text->dbl_timeout)); + text->dbl_timeout = g_timeout_add (200, + _click, + &(text->dbl_timeout)); } else { if (text->tpl_timeout == 0) { e_tep_event.type = GDK_2BUTTON_PRESS; - text->tpl_timeout = gtk_timeout_add (200, _click, &(text->tpl_timeout)); + text->tpl_timeout = g_timeout_add (200, _click, &(text->tpl_timeout)); } else { e_tep_event.type = GDK_3BUTTON_PRESS; } @@ -2445,7 +2445,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) { if ( text->tooltip_count == 0 && text->clip) { if (!text->tooltip_timeout) - text->tooltip_timeout = gtk_timeout_add (2000, _do_tooltip, text); + text->tooltip_timeout = g_timeout_add (2000, _do_tooltip, text); } text->tooltip_count ++; } @@ -2463,7 +2463,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) text->tooltip_count --; if ( text->tooltip_count == 0 && text->clip) { if ( text->tooltip_timeout ) { - gtk_timeout_remove (text->tooltip_timeout); + g_source_remove (text->tooltip_timeout); text->tooltip_timeout = 0; } } |