Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
c4e9a49b
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c4e9a49b
编写于
2月 25, 2011
作者:
D
dcherepanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7009114: GTK FileDialog lies about it's Bounds
Reviewed-by: art, anthony
上级
832e5e9d
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
59 addition
and
10 deletion
+59
-10
make/sun/xawt/mapfile-vers
make/sun/xawt/mapfile-vers
+1
-0
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
+5
-4
src/solaris/native/sun/awt/gtk2_interface.c
src/solaris/native/sun/awt/gtk2_interface.c
+4
-1
src/solaris/native/sun/awt/gtk2_interface.h
src/solaris/native/sun/awt/gtk2_interface.h
+2
-1
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
+37
-2
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h
+10
-2
未找到文件。
make/sun/xawt/mapfile-vers
浏览文件 @
c4e9a49b
...
@@ -432,6 +432,7 @@ SUNWprivate_1.1 {
...
@@ -432,6 +432,7 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_GtkFileDialogPeer_run;
Java_sun_awt_X11_GtkFileDialogPeer_run;
Java_sun_awt_X11_GtkFileDialogPeer_quit;
Java_sun_awt_X11_GtkFileDialogPeer_quit;
Java_sun_awt_X11_GtkFileDialogPeer_toFront;
Java_sun_awt_X11_GtkFileDialogPeer_toFront;
Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
Java_sun_print_CUPSPrinter_initIDs;
Java_sun_print_CUPSPrinter_initIDs;
Java_sun_print_CUPSPrinter_getCupsServer;
Java_sun_print_CUPSPrinter_getCupsServer;
...
...
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
浏览文件 @
c4e9a49b
...
@@ -56,12 +56,14 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
...
@@ -56,12 +56,14 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
}
}
private
native
void
run
(
String
title
,
int
mode
,
String
dir
,
String
file
,
private
native
void
run
(
String
title
,
int
mode
,
String
dir
,
String
file
,
FilenameFilter
filter
,
boolean
isMultipleMode
);
FilenameFilter
filter
,
boolean
isMultipleMode
,
int
x
,
int
y
);
private
native
void
quit
();
private
native
void
quit
();
@Override
@Override
public
native
void
toFront
();
public
native
void
toFront
();
@Override
public
native
void
setBounds
(
int
x
,
int
y
,
int
width
,
int
height
,
int
op
);
/**
/**
* Called exclusively by the native C code.
* Called exclusively by the native C code.
...
@@ -106,9 +108,8 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
...
@@ -106,9 +108,8 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
Thread
t
=
new
Thread
()
{
Thread
t
=
new
Thread
()
{
public
void
run
()
{
public
void
run
()
{
GtkFileDialogPeer
.
this
.
run
(
fd
.
getTitle
(),
fd
.
getMode
(),
GtkFileDialogPeer
.
this
.
run
(
fd
.
getTitle
(),
fd
.
getMode
(),
fd
.
getDirectory
(),
fd
.
getFile
(),
fd
fd
.
getDirectory
(),
fd
.
getFile
(),
fd
.
getFilenameFilter
(),
fd
.
isMultipleMode
(),
.
getFilenameFilter
(),
fd
fd
.
getX
(),
fd
.
getY
());
.
isMultipleMode
());
fd
.
setVisible
(
false
);
fd
.
setVisible
(
false
);
}
}
};
};
...
...
src/solaris/native/sun/awt/gtk2_interface.c
浏览文件 @
c4e9a49b
...
@@ -608,6 +608,9 @@ gboolean gtk2_load()
...
@@ -608,6 +608,9 @@ gboolean gtk2_load()
fp_gtk_viewport_new
=
dl_symbol
(
"gtk_viewport_new"
);
fp_gtk_viewport_new
=
dl_symbol
(
"gtk_viewport_new"
);
fp_gtk_window_new
=
dl_symbol
(
"gtk_window_new"
);
fp_gtk_window_new
=
dl_symbol
(
"gtk_window_new"
);
fp_gtk_window_present
=
dl_symbol
(
"gtk_window_present"
);
fp_gtk_window_present
=
dl_symbol
(
"gtk_window_present"
);
fp_gtk_window_move
=
dl_symbol
(
"gtk_window_move"
);
fp_gtk_window_resize
=
dl_symbol
(
"gtk_window_resize"
);
fp_gtk_dialog_new
=
dl_symbol
(
"gtk_dialog_new"
);
fp_gtk_dialog_new
=
dl_symbol
(
"gtk_dialog_new"
);
fp_gtk_frame_new
=
dl_symbol
(
"gtk_frame_new"
);
fp_gtk_frame_new
=
dl_symbol
(
"gtk_frame_new"
);
...
...
src/solaris/native/sun/awt/gtk2_interface.h
浏览文件 @
c4e9a49b
...
@@ -750,7 +750,8 @@ int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
...
@@ -750,7 +750,8 @@ int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
GdkPixbuf
*
(
*
fp_gdk_pixbuf_new_from_file
)(
const
char
*
filename
,
GError
**
error
);
GdkPixbuf
*
(
*
fp_gdk_pixbuf_new_from_file
)(
const
char
*
filename
,
GError
**
error
);
void
(
*
fp_gtk_widget_destroy
)(
GtkWidget
*
widget
);
void
(
*
fp_gtk_widget_destroy
)(
GtkWidget
*
widget
);
void
(
*
fp_gtk_window_present
)(
GtkWindow
*
window
);
void
(
*
fp_gtk_window_present
)(
GtkWindow
*
window
);
void
(
*
fp_gtk_window_move
)(
GtkWindow
*
window
,
gint
x
,
gint
y
);
void
(
*
fp_gtk_window_resize
)(
GtkWindow
*
window
,
gint
width
,
gint
height
);
/**
/**
* Function Pointers for GtkFileChooser
* Function Pointers for GtkFileChooser
...
...
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
浏览文件 @
c4e9a49b
...
@@ -102,6 +102,33 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
...
@@ -102,6 +102,33 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
fp_gdk_threads_leave
();
fp_gdk_threads_leave
();
}
}
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: setBounds
* Signature: (IIIII)V
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_setBounds
(
JNIEnv
*
env
,
jobject
jpeer
,
jint
x
,
jint
y
,
jint
width
,
jint
height
,
jint
op
)
{
GtkWindow
*
dialog
;
fp_gdk_threads_enter
();
dialog
=
(
GtkWindow
*
)
jlong_to_ptr
(
(
*
env
)
->
GetLongField
(
env
,
jpeer
,
widgetFieldID
));
if
(
dialog
!=
NULL
)
{
if
(
x
>=
0
&&
y
>=
0
)
{
fp_gtk_window_move
(
dialog
,
(
gint
)
x
,
(
gint
)
y
);
}
if
(
width
>
0
&&
height
>
0
)
{
fp_gtk_window_resize
(
dialog
,
(
gint
)
width
,
(
gint
)
height
);
}
}
fp_gdk_threads_leave
();
}
/**
/**
* Convert a GSList to an array of filenames (without the parent folder)
* Convert a GSList to an array of filenames (without the parent folder)
*/
*/
...
@@ -175,12 +202,12 @@ static void handle_response(GtkWidget* aDialog, gint responseId, gpointer obj)
...
@@ -175,12 +202,12 @@ static void handle_response(GtkWidget* aDialog, gint responseId, gpointer obj)
/*
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: run
* Method: run
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
;
)V
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
II
)V
*/
*/
JNIEXPORT
void
JNICALL
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_run
(
JNIEnv
*
env
,
jobject
jpeer
,
Java_sun_awt_X11_GtkFileDialogPeer_run
(
JNIEnv
*
env
,
jobject
jpeer
,
jstring
jtitle
,
jint
mode
,
jstring
jdir
,
jstring
jfile
,
jstring
jtitle
,
jint
mode
,
jstring
jdir
,
jstring
jfile
,
jobject
jfilter
,
jboolean
multiple
)
jobject
jfilter
,
jboolean
multiple
,
int
x
,
int
y
)
{
{
GtkWidget
*
dialog
=
NULL
;
GtkWidget
*
dialog
=
NULL
;
GtkFileFilter
*
filter
;
GtkFileFilter
*
filter
;
...
@@ -244,6 +271,14 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
...
@@ -244,6 +271,14 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
dialog
),
TRUE
);
dialog
),
TRUE
);
}
}
/* Set the initial location */
if
(
x
>=
0
&&
y
>=
0
)
{
fp_gtk_window_move
((
GtkWindow
*
)
dialog
,
(
gint
)
x
,
(
gint
)
y
);
// NOTE: it doesn't set the initial size for the file chooser
// as it seems like the file chooser overrides the size internally
}
fp_g_signal_connect
(
G_OBJECT
(
dialog
),
"response"
,
G_CALLBACK
(
fp_g_signal_connect
(
G_OBJECT
(
dialog
),
"response"
,
G_CALLBACK
(
handle_response
),
jpeer
);
handle_response
),
jpeer
);
...
...
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h
浏览文件 @
c4e9a49b
...
@@ -20,10 +20,10 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_initIDs
...
@@ -20,10 +20,10 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_initIDs
/*
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: run
* Method: run
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
;
)V
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
II
)V
*/
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_run
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_run
(
JNIEnv
*
,
jobject
,
jstring
,
jint
,
jstring
,
jstring
,
jobject
,
jboolean
);
(
JNIEnv
*
,
jobject
,
jstring
,
jint
,
jstring
,
jstring
,
jobject
,
jboolean
,
jint
,
jint
);
/*
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Class: sun_awt_X11_GtkFileDialogPeer
...
@@ -41,6 +41,14 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
...
@@ -41,6 +41,14 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_toFront
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_toFront
(
JNIEnv
*
,
jobject
);
(
JNIEnv
*
,
jobject
);
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: setBounds
* Signature: (IIIII)V
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_setBounds
(
JNIEnv
*
env
,
jobject
jpeer
,
jint
x
,
jint
y
,
jint
width
,
jint
height
,
jint
op
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录