[nautilus/wip/antoniof/experimental-gtk4-build: 76/88] general: Assorted leftovers changes -- IT BUILDS NOW




commit 48be82a8fdc01f8e12790638e8eb5176d29fac1d
Author: António Fernandes <antoniof gnome org>
Date:   Fri Dec 17 15:56:41 2021 +0000

    general: Assorted leftovers changes -- IT BUILDS NOW

 eel/check-program.c                                          | 3 +--
 extensions/audio-video-properties/test-properties-page.c     | 2 +-
 extensions/image-properties/nautilus-image-properties-page.c | 2 +-
 src/nautilus-application.c                                   | 8 ++++----
 src/nautilus-autorun-software.c                              | 2 +-
 src/nautilus-files-view.c                                    | 2 +-
 src/nautilus-mime-actions.c                                  | 2 +-
 src/nautilus-pathbar.c                                       | 2 +-
 src/nautilus-properties-window.c                             | 8 +++-----
 src/nautilus-query-editor.c                                  | 2 +-
 src/nautilus-search-popover.c                                | 2 +-
 src/nautilus-shell-search-provider.c                         | 2 +-
 src/nautilus-toolbar.c                                       | 2 +-
 test/automated/display/test-nautilus-mime-actions-set.c      | 2 +-
 test/automated/display/test-nautilus-mime-actions.c          | 2 +-
 test/interactive/test.c                                      | 2 +-
 16 files changed, 21 insertions(+), 24 deletions(-)
