[gtranslator/gtk4] Clean gtr-io-error-info-bar
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtranslator/gtk4] Clean gtr-io-error-info-bar
- Date: Mon, 10 Oct 2022 16:26:38 +0000 (UTC)
commit 911fcc981b1ab1047d16ab223dfc432ca303e5ed
Author: Daniel GarcĂa Moreno <dani danigm net>
Date: Mon Oct 10 18:20:38 2022 +0200
Clean gtr-io-error-info-bar
src/gtr-io-error-info-bar.c | 22 ++++++----------------
src/gtr-io-error-info-bar.h | 4 +---
2 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/src/gtr-io-error-info-bar.c b/src/gtr-io-error-info-bar.c
index ab16cf3b..dc7ec548 100644
--- a/src/gtr-io-error-info-bar.c
+++ b/src/gtr-io-error-info-bar.c
@@ -1,17 +1,17 @@
/*
* Copyright (C) 2007 Ignacio Casal Quinteiro <nacho resa gmail com>
- * 2005 Paolo Maggi
- *
+ * 2005 Paolo Maggi
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
@@ -36,16 +36,6 @@ typedef struct
static void show_info_bar (GtrTab * tab);
-static void
-set_contents (GtkInfoBar * infobar, GtkWidget * contents)
-{
- /*GtkWidget *content_area;
-
- content_area = gtk_info_bar_get_content_area (infobar);
- gtk_container_add (GTK_CONTAINER (content_area), contents);*/
- gtk_info_bar_add_child (infobar, contents);
-}
-
/*
* Message area funcs
*/
@@ -67,7 +57,7 @@ set_info_bar_text_and_icon (GtkInfoBar * infobar,
gtk_widget_show (hbox_content);
image = gtk_image_new_from_icon_name (icon_stock_id);
- gtk_image_set_icon_size (image, GTK_ICON_SIZE_NORMAL);
+ gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_NORMAL);
gtk_widget_show (image);
gtk_box_append (GTK_BOX (hbox_content), image);
gtk_widget_set_halign (image, 0.5);
@@ -116,7 +106,7 @@ set_info_bar_text_and_icon (GtkInfoBar * infobar,
gtk_label_set_yalign (GTK_LABEL (secondary_label), 0.5);
}
- set_contents (infobar, hbox_content);
+ gtk_info_bar_add_child (infobar, hbox_content);
}
/*
diff --git a/src/gtr-io-error-info-bar.h b/src/gtr-io-error-info-bar.h
index 0cb5b21d..def71071 100644
--- a/src/gtr-io-error-info-bar.h
+++ b/src/gtr-io-error-info-bar.h
@@ -16,8 +16,7 @@
*
*/
-#ifndef __IO_ERROR_MESSAGE_AREA_H__
-#define __IO_ERROR_MESSAGE_AREA_H__
+#pragma once
#include "gtr-tab.h"
@@ -34,4 +33,3 @@ G_BEGIN_DECLS
GtrTab * tab);
G_END_DECLS
-#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]