예제 #1
0
static gboolean
delegate_set_current_uri (GtkRecentChooser  *chooser,
			  const gchar       *uri,
			  GError           **error)
{
  return gtk_recent_chooser_set_current_uri (get_delegate (chooser), uri, error);
}
예제 #2
0
static VALUE
rc_set_current_uri(VALUE self, VALUE uri)
{
    GError *error = NULL;
    gboolean ret = gtk_recent_chooser_set_current_uri(_SELF(self),
                                                      RVAL2CSTR(uri),
                                                      &error);
    if (! ret) RAISE_GERROR(error);
    return self;
}
예제 #3
0
JNIEXPORT jboolean JNICALL
Java_org_gnome_gtk_GtkRecentChooser_gtk_1recent_1chooser_1set_1current_1uri
(
	JNIEnv* env,
	jclass cls,
	jlong _self,
	jstring _uri
)
{
	gboolean result;
	jboolean _result;
	GtkRecentChooser* self;
	const gchar* uri;
	GError* error = NULL;

	// convert parameter self
	self = (GtkRecentChooser*) _self;

	// convert parameter uri
	uri = (const gchar*) bindings_java_getString(env, _uri);
	if (uri == NULL) {
		return  JNI_FALSE; // Java Exception already thrown
	}

	// call function
	result = gtk_recent_chooser_set_current_uri(self, uri, &error);

	// cleanup parameter self

	// cleanup parameter uri
	bindings_java_releaseString(uri);

	// check for error
	if (error) {
		bindings_java_throwGlibException(env, error);
		return  JNI_FALSE;
	}

	// translate return value to JNI type
	_result = (jboolean) result;

	// and finally
	return _result;
}
예제 #4
0
파일: gtkrecentaction.c 프로젝트: 3v1n0/gtk
static gboolean
gtk_recent_action_set_current_uri (GtkRecentChooser  *chooser,
                                   const gchar       *uri,
                                   GError           **error)
{
  GtkRecentAction *action = GTK_RECENT_ACTION (chooser);
  GtkRecentActionPrivate *priv = action->priv;
  GSList *l;

  for (l = priv->choosers; l; l = l->next)
    {
      GtkRecentChooser *recent_chooser = l->data;

      if (!gtk_recent_chooser_set_current_uri (recent_chooser, uri, error))
        return FALSE;
    }

  return TRUE;
}