New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings with the over-the-spot patch #1082

Closed
k-takata opened this Issue Sep 4, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@k-takata
Member

k-takata commented Sep 4, 2017

質問・報告の内容

#874 の over-the-spot パッチ以降、コンパイル時にwarningが出るそうです。
https://groups.google.com/d/msg/vim_dev/-acKWk-MjIo/QlqPzpQ0DAAJ
以下、 ログからの抜粋

mbyte.c:4874:5: warning: ‘gdk_screen_get_width’ is deprecated [-Wdeprecated-declarations]
mbyte.c:4875:5: warning: ‘gdk_screen_get_height’ is deprecated [-Wdeprecated-declarations]
mbyte.c:4908:5: warning: ‘gtk_widget_modify_font’ is deprecated: Use 'gtk_widget_override_font' instead [-Wdeprecated-declarations]
mbyte.c:4911:5: warning: ‘gdk_color_parse’ is deprecated: Use 'gdk_rgba_parse' instead [-Wdeprecated-declarations]
mbyte.c:4912:5: warning: ‘gtk_widget_modify_fg’ is deprecated: Use 'gtk_widget_override_color' instead [-Wdeprecated-declarations]
mbyte.c:4915:5: warning: ‘gdk_color_parse’ is deprecated: Use 'gdk_rgba_parse' instead [-Wdeprecated-declarations]
mbyte.c:4916:5: warning: ‘gtk_widget_modify_bg’ is deprecated: Use 'gtk_widget_override_background_color' instead [-Wdeprecated-declarations]

Vimのバージョン

8.0.1026 以降

OSの種類/ディストリ/バージョン

  • Linux
@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Sep 5, 2017

Member

https://patchwork.kernel.org/patch/9397505/

+#if GTK_CHECK_VERSION(3, 22, 0)
+        {
+            GdkDisplay *dpy = gtk_widget_get_display(widget);
+            GdkWindow *win = gtk_widget_get_window(widget);
+            GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
+            GdkRectangle geometry;
+            gdk_monitor_get_geometry(monitor, &geometry);
+            screen_width = geometry.width;
+            screen_height = geometry.height;
+        }
+#else
+        {
+            screen_width = gdk_screen_get_width(screen);
+            screen_height = gdk_screen_get_height(screen);
+        }
+#endif

モニタからジオメトリを取るという修正が必要らしい。

Member

mattn commented Sep 5, 2017

https://patchwork.kernel.org/patch/9397505/

+#if GTK_CHECK_VERSION(3, 22, 0)
+        {
+            GdkDisplay *dpy = gtk_widget_get_display(widget);
+            GdkWindow *win = gtk_widget_get_window(widget);
+            GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win);
+            GdkRectangle geometry;
+            gdk_monitor_get_geometry(monitor, &geometry);
+            screen_width = geometry.width;
+            screen_height = geometry.height;
+        }
+#else
+        {
+            screen_width = gdk_screen_get_width(screen);
+            screen_height = gdk_screen_get_height(screen);
+        }
+#endif

モニタからジオメトリを取るという修正が必要らしい。

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Sep 5, 2017

Member

GtkCssProvider ってのを使って色は行けそうだけど、フォントを直すとなると PangoFontDescription を生で使うのすら deprecated らしく大改造になりそう。

Member

mattn commented Sep 5, 2017

GtkCssProvider ってのを使って色は行けそうだけど、フォントを直すとなると PangoFontDescription を生で使うのすら deprecated らしく大改造になりそう。

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata
Member

k-takata commented Sep 9, 2017

gdk_screen_get_width/height の対応、そっくりそのままVim向けに直してみました。
https://bitbucket.org/k_takata/vim-ktakata-mq/src/b196427eeaccf65b08d07bb69e202322f4eabd4f/fix-warning-of-overthespot.patch?fileviewer=file-view-default

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Sep 9, 2017

Member

8.0.1084
https://groups.google.com/d/topic/vim_dev/XnSvDc6p6j8/discussion
Bramに大幅に書き直されたw

Member

k-takata commented Sep 9, 2017

8.0.1084
https://groups.google.com/d/topic/vim_dev/XnSvDc6p6j8/discussion
Bramに大幅に書き直されたw

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata

k-takata Sep 14, 2017

Member

残りはGTKのエキスパートが直してくれました。
8.0.1099
https://groups.google.com/d/topic/vim_dev/gw9dcQfsSAI/discussion

Member

k-takata commented Sep 14, 2017

残りはGTKのエキスパートが直してくれました。
8.0.1099
https://groups.google.com/d/topic/vim_dev/gw9dcQfsSAI/discussion

@k-takata k-takata closed this Sep 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment