GithubHelp home page GithubHelp logo

Finish Gtk+ 3 migration about gpredict HOT 8 CLOSED

csete avatar csete commented on September 17, 2024
Finish Gtk+ 3 migration

from gpredict.

Comments (8)

csete avatar csete commented on September 17, 2024 2

DONE!

from gpredict.

gvanem avatar gvanem commented on September 17, 2024

In that regard, these should be applied:

--- a/gtk-sat-module-popup.c 2017-12-07 22:12:03
+++ b/gtk-sat-module-popup.c 2017-12-08 10:06:46
@@ -1261,7 +1271,7 @@
 #ifdef G_OS_WIN32
     /* Workaround for GTK+ bug # 169811 - "configure_event" is fired
        when the window is being maximized */
-    if (gdk_window_get_state(widget->window) & GDK_WINDOW_STATE_MAXIMIZED)
+    if (gdk_window_get_state(gtk_widget_get_window(widget)) & GDK_WINDOW_STATE_MAXIMIZED)
     {
         return FALSE;
     }

And:

--- a/main.c 2017-12-07 22:03:48
+++ b/main.c 2017-12-08 10:08:02
@@ -403,7 +403,7 @@
 #ifdef G_OS_WIN32
     /* Workaround for GTK+ bug # 169811 - "configure_event" is fired
        when the window is being maximized */
-    if (gdk_window_get_state(widget->window) & GDK_WINDOW_STATE_MAXIMIZED)
+    if (gdk_window_get_state(gtk_widget_get_window(widget)) & GDK_WINDOW_STATE_MAXIMIZED)
     {
         return FALSE;
     }

PS. Very good that development have moved away from the awful SF. I've build GPredict using MSVC.-2017 So I have more patches. Would you accept those?

from gpredict.

csete avatar csete commented on September 17, 2024

Thanks for the patch @gvanem - I have applied them. I'd be happy to accept patches that improve windows support, as long as they don't break linux support ;)

from gpredict.

gvanem avatar gvanem commented on September 17, 2024

Okay, my main objection is this gnu-ism: case '0' ... '9': is 8 places. Can this be moved to gpredict-utils.c at-least (and maybe with a !defined __GNUC__ check)?

from gpredict.

csete avatar csete commented on September 17, 2024

You will have to be more specific. Most of the code was written 10 years ago and I'm old enough to barely remember what I had for breakfast this morning ;-)

Also, please open a new issue for windows related fixes because this issue is for Gtk+ 3 migration and will be closed once Gtk+ 3 related compiler warnings have been fixed.

from gpredict.

kukabu avatar kukabu commented on September 17, 2024

Hello

I see the warnings yet:

warning: ‘gtk_menu_popup’ is deprecated: Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead [-Wdeprecated-declarations]
warning: ‘gdk_screen_width’ is deprecated [-Wdeprecated-declarations]
warning: ‘gdk_screen_height’ is deprecated [-Wdeprecated-declarations]

from gpredict.

csete avatar csete commented on September 17, 2024

Yes, I suppose they keep deprecating things in newer versions of Gtk+ but I can not see them on my development machine. I don't expect this to be a problem for a while.

from gpredict.

kukabu avatar kukabu commented on September 17, 2024

Yes, these functions has been deprecated since 3.22.

from gpredict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.