Commit 0f2ff4d6 authored by Johannes Schmid's avatar Johannes Schmid
Browse files

Initial gtk+ 3.0 port (compiles but doesn't work)

parent cbc454d0
## Previewer
bin_PROGRAMS = glade-previewer
glade_previewer_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
-DGLADE_GNOMEHELPDIR="\"$(HELP_DIR)\""
$(AM_CPPFLAGS)
glade_previewer_CFLAGS = \
$(GTK_CFLAGS) \
$(IGE_MAC_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS)
glade_previewer_LDFLAGS = $(AM_LDFLAGS)
glade_previewer_LDADD = $(top_builddir)/gladeui/libgladeui-2.la $(IGE_MAC_LIBS)
glade_previewer_SOURCES = \
glade-previewer.c
if NATIVE_WIN32
glade_previewer_LDADD += glade-win32-res.o
if !GLADE_UNSTABLE
glade_previewer_LDFLAGS += -mwindows
endif
endif
glade-win32-res.o: glade-previewer.rc
$(WINDRES) $< $@
## Rest of the UI ;)
common_defines = \
......
......@@ -447,7 +447,7 @@ glade_app_init (GladeApp *app)
/* Create Editor */
app->priv->editor = GLADE_EDITOR (glade_editor_new ());
g_object_ref_sink (GTK_OBJECT (app->priv->editor));
g_object_ref_sink (G_OBJECT (app->priv->editor));
glade_editor_refresh (app->priv->editor);
......
......@@ -632,17 +632,15 @@ child_realize (GtkWidget *widget, GtkWidget *parent)
window = gtk_widget_get_window (widget);
gdk_drawable_get_size (GDK_DRAWABLE (window),
&attributes.width,
&attributes.height);
attributes.width = gdk_window_get_width (window);
attributes.height = gdk_window_get_width (window);
attributes.window_type = GDK_WINDOW_OFFSCREEN;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.event_mask = gdk_window_get_events (window);
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
new_window = gdk_window_new (NULL, &attributes, GDK_WA_VISUAL | GDK_WA_COLORMAP);
new_window = gdk_window_new (NULL, &attributes, GDK_WA_VISUAL);
gtk_widget_set_window (widget, new_window);
gdk_window_set_user_data (new_window, parent);
......@@ -754,11 +752,11 @@ draw_frame (GtkWidget *widget,
}
static gboolean
glade_design_layout_expose_event (GtkWidget *widget, GdkEventExpose *ev)
glade_design_layout_draw (GtkWidget *widget, cairo_t *cr)
{
GladeDesignLayout *layout = GLADE_DESIGN_LAYOUT (widget);
if (ev->window == gtk_widget_get_window (widget))
if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
{
GtkStyle *style;
GtkAllocation allocation;
......@@ -766,7 +764,6 @@ glade_design_layout_expose_event (GtkWidget *widget, GdkEventExpose *ev)
GdkWindow *window;
gint x, y, w, h;
gint border_width;
cairo_t *cr;
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
......@@ -776,8 +773,6 @@ glade_design_layout_expose_event (GtkWidget *widget, GdkEventExpose *ev)
child = layout->child;
cr = gdk_cairo_create (window);
/* draw a white widget background */
glade_utils_cairo_draw_rectangle (cr,
&style->base [gtk_widget_get_state (widget)],
......@@ -789,16 +784,18 @@ glade_design_layout_expose_event (GtkWidget *widget, GdkEventExpose *ev)
if (child && gtk_widget_get_visible (child))
{
GdkPixmap *child_pixmap = gdk_offscreen_window_get_pixmap (gtk_widget_get_window (child));
GdkWindow* child_window = gtk_widget_get_window (child);
gdk_drawable_get_size (GDK_DRAWABLE (child_pixmap), &w, &h);
w = gdk_window_get_width (child_window);
h = gdk_window_get_height (child_window);
x = allocation.x + border_width;
y = allocation.y + border_width;
g_message ("aaaa %d %d %d %d ", x, y, w, h);
gdk_cairo_set_source_pixmap (cr, child_pixmap, 0, 0);
gdk_cairo_set_source_window (cr, child_window, 0, 0);
cairo_rectangle (cr, x + OUTLINE_WIDTH/2, y + OUTLINE_WIDTH/2, w, h);
cairo_paint (cr);
......@@ -809,13 +806,8 @@ glade_design_layout_expose_event (GtkWidget *widget, GdkEventExpose *ev)
draw_frame (widget, cr, x, y, w, h);
}
cairo_destroy (cr);
return TRUE;
}
else if (ev->window == gtk_widget_get_window (layout->child))
{
g_message ("ev->window == layout->child->window");
}
return FALSE;
}
......@@ -935,7 +927,7 @@ glade_design_layout_class_init (GladeDesignLayoutClass *klass)
widget_class->leave_notify_event = glade_design_layout_leave_notify_event;
widget_class->button_press_event = glade_design_layout_button_press_event;
widget_class->button_release_event = glade_design_layout_button_release_event;
widget_class->expose_event = glade_design_layout_expose_event;
widget_class->draw = glade_design_layout_draw;
widget_class->size_request = glade_design_layout_size_request;
widget_class->size_allocate = glade_design_layout_size_allocate;
......
......@@ -1229,9 +1229,7 @@ glade_eprop_color_load (GladeEditorProperty *eprop, GladeProperty *property)
/* Manually fill it with black for an NULL value.
*/
if (gdk_color_parse("Black", &black) &&
gdk_colormap_alloc_color(gtk_widget_get_default_colormap(),
&black, FALSE, TRUE))
if (gdk_color_parse("Black", &black))
gtk_color_button_set_color
(GTK_COLOR_BUTTON (eprop_color->cbutton),
&black);
......@@ -1530,7 +1528,7 @@ glade_eprop_text_load (GladeEditorProperty *eprop, GladeProperty *property)
if (GTK_IS_COMBO_BOX (eprop_text->text_entry))
{
if (GTK_IS_COMBO_BOX_ENTRY (eprop_text->text_entry))
if (gtk_combo_box_get_has_entry (GTK_COMBO_BOX (eprop_text->text_entry)))
{
const gchar *text = g_value_get_string (property->value);
if (!text) text = "";
......@@ -2064,7 +2062,7 @@ eprop_text_stock_changed (GtkComboBox *combo,
glade_eprop_text_changed_common (eprop, text, eprop->use_command);
g_free (text);
}
else if (GTK_IS_COMBO_BOX_ENTRY (combo))
else if (gtk_combo_box_get_has_entry (combo))
{
str = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo))));
glade_eprop_text_changed_common (eprop, str, eprop->use_command);
......@@ -2086,7 +2084,7 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
{
GtkCellRenderer *renderer;
GtkWidget *child;
GtkWidget *combo = gtk_combo_box_entry_new ();
GtkWidget *combo = gtk_combo_box_new_with_entry ();
eprop_text->store = (GtkTreeModel *)
glade_eprop_text_create_store (klass->stock ? GLADE_TYPE_STOCK :
......@@ -2095,7 +2093,7 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (eprop_text->store));
/* let the comboboxentry prepend its intrusive cell first... */
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo),
gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (combo),
COMBO_COLUMN_TEXT);
renderer = gtk_cell_renderer_pixbuf_new ();
......
......@@ -1231,14 +1231,14 @@ glade_named_icon_chooser_dialog_unmap (GtkWidget *widget)
* to be fully painted before loading begins
*/
static gboolean
glade_named_icon_chooser_dialog_expose_event (GtkWidget *widget,
GdkEventExpose *event)
glade_named_icon_chooser_dialog_draw (GtkWidget *widget,
cairo_t *cr)
{
GladeNamedIconChooserDialog *dialog = GLADE_NAMED_ICON_CHOOSER_DIALOG (widget);
gboolean retval;
retval = GTK_WIDGET_CLASS (glade_named_icon_chooser_dialog_parent_class)->expose_event (widget,
event);
retval = GTK_WIDGET_CLASS (glade_named_icon_chooser_dialog_parent_class)->draw (widget,
cr);
if (!dialog->priv->icons_loaded)
{
change_icon_theme (GLADE_NAMED_ICON_CHOOSER_DIALOG (widget));
......@@ -1522,7 +1522,7 @@ glade_named_icon_chooser_dialog_class_init (GladeNamedIconChooserDialogClass *kl
widget_class->map = glade_named_icon_chooser_dialog_map;
widget_class->unmap = glade_named_icon_chooser_dialog_unmap;
widget_class->expose_event = glade_named_icon_chooser_dialog_expose_event;
widget_class->draw = glade_named_icon_chooser_dialog_draw;
widget_class->show_all = glade_named_icon_chooser_dialog_show_all;
widget_class->style_set = glade_named_icon_chooser_dialog_style_set;
widget_class->screen_changed = glade_named_icon_chooser_dialog_screen_changed;
......
......@@ -59,8 +59,8 @@ static void glade_placeholder_size_allocate (GtkWidget *widget,
static void glade_placeholder_send_configure (GladePlaceholder *placeholder);
static gboolean glade_placeholder_expose (GtkWidget *widget,
GdkEventExpose *event);
static gboolean glade_placeholder_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean glade_placeholder_motion_notify_event (GtkWidget *widget,
GdkEventMotion *event);
......@@ -98,23 +98,10 @@ glade_placeholder_class_init (GladePlaceholderClass *klass)
object_class->finalize = glade_placeholder_finalize;
widget_class->realize = glade_placeholder_realize;
widget_class->size_allocate = glade_placeholder_size_allocate;
widget_class->expose_event = glade_placeholder_expose;
widget_class->draw = glade_placeholder_draw;
widget_class->motion_notify_event = glade_placeholder_motion_notify_event;
widget_class->button_press_event = glade_placeholder_button_press;
widget_class->popup_menu = glade_placeholder_popup_menu;
/* Avoid warnings when adding placeholders to scrolled windows */
widget_class->set_scroll_adjustments_signal =
g_signal_new ("set-scroll-adjustments",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
0, /* G_STRUCT_OFFSET (GladePlaceholderClass, set_scroll_adjustments) */
NULL, NULL,
glade_marshal_VOID__OBJECT_OBJECT,
G_TYPE_NONE, 2,
GTK_TYPE_ADJUSTMENT,
GTK_TYPE_ADJUSTMENT);
}
static void
......@@ -139,7 +126,6 @@ glade_placeholder_notify_parent (GObject *gobject,
static void
glade_placeholder_init (GladePlaceholder *placeholder)
{
placeholder->placeholder_pixmap = NULL;
placeholder->packing_actions = NULL;
gtk_widget_set_can_focus (GTK_WIDGET (placeholder), TRUE);
......@@ -174,11 +160,6 @@ glade_placeholder_finalize (GObject *object)
g_return_if_fail (GLADE_IS_PLACEHOLDER (object));
placeholder = GLADE_PLACEHOLDER (object);
/* placeholder->placeholder_pixmap can be NULL if the placeholder is
* destroyed before it's realized */
if (placeholder->placeholder_pixmap)
g_object_unref (placeholder->placeholder_pixmap);
if (placeholder->packing_actions)
{
g_list_foreach (placeholder->packing_actions, (GFunc)g_object_unref, NULL);
......@@ -211,7 +192,6 @@ glade_placeholder_realize (GtkWidget *widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.event_mask =
gtk_widget_get_events (widget) |
GDK_EXPOSURE_MASK |
......@@ -219,7 +199,7 @@ glade_placeholder_realize (GtkWidget *widget)
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
gtk_widget_set_window (widget, window);
......@@ -228,16 +208,6 @@ glade_placeholder_realize (GtkWidget *widget)
gtk_widget_style_attach (widget);
glade_placeholder_send_configure (GLADE_PLACEHOLDER (widget));
if (!placeholder->placeholder_pixmap)
{
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (placeholder_xpm);
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &placeholder->placeholder_pixmap, NULL, 1);
g_assert(G_IS_OBJECT(placeholder->placeholder_pixmap));
}
gdk_window_set_back_pixmap (gtk_widget_get_window (GTK_WIDGET (placeholder)), placeholder->placeholder_pixmap, FALSE);
}
static void
......@@ -288,13 +258,11 @@ glade_placeholder_get_project (GladePlaceholder *placeholder)
}
static gboolean
glade_placeholder_expose (GtkWidget *widget, GdkEventExpose *event)
glade_placeholder_draw (GtkWidget *widget, cairo_t *cr)
{
GtkStyle *style;
GdkColor *light;
GdkColor *dark;
cairo_t *cr;
gint w, h;
g_return_val_if_fail (GLADE_IS_PLACEHOLDER (widget), FALSE);
......@@ -302,19 +270,21 @@ glade_placeholder_expose (GtkWidget *widget, GdkEventExpose *event)
light = &style->light[GTK_STATE_NORMAL];
dark = &style->dark[GTK_STATE_NORMAL];
gdk_drawable_get_size (event->window, &w, &h);
cr = gdk_cairo_create (event->window);
cairo_set_line_width (cr, 1.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
glade_utils_cairo_draw_line (cr, light, 0, 0, w - 1, 0);
glade_utils_cairo_draw_line (cr, light, 0, 0, 0, h - 1);
glade_utils_cairo_draw_line (cr, dark, 0, h - 1, w - 1, h - 1);
glade_utils_cairo_draw_line (cr, dark, w - 1, 0, w - 1, h - 1);
gdk_cairo_set_source_color (cr, light);
cairo_move_to (cr, 0, 0);
cairo_line_to (cr, 1, 0);
cairo_move_to (cr, 0, 0);
cairo_line_to (cr, 0, 1);
cairo_destroy (cr);
gdk_cairo_set_source_color (cr, light);
cairo_move_to (cr, 0, 1);
cairo_line_to (cr, 1, 1);
cairo_line_to (cr, 1, 0);
glade_util_draw_selection_nodes (event->window);
glade_util_draw_selection_nodes (widget, cr);
return FALSE;
}
......
......@@ -43,8 +43,6 @@ typedef struct _GladePlaceholderClass GladePlaceholderClass;
struct _GladePlaceholder
{
GtkWidget widget;
GdkPixmap *placeholder_pixmap;
GList *packing_actions;
};
......
......@@ -731,9 +731,7 @@ glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class
{
if (property_class->pspec->value_type == GDK_TYPE_COLOR)
{
if (gdk_color_parse(string, &color) &&
gdk_colormap_alloc_color(gtk_widget_get_default_colormap(),
&color, FALSE, TRUE))
if (gdk_color_parse(string, &color))
g_value_set_boxed(value, &color);
else
g_warning ("could not parse colour name `%s'", string);
......
......@@ -787,34 +787,18 @@ glade_util_can_draw_nodes (GtkWidget *sel_widget, GdkWindow *sel_win,
*
*/
void
glade_util_draw_selection_nodes (GdkWindow *expose_win)
glade_util_draw_selection_nodes (GtkWidget* expose_widget, cairo_t *cr)
{
GtkWidget *expose_widget;
gint expose_win_x, expose_win_y;
gint expose_win_w, expose_win_h;
#if 0
GdkWindow *expose_toplevel;
GdkColor *color;
GList *elem;
cairo_t *cr;
g_return_if_fail (GDK_IS_WINDOW (expose_win));
/* Find the corresponding GtkWidget */
gdk_window_get_user_data (expose_win, (gpointer)&expose_widget);
GtkAllocation expose_allocation;
color = &(gtk_widget_get_style (expose_widget)->black);
/* Calculate the offset of the expose window within its toplevel. */
glade_util_calculate_window_offset (expose_win,
&expose_win_x,
&expose_win_y,
&expose_toplevel);
gdk_drawable_get_size (expose_win,
&expose_win_w, &expose_win_h);
cr = gdk_cairo_create (expose_win);
gtk_widget_get_allocation (expose_widget, &expose_allocation);
/* Step through all the selected widgets. */
for (elem = glade_util_selection; elem; elem = elem->next) {
......@@ -836,25 +820,24 @@ glade_util_draw_selection_nodes (GdkWindow *expose_win)
event is in the same toplevel as the selected widget. */
if (expose_toplevel == sel_toplevel
&& glade_util_can_draw_nodes (sel_widget, sel_win,
expose_win)) {
GtkAllocation allocation;
cr)) {
GtkAllocation allocation;
gtk_widget_get_allocation (sel_widget, &allocation);
x = sel_x + allocation.x - expose_win_x;
y = sel_y + allocation.y - expose_win_y;
x = sel_x + allocation.x - expose_allocation.x;
y = sel_y + allocation.y - expose_allocation.y;
w = allocation.width;
h = allocation.height;
/* Draw the selection nodes if they intersect the
expose window bounds. */
if (x < expose_win_w && x + w >= 0
&& y < expose_win_h && y + h >= 0) {
if (x < expose_allocation.width && x + w >= 0
&& y < expose_allocation.height && y + h >= 0) {
glade_util_draw_nodes (cr, color, x, y, w, h);
}
}
}
cairo_destroy (cr);
#endif
}
/**
......
......@@ -72,7 +72,7 @@ void glade_util_clear_selection (void);
GList *glade_util_get_selection (void);
void glade_util_draw_selection_nodes (GdkWindow *expose_win);
void glade_util_draw_selection_nodes (GtkWidget* expose_widget, cairo_t *cr);
GList *glade_util_container_get_all_children (GtkContainer *container);
......
......@@ -393,12 +393,8 @@ gwa_clone_parent_properties (GladeWidgetAdaptor *adaptor, gboolean is_packing)
if (strcmp (adaptor->priv->catalog,
parent_adaptor->priv->catalog))
{
pclass->version_since_major =
pclass->version_since_major = 0;
pclass->builder_since_major =
pclass->builder_since_major = 0;
pclass->version_since_major = 0;
pclass->builder_since_major = 0;
}
properties = g_list_prepend (properties, pclass);
}
......@@ -547,8 +543,7 @@ gwa_inherit_signals (GladeWidgetAdaptor *adaptor)
/* Reset versioning in derived catalogs just once */
if (strcmp (adaptor->priv->catalog,
parent_adaptor->priv->catalog))
signal->version_since_major =
signal->version_since_major = 0;
signal->version_since_major = 0;
else
{
signal->version_since_major =
......@@ -601,9 +596,8 @@ glade_widget_adaptor_constructor (GType type,
}
/* Detect scrollability */
if (g_type_is_a (adaptor->type, GTK_TYPE_WIDGET) &&
GTK_WIDGET_CLASS (object_class)->set_scroll_adjustments_signal != 0)
GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->scrollable = TRUE;
if (g_type_is_a (adaptor->type, GTK_TYPE_SCROLLABLE))
GLADE_WIDGET_ADAPTOR_GET_CLASS(adaptor)->scrollable = TRUE;
/* Inherit packing defaults here */
adaptor->child_packings = gwa_inherit_child_packing (adaptor);
......
......@@ -1782,11 +1782,11 @@ glade_widget_set_adaptor (GladeWidget *widget, GladeWidgetAdaptor *adaptor)
}
static gboolean
expose_draw_selection (GtkWidget *widget_gtk,
GdkEventExpose *event,
GladeWidget *gwidget)
draw_selection (GtkWidget *widget_gtk,
cairo_t *cr,
GladeWidget *gwidget)
{
glade_util_draw_selection_nodes (event->window);
glade_util_draw_selection_nodes (widget_gtk, cr);
return FALSE;
}
......@@ -1817,8 +1817,8 @@ glade_widget_connect_signal_handlers (GtkWidget *widget_gtk,
g_signal_connect (G_OBJECT (widget_gtk), "event",
callback, gwidget);
g_signal_connect_after (G_OBJECT (widget_gtk), "expose-event",
G_CALLBACK (expose_draw_selection), gwidget);
g_signal_connect_after (G_OBJECT (widget_gtk), "draw",
G_CALLBACK (draw_selection), gwidget);
g_object_set_data (G_OBJECT (widget_gtk),
......@@ -3329,8 +3329,6 @@ glade_widget_set_object (GladeWidget *gwidget, GObject *new_object)
/* Add internal reference to new widget if its not internal */
if (gwidget->internal)
gwidget->object = G_OBJECT(new_object);
else if (GTK_IS_OBJECT (new_object))
gwidget->object = g_object_ref (G_OBJECT(new_object));
else
/* If this is a base GObject; assume ownership of the initial ref count */
gwidget->object = new_object;
......
......@@ -4909,7 +4909,7 @@ glade_gtk_entry_read_widget (GladeWidgetAdaptor *adaptor,
glade_property_sync (property);
}
#if 0
/* ----------------------------- GtkFixed/GtkLayout ------------------------------ */
static void
glade_gtk_fixed_layout_finalize(GdkPixmap *backing)
......@@ -5006,6 +5006,7 @@ glade_gtk_fixed_layout_remove_child (GladeWidgetAdaptor *adaptor,
gtk_container_remove (GTK_CONTAINER (object), GTK_WIDGET (child));
}
#endif
/* ----------------------------- GtkWindow ------------------------------ */
static void
......@@ -8771,7 +8772,7 @@ glade_gtk_combo_box_set_items (GObject *object, const GValue *value)
if (split)
for (i = 0; split[i] != NULL; i++)
if (split[i][0] != '\0')
gtk_combo_box_append_text (combo, split[i]);
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), split[i]);
}
void
......@@ -8812,7 +8813,7 @@ glade_gtk_combo_box_entry_get_internal_child (GladeWidgetAdaptor *adaptor,
const gchar *name)
{
GObject *child = NULL;
g_return_val_if_fail (GTK_IS_COMBO_BOX_ENTRY (object), NULL);
g_return_val_if_fail (GTK_IS_COMBO_BOX (object), NULL);
if (strcmp ("entry", name) == 0)
child = G_OBJECT (gtk_bin_get_child (GTK_BIN (object)));
......@@ -8830,7 +8831,7 @@ glade_gtk_combo_box_entry_set_property (GladeWidgetAdaptor *adaptor,
if (!strcmp (id, "text-column"))
{
if (g_value_get_int (value) >= 0)
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (object),
gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (object),
g_value_get_int (value));
}
else
......
......@@ -934,8 +934,9 @@ glade_eprop_icon_sources_create_input (GladeEditorProperty *eprop)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
eprop_sources->icon_names_store = gtk_list_store_new (1, G_TYPE_STRING);
eprop_sources->combo = gtk_combo_box_entry_new_with_model
(GTK_TREE_MODEL (eprop_sources->icon_names_store), 0);
eprop_sources->combo = gtk_combo_box_new_with_entry ();
gtk_combo_box_set_model (GTK_COMBO_BOX (eprop_sources->combo),
GTK_TREE_MODEL (eprop_sources->icon_names_store));
g_signal_connect (G_OBJECT (gtk_bin_get_child (GTK_BIN (eprop_sources->combo))), "activate",
G_CALLBACK (icon_name_entry_activated), eprop);
......
......@@ -1239,10 +1239,10 @@ glade_eprop_model_data_create_input (GladeEditorProperty *eprop)
gtk_misc_set_padding (GTK_MISC (label), 2, 0);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
combo = gtk_combo_box_new_text ();
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Off"));
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Horizontal"));
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Vertical"));
combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Off"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Horizontal"));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Vertical"));
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), eprop_data->sequence);
......
......@@ -2409,10 +2409,8 @@ create_preview_tool_button (GtkToolbar *toolbar)
button = gtk_tool_button_new_from_stock (GTK_STOCK_EXECUTE);
gtk_tool_button_set_label (GTK_TOOL_BUTTON(button), _("Preview snapshot"));
gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (button),
toolbar->tooltips,
_("Previews snapshot of project"),
NULL);
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button),
_("Previews snapshot of project"));
gtk_widget_show (GTK_WIDGET (button));
......
Markdown is supported
0% <