Skip to content

Commit

Permalink
finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
grantshandy committed Jul 27, 2020
1 parent 9cb964e commit 9cd0276
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 67 deletions.
29 changes: 0 additions & 29 deletions src/app_window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -270,33 +270,4 @@
</object>
</child>
</object>
<object class="GtkWindow" id="preferences-window">
<property name="can_focus">False</property>
<property name="default_width">440</property>
<property name="default_height">250</property>
<child type="titlebar">
<placeholder/>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
33 changes: 0 additions & 33 deletions src/app_window.ui~
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_top">6</property>
<property name="margin_bottom">6</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="about-button">
Expand Down Expand Up @@ -274,33 +270,4 @@
</object>
</child>
</object>
<object class="GtkWindow" id="preferences-window">
<property name="can_focus">False</property>
<property name="default_width">440</property>
<property name="default_height">250</property>
<child type="titlebar">
<placeholder/>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn launch() {

// Import app_window.ui and set the app_window as main window.
let builder = gtk::Builder::new_from_string(include_str!("app_window.ui"));
let main_window: gtk::Window = builder.get_object("app_window").unwrap();
let main_window: gtk::Window = builder.get_object("app-window").unwrap();

// Import translate, about and verbose buttons from builder.
let translate_button: gtk::Button = builder.get_object("translate-button").unwrap();
Expand All @@ -31,8 +31,6 @@ pub fn launch() {

let mut input_lang_box: gtk::ComboBoxText = builder.get_object("input-lang").unwrap();
let mut output_lang_box: gtk::ComboBoxText = builder.get_object("output-lang").unwrap();



let mut lang_codes = HashMap::new();
lang_codes.insert("English", "en");
Expand All @@ -41,8 +39,9 @@ pub fn launch() {
lang_codes.insert("Spanish", "es");
lang_codes.insert("Detect", "");

// Set header bar settings.
// Set header bar settings.
header_bar.set_has_subtitle(true);
header_bar.set_title(Some("Translator"));
header_bar.set_subtitle(Some("This is a test subtitle!"));

// Execute about_button function.
Expand All @@ -56,6 +55,7 @@ pub fn launch() {
about_window.set_copyright(Some("Copyright © 2020 Skyline Coding Club"));
about_window.set_license_type(Gpl30);
about_window.set_wrap_license(false);
about_window.set_logo_icon_name(Some("gtktranslate"));
about_window.set_title("About gtktranslate");
about_window.set_authors(&["Grant Handy"]);
about_window.add_credit_section(&"Club Members", &[
Expand All @@ -70,7 +70,7 @@ pub fn launch() {
"Ayush Ranjan",
"Alex Rose",
]);
about_window.show_all();
about_window.show_all();
});

// Execute translate_button function.
Expand Down

0 comments on commit 9cd0276

Please sign in to comment.