GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

...
 
Commits (24)
......@@ -8,10 +8,13 @@ variables:
BUNDLE: "org.gnome.Usage.Devel.flatpak"
build:
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- dnf update -y
- dnf install -y gcc meson gettext gtk-doc vala gtk3-devel libgtop2-devel
desktop-file-utils libdazzle-devel tracker-devel
redhat-rpm-config
image: fedora:29
stage: build
script:
......
[submodule "subprojects/libhandy"]
path = subprojects/libhandy
url = https://gitlab.gnome.org/GNOME/libhandy.git
<svg xmlns="http://www.w3.org/2000/svg" width="16.011" height="16">
<g fill="#2e3436">
<path d="M8.017 1.001c-2.049 0-4.098.78-5.656 2.338-3.116 3.116-3.116 8.197 0 11.313a1 1 0 101.414-1.414 5.984 5.984 0 010-8.485 5.984 5.984 0 018.485 0 5.984 5.984 0 010 8.485 1 1 0 101.414 1.414c3.116-3.116 3.116-8.197 0-11.313a7.975 7.975 0 00-5.657-2.338z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1;marker:none" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/>
<path d="M10.017 8.995a2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2 2 2 0 012 2z"/>
<path d="M4.01 4.238a.75.75 0 00-.524 1.289l3 3A.751.751 0 107.55 7.464l-3-3a.75.75 0 00-.54-.226zM7.517 1.995v2h1v-2z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible" fill-rule="evenodd"/>
<path d="M3.422 3.693l-.707.707 1.414 1.414.707-.707zM1.017 8.495v1h2v-1zM13.017 8.495v1h2v-1zM12.613 3.693L11.2 5.107l.707.707L13.32 4.4zM4.129 12.177l-1.414 1.414.707.707 1.414-1.414zM11.906 12.177l-.707.707 1.414 1.414.707-.707z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible" fill-rule="evenodd"/>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/Usage">
<file preprocess="xml-stripblanks">icons/hicolor/scalable/status/speedometer-symbolic.svg</file>
<file compressed="true">interface/adwaita.css</file>
<file preprocess="xml-stripblanks">ui/primary-menu.ui</file>
<file preprocess="xml-stripblanks">ui/header-bar.ui</file>
......
......@@ -2,12 +2,15 @@
<interface>
<!-- interface-requires gtk+ 3.12 -->
<template class="UsageHeaderBar" parent="GtkHeaderBar">
<template class="UsageHeaderBar" parent="HdyHeaderBar">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<property name="centering-policy">strict</property>
<child type="title">
<object class="GtkStackSwitcher" id="stack_switcher">
<object class="HdyViewSwitcherTitle" id="view_switcher_title">
<property name="visible">True</property>
<property name="title" translatable="yes">Usage</property>
<signal name="notify::title-visible" handler="on_title_visible_changed"/>
</object>
</child>
......@@ -27,14 +30,22 @@
</child>
<child>
<object class="GtkToggleButton" id="performance_search_button">
<object class="GtkRevealer" id="performance_search_revealer">
<property name="visible">True</property>
<signal name="toggled" handler="on_performance_search_button_toggled"/>
<!-- This allows the button to take space even when it is concealed, keeping the header bar's sizing homogeneous. -->
<property name="transition-duration">0</property>
<property name="transition-type">crossfade</property>
<child>
<object class="GtkImage">
<object class="GtkToggleButton" id="performance_search_button">
<property name="visible">True</property>
<property name="icon-name">system-search-symbolic</property>
<signal name="toggled" handler="on_performance_search_button_toggled"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="icon-name">system-search-symbolic</property>
</object>
</child>
</object>
</child>
</object>
......
......@@ -7,13 +7,18 @@
<child>
<object class="GtkPaned" id="paned">
<object class="HdyLeaflet" id="leaflet">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="can-swipe-back">True</property>
<property name="can-swipe-forward">True</property>
<property name="transition-type">under</property>
<property name="visible-child">content_box</property>
<child>
<object class="GtkBox" id="switcher_box">
<property name="visible">True</property>
<property name="hexpand">False</property>
<property name="hexpand-set">True</property>
<property name="width-request">200</property>
<style>
<class name="sidebar"/>
......@@ -22,19 +27,28 @@
</child>
<child>
<object class="GtkBox">
<object class="GtkBox" id="content_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="width-request">360</property>
<child>
<object class="GtkSearchBar" id="search_bar">
<property name="visible">True</property>
<object class="HdySearchBar" id="search_bar">
<property name="visible">True</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<object class="HdyClamp">
<property name="visible">True</property>
<property name="width-request">350</property>
<signal name="search-changed" handler="on_search_entry_changed"/>
<property name="hexpand">True</property>
<property name="maximum-size">400</property>
<property name="tightening-threshold">300</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="visible">True</property>
<property name="hexpand">True</property>
<signal name="search-changed" handler="on_search_entry_changed"/>
</object>
</child>
</object>
</child>
</object>
......@@ -45,10 +59,18 @@
<property name="visible">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkBox" id="performance_content">
<object class="HdyClamp">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">30</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="expand">True</property>
<child>
<object class="GtkBox" id="performance_content">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">30</property>
</object>
</child>
</object>
</child>
</object>
......
......@@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 3.10 -->
<template class="UsageProcessRow" parent="GtkListBoxRow">
<property name="visible">True</property>
<property name="width-request">600</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
......
......@@ -18,14 +18,19 @@
</object>
</child>
<child>
<object class="GtkPaned">
<object class="HdyLeaflet" id="leaflet">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="position">360</property>
<property name="can-swipe-back">True</property>
<property name="can-swipe-forward">True</property>
<property name="transition-type">over</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="hexpand">False</property>
<property name="hexpand-set">True</property>
<property name="orientation">vertical</property>
<property name="width-request">360</property>
<style>
<class name="view" />
</style>
......@@ -69,10 +74,23 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<style>
<class name="sidebar" />
</style>
</object>
<packing>
<property name="allow-visible">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="width-request">360</property>
<child>
<object class="UsageStorageGraph" id="graph">
<property name="visible">True</property>
......
......@@ -11,6 +11,13 @@
<programming-language>Vala</programming-language>
<homepage rdf:resource="https://wiki.gnome.org/Apps/Usage" />
<bug-database rdf:resource="https://gitlab.gnome.org/GNOME/gnome-usage/issues" />
<maintainer>
<foaf:Person>
<foaf:name>Adrien Plazas</foaf:name>
<foaf:mbox rdf:resource="mailto:kekun.plazas@laposte.net" />
<gnome:userid>aplazas</gnome:userid>
</foaf:Person>
</maintainer>
<maintainer>
<foaf:Person>
<foaf:name>Petr Štětka</foaf:name>
......
......@@ -2,7 +2,7 @@ project(
'gnome-usage', ['vala', 'c'],
version: '3.33.2',
license: 'GPL3',
meson_version: '>= 0.37.0'
meson_version: '>= 0.38.0'
)
cc = meson.get_compiler('c')
......@@ -15,14 +15,54 @@ gio_unix_dep = dependency('gio-unix-2.0')
gtk_dep = dependency('gtk+-3.0', version : '>=3.20.10')
libdazzle_dep = dependency('libdazzle-1.0', version : '>=3.30')
libgtop_dep = dependency('libgtop-2.0', version : '>= 2.34.0')
libhandy_dep = dependency('libhandy-1', version : '>= 0.82.0', required: false)
tracker_dep = dependency('tracker-sparql-2.0')
if not libhandy_dep.found()
libhandy_subproj = subproject(
'libhandy',
default_options: [
'examples=false',
'glade_catalog=disabled',
'tests=false',
]
)
# When using libhandy as subproject, make sure we get the VAPI file
libhandy_dep = declare_dependency(
dependencies: [
libhandy_subproj.get_variable('libhandy_dep'),
libhandy_subproj.get_variable('libhandy_vapi'),
]
)
libhandy_vapidir = join_paths(meson.build_root(), 'subprojects', 'libhandy', 'src')
else
libhandy_vapidir = ''
endif
gnome = import('gnome')
i18n = import('i18n')
add_project_arguments (
'-DHANDY_USE_UNSTABLE_API',
language: 'c'
)
add_project_arguments (
# FIXME Drop once we depend on libhandy 1.0.
'--disable-since-check',
language: 'vala'
)
po_dir = join_paths(meson.source_root(), 'po')
vapi_dir = join_paths (meson.source_root (), 'vapi')
vapi_dirs = [ '--vapidir=@0@'.format(vapi_dir) ]
if libhandy_vapidir != ''
vapi_dirs += '--vapidir=@0@'.format(libhandy_vapidir)
endif
if get_option('profile') == 'development'
profile = 'Devel'
name_suffix = ' (Development)'
......
......@@ -43,6 +43,7 @@
"sources": [
{
"type": "git",
"branch": "tracker-2.3",
"url": "https://gitlab.gnome.org/GNOME/tracker.git"
}
]
......@@ -66,6 +67,21 @@
}
]
},
{
"name" : "libhandy",
"buildsystem" : "meson",
"config-opts" : [
"-Dexamples=false",
"-Dglade_catalog=disabled",
"-Dtests=false"
],
"sources" : [
{
"type" : "git",
"url" : "https://gitlab.gnome.org/GNOME/libhandy.git"
}
]
},
{
"buildsystem": "meson",
"config-opts": [
......
......@@ -2,15 +2,14 @@
# Copyright (C) 2017 gnome-usage's COPYRIGHT HOLDER
# This file is distributed under the same license as the gnome-usage package.
#
# Matej Urbančič <mateju@svn.gnome.org>, 2017.
# Matej Urbančič <mateju@svn.gnome.org>, 2017–2020.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-usage master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"usage&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-05-03 12:38+0000\n"
"PO-Revision-Date: 2017-05-09 21:28+0200\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-usage/issues\n"
"POT-Creation-Date: 2020-05-24 17:38+0000\n"
"PO-Revision-Date: 2020-06-05 08:48+0200\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
......@@ -20,27 +19,39 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Generator: Poedit 2.0.1\n"
"X-Generator: Poedit 2.3\n"
#: ../data/org.gnome.Usage.desktop:3 ../data/ui/window.ui.h:1
#: ../src/application.vala:76
#: data/org.gnome.Usage.appdata.xml.in.in:5
msgid "GNOME Usage"
msgstr "Uporaba GNOME"
#: data/org.gnome.Usage.appdata.xml.in.in:6
msgid "A nice way to view information about use of system resources"
msgstr "Učinkovit način za pregled podrobnosti o uporabi sistemskih virov"
#: data/org.gnome.Usage.appdata.xml.in.in:8
msgid ""
"A simple GNOME 3 application to monitor and analyze system resources such as "
"processing, memory, and storage."
msgstr ""
"Enostaven program GNOME za nadzor in preučevanje sistemskih virov, kot so "
"procesorska moč, pomnilnik in prostor."
#: data/org.gnome.Usage.desktop.in.in:3 src/application.vala:79
#: src/window.vala:41
msgid "Usage"
msgstr "Uporaba"
msgstr "Podrobnosti uporabe sistema"
#: ../data/org.gnome.Usage.desktop:4
#: data/org.gnome.Usage.desktop.in.in:4
msgid ""
"A nice way to view information about use of system resources, like memory "
"and disk space"
msgstr ""
#. Translators: Do NOT translate or transliterate this text (this is an icon file name)!
#: ../data/org.gnome.Usage.desktop:8
#, fuzzy
msgid "application-default-icon"
msgstr "Le ikono programa"
"Učinkovit način za pregled podrobnosti o uporabi sistemskih virov, kot sta "
"pomnilnik in prostor na disku."
#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: ../data/org.gnome.Usage.desktop:13
#: data/org.gnome.Usage.desktop.in.in:13
msgid ""
"Monitor;System;Process;CPU;Memory;Network;History;Usage;Performance;Task;"
"Manager;"
......@@ -48,246 +59,259 @@ msgstr ""
"Nadzor;Sistem;Opravila;CPE;OPE;Pomnilnik;Omrežje;Zgodovina;Uporaba;Zmožnost;"
"Naloge;Upravljalnik"
#: ../data/org.gnome.Usage.gschema.xml.h:1
#: data/org.gnome.Usage.gschema.xml.in:5
msgid "A list of processes which we don’t want killed"
msgstr ""
msgstr "Seznam procesov, ki jih ni priporočljivo zaustaviti"
#: ../data/org.gnome.Usage.gschema.xml.h:2
#: data/org.gnome.Usage.gschema.xml.in:6
msgid "This list is used for filtering which processes the user can’t stop."
msgstr ""
"Seznam se uporablja za filtriranje opravil, ki jih uporabnik ne more "
"zaustaviti."
#: data/ui/memory-speedometer.ui:38
msgid "RAM"
msgstr "RAM"
#: data/ui/memory-speedometer.ui:53 data/ui/storage-view.ui:46
#: data/ui/swap-speedometer.ui:51
msgid "Used"
msgstr "Uporabljeno"
#: data/ui/memory-speedometer.ui:77 data/ui/storage-view.ui:53
#: data/ui/swap-speedometer.ui:75
msgid "Available"
msgstr "Razpoložljivo"
#: data/ui/no-results-found-view.ui:23
msgid "No results found"
msgstr "Ni najdenih zadetkov"
#: data/ui/no-results-found-view.ui:32
msgid "Try a different search"
msgstr "Poskusite z drugačnim iskalnim nizom"
#: data/ui/primary-menu.ui:14
msgid "_About Usage"
msgstr "_O programu"
#: data/ui/primary-menu.ui:29
msgid "Group system processes"
msgstr "Skupinska sistemska opravila"
#: data/ui/primary-menu.ui:37
msgid "Show all processes"
msgstr "Pokaži vsa opravila"
#: ../data/ui/header-bar.ui.h:1 ../src/storage-actionbar.vala:88
#: ../src/storage-row.vala:373
#. Translators: This sentence is later suffixed with an application name. Example: “Force Quit Videos?”
#: data/ui/quit-process-dialog.ui:9
msgid "Force Quit %s?"
msgstr "Ali želite vsiliti končanje %s?"
#: data/ui/quit-process-dialog.ui:10
msgid "Unsaved work might be lost."
msgstr "Neshranjeno delo bo morda izgubljeno."
#: data/ui/quit-process-dialog.ui:16
msgid "Cancel"
msgstr "Prekliči"
#: ../src/application.vala:49
msgid "About"
msgstr "O programu"
#: data/ui/quit-process-dialog.ui:24
msgid "Force Quit"
msgstr "Vsili končanje"
#: data/ui/storage-actionbar.ui:17
#| msgid "Delete"
msgid "Delete…"
msgstr "Izbriši …"
#: data/ui/storage-view.ui:37
msgid "Home Partition"
msgstr "Osebni razdelek (home)"
#: data/ui/swap-speedometer.ui:36
msgid "Swap"
msgstr "Izmenjevalni razdelek"
#: ../src/application.vala:52
msgid "Quit"
msgstr "Končaj"
#: src/app-item.vala:71
msgid "System"
msgstr "Sistem"
#: ../src/application.vala:77
#: src/application.vala:80
msgid ""
"A nice way to view information about use of system resources, like memory "
"and disk space."
msgstr ""
"Učinkovit način za pregled podrobnosti o uporabi sistemskih virov, kot sta "
"pomnilnik in prostor na disku."
#: ../src/application.vala:79
#: src/application.vala:83
msgid "translator-credits"
msgstr ""
"Matjaž Horvat <m@owca.info>\n"
"Matic Žgur <mr.zgur@gmail.com>\n"
"Andraž Tori <andraz.tori1@guest.arnes.si>\n"
"Matej Urbančič <mateju@svn.gnome.org>"
"Matej Urbančič <mateju@svn.gnome.org>\n"
"Matjaž Horvat\n"
"Matic Žgur\n"
"Andraž Tori"
#: ../src/application.vala:81
#: src/application.vala:85
msgid "Websites"
msgstr "Spletne strani"
#: ../src/cpu-sub-view.vala:11 ../src/graph-stack-switcher.vala:25
#: ../src/process-dialog.vala:30
#: src/cpu-sub-view.vala:32 src/graph-stack-switcher.vala:45
msgid "Processor"
msgstr "Procesor"
#: ../src/cpu-sub-view.vala:37
#, fuzzy
msgid "No applications using processor."
msgstr "Procesor"
#: src/graph-stack-switcher.vala:46 src/memory-sub-view.vala:32
msgid "Memory"
msgstr "Pomnilnik"
#: ../src/data-view.vala:8
msgid "Data"
msgstr "Podatki"
#: src/performance-view.vala:48
msgid "Performance"
msgstr "Zmogljivost"
#: ../src/graph-block.vala:45
msgid "Others"
msgstr "Drugi"
#: src/storage/storage-actionbar.vala:40
#, c-format
msgid "%s selected"
msgstr "%s izbranih"
#: ../src/graph-block.vala:47 ../src/storage-item.vala:120
msgid "Available"
msgstr "Razpoložljivo"
#: src/storage/storage-actionbar.vala:45
msgid "Are you sure you want to permanently delete selected items?"
msgstr "Ali ste prepričani, da želite trajno izbrisati izbrane predmete?"
#: ../src/graph-stack-switcher.vala:26 ../src/memory-sub-view.vala:11
#: ../src/process-dialog.vala:31
msgid "Memory"
msgstr "Pomnilnik"
#: src/storage/storage-actionbar.vala:49
msgid "If you delete these items, they will be permanently lost."
msgstr "Izbrisani predmeti, bodo trajno izgubljeni."
#: ../src/header-bar.vala:138
#, c-format
msgid "%u selected"
msgid_plural "%u selected"
msgstr[0] "%u izbranih"
msgstr[1] "%u izbran"
msgstr[2] "%u izbrana"
msgstr[3] "%u izbrani"
#: ../src/header-bar.vala:140
msgid "Click on items to select them"
msgstr "S klikom se predmeti izberejo"
#: ../src/header-bar.vala:206
msgid "Select all"
msgstr "Izberi vse"
#: ../src/header-bar.vala:210
msgid "Select None"
msgstr "Odstrani izbor"
#: ../src/memory-sub-view.vala:37
#, fuzzy
msgid "No applications using memory."
msgstr "_Pomnilnik:"
#: ../src/performance-view.vala:25
#, fuzzy
msgid "Performance"
msgstr "Možnosti izvrševanja"
#: ../src/power-view.vala:8
msgid "Power"
msgstr "Napajanje"
#: ../src/process-dialog.vala:36
msgid "Stop"
msgstr "Zaustavi"
#: ../src/process-dialog.vala:123
msgid "Running"
msgstr "Zagnano"
#: ../src/process-dialog.vala:126
msgid "Sleeping"
msgstr "V pripravljenosti"
#: ../src/process-dialog.vala:129
#, fuzzy
msgid "Dead"
msgstr "<nedejavno>"
#. common
#: ../src/storage-actionbar.vala:15 ../src/storage-row.vala:254
msgid "Move to"
msgstr "Premakni na"
#: ../src/storage-actionbar.vala:17 ../src/storage-row.vala:258
msgid "Delete"
msgstr "Delete"
#: ../src/storage-actionbar.vala:20
msgid "Move to Trash"
msgstr "Premakni v smeti"
#. root
#: ../src/storage-actionbar.vala:27
#, fuzzy
msgid "Empty folder"
#: src/storage/storage-row-popover.vala:32
msgid ""
"Operating system files are an essential part of your system and cannot be "
"removed."
msgstr ""
"Mapa v »{1}» že obstaja in ni prazna.\n"
"\n"
"Mapo lahko prezrete, prepišete, dodate vsebino ali pa končate."
#. trash
#: ../src/storage-actionbar.vala:32 ../src/storage-row.vala:243
msgid "Restore"
msgstr "Obnovi"
#: ../src/storage-actionbar.vala:34 ../src/storage-row.vala:246
#, fuzzy
msgid "Delete from Trash"
msgstr "_Izbriši iz smeti"
#: ../src/storage-actionbar.vala:87 ../src/storage-row.vala:372
#, fuzzy
msgid "Select destination folder"
msgstr "Ciljno mesto ni mapa."
#: ../src/storage-actionbar.vala:90 ../src/storage-row.vala:375
msgid "Select"
msgstr "Izbor"
#: ../src/storage-actionbar.vala:140
#, fuzzy, c-format
msgid "Are you sure you want to permanently delete this items %s?"
msgstr "Ali ste prepričani, da želite trajno izbrisati \"%s\"?"
#: ../src/storage-actionbar.vala:141
#, fuzzy
msgid "If you delete these items, they will be permanently lost."
msgstr "V primeru da sporočilce izbrišete, bo trajno izgubljeno."
"Datoteke operacijskega sistema so nepogrešljivi del sistema in jih ni mogoče "
"odstraniti."
#: ../src/storage-actionbar.vala:191 ../src/storage-row.vala:322
msgid "Empty all items from Trash?"
msgstr "Ali naj se izbrišejo vsi predmeti iz smeti?"
#: src/storage/storage-view.vala:78
msgid "Storage"
msgstr "Prostor"
#: ../src/storage-actionbar.vala:192 ../src/storage-row.vala:323
msgid "All items in the Trash will be permanently deleted."
msgstr "Vsi predmeti v smeteh bodo trajno izbrisani."
#: src/storage/storage-view.vala:245
msgid "Operating System"
msgstr "Operacijski sistem"
#: ../src/storage-actionbar.vala:214 ../src/storage-row.vala:302
#, fuzzy, c-format
msgid "Empty all items from %s?"
msgstr "Ali naj se izbrišejo vsi predmeti iz smeti?"
#: src/storage/storage-view.vala:271
msgid "Scanning directories"
msgstr "Poteka preiskovanje map"
#: ../src/storage-actionbar.vala:215 ../src/storage-row.vala:303
#, fuzzy, c-format
msgid "All items in the %s will be moved to the Trash."
msgstr "Izbriši vse predmete v smeteh"
#~ msgid "application-default-icon"
#~ msgstr "application-default-icon"
#: ../src/storage-analyzer.vala:65
msgid "Storage 1"
msgstr "Shramba 1"
#~ msgid "About"
#~ msgstr "O programu"
#: ../src/storage-analyzer.vala:69
msgid "Storage 2"
msgstr "Shramba 2"
#~ msgid "Quit"
#~ msgstr "Končaj"
#: ../src/storage-analyzer.vala:76
msgid "Capacity"
msgstr "Zmogljivost"
#~ msgid "No applications using processor."
#~ msgstr "Ni programa, ki bi uporabljaj procesorsko moč."
#: ../src/storage-analyzer.vala:618
msgid "Home"
msgstr "Osebna mapa"
#~ msgid "Data"
#~ msgstr "Podatki"
#: ../src/storage-item.vala:84
msgid "Trash"
msgstr "Smeti"
#~ msgid "Others"
#~ msgstr "Drugi"
#: ../src/storage-item.vala:108
msgid "Operating System"
msgstr "Operacijski sistem"
#~ msgid "Click on items to select them"
#~ msgstr "S klikom se predmeti izberejo"
#: ../src/storage-row.vala:228
msgid "Empty"
msgstr "Prazno"
#~ msgid "Select all"
#~ msgstr "Izberi vse"
#: ../src/storage-row.vala:233
msgid "Empty Trash"
msgstr "Izprazni smeti"
#~ msgid "Select None"
#~ msgstr "Odstrani izbor"
#: ../src/storage-row.vala:253 ../src/storage-row.vala:347
msgid "Rename"
msgstr "Preimenuj"
#~ msgid "No applications using memory."
#~ msgstr "Ni programa, ki bi uporabljaj pomnilnik."
#: ../src/storage-row.vala:257
msgid "Move to trash"
msgstr "Premakni v smeti"
#~ msgid "Power"
#~ msgstr "Napajanje"
#: ../src/storage-row.vala:419
#, c-format
msgid "Are you sure you want to permanently delete %s?"
msgstr "Ali zares želite trajno izbrisati %s?"
#~ msgid "Stop"
#~ msgstr "Zaustavi"
#: ../src/storage-row.vala:420
msgid "If you delete an item, it will be permanently lost."
msgstr "V primeru, da predmet izbrišete, bo trajno izgubljen."
#~ msgid "Running"
#~ msgstr "Zagnano"
#: ../src/storage-view.vala:12
msgid "Storage"
msgstr "Shramba"
#~ msgid "Sleeping"
#~ msgstr "V pripravljenosti"
#~ msgid "Dead"
#~ msgstr "<nedejavno>"
#~ msgid "Move to"
#~ msgstr "Premakni na"
#~ msgid "Move to Trash"
#~ msgstr "Premakni v smeti"
#~ msgid "Empty folder"
#~ msgstr "Prazna mapa"
#~ msgid "Restore"
#~ msgstr "Obnovi"
#~ msgid "Delete from Trash"
#~ msgstr "Izbriši iz smeti"
#~ msgid "Select destination folder"
#~ msgstr "Izbor ciljne mape"
#~ msgid "Select"
#~ msgstr "Izbor"
#~ msgid "Empty all items from Trash?"
#~ msgstr "Ali naj se izbrišejo vsi predmeti iz smeti?"
#~ msgid "All items in the Trash will be permanently deleted."
#~ msgstr "Vsi predmeti v smeteh bodo trajno izbrisani."
#~ msgid "Empty all items from %s?"
#~ msgstr "Ali želite izprazniti %s?"
#~ msgid "All items in the %s will be moved to the Trash."
#~ msgstr "Vsi predmeti v %s bodo premaknjeni v smeti."
#~ msgid "Storage 1"
#~ msgstr "Shramba 1"
#~ msgid "Storage 2"
#~ msgstr "Shramba 2"
#~ msgid "Capacity"
#~ msgstr "Skupna velikost"
#~ msgid "Home"
#~ msgstr "Osebna mapa"
#~ msgid "Trash"
#~ msgstr "Smeti"
#~ msgid "Empty"
#~ msgstr "Prazno"
#~ msgid "Empty Trash"
#~ msgstr "Izprazni smeti"
#~ msgid "Rename"
#~ msgstr "Preimenuj"
#~ msgid "Move to trash"
#~ msgstr "Premakni v smeti"
#~ msgid "Are you sure you want to permanently delete %s?"
#~ msgstr "Ali zares želite trajno izbrisati %s?"
#~ msgid "If you delete an item, it will be permanently lost."
#~ msgstr "V primeru, da predmet izbrišete, bo trajno izgubljen."
#: ../src/storage-view.vala:33
msgid "No content here"
msgstr "Ni vsebine"
#~ msgid "No content here"
#~ msgstr "Ni vsebine"
......@@ -61,6 +61,9 @@ namespace Usage
base.startup();
add_action_entries(app_entries, this);
set_accels_for_action ("app.search", {"<Primary>f"});
var icon_theme = Gtk.IconTheme.get_default ();
icon_theme.add_resource_path ("/org/gnome/Usage/icons/hicolor");
}
private void on_about(GLib.SimpleAction action, GLib.Variant? parameter)
......
......@@ -38,7 +38,6 @@ namespace Usage
cpu_graph.hexpand = true;
var cpu_graph_box = new GraphBox(cpu_graph);
cpu_graph_box.height_request = 225;
cpu_graph_box.width_request = 600;
cpu_graph_box.valign = Gtk.Align.START;
process_list_box = new ProcessListBox(ProcessListBoxType.PROCESSOR);
......@@ -53,7 +52,6 @@ namespace Usage
no_process_view = new NoResultsFoundView();
var cpu_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
cpu_box.halign = Gtk.Align.CENTER;
cpu_box.pack_start(label, false, false, 0);
cpu_box.pack_start(cpu_graph_box, false, false, 0);
cpu_box.pack_start(spinner, true, true, 0);
......
......@@ -29,10 +29,13 @@ namespace Usage
}
[GtkTemplate (ui = "/org/gnome/Usage/ui/header-bar.ui")]
public class HeaderBar : Gtk.HeaderBar
public class HeaderBar : Hdy.HeaderBar
{
[GtkChild]
private Gtk.StackSwitcher stack_switcher;
private Hdy.ViewSwitcherTitle view_switcher_title;
[GtkChild]
private Gtk.Revealer performance_search_revealer;
[GtkChild]
private Gtk.ToggleButton performance_search_button;
......@@ -44,22 +47,28 @@ namespace Usage
private HeaderBarMode mode;
private Usage.PrimaryMenu menu;
public bool title_visible { get; private set; }
public HeaderBar(Gtk.Stack stack)
{
mode = HeaderBarMode.PERFORMANCE;
menu = new Usage.PrimaryMenu();
stack_switcher.set_stack(stack);
view_switcher_title.set_stack(stack);
this.primary_menu_button.set_popover(menu);
set_mode(HeaderBarMode.PERFORMANCE);
}
construct {
update_title_visible ();
}
public void set_mode(HeaderBarMode mode)
{
switch(this.mode)
{
case HeaderBarMode.PERFORMANCE:
performance_search_button.hide ();
performance_search_revealer.reveal_child = false;
break;
case HeaderBarMode.STORAGE:
break;
......@@ -68,17 +77,24 @@ namespace Usage
switch(mode)
{
case HeaderBarMode.PERFORMANCE:
show_stack_switcher();
performance_search_button.show();
performance_search_revealer.reveal_child = true;
break;
case HeaderBarMode.STORAGE:
show_stack_switcher();
break;
}
menu.mode = mode;
this.mode = mode;
}
private void update_title_visible () {
title_visible = view_switcher_title.title_visible;
}
[GtkCallback]
private void on_title_visible_changed () {
update_title_visible ();
}
[GtkCallback]
private void on_performance_search_button_toggled () {
/* TODO: Implement a saner way of toggling this mode. */
......@@ -90,22 +106,6 @@ namespace Usage
return mode;
}
public void show_title()
{
set_custom_title(null);
set_title(title_text);
}
public void set_title_text(string title)
{
this.title_text = title;
}
public void show_stack_switcher()
{
set_custom_title(stack_switcher);
}
public void action_on_search()
{
switch(mode)
......
......@@ -55,7 +55,6 @@ namespace Usage
speedometers.margin_top = 30;
var memory_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
memory_box.halign = Gtk.Align.CENTER;
memory_box.pack_start(label, false, false, 0);
memory_box.pack_start(speedometers, false, false, 0);
memory_box.pack_start(spinner, true, true, 0);
......
......@@ -57,6 +57,7 @@ deps = [
libgtop_dep,
tracker_dep,
libdazzle_dep,
libhandy_dep,
cc.find_library('m'),
valac.find_library('config', dirs: vapi_dir),
valac.find_library('stopgap', dirs: vapi_dir),
......@@ -77,6 +78,6 @@ executable(
vala_sources + resources,
dependencies: deps,
c_args: c_args,
vala_args: '--vapidir=' + vapi_dir,
vala_args: vapi_dirs,
install: true
)
......@@ -32,7 +32,7 @@ namespace Usage
private Gtk.Box performance_content;
[GtkChild]
private Gtk.SearchBar search_bar;
private Hdy.SearchBar search_bar;
[GtkChild]
private Gtk.SearchEntry search_entry;
......@@ -46,6 +46,7 @@ namespace Usage
{
name = "PERFORMANCE";
title = _("Performance");
icon_name = "speedometer-symbolic";
sub_views = new View[]
{
......
......@@ -76,6 +76,7 @@ public class Usage.StorageView : Usage.View {
construct {
name = "STORAGE";
title = _("Storage");
icon_name = "drive-harddisk-symbolic";
try {
connection = Sparql.Connection.get ();
......
......@@ -23,6 +23,7 @@ namespace Usage
public abstract class View : Gtk.Bin
{
public string title;
public string icon_name;
protected View ()
{
......
......@@ -29,6 +29,7 @@ namespace Usage
public class Window : Gtk.ApplicationWindow
{
private Usage.HeaderBar header_bar;
private Hdy.ViewSwitcherBar viewswitcher_bar;
private View[] views;
public Window(Gtk.Application application)
......@@ -36,7 +37,6 @@ namespace Usage
GLib.Object(application : application);
this.set_default_size(950, 600);
this.set_size_request(930, 300);
this.window_position = Gtk.WindowPosition.CENTER;
this.set_title(_("Usage"));
......@@ -51,9 +51,15 @@ namespace Usage
});
var stack = new Gtk.Stack();
stack.set_size_request(360, 200);
stack.visible = true;
stack.vexpand = true;
header_bar = new Usage.HeaderBar(stack);
set_titlebar(header_bar);
viewswitcher_bar = new Hdy.ViewSwitcherBar();
viewswitcher_bar.visible = true;
viewswitcher_bar.stack = stack;
header_bar.bind_property ("title-visible", viewswitcher_bar, "reveal", BindingFlags.SYNC_CREATE);
views = new View[]
{
......@@ -61,8 +67,10 @@ namespace Usage
new StorageView(),
};
foreach(var view in views)
foreach(var view in views) {
stack.add_titled(view, view.name, view.title);
stack.child_set (view, "icon-name", view.icon_name, null);
}
stack.notify.connect(() => {
if(stack.visible_child_name == views[Views.PERFORMANCE].name)
......@@ -75,7 +83,11 @@ namespace Usage
}
});
this.add(stack);
var box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
box.visible = true;
box.add(stack);
box.add(viewswitcher_bar);
this.add(box);
}
public Usage.HeaderBar get_header_bar()
......
Subproject commit cc833973c6fc78a83ea9d06f62c9f9b8047fa914