[gnome-screenshot/wip/exalm/cleanups: 5/16] dialog: Remove screenshot_dialog_get_dialog()



commit d5c2b9a9009570314235ea281f11dd2c57b0cea6
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 3 04:19:29 2020 +0500

    dialog: Remove screenshot_dialog_get_dialog()
    
    This function was a stopgap solution, now that ScreenshotDialgo is a widget
    itself, it's not needed anymore.

 src/screenshot-application.c | 4 ++--
 src/screenshot-dialog.c      | 6 ------
 src/screenshot-dialog.h      | 1 -
 3 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
index 0895d60..013faed 100644
--- a/src/screenshot-application.c
+++ b/src/screenshot-application.c
@@ -142,7 +142,7 @@ save_pixbuf_handle_error (ScreenshotApplication *self,
           g_autofree gchar *detail = g_strdup_printf (_("A file named ā€œ%sā€ already exists in ā€œ%sā€"),
                                                       file_name, folder_name);
 
-          gint response = screenshot_show_dialog (GTK_WINDOW (screenshot_dialog_get_dialog (dialog)),
+          gint response = screenshot_show_dialog (GTK_WINDOW (dialog),
                                                   GTK_MESSAGE_WARNING,
                                                   GTK_BUTTONS_YES_NO,
                                                   _("Overwrite existing file?"),
@@ -158,7 +158,7 @@ save_pixbuf_handle_error (ScreenshotApplication *self,
         }
       else
         {
-          screenshot_show_dialog (GTK_WINDOW (screenshot_dialog_get_dialog (dialog)),
+          screenshot_show_dialog (GTK_WINDOW (dialog),
                                   GTK_MESSAGE_ERROR,
                                   GTK_BUTTONS_OK,
                                   _("Unable to capture a screenshot"),
diff --git a/src/screenshot-dialog.c b/src/screenshot-dialog.c
index ff4416a..c3b6f0b 100644
--- a/src/screenshot-dialog.c
+++ b/src/screenshot-dialog.c
@@ -353,12 +353,6 @@ screenshot_dialog_set_busy (ScreenshotDialog *dialog,
   gdk_flush ();
 }
 
-GtkWidget *
-screenshot_dialog_get_dialog (ScreenshotDialog *dialog)
-{
-  return GTK_WIDGET (dialog);
-}
-
 GtkWidget *
 screenshot_dialog_get_filename_entry (ScreenshotDialog *dialog)
 {
diff --git a/src/screenshot-dialog.h b/src/screenshot-dialog.h
index 42fa3ef..a929ac4 100644
--- a/src/screenshot-dialog.h
+++ b/src/screenshot-dialog.h
@@ -46,7 +46,6 @@ char             *screenshot_dialog_get_folder   (ScreenshotDialog *dialog);
 char             *screenshot_dialog_get_filename (ScreenshotDialog *dialog);
 void              screenshot_dialog_set_busy     (ScreenshotDialog *dialog,
                                                   gboolean          busy);
-GtkWidget        *screenshot_dialog_get_dialog   (ScreenshotDialog *dialog);
 GtkWidget        *screenshot_dialog_get_filename_entry (ScreenshotDialog *dialog);
 
 G_END_DECLS


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