aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-activity-proxy.c2
-rw-r--r--widgets/misc/e-buffer-tagger.c4
-rw-r--r--widgets/misc/e-calendar-item.c4
-rw-r--r--widgets/misc/e-calendar.c17
-rw-r--r--widgets/misc/e-canvas-background.c4
-rw-r--r--widgets/misc/e-canvas.c4
-rw-r--r--widgets/misc/e-dateedit.c4
-rw-r--r--widgets/misc/e-hinted-entry.c4
-rw-r--r--widgets/misc/e-map.c41
-rw-r--r--widgets/misc/e-online-button.c4
-rw-r--r--widgets/misc/e-search-bar.c4
11 files changed, 1 insertions, 91 deletions
diff --git a/widgets/misc/e-activity-proxy.c b/widgets/misc/e-activity-proxy.c
index 825aae04d6..c503e5e26d 100644
--- a/widgets/misc/e-activity-proxy.c
+++ b/widgets/misc/e-activity-proxy.c
@@ -278,7 +278,7 @@ activity_proxy_init (EActivityProxy *proxy)
widget = gtk_spinner_new ();
gtk_spinner_start (GTK_SPINNER (widget));
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 3);
proxy->priv->spinner = g_object_ref (widget);
gtk_widget_show (widget);
diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c
index 9501f29d6a..b3d5a4e61e 100644
--- a/widgets/misc/e-buffer-tagger.c
+++ b/widgets/misc/e-buffer-tagger.c
@@ -308,11 +308,7 @@ update_mouse_cursor (GtkTextView *text_view, gint x, gint y)
if (hovering != hovering_over_link) {
update_state (buffer, E_BUFFER_TAGGER_STATE_IS_HOVERING, hovering);
-#if GTK_CHECK_VERSION(2,19,7)
if (hovering && gtk_widget_has_focus (GTK_WIDGET (text_view)))
-#else
- if (hovering && GTK_WIDGET_HAS_FOCUS (text_view))
-#endif
gdk_window_set_cursor (gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT), hand_cursor);
else
gdk_window_set_cursor (gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT), regular_cursor);
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 4d7506e05d..27519528c2 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1557,11 +1557,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
day_style = calitem->styles[(month_offset + 1) * 32 + day_num];
/* Get the colors & style to use for the day.*/
-#if GTK_CHECK_VERSION(2,19,7)
if ((gtk_widget_has_focus (GTK_WIDGET (item->canvas))) &&
-#else
- if ((GTK_WIDGET_HAS_FOCUS(item->canvas)) &&
-#endif
item->canvas->focused_item == item)
has_focus = TRUE;
else
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index 27ac031b8d..3164b7b976 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -266,11 +266,7 @@ e_calendar_style_set (GtkWidget *widget,
/* Set the background of the canvas window to the normal color,
or the arrow buttons are not displayed properly. */
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_realized (widget)) {
-#else
- if (GTK_WIDGET_REALIZED (widget)) {
-#endif
GtkStyle *style;
GdkWindow *window;
@@ -562,13 +558,8 @@ e_calendar_button_has_focus (ECalendar *cal)
prev_widget = GNOME_CANVAS_WIDGET(cal->prev_item)->widget;
next_widget = GNOME_CANVAS_WIDGET(cal->next_item)->widget;
-#if GTK_CHECK_VERSION(2,19,7)
ret_val = gtk_widget_has_focus (prev_widget) ||
gtk_widget_has_focus (next_widget);
-#else
- ret_val = GTK_WIDGET_HAS_FOCUS (prev_widget) ||
- GTK_WIDGET_HAS_FOCUS (next_widget);
-#endif
return ret_val;
}
@@ -595,11 +586,7 @@ e_calendar_focus (GtkWidget *widget, GtkDirectionType direction)
children[2] = cal->next_item;
/* get current focused item, if e-calendar has had focus */
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_has_focus (widget) || e_calendar_button_has_focus (cal))
-#else
- if (GTK_WIDGET_HAS_FOCUS (widget) || e_calendar_button_has_focus (cal))
-#endif
for (index = 0; index < E_CALENDAR_FOCUS_CHILDREN_NUM; ++index) {
if (canvas->focused_item == NULL)
break;
@@ -649,11 +636,7 @@ e_calendar_set_focusable (ECalendar *cal, gboolean focusable)
GTK_WIDGET_SET_FLAGS (next_widget, GTK_CAN_FOCUS);
}
else {
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_has_focus (GTK_WIDGET (cal)) || e_calendar_button_has_focus (cal)) {
-#else
- if (GTK_WIDGET_HAS_FOCUS (cal) || e_calendar_button_has_focus (cal)) {
-#endif
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (cal));
if (toplevel)
gtk_widget_grab_focus (toplevel);
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 68c2488508..28875725b3 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -437,11 +437,7 @@ ecb_style_set (ECanvasBackground *ecb,
style = gtk_widget_get_style (GTK_WIDGET (item->canvas));
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_realized (GTK_WIDGET (item->canvas))) {
-#else
- if (GTK_WIDGET_REALIZED (item->canvas)) {
-#endif
gdk_gc_set_foreground (
ecb->priv->gc, &style->base[GTK_STATE_NORMAL]);
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb));
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index db187b6e13..593c9c4530 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -568,11 +568,7 @@ e_canvas_item_grab_focus (GnomeCanvasItem *item, gboolean widget_too)
item->canvas->focused_item = item;
-#if GTK_CHECK_VERSION(2,19,7)
if (widget_too && !gtk_widget_has_focus (GTK_WIDGET(item->canvas))) {
-#else
- if (widget_too && !GTK_WIDGET_HAS_FOCUS (GTK_WIDGET(item->canvas))) {
-#endif
gtk_widget_grab_focus (GTK_WIDGET (item->canvas));
}
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 03c8f2fd47..73b649defd 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1699,11 +1699,7 @@ on_date_edit_time_selected (GtkComboBox *combo,
if (gtk_combo_box_get_active (combo) == -1)
return;
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_get_mapped (child))
-#else
- if (!GTK_WIDGET_MAPPED (child))
-#endif
return;
e_date_edit_check_time_changed (dedit);
diff --git a/widgets/misc/e-hinted-entry.c b/widgets/misc/e-hinted-entry.c
index 24bac0087c..51131cedcd 100644
--- a/widgets/misc/e-hinted-entry.c
+++ b/widgets/misc/e-hinted-entry.c
@@ -290,11 +290,7 @@ e_hinted_entry_set_text (EHintedEntry *entry,
if (text == NULL)
text = "";
-#if GTK_CHECK_VERSION(2,19,7)
if (*text == '\0' && !gtk_widget_has_focus (GTK_WIDGET (entry)))
-#else
- if (*text == '\0' && !GTK_WIDGET_HAS_FOCUS (entry))
-#endif
hinted_entry_show_hint (entry);
else {
hinted_entry_hide_hint (entry);
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index ff13e41be8..4ce8d75084 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -382,11 +382,7 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
gtk_widget_set_allocation (widget, allocation);
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_realized (widget)) {
-#else
- if (GTK_WIDGET_REALIZED (widget)) {
-#endif
GdkWindow *window;
window = gtk_widget_get_window (widget);
@@ -410,11 +406,7 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
static gint
e_map_button_press (GtkWidget *widget, GdkEventButton *event)
{
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_has_focus (widget)) gtk_widget_grab_focus (widget);
-#else
- if (!GTK_WIDGET_HAS_FOCUS (widget)) gtk_widget_grab_focus (widget);
-#endif
return TRUE;
}
@@ -649,11 +641,7 @@ e_map_window_to_world (EMap *map, gdouble win_x, gdouble win_y, gdouble *world_l
g_return_if_fail (map);
priv = map->priv;
-#if GTK_CHECK_VERSION(2,19,7)
g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (map)));
-#else
- g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map)));
-#endif
width = gdk_pixbuf_get_width (priv->map_render_pixbuf);
height = gdk_pixbuf_get_height (priv->map_render_pixbuf);
@@ -706,11 +694,7 @@ e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude)
EMapPrivate *priv;
g_return_if_fail (map);
-#if GTK_CHECK_VERSION(2,19,7)
g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (map)));
-#else
- g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map)));
-#endif
priv = map->priv;
@@ -730,11 +714,7 @@ e_map_zoom_out (EMap *map)
EMapPrivate *priv;
g_return_if_fail (map);
-#if GTK_CHECK_VERSION(2,19,7)
g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (map)));
-#else
- g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map)));
-#endif
priv = map->priv;
@@ -970,11 +950,7 @@ update_render_pixbuf (EMap *map,
gdouble zoom;
gint i;
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_get_realized (GTK_WIDGET (map)))
-#else
- if (!GTK_WIDGET_REALIZED (map))
-#endif
return;
gtk_widget_get_allocation (GTK_WIDGET (map), &allocation);
@@ -1039,13 +1015,8 @@ request_paint_area (EMap *view, GdkRectangle *area)
EMapPrivate *priv;
gint width, height;
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_is_drawable (GTK_WIDGET (view)) ||
!gtk_widget_get_realized (GTK_WIDGET (view))) return;
-#else
- if (!GTK_WIDGET_DRAWABLE (GTK_WIDGET (view)) ||
- !GTK_WIDGET_REALIZED (GTK_WIDGET (view))) return;
-#endif
priv = view->priv;
if (!priv->map_render_pixbuf) return;
@@ -1255,11 +1226,7 @@ scroll_to (EMap *view, gint x, gint y)
priv->xofs = x;
priv->yofs = y;
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_is_drawable (GTK_WIDGET (view)))
-#else
- if (!GTK_WIDGET_DRAWABLE (view))
-#endif
return;
gtk_widget_get_allocation (GTK_WIDGET (view), &allocation);
@@ -1573,11 +1540,7 @@ zoom_in_smooth (EMap *map)
gdouble x, y;
g_return_if_fail (map);
-#if GTK_CHECK_VERSION(2,19,7)
g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (map)));
-#else
- g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map)));
-#endif
gtk_widget_get_allocation (GTK_WIDGET (map), &allocation);
@@ -1744,11 +1707,7 @@ set_scroll_area (EMap *view)
priv = view->priv;
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_get_realized (GTK_WIDGET (view))) return;
-#else
- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (view))) return;
-#endif
if (!priv->hadj || !priv->vadj) return;
g_object_freeze_notify (G_OBJECT (priv->hadj));
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c
index 7c5c23b760..cb7dab1453 100644
--- a/widgets/misc/e-online-button.c
+++ b/widgets/misc/e-online-button.c
@@ -51,11 +51,7 @@ online_button_update_tooltip (EOnlineButton *button)
if (e_online_button_get_online (button))
tooltip = ONLINE_TOOLTIP;
-#if GTK_CHECK_VERSION(2,19,7)
else if (gtk_widget_get_sensitive (GTK_WIDGET (button)))
-#else
- else if (GTK_WIDGET_SENSITIVE (button))
-#endif
tooltip = OFFLINE_TOOLTIP;
else
tooltip = NETWORK_UNAVAILABLE_TOOLTIP;
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index 06b9ef6e78..aaf18b3912 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -92,11 +92,7 @@ search_bar_update_tokenizer (ESearchBar *search_bar)
tokenizer = e_search_bar_get_tokenizer (search_bar);
case_sensitive = e_search_bar_get_case_sensitive (search_bar);
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_visible (GTK_WIDGET (search_bar)))
-#else
- if (GTK_WIDGET_VISIBLE (search_bar))
-#endif
active_search = search_bar->priv->active_search;
else
active_search = NULL;