Commit a5316336 authored by Matthias Clasen's avatar Matthias Clasen

Run gtk-builder-tool simplify over all templates

parent 3c247f20
......@@ -263,9 +263,13 @@ maybe_emit_property (MyParserData *data)
bound = TRUE;
else if (strcmp (data->attribute_names[i], "translatable") == 0)
translatable = TRUE;
else if (strcmp (data->attribute_names[i], "name") == 0)
property_name = (const gchar *)data->attribute_values[i];
}
if (!translatable)
if (!translatable &&
!bound &&
!needs_explicit_setting (data, class_name, property_name))
{
for (i = 0; data->attribute_names[i]; i++)
{
......@@ -274,11 +278,6 @@ maybe_emit_property (MyParserData *data)
if (data->classes == NULL)
break;
property_name = (const gchar *)data->attribute_values[i];
if (needs_explicit_setting (data, class_name, property_name))
break;
if (value_is_default (data, class_name, property_name, value_string))
return;
}
......
......@@ -2,64 +2,53 @@
<interface domain="gtk30">
<!-- interface-requires gtk+ 3.10 -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<property name="icon_name">help-about</property>
</object>
<template class="GtkAboutDialog" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="resizable">0</property>
<property name="type_hint">dialog</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar" id="headerbar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="show-close-button">True</property>
<property name="visible">1</property>
<property name="show-close-button">1</property>
<child type="title">
<object class="GtkStackSwitcher" id="stack_switcher">
<property name="visible">False</property>
<property name="stack">stack</property>
<property name="no-show-all">True</property>
<property name="no-show-all">1</property>
</object>
</child>
</object>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<property name="border_width">5</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="logo_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<property name="icon_name">image-missing</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<property name="label">name label</property>
<property name="justify">center</property>
<property name="selectable">True</property>
<property name="selectable">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
......@@ -67,104 +56,88 @@
<object class="GtkStack" id="stack">
<property name="width_request">400</property>
<property name="height_request">100</property>
<property name="visible">True</property>
<property name="homogeneous">True</property>
<property name="visible">1</property>
<property name="transition-type">over-up-down</property>
<property name="transition-duration">600</property>
<signal name="notify::visible-child" handler="stack_visible_child_notify" swapped="no"/>
<child>
<object class="GtkBox" id="page_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkLabel" id="version_label">
<property name="can_focus">False</property>
<property name="label">version 1.0</property>
<property name="justify">center</property>
<property name="selectable">True</property>
<property name="no-show-all">True</property>
<property name="selectable">1</property>
<property name="no-show-all">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="comments_label">
<property name="can_focus">False</property>
<property name="label">comments</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<property name="no-show-all">True</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
<property name="no-show-all">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">0</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<property name="visible">1</property>
<property name="homogeneous">1</property>
<child>
<object class="GtkLabel" id="website_label">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="no_show_all">1</property>
<property name="label">http://website.com</property>
<property name="selectable">True</property>
<property name="selectable">1</property>
<signal name="activate-link" handler="emit_activate_link" object="GtkAboutDialog" swapped="yes"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="fill">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">0</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="license_label">
<property name="can_focus">False</property>
<property name="label">license</property>
<property name="use_markup">True</property>
<property name="use_markup">1</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<property name="no_show_all">True</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
<property name="no_show_all">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">0</property>
<property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="copyright_label">
<property name="can_focus">False</property>
<property name="label">copyright</property>
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="selectable">True</property>
<property name="no-show-all">True</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
<property name="no-show-all">1</property>
<property name="max-width-chars">60</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="fill">0</property>
<property name="pack_type">end</property>
<property name="position">4</property>
</packing>
......@@ -172,101 +145,66 @@
</object>
<packing>
<property name="name">main</property>
<property name="title" translatable="yes">About</property>
<property name="title" translatable="1">About</property>
</packing>
</child>
<child>
<object class="GtkBox" id="credits_page">
<property name="visible">False</property>
<property name="no-show-all">True</property>
<property name="can_focus">False</property>
<property name="no-show-all">1</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<style>
<class name="view"/>
</style>
<child>
<object class="GtkGrid" id="credits_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible">1</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="border_width">5</property>
<property name="orientation">vertical</property>
<property name="row_spacing">2</property>
<property name="column_spacing">8</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="expand">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">credits</property>
<property name="title" translatable="yes">Credits</property>
<property name="title" translatable="1">Credits</property>
</packing>
</child>
<child>
<object class="GtkBox" id="license_page">
<property name="visible">False</property>
<property name="no-show-all">True</property>
<property name="can_focus">False</property>
<property name="no-show-all">1</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="license_view">
<property name="visible">True</property>
<property name="editable">False</property>
<property name="visible">1</property>
<property name="editable">0</property>
<property name="left_margin">8</property>
<property name="right_margin">8</property>
<property name="cursor_visible">False</property>
<property name="cursor_visible">0</property>
<signal name="event-after" handler="text_view_event_after" swapped="no"/>
<signal name="key-press-event" handler="text_view_key_press_event" swapped="no"/>
<signal name="motion-notify-event" handler="text_view_motion_notify_event" swapped="no"/>
......@@ -274,28 +212,24 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="expand">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">license</property>
<property name="title" translatable="yes">License</property>
<property name="title" translatable="1">License</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="expand">1</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="expand">1</property>
<property name="position">1</property>
</packing>
</child>
......
......@@ -4,16 +4,16 @@
<template class="GtkActionBar" parent="GtkBin">
<child>
<object class="GtkRevealer" id="revealer">
<property name="visible">True</property>
<property name="visible">1</property>
<child>
<object class="GtkFrame" id="frame">
<property name="visible">True</property>
<property name="visible">1</property>
<style>
<class name="action-bar"/>
</style>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="spacing">6</property>
</object>
</child>
......
......@@ -2,7 +2,7 @@
<interface domain="gtk30">
<!-- interface-requires gtk+ 3.10 -->
<template class="GtkAppChooserDialog" parent="GtkDialog">
<property name="title" translatable="yes">Select Application</property>
<property name="title" translatable="1">Select Application</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
......@@ -10,11 +10,11 @@
<property name="spacing">2</property>
<child>
<object class="GtkSearchBar" id="search_bar">
<property name="visible">True</property>
<property name="visible">1</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="visible">1</property>
<property name="hexpand">1</property>
<property name="max-width-chars">40</property>
</object>
</child>
......@@ -31,24 +31,24 @@
</child>
<child>
<object class="GtkBox" id="inner_box">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">label</property>
<property name="wrap">True</property>
<property name="wrap">1</property>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">1</property>
<property name="position">2</property>
</packing>
</child>
......@@ -56,17 +56,17 @@
</child>
<child type="action">
<object class="GtkButton" id="cancel_button">
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">1</property>
<property name="use_underline">1</property>
<property name="label" translatable="1">_Cancel</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="ok_button">
<property name="visible">True</property>
<property name="label" translatable="yes">_Select</property>
<property name="use_underline">True</property>
<property name="can_default">True</property>
<property name="visible">1</property>
<property name="label" translatable="1">_Select</property>
<property name="use_underline">1</property>
<property name="can_default">1</property>
</object>
</child>
<action-widgets>
......@@ -75,19 +75,19 @@
</action-widgets>
</template>
<object class="GtkButton" id="show_more_button">
<property name="label" translatable="yes">_View All Applications</property>
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="1">_View All Applications</property>
<property name="visible">1</property>
<property name="use_underline">1</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<signal name="clicked" handler="show_more_button_clicked_cb" swapped="no"/>
</object>
<object class="GtkButton" id="software_button">
<property name="label" translatable="yes">_Find New Applications</property>
<property name="visible">True</property>
<property name="use_underline">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="label" translatable="1">_Find New Applications</property>
<property name="visible">1</property>
<property name="use_underline">1</property>
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<signal name="clicked" handler="software_button_clicked_cb" swapped="no"/>
</object>
<object class="GtkSizeGroup" id="buttons">
......
......@@ -32,21 +32,21 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay" id="overlay">
<property name="visible">True</property>
<property name="visible">1</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="width_request">400</property>
<property name="height_request">300</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visible">1</property>
<property name="can_focus">1</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="program_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visible">1</property>
<property name="can_focus">1</property>
<property name="model">program_list_sort</property>
<property name="headers_visible">False</property>
<property name="headers_visible">0</property>
<signal name="button-press-event" handler="widget_button_press_event_cb" swapped="no"/>
<signal name="row-activated" handler="program_list_selection_activated" swapped="no"/>
<child internal-child="selection">
......@@ -101,7 +101,7 @@
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="icon-name">gnome-software-symbolic</property>
<property name="pixel-size">48</property>
<property name="margin">12</property>
......@@ -112,8 +112,8 @@
</child>
<child>
<object class="GtkLabel" id="no_apps_label">
<property name="visible">True</property>
<property name="label" translatable="yes">No applications found.</property>
<property name="visible">1</property>
<property name="label" translatable="1">No applications found.</property>
<property name="halign">center</property>
<property name="valign">center</property>
<attributes>
......@@ -128,7 +128,7 @@
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">1</property>
</packing>
</child>
</template>
......
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk30">
<menu id='app-menu'>
<menu id="app-menu">
<section>
<item>
<!-- used for the application menu on MacOS. %s is replaced with the application name. -->
<attribute name='label' translatable='yes'>About %s</attribute>
<attribute name='action'>app.about</attribute>
<attribute name='x-gtk-private-special'>replace-appname</attribute>
<attribute name="label" translatable="yes">About %s</attribute>
<attribute name="action">app.about</attribute>
<attribute name="x-gtk-private-special">replace-appname</attribute>
</item>
</section>
<section>
<item>
<!-- used for the application menu on MacOS -->
<attribute name='label' translatable='yes'>Preferences</attribute>
<attribute name='action'>app.preferences</attribute>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
</section>
<section>
<item>
<!-- used for the application menu on MacOS -->
<attribute name='label' translatable='yes'>Services</attribute>
<attribute name='x-gtk-private-special'>services-submenu</attribute>
<attribute name="label" translatable="yes">Services</attribute>
<attribute name="x-gtk-private-special">services-submenu</attribute>
</item>
</section>
<section>
<item>
<!-- used for the application menu on MacOS. %s is replaced with the application name. -->
<attribute name='label' translatable='yes'>Hide %s</attribute>
<attribute name='x-gtk-private-special'>hide-this</attribute>
<attribute name='action'>gtkinternal.hide</attribute>
<attribute name="label" translatable="yes">Hide %s</attribute>
<attribute name="x-gtk-private-special">hide-this</attribute>
<attribute name="action">gtkinternal.hide</attribute>
</item>
<item>
<!-- used for the application menu on MacOS -->
<attribute name='label' translatable='yes'>Hide Others</attribute>
<attribute name='x-gtk-private-special'>hide-others</attribute>
<attribute name='action'>gtkinternal.hide-others</attribute>
<attribute name="label" translatable="yes">Hide Others</attribute>
<attribute name="x-gtk-private-special">hide-others</attribute>
<attribute name="action">gtkinternal.hide-others</attribute>
</item>
<item>
<!-- used for the application menu on MacOS -->
<attribute name='label' translatable='yes'>Show All</attribute>
<attribute name='x-gtk-private-special'>show-all</attribute>
<attribute name='action'>gtkinternal.show-all</attribute>
<attribute name="label" translatable="yes">Show All</attribute>
<attribute name="x-gtk-private-special">show-all</attribute>
<attribute name="action">gtkinternal.show-all</attribute>
</item>
</section>
<section>
<item>
<!-- used for the application menu on MacOS. %s is replaced with the application name. -->
<attribute name='label' translatable='yes'>Quit %s</attribute>
<attribute name='action'>app.quit</attribute>
<attribute name='x-gtk-private-special'>replace-appname</attribute>
<attribute name="label" translatable="yes">Quit %s</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="x-gtk-private-special">replace-appname</attribute>
</item>
</section>
</menu>
......
......@@ -4,167 +4,162 @@
<template class="GtkAssistant" parent="GtkWindow">
<child type="titlebar">
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
<property name="visible">1</property>
</object>
</child>
<child>
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="spacing">0</property>
<property name="visible">1</property>
<child>
<object class="GtkFrame" id="sidebar_frame">
<property name="visible">True</property>
<property name="visible">1</property>
<style>
<class name="sidebar"/>
</style>
<child>
<object class="GtkBox" id="sidebar">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
</object>
</child>
<child type="label_item">
</child>
<child type="label_item"/>
</object>
<packing>
<property name="fill">False</property>
<property name="fill">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="content_box">
<property name="visible">True</property>
<property name="border_width">0</property>
<property name="visible">1</property>
<property name="orientation">vertical</property>
<property name="spacing">0</property>
<child>
<object class="GtkNotebook" id="content">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="visible">1</property>
<property name="can_focus">1</property>
<property name="show_tabs">0</property>
<property name="show_border">0</property>
<signal name="remove" handler="assistant_remove_page_cb" swapped="no"/>
<child type="tab">
</child>
<child type="tab"/>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="action_area">
<property name="visible">True</property>
<property name="visible">1</property>
<property name="halign">end</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="apply">
<property name="label" translatable="yes">_Apply</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_underline">True</property>