Skip to content

Commit

Permalink
Fix .ui file loading. Remove all shadow-type properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf committed Jan 6, 2025
1 parent 4646d8a commit 4a45e9c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 63 deletions.
46 changes: 1 addition & 45 deletions resources/gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,73 +10,29 @@
<gresource prefix="/org/gnome/liferea">
<file compressed="true">htmlview.js</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/about">
<gresource prefix="/org/gnome/liferea/ui">
<file compressed="true">about.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/auth">
<file compressed="true">auth.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/google_source">
<file compressed="true">google_source.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/liferea_menu">
<file compressed="true">liferea_menu.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/liferea_headerbar">
<file compressed="true">liferea_headerbar.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/mainwindow">
<file compressed="true">mainwindow.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/mark_read_dialog">
<file compressed="true">mark_read_dialog.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/new_folder">
<file compressed="true">new_folder.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/new_newsbin">
<file compressed="true">new_newsbin.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/new_subscription">
<file compressed="true">new_subscription.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/node_source">
<file compressed="true">node_source.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/opml_source">
<file compressed="true">opml_source.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/prefs">
<file compressed="true">prefs.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/properties">
<file compressed="true">properties.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/reedah_source">
<file compressed="true">reedah_source.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/rename_node">
<file compressed="true">rename_node.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/search_folder">
<file compressed="true">search_folder.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/search">
<file compressed="true">search.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/simple_search">
<file compressed="true">simple_search.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/simple_subscription">
<file compressed="true">simple_subscription.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/theoldreader_source">
<file compressed="true">theoldreader_source.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/ttrss_source">
<file compressed="true">ttrss_source.ui</file>
</gresource>
<gresource prefix="/org/gnome/liferea/ui/update_monitor">
<file compressed="true">update_monitor.ui</file>
</gresource>
</gresources>
Expand Down
5 changes: 0 additions & 5 deletions resources/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="hscrollbar-policy">never</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="feedlist">
<property name="visible">True</property>
Expand Down Expand Up @@ -76,7 +75,6 @@
<object class="GtkViewport" id="normalViewItems">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="shadow-type">none</property>
<child>
<placeholder/>
</child>
Expand All @@ -98,7 +96,6 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">none</property>
<child>
<placeholder/>
</child>
Expand Down Expand Up @@ -160,7 +157,6 @@
<object class="GtkViewport" id="wideViewItems">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="shadow-type">none</property>
<child>
<placeholder/>
</child>
Expand All @@ -181,7 +177,6 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow-type">none</property>
<child>
<placeholder/>
</child>
Expand Down
12 changes: 2 additions & 10 deletions src/ui/liferea_dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <gtk/gtk.h>

#include "ui/liferea_dialog.h"
Expand Down Expand Up @@ -98,16 +94,12 @@ GtkWidget *
liferea_dialog_new (const gchar *name)
{
LifereaDialog *ld;
g_autofree gchar *path;

path = g_strdup_printf ("/org/gnome/liferea/ui/%s", name);
g_autofree gchar *path = g_strdup_printf ("/org/gnome/liferea/ui/%s.ui", name);

ld = LIFEREA_DIALOG (g_object_new (LIFEREA_DIALOG_TYPE, NULL));
ld->priv->xml = gtk_builder_new_from_resource (path);
g_return_val_if_fail (ld->priv->xml != NULL, NULL);

ld->priv->dialog = GTK_WIDGET (gtk_builder_get_object (ld->priv->xml, name));
gtk_window_set_transient_for (GTK_WINDOW (ld->priv->dialog), GTK_WINDOW (liferea_shell_get_window()));
gtk_window_set_transient_for (GTK_WINDOW (ld->priv->dialog), GTK_WINDOW (liferea_shell_get_window ()));
g_return_val_if_fail (ld->priv->dialog != NULL, NULL);

g_object_set_data (G_OBJECT (ld->priv->dialog), "LifereaDialog", ld);
Expand Down
4 changes: 1 addition & 3 deletions src/ui/liferea_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ liferea_shell_init (LifereaShell *ls)
/* globally accessible singleton */
g_assert (NULL == shell);
shell = ls;
shell->xml = gtk_builder_new_from_file (PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "mainwindow.ui");
if (!shell->xml)
g_error ("Loading " PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "mainwindow.ui failed");
shell->xml = gtk_builder_new_from_resource ("/org/gnome/liferea/ui/mainwindow.ui");
}

void
Expand Down

0 comments on commit 4a45e9c

Please sign in to comment.