Esempio n. 1
0
static void
gimp_action_connect_proxy (GtkAction *action,
                           GtkWidget *proxy)
{
  GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);

  gimp_action_set_proxy (GIMP_ACTION (action), proxy);
  gimp_action_set_proxy_tooltip (GIMP_ACTION (action), proxy);
}
Esempio n. 2
0
static void
ephy_page_menu_action_connect_proxy (GtkAction *action,
                                     GtkWidget *proxy)
{
  if (GTK_IS_BUTTON (proxy))
    g_signal_connect (proxy, "button-press-event",
                      G_CALLBACK (button_press_cb), action);

  GTK_ACTION_CLASS (ephy_page_menu_action_parent_class)->connect_proxy (action, proxy);
}
Esempio n. 3
0
static void
gimp_throbber_action_class_init (GimpThrobberActionClass *klass)
{
  GtkActionClass *action_class = GTK_ACTION_CLASS (klass);

  parent_class = g_type_class_peek_parent (klass);

  action_class->connect_proxy     = gimp_throbber_action_connect_proxy;
  action_class->toolbar_item_type = GIMP_TYPE_THROBBER;
}
Esempio n. 4
0
static void
submenu_action_class_init (xdiff_ext_submenu_action_class* klass) {
  GtkActionClass* action_class = GTK_ACTION_CLASS (klass);
  GObjectClass* gobject_class;

  gobject_class = G_OBJECT_CLASS (klass);

  parent_class = g_type_class_peek_parent (klass);

  action_class->menu_item_type = GTK_TYPE_IMAGE_MENU_ITEM;
  action_class->create_menu_item = create_menu_item;
}
Esempio n. 5
0
static void
face_action_disconnect_proxy (GtkAction *action,
                              GtkWidget *proxy)
{
	GtkhtmlFaceActionPrivate *priv;

	priv = GTKHTML_FACE_ACTION (action)->priv;

	priv->choosers = g_list_remove (priv->choosers, proxy);

	/* Chain up to parent's disconnect_proxy() method. */
	GTK_ACTION_CLASS (parent_class)->disconnect_proxy (action, proxy);
}
Esempio n. 6
0
static void
ephy_page_menu_action_class_init (EphyPageMenuActionClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GtkActionClass *action_class = GTK_ACTION_CLASS (klass);

  gobject_class->dispose = ephy_page_menu_action_dispose;

  action_class->activate = ephy_page_menu_action_activate;
  action_class->connect_proxy = ephy_page_menu_action_connect_proxy;
  action_class->disconnect_proxy = ephy_page_menu_action_disconnect_proxy;

  g_type_class_add_private (klass, sizeof (EphyPageMenuActionPrivate));
}
GtkWidget* create_menu_item( GtkAction* action )
{
    GtkWidget* item = 0;

    if ( IS_EGE_SELECT_ONE_ACTION(action) ) {
        EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION( action );
        gchar*  sss = 0;
        gint index = 0;
        GtkTreeIter iter;
        GSList* group = 0;
        GtkWidget* subby = gtk_menu_new();

        g_object_get( G_OBJECT(action), "label", &sss, NULL );

        item = gtk_menu_item_new_with_label( sss );

        gboolean valid = gtk_tree_model_get_iter_first( act->private_data->model, &iter );
        while ( valid ) {
            gchar* str = 0;
            gtk_tree_model_get( act->private_data->model, &iter,
                                act->private_data->labelColumn, &str,
                                -1 );

            GtkWidget *item = gtk_radio_menu_item_new_with_label( group, str );
            group = gtk_radio_menu_item_get_group( GTK_RADIO_MENU_ITEM(item) );
            gtk_menu_shell_append( GTK_MENU_SHELL(subby), item );
            g_object_set_qdata( G_OBJECT(item), gDataName, act );

            gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(item), index == act->private_data->active );

            g_free(str);
            str = 0;

            g_signal_connect( G_OBJECT(item), "toggled", G_CALLBACK(menu_toggled_cb), GINT_TO_POINTER(index) );

            index++;
            valid = gtk_tree_model_iter_next( act->private_data->model, &iter );
        }

        gtk_menu_item_set_submenu( GTK_MENU_ITEM(item), subby );
        gtk_widget_show_all( subby );

        g_free(sss);
    } else {
        item = GTK_ACTION_CLASS(ege_select_one_action_parent_class)->create_menu_item( action );
    }

    return item;
}
Esempio n. 8
0
static void
ephy_link_action_connect_proxy (GtkAction *action, GtkWidget *proxy)
{
  GtkWidget *widget;

  LOG ("Connect link action proxy");

  widget = get_event_widget (proxy);
  if (widget) {
    g_signal_connect (widget, "button-press-event",
                      G_CALLBACK (proxy_button_press_event_cb),
                      action);
  }

  GTK_ACTION_CLASS (ephy_link_action_parent_class)->connect_proxy (action, proxy);
}
static void
disconnect_proxy (GtkAction *action,
                  GtkWidget *proxy)
{
    if (GTK_IS_TOOL_ITEM (proxy))
    {
        CajaViewAsAction *vaction = CAJA_VIEW_AS_ACTION (action);
        CajaNavigationWindow *window = vaction->priv->window;

        g_signal_handlers_disconnect_matched (window,
                                              G_SIGNAL_MATCH_FUNC,
                                              0, 0, NULL, G_CALLBACK (view_as_changed_callback), NULL);
    }

    (* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy);
}
static void
disconnect_proxy (GtkAction *action, GtkWidget *proxy)
{
    if (GTK_IS_MENU_TOOL_BUTTON (proxy))
    {
        GtkWidget *child;

        g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (show_menu_callback), action);

        child = eel_gtk_menu_tool_button_get_button (GTK_MENU_TOOL_BUTTON (proxy));
        g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_press_event_cb), NULL);
        g_signal_handlers_disconnect_by_func (child, G_CALLBACK (proxy_button_release_event_cb), NULL);
    }

    (* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy);
}
Esempio n. 11
0
static void
ephy_link_action_disconnect_proxy (GtkAction *action, GtkWidget *proxy)
{
  GtkWidget *widget;

  LOG ("Disconnect link action proxy");

  widget = get_event_widget (proxy);
  if (widget) {
    g_signal_handlers_disconnect_by_func (widget,
                                          G_CALLBACK (proxy_button_press_event_cb),
                                          action);
  }

  GTK_ACTION_CLASS (ephy_link_action_parent_class)->disconnect_proxy (action, proxy);
}
Esempio n. 12
0
static void
gimp_action_class_init (GimpActionClass *klass)
{
  GObjectClass   *object_class = G_OBJECT_CLASS (klass);
  GtkActionClass *action_class = GTK_ACTION_CLASS (klass);
  GimpRGB         black;

  object_class->constructed   = gimp_action_constructed;
  object_class->finalize      = gimp_action_finalize;
  object_class->set_property  = gimp_action_set_property;
  object_class->get_property  = gimp_action_get_property;

  action_class->connect_proxy = gimp_action_connect_proxy;

  gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE);

  g_object_class_install_property (object_class, PROP_CONTEXT,
                                   g_param_spec_object ("context",
                                                        NULL, NULL,
                                                        GIMP_TYPE_CONTEXT,
                                                        GIMP_PARAM_READWRITE));

  g_object_class_install_property (object_class, PROP_COLOR,
                                   gimp_param_spec_rgb ("color",
                                                        NULL, NULL,
                                                        TRUE, &black,
                                                        GIMP_PARAM_READWRITE));

  g_object_class_install_property (object_class, PROP_VIEWABLE,
                                   g_param_spec_object ("viewable",
                                                        NULL, NULL,
                                                        GIMP_TYPE_VIEWABLE,
                                                        GIMP_PARAM_READWRITE));

  g_object_class_install_property (object_class, PROP_ELLIPSIZE,
                                   g_param_spec_enum ("ellipsize",
                                                      NULL, NULL,
                                                      PANGO_TYPE_ELLIPSIZE_MODE,
                                                      PANGO_ELLIPSIZE_NONE,
                                                      GIMP_PARAM_READWRITE));

  g_object_class_install_property (object_class, PROP_MAX_WIDTH_CHARS,
                                   g_param_spec_int ("max-width-chars",
                                                     NULL, NULL,
                                                     -1, G_MAXINT, -1,
                                                     GIMP_PARAM_READWRITE));
}
Esempio n. 13
0
static void
connect_proxy (GtkAction *action,
               GtkWidget *proxy)
{
    GtkWidget *button;

	if (GTK_IS_BUTTON (proxy)) {
        button = GTK_BUTTON (proxy);

        g_signal_connect (button, "button-press-event",
                          G_CALLBACK (tool_button_press_cb), action);
        g_signal_connect (button, "button-release-event",
                          G_CALLBACK (tool_button_release_cb), action);
    }

	(* GTK_ACTION_CLASS (nemo_navigation_action_parent_class)->connect_proxy) (action, proxy);
}
Esempio n. 14
0
static void
disconnect_proxy (GtkAction *action,
                  GtkWidget *proxy)
{
        if (GTK_IS_TOOL_ITEM (proxy)) {
                GtkToolItem *item = GTK_TOOL_ITEM (proxy);
                NautilusZoomAction *zaction = NAUTILUS_ZOOM_ACTION (action);
                NautilusNavigationWindow *window = zaction->priv->window;
                GtkWidget *child;

                child = gtk_bin_get_child (GTK_BIN (item));

                g_signal_handlers_disconnect_by_func (window, G_CALLBACK (zoom_changed_callback), child);

        }

        (* GTK_ACTION_CLASS (parent_class)->disconnect_proxy) (action, proxy);
}
Esempio n. 15
0
static void
go_action_combo_pixmaps_connect_proxy (GtkAction *a, GtkWidget *proxy)
{
	GTK_ACTION_CLASS (combo_pixmaps_parent)->connect_proxy (a, proxy);

	if (GTK_IS_IMAGE_MENU_ITEM (proxy)) { /* set the icon */
		GOActionComboPixmaps *paction = (GOActionComboPixmaps *)a;
		const char *stock_id = paction->elements[0].stock_id;
		GdkPixbuf *icon = make_icon (a, stock_id, proxy);
		if (icon) {
			GtkWidget *image = gtk_image_new_from_pixbuf (icon);
			g_object_unref (icon);
			gtk_widget_show (image);
			gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy),
						       image);
		}
	}
}
static void
connect_proxy (GtkAction *action,
               GtkWidget *proxy)
{
        GtkToolButton *tool;
        GtkWidget *button;

	if (GTK_IS_TOOL_BUTTON (proxy)) {
                tool = GTK_TOOL_BUTTON (proxy);
                button = get_actual_button (tool);

                g_signal_connect (button, "button-press-event",
                                  G_CALLBACK (tool_button_press_cb), action);
                g_signal_connect (button, "button-release-event",
                                  G_CALLBACK (tool_button_release_cb), action);
        }

	(* GTK_ACTION_CLASS (nautilus_navigation_action_parent_class)->connect_proxy) (action, proxy);
}
Esempio n. 17
0
static void
gimp_procedure_action_connect_proxy (GtkAction *action,
                                     GtkWidget *proxy)
{
  GimpProcedureAction *procedure_action = GIMP_PROCEDURE_ACTION (action);

  GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);

  if (GTK_IS_IMAGE_MENU_ITEM (proxy) && procedure_action->procedure)
    {
      GdkPixbuf *pixbuf;

      g_object_get (procedure_action->procedure,
                    "icon-pixbuf", &pixbuf,
                    NULL);

      if (pixbuf)
        {
          GtkSettings *settings = gtk_widget_get_settings (proxy);
          gint         width;
          gint         height;
          GtkWidget   *image;

          gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU,
                                             &width, &height);

          if (width  != gdk_pixbuf_get_width  (pixbuf) ||
              height != gdk_pixbuf_get_height (pixbuf))
            {
              GdkPixbuf *copy;

              copy = gdk_pixbuf_scale_simple (pixbuf, width, height,
                                              GDK_INTERP_BILINEAR);
              g_object_unref (pixbuf);
              pixbuf = copy;
            }

          image = gtk_image_new_from_pixbuf (pixbuf);
          gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), image);
          g_object_unref (pixbuf);
        }
    }
}
Esempio n. 18
0
static GtkWidget* ink_action_create_menu_item( GtkAction* action )
{
    InkAction* act = INK_ACTION( action );
    GtkWidget* item = 0;

    if ( act->private_data->iconId ) {
        gchar* label = 0;
        g_object_get( G_OBJECT(act), "label", &label, NULL );

#if GTK_CHECK_VERSION(3,0,0)
        item = image_menu_item_new_with_mnemonic( label );
#else
        item = gtk_image_menu_item_new_with_mnemonic( label );
#endif

        GtkWidget* child = sp_icon_new( Inkscape::ICON_SIZE_MENU, act->private_data->iconId );
        // TODO this work-around is until SPIcon will live properly inside of a popup menu
        if ( SP_IS_ICON(child) ) {
            SPIcon* icon = SP_ICON(child);
            sp_icon_fetch_pixbuf( icon );
            GdkPixbuf* target = icon->pb;
            if ( target ) {
                child = gtk_image_new_from_pixbuf( target );
                gtk_widget_set_sensitive(child, gtk_action_is_sensitive(action));
                gtk_widget_destroy( GTK_WIDGET(icon) );
            }
        }
        gtk_widget_show_all( child );

#if GTK_CHECK_VERSION(3,0,0)
        image_menu_item_set_image( IMAGE_MENU_ITEM(item), child );
#else
        gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(item), child );
#endif

        g_free( label );
        label = 0;
    } else {
        item = GTK_ACTION_CLASS(ink_action_parent_class)->create_menu_item( action );
    }

    return item;
}
Esempio n. 19
0
static void
disconnect_proxy (GtkAction *action,
                  GtkWidget *proxy)
{
    GtkWidget *button;

	if (GTK_IS_BUTTON (proxy)) {
        button = GTK_BUTTON (proxy);

        /* remove any possible timeout going on */
        unschedule_menu_popup_timeout (NEMO_NAVIGATION_ACTION (action));

		g_signal_handlers_disconnect_by_func (button,
                                              G_CALLBACK (tool_button_press_cb), action);
		g_signal_handlers_disconnect_by_func (button,
                                              G_CALLBACK (tool_button_release_cb), action);
	}

	(* GTK_ACTION_CLASS (nemo_navigation_action_parent_class)->disconnect_proxy) (action, proxy);
}
static void
connect_proxy (GtkAction *action, GtkWidget *proxy)
{
	if (GTK_IS_MENU_TOOL_BUTTON (proxy)) {
		NautilusNavigationAction *naction = NAUTILUS_NAVIGATION_ACTION (action);
		GtkMenuToolButton *button = GTK_MENU_TOOL_BUTTON (proxy);
		GtkWidget *menu;

		/* set an empty menu, so the arrow button becomes sensitive */
		menu = gtk_menu_new ();
		gtk_menu_tool_button_set_menu (button, menu);

		gtk_menu_tool_button_set_arrow_tooltip_text (button,
							     naction->priv->arrow_tooltip);
		
		g_signal_connect (proxy, "show-menu",
				  G_CALLBACK (show_menu_callback), action);
	}

	(* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
}
Esempio n. 21
0
static void
gtk_recent_action_class_init (GtkRecentActionClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  GtkActionClass *action_class = GTK_ACTION_CLASS (klass);

  gobject_class->finalize = gtk_recent_action_finalize;
  gobject_class->dispose = gtk_recent_action_dispose;
  gobject_class->set_property = gtk_recent_action_set_property;
  gobject_class->get_property = gtk_recent_action_get_property;

  action_class->activate = gtk_recent_action_activate;
  action_class->connect_proxy = gtk_recent_action_connect_proxy;
  action_class->disconnect_proxy = gtk_recent_action_disconnect_proxy;
  action_class->create_menu_item = gtk_recent_action_create_menu_item;
  action_class->create_tool_item = gtk_recent_action_create_tool_item;
  action_class->create_menu = gtk_recent_action_create_menu;
  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
  action_class->menu_item_type = GTK_TYPE_IMAGE_MENU_ITEM;
  G_GNUC_END_IGNORE_DEPRECATIONS;
  action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;

  _gtk_recent_chooser_install_properties (gobject_class);

  /**
   * GtkRecentAction:show-numbers:
   *
   * Whether the items should be displayed with a number.
   *
   * Deprecated: 3.10
   */
  g_object_class_install_property (gobject_class,
                                   PROP_SHOW_NUMBERS,
                                   g_param_spec_boolean ("show-numbers",
                                                         P_("Show Numbers"),
                                                         P_("Whether the items should be displayed with a number"),
                                                         FALSE,
                                                         G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));

}
Esempio n. 22
0
static void
encoding_action_class_init(EncodingActionClass *klass)
{
	GObjectClass *gobject_class;
	GtkActionClass *action_class;

	gobject_class = G_OBJECT_CLASS(klass);
	action_class = GTK_ACTION_CLASS(klass);

	action_class->menu_item_type = GTK_TYPE_IMAGE_MENU_ITEM;

	action_class->create_menu_item = encoding_action_create_menu_item;

	item_activated = g_signal_new("item-activated",
					G_OBJECT_CLASS_TYPE (klass),
					G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
					G_STRUCT_OFFSET (EncodingActionClass, item_activated),
					NULL, NULL,
					g_cclosure_marshal_VOID__BOXED,
					G_TYPE_NONE, 1,
					NULL);
}
Esempio n. 23
0
static void
face_action_connect_proxy (GtkAction *action,
                           GtkWidget *proxy)
{
	GtkhtmlFaceActionPrivate *priv;

	priv = GTKHTML_FACE_ACTION (action)->priv;

	if (!GTKHTML_IS_FACE_CHOOSER (proxy))
		goto chainup;

	if (g_list_find (priv->choosers, proxy) != NULL)
		goto chainup;

	g_signal_connect_swapped (
		proxy, "item-activated",
		G_CALLBACK (face_action_proxy_item_activated_cb), action);

chainup:
	/* Chain up to parent's connect_proxy() method. */
	GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);
}
Esempio n. 24
0
static GtkWidget* ink_action_create_tool_item( GtkAction* action )
{
    InkAction* act = INK_ACTION( action );
    GtkWidget* item = GTK_ACTION_CLASS(ink_action_parent_class)->create_tool_item(action);

    if ( act->private_data->iconId ) {
        if ( GTK_IS_TOOL_BUTTON(item) ) {
            GtkToolButton* button = GTK_TOOL_BUTTON(item);

            GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId );
            gtk_tool_button_set_icon_widget( button, child );
        } else {
            // For now trigger a warning but don't do anything else
            GtkToolButton* button = GTK_TOOL_BUTTON(item);
            (void)button;
        }
    }

    // TODO investigate if needed
    gtk_widget_show_all( item );

    return item;
}
Esempio n. 25
0
void ege_output_action_class_init( EgeOutputActionClass* klass )
{
    if ( klass ) {
        GObjectClass* objClass = G_OBJECT_CLASS( klass );
        gParentClass = GTK_ACTION_CLASS( g_type_class_peek_parent( klass ) );

        objClass->get_property = ege_output_action_get_property;
        objClass->set_property = ege_output_action_set_property;

/*         klass->parent_class.create_menu_item = create_menu_item; */
        klass->parent_class.create_tool_item = create_tool_item;

        g_object_class_install_property( objClass,
                                         PROP_USE_MARKUP,
                                         g_param_spec_boolean( "use-markup",
                                                               "UseMarkup",
                                                               "If markup should be used",
                                                               FALSE,
                                                               (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );

        g_type_class_add_private( klass, sizeof(EgeOutputActionClass) );
    }
}
Esempio n. 26
0
static void
connect_proxy (GtkAction *action,
               GtkWidget *proxy)
{
    if (GTK_IS_TOOL_ITEM (proxy))
    {
        GtkToolItem *item = GTK_TOOL_ITEM (proxy);
        CajaZoomAction *zaction = CAJA_ZOOM_ACTION (action);
        CajaNavigationWindow *window = zaction->priv->window;
        GtkWidget *zoom_control;

        zoom_control = caja_zoom_control_new ();
        gtk_container_set_border_width (GTK_CONTAINER (item), 4);
        gtk_container_add (GTK_CONTAINER (item),  zoom_control);
        gtk_widget_show (zoom_control);

        g_signal_connect_object (zoom_control, "zoom_in",
                                 G_CALLBACK (caja_window_zoom_in),
                                 window, G_CONNECT_SWAPPED);
        g_signal_connect_object (zoom_control, "zoom_out",
                                 G_CALLBACK (caja_window_zoom_out),
                                 window, G_CONNECT_SWAPPED);
        g_signal_connect_object (zoom_control, "zoom_to_level",
                                 G_CALLBACK (caja_window_zoom_to_level),
                                 window, G_CONNECT_SWAPPED);
        g_signal_connect_object (zoom_control, "zoom_to_default",
                                 G_CALLBACK (caja_window_zoom_to_default),
                                 window, G_CONNECT_SWAPPED);

        g_signal_connect (window, "zoom-changed",
                          G_CALLBACK (zoom_changed_callback),
                          zoom_control);
    }

    (* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
}
Esempio n. 27
0
static void
gimp_throbber_action_connect_proxy (GtkAction *action,
                                    GtkWidget *proxy)
{

  GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);

  if (GIMP_IS_THROBBER (proxy))
    {
      GParamSpec *pspec;

      pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (action),
                                            "stock-id");

      gimp_throbber_action_sync_property (action, pspec, proxy);
      g_signal_connect_object (action, "notify::stock-id",
                               G_CALLBACK (gimp_throbber_action_sync_property),
                               proxy, 0);

      g_signal_connect_object (proxy, "clicked",
                               G_CALLBACK (gtk_action_activate), action,
                               G_CONNECT_SWAPPED);
    }
}
static void
connect_proxy (GtkAction *action,
               GtkWidget *proxy)
{
    if (GTK_IS_TOOL_ITEM (proxy))
    {
        GtkToolItem *item = GTK_TOOL_ITEM (proxy);
        CajaViewAsAction *vaction = CAJA_VIEW_AS_ACTION (action);
        CajaNavigationWindow *window = vaction->priv->window;
        GtkWidget *view_as_menu_vbox;
        GtkWidget *view_as_combo_box;

        /* Option menu for content view types; it's empty here, filled in when a uri is set.
         * Pack it into vbox so it doesn't grow vertically when location bar does.
         */
        view_as_menu_vbox = gtk_vbox_new (FALSE, 4);
        gtk_widget_show (view_as_menu_vbox);

        gtk_container_set_border_width (GTK_CONTAINER (item), 4);
        gtk_container_add (GTK_CONTAINER (item), view_as_menu_vbox);

        view_as_combo_box = gtk_combo_box_new_text ();

        gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (view_as_combo_box), FALSE);
        gtk_box_pack_end (GTK_BOX (view_as_menu_vbox), view_as_combo_box, TRUE, FALSE, 0);
        gtk_widget_show (view_as_combo_box);
        g_signal_connect_object (view_as_combo_box, "changed",
                                 G_CALLBACK (view_as_menu_switch_views_callback), window, 0);

        g_signal_connect (window, "view-as-changed",
                          G_CALLBACK (view_as_changed_callback),
                          view_as_combo_box);
    }

    (* GTK_ACTION_CLASS (parent_class)->connect_proxy) (action, proxy);
}
static void ink_action_class_init( InkActionClass* klass )
{
    if ( klass ) {
        gInkActionParentClass = GTK_ACTION_CLASS( g_type_class_peek_parent( klass ) );
        GObjectClass * objClass = G_OBJECT_CLASS( klass );

        objClass->finalize = ink_action_finalize;
        objClass->get_property = ink_action_get_property;
        objClass->set_property = ink_action_set_property;

        klass->parent_class.create_menu_item = ink_action_create_menu_item;
        klass->parent_class.create_tool_item = ink_action_create_tool_item;
        /*klass->parent_class.connect_proxy = connect_proxy;*/
        /*klass->parent_class.disconnect_proxy = disconnect_proxy;*/

        g_object_class_install_property( objClass,
                                         PROP_INK_ID,
                                         g_param_spec_string( "iconId",
                                                              "Icon ID",
                                                              "The id for the icon",
                                                              "",
                                                              (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );

        g_object_class_install_property( objClass,
                                         PROP_INK_SIZE,
                                         g_param_spec_int( "iconSize",
                                                           "Icon Size",
                                                           "The size the icon",
                                                           (int)Inkscape::ICON_SIZE_MENU,
                                                           (int)Inkscape::ICON_SIZE_DECORATION,
                                                           (int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
                                                           (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );

        g_type_class_add_private( klass, sizeof(InkActionClass) );
    }
}
static void
games_fullscreen_action_class_init (GamesFullscreenActionClass *klass)
{
    GObjectClass *object_class = G_OBJECT_CLASS (klass);
    GtkActionClass *action_class = GTK_ACTION_CLASS (klass);

    action_class->activate = games_fullscreen_action_activate;
    object_class->set_property = games_fullscreen_action_set_property;
    object_class->get_property = games_fullscreen_action_get_property;

    g_object_class_install_property(object_class,
                                    PROP_WINDOW,
                                    g_param_spec_object("window",
                                                        "window",
                                                        "The window being controlled",
                                                        GTK_TYPE_WINDOW,
                                                        G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));

    g_object_class_install_property(object_class,
                                    PROP_IS_FULLSCREEN,
                                    g_param_spec_boolean("is-fullscreen",
                                                         "is-fullscreen",
                                                         "True if game is fullscreen",
                                                         FALSE,
                                                         G_PARAM_READWRITE));

    g_object_class_install_property(object_class,
                                    PROP_VISIBLE_POLICY,
                                    g_param_spec_boolean("visible-policy",
                                                         "visible-policy",
                                                         "Policy when to show this action",
                                                         GAMES_FULLSCREEN_ACTION_VISIBLE_ALWAYS,
                                                         G_PARAM_READWRITE));

    g_type_class_add_private (klass, sizeof (GamesFullscreenActionPrivate));
}