---
diff --git a/eel/check-program.c b/eel/check-program.c
index 1e0f0a382..04cbc7de6 100644
--- a/eel/check-program.c
+++ b/eel/check-program.c
@@ -40,8 +40,7 @@ main (int   argc,
 
 
     LIBXML_TEST_VERSION
-    gtk_init (&argc,
-              &argv);
+    gtk_init ();
 
     /* Run the checks for eel twice. */
 
diff --git a/extensions/audio-video-properties/test-properties-page.c 
b/extensions/audio-video-properties/test-properties-page.c
index 2e3fa6678..f52881625 100644
--- a/extensions/audio-video-properties/test-properties-page.c
+++ b/extensions/audio-video-properties/test-properties-page.c
@@ -58,7 +58,7 @@ int main (int argc, char **argv)
 
        totem_gst_disable_display_decoders ();
        gst_init (&argc, &argv);
-       gtk_init (&argc, &argv);
+       gtk_init ();
 
        if (argc != 2) {
                g_print ("Usage: %s [URI]\n", argv[0]);
diff --git a/extensions/image-properties/nautilus-image-properties-page.c 
b/extensions/image-properties/nautilus-image-properties-page.c
index ce9a704c9..afae8ccf0 100644
--- a/extensions/image-properties/nautilus-image-properties-page.c
+++ b/extensions/image-properties/nautilus-image-properties-page.c
@@ -91,7 +91,7 @@ append_item (NautilusImagesPropertiesPage *page,
 static void
 nautilus_image_properties_page_init (NautilusImagesPropertiesPage *self)
 {
-    self->page_widget = gtk_scrolled_window_new (NULL, NULL);
+    self->page_widget = gtk_scrolled_window_new ();
 
     g_object_set (self->page_widget,
                   "margin-bottom", 6,
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 2c0cc2929..505001f1a 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -634,7 +634,7 @@ static int
 do_perform_self_checks (void)
 {
 #ifndef NAUTILUS_OMIT_SELF_CHECK
-    gtk_init (NULL, NULL);
+    gtk_init ();
 
     nautilus_profile_start (NULL);
     /* Run the checks (each twice) for nautilus and libnautilus-private. */
@@ -1131,7 +1131,7 @@ theme_changed (GtkSettings *settings)
         {
             provider = gtk_css_provider_new ();
             file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/Adwaita.css");
-            gtk_css_provider_load_from_file (provider, file, NULL);
+            gtk_css_provider_load_from_file (provider, file);
             g_object_unref (file);
         }
 
@@ -1151,7 +1151,7 @@ theme_changed (GtkSettings *settings)
     {
         permanent_provider = gtk_css_provider_new ();
         file = g_file_new_for_uri ("resource:///org/gnome/nautilus/css/nautilus.css");
-        gtk_css_provider_load_from_file (permanent_provider, file, NULL);
+        gtk_css_provider_load_from_file (permanent_provider, file);
         /* The behavior of two style providers with the same priority is
          * undefined and gtk happens to prefer the provider that got added last.
          * Use a higher priority here to avoid this problem.
@@ -1304,7 +1304,7 @@ nautilus_application_startup_common (NautilusApplication *self)
 
     g_signal_connect (self, "shutdown", G_CALLBACK (on_application_shutdown), NULL);
 
-    g_signal_connect_object (gtk_icon_theme_get_default (),
+    g_signal_connect_object (gtk_icon_theme_get_for_display (gdk_display_get_default ()),
                              "changed",
                              G_CALLBACK (icon_theme_changed_callback),
                              NULL, 0);
diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c
index e98ceebf6..cf2007a61 100644
--- a/src/nautilus-autorun-software.c
+++ b/src/nautilus-autorun-software.c
@@ -252,7 +252,7 @@ main (int   argc,
     bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
     textdomain (GETTEXT_PACKAGE);
 
-    gtk_init (&argc, &argv);
+    gtk_init ();
 
     if (argc != 2)
     {
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 30815a08e..5c37b8347 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -9562,7 +9562,7 @@ nautilus_files_view_init (NautilusFilesView *view)
     gtk_widget_show (priv->overlay);
 
     /* Scrolled Window */
-    priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+    priv->scrolled_window = gtk_scrolled_window_new ();
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
                                     GTK_POLICY_AUTOMATIC,
                                     GTK_POLICY_AUTOMATIC);
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 923cab933..9adebffc3 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1280,7 +1280,7 @@ search_for_application_mime_type (ActivateParametersInstall *parameters_install,
 
     g_assert (parameters_install->proxy != NULL);
 
-    desktop_startup_id = g_strdup_printf ("_TIME%i", gtk_get_current_event_time ());
+    desktop_startup_id = g_strdup_printf ("_TIME%i", (guint32) GDK_CURRENT_TIME);
 
     g_dbus_proxy_call (parameters_install->proxy,
                        "InstallMimeTypes",
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index dddc1308f..644fc9d0e 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -223,7 +223,7 @@ nautilus_path_bar_init (NautilusPathBar *self)
     GtkBuilder *builder;
     g_autoptr (GError) error = NULL;
 
-    self->scrolled = gtk_scrolled_window_new (NULL, NULL);
+    self->scrolled = gtk_scrolled_window_new ();
     /* Scroll horizontally only and don't use internal scrollbar. */
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (self->scrolled),
                                     /* hscrollbar-policy */ GTK_POLICY_EXTERNAL,
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 74fbdbb0c..19307528f 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -2430,7 +2430,6 @@ paint_slice (GtkWidget   *widget,
     double offset = G_PI / 2.0;
     GdkRGBA fill;
     GdkRGBA stroke;
-    GtkStateFlags state;
     GtkBorder border;
     GtkStyleContext *context;
     double x, y, radius;
@@ -2442,14 +2441,13 @@ paint_slice (GtkWidget   *widget,
     }
 
     context = gtk_widget_get_style_context (widget);
-    state = gtk_style_context_get_state (context);
-    gtk_style_context_get_border (context, state, &border);
+    gtk_style_context_get_border (context, &border);
 
     gtk_style_context_save (context);
     gtk_style_context_add_class (context, style_class);
-    gtk_style_context_get_color (context, state, &fill);
+    gtk_style_context_get_color (context, &fill);
     gtk_style_context_add_class (context, "border");
-    gtk_style_context_get_color (context, state, &stroke);
+    gtk_style_context_get_color (context, &stroke);
     gtk_style_context_restore (context);
 
     width = gtk_widget_get_allocated_width (widget);
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index a4b67809e..727240a7c 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -787,7 +787,7 @@ nautilus_gtk_search_entry_is_keynav_event (guint           keyval,
         keyval == GDK_KEY_End || keyval == GDK_KEY_KP_End ||
         keyval == GDK_KEY_Page_Up || keyval == GDK_KEY_KP_Page_Up ||
         keyval == GDK_KEY_Page_Down || keyval == GDK_KEY_KP_Page_Down ||
-        ((state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) != 0))
+        ((state & (GDK_CONTROL_MASK | GDK_ALT_MASK)) != 0))
     {
         return TRUE;
     }
diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
index 21565a5ef..20559fa9e 100644
--- a/src/nautilus-search-popover.c
+++ b/src/nautilus-search-popover.c
@@ -616,7 +616,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
                                           NULL);
     gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 600);
 
-    scrolled = gtk_scrolled_window_new (NULL, NULL);
+    scrolled = gtk_scrolled_window_new ();
     gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
                                     GTK_POLICY_AUTOMATIC,
                                     GTK_POLICY_AUTOMATIC);
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index 90fdaa33b..55e9e1aff 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -619,7 +619,7 @@ result_list_attributes_ready_cb (GList    *file_list,
     GVariant *meta_variant;
     gint icon_scale;
 
-    icon_scale = gdk_monitor_get_scale_factor (gdk_display_get_monitor (gdk_display_get_default (), 0));
+    icon_scale = gdk_monitor_get_scale_factor (g_list_model_get_item (gdk_display_get_monitors 
(gdk_display_get_default ()), 0));
 
     for (l = file_list; l != NULL; l = l->next)
     {
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index ddd090151..670508933 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -589,7 +589,7 @@ on_operations_icon_draw (GtkDrawingArea  *drawing_area,
     GtkStyleContext *style_context;
 
     style_context = gtk_widget_get_style_context (widget);
-    gtk_style_context_get_color (style_context, gtk_style_context_get_state (style_context), &foreground);
+    gtk_style_context_get_color (style_context, &foreground);
     background = foreground;
     background.alpha *= 0.3;
 
diff --git a/test/automated/display/test-nautilus-mime-actions-set.c 
b/test/automated/display/test-nautilus-mime-actions-set.c
index 11e9ddc0d..9d364b69c 100644
--- a/test/automated/display/test-nautilus-mime-actions-set.c
+++ b/test/automated/display/test-nautilus-mime-actions-set.c
@@ -118,7 +118,7 @@ main (int    argc,
     NautilusFile *file;
     NautilusFileAttributes attributes;
 
-    gtk_init (&argc, &argv);
+    gtk_init ();
 
     if (argc < 3)
     {
diff --git a/test/automated/display/test-nautilus-mime-actions.c 
b/test/automated/display/test-nautilus-mime-actions.c
index a6818adbc..052e9c719 100644
--- a/test/automated/display/test-nautilus-mime-actions.c
+++ b/test/automated/display/test-nautilus-mime-actions.c
@@ -112,7 +112,7 @@ main (int    argc,
     NautilusFile *file;
     NautilusFileAttributes attributes;
 
-    gtk_init (&argc, &argv);
+    gtk_init ();
 
     if (argc != 2)
     {
diff --git a/test/interactive/test.c b/test/interactive/test.c
index 34a5fa8c4..0f1662e02 100644
--- a/test/interactive/test.c
+++ b/test/interactive/test.c
@@ -6,7 +6,7 @@ void
 test_init (int    *argc,
            char ***argv)
 {
-    gtk_init (argc, argv);
+    gtk_init ();
 
     eel_make_warnings_and_criticals_stop_in_debugger ();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]