diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-26 15:11:07 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-26 15:11:07 +0000 |
| commit | 630be8274013c5eef5f19e19a14bc6d759aada5a (patch) | |
| tree | 6774d8db433426ab8361e18638869ad2336bf705 /src/debug | |
| parent | Rename wrong named function (diff) | |
| download | inkscape-630be8274013c5eef5f19e19a14bc6d759aada5a.tar.gz inkscape-630be8274013c5eef5f19e19a14bc6d759aada5a.zip | |
Rm unused code now Gtk+ >= 3.22 dependency is set
Diffstat (limited to 'src/debug')
| -rw-r--r-- | src/debug/log-display-config.cpp | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/src/debug/log-display-config.cpp b/src/debug/log-display-config.cpp index e96802847..7de69bea6 100644 --- a/src/debug/log-display-config.cpp +++ b/src/debug/log-display-config.cpp @@ -28,19 +28,11 @@ typedef SimpleEvent<Event::CONFIGURATION> ConfigurationEvent; class Monitor : public ConfigurationEvent { public: -#if GTK_CHECK_VERSION(3,22,0) Monitor(GdkMonitor *monitor) -#else - Monitor(GdkScreen *screen, gint monitor) -#endif - : ConfigurationEvent("monitor") { + : ConfigurationEvent("monitor") + { GdkRectangle area; - -#if GTK_CHECK_VERSION(3,22,0) gdk_monitor_get_geometry(monitor, &area); -#else - gdk_screen_get_monitor_geometry(screen, monitor, &area); -#endif _addProperty("x", area.x); _addProperty("y", area.y); @@ -49,34 +41,12 @@ public: } }; -#if !GTK_CHECK_VERSION(3,22,0) -// We don't need this in newer Gtk+ versions as GdkMonitor information is now -// returned directly from GdkDisplay rather than needing GdkScreen first -class Screen : public ConfigurationEvent { -public: - Screen(GdkScreen *s) : ConfigurationEvent("screen"), screen(s) { - _addProperty("width", gdk_screen_get_width(screen)); - _addProperty("height", gdk_screen_get_height(screen)); - } - void generateChildEvents() const { - gint n_monitors = gdk_screen_get_n_monitors(screen); - for ( gint i = 0 ; i < n_monitors ; i++ ) { - Logger::write<Monitor>(screen, i); - } - } - -private: - GdkScreen *screen; -}; -#endif - class Display : public ConfigurationEvent { public: Display() : ConfigurationEvent("display") {} void generateChildEvents() const override { GdkDisplay *display=gdk_display_get_default(); -#if GTK_CHECK_VERSION(3,22,0) gint const n_monitors = gdk_display_get_n_monitors(display); // Loop through all monitors and log their details @@ -84,13 +54,6 @@ public: GdkMonitor *monitor = gdk_display_get_monitor(display, i_monitor); Logger::write<Monitor>(monitor); } -#else - // We used to find the number of screens, and log info for - // each of them. However, the number of screens is always - // one in Gtk+ 3 - GdkScreen *screen = gdk_display_get_default_screen(display); - Logger::write<Screen>(screen); -#endif } }; |
