Add gtk155
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
||||
"files.associations": {
|
||||
"cstring": "cpp"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
set(CMAKE_CXX_STANDARD 17)
|
||||
cmake_minimum_required(VERSION 3.5.0)
|
||||
project(gtk155_applaunch VERSION 1.0.0)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../GCR_CMake/macros)
|
||||
include(GlibCompileResourcesSupport)
|
||||
|
||||
include(CTest)
|
||||
enable_testing()
|
||||
|
||||
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
||||
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
||||
|
||||
include(CPack)
|
||||
include_directories(.)
|
||||
include_directories(..)
|
||||
|
||||
#Find PkgConfig to use gtkmm3
|
||||
find_package (PkgConfig REQUIRED)
|
||||
pkg_check_modules (GTK4 REQUIRED gtk4)
|
||||
include_directories (${GTK4_INCLUDE_DIRS})
|
||||
link_directories (${GTK4_LIBRARY_DIRS})
|
||||
|
||||
#Find Gettext
|
||||
# find_package (Gettext REQUIRED)
|
||||
# set(PO_DIR ${CMAKE_BINARY_DIR}/po/zh_CN/LC_MESSAGES)
|
||||
|
||||
#Source files
|
||||
set(SOURCE_FILE src/main.cpp src/Applauncher.cpp src/AppView.cpp)
|
||||
|
||||
#Compile Resource
|
||||
|
||||
# set(RESOURCE_LIST
|
||||
# )
|
||||
|
||||
# compile_gresources(RESOURCE_FILE
|
||||
# XML_OUT
|
||||
# TYPE EMBED_C
|
||||
# RESOURCES ${RESOURCE_LIST}
|
||||
# PREFIX "/org/gtk/daleclack"
|
||||
# SOURCE_DIR ${PROJECT_SOURCE_DIR}/res)
|
||||
|
||||
# Add a custom target to the makefile. Now make builds our resource file.
|
||||
# It depends on the output RESOURCE_FILE.
|
||||
|
||||
# add_custom_target(resource ALL DEPENDS ${RESOURCE_FILE})
|
||||
|
||||
#For win32 platform,use rc resource and .ico icon
|
||||
if(WIN32)
|
||||
SET(CMAKE_RC_COMPILER windres)
|
||||
set(app_WINRC ../icon.rc)
|
||||
set_property(SOURCE ../icon.rc APPEND PROPERTY
|
||||
OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/../icon.ico
|
||||
)
|
||||
add_executable(${PROJECT_NAME} ${app_WINRC} ${SOURCE_FILE})
|
||||
add_custom_command( TARGET ${PROJECT_NAME}
|
||||
COMMAND echo * > ${CMAKE_BINARY_DIR}/.gitignore
|
||||
COMMAND echo **/* > ${CMAKE_BINARY_DIR}/.hgignore)
|
||||
else()
|
||||
add_executable(${PROJECT_NAME} ${SOURCE_FILE})
|
||||
add_custom_command( TARGET ${PROJECT_NAME}
|
||||
COMMAND echo \"*\" > ${CMAKE_BINARY_DIR}/.gitignore
|
||||
COMMAND echo \"**/*\" > ${CMAKE_BINARY_DIR}/.hgignore)
|
||||
endif(WIN32)
|
||||
|
||||
#Add command to generate .gitignore and .mo files
|
||||
# add_custom_command( TARGET ${PROJECT_NAME}
|
||||
# COMMAND mkdir -p ${PO_DIR}
|
||||
# COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} ${CMAKE_SOURCE_DIR}/po/zh_CN.po -o ${PO_DIR}/${PROJECT_NAME}.mo)
|
||||
|
||||
SET (CMAKE_EXTRA_CXX_FLAGS ${GTK4_CFLAGS_OTHER})
|
||||
target_link_libraries (${PROJECT_NAME} ${GTK4_LIBRARIES} -lpthread)
|
|
@ -0,0 +1,5 @@
|
|||
# README of My Reminder
|
||||
This simple application is a reminder for the date,
|
||||
and the window show the days left for the deadline set by user
|
||||
|
||||
The reminded date and color of text can be changed by preferences dialog.
|
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 8 4 L 3 10 L 13 10 L 8 4 z M 3 11 L 3 12 L 13 12 L 13 11 L 3 11 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 404 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 8 4 L 3 10 L 13 10 L 8 4 z M 3 11 L 3 12 L 13 12 L 13 11 L 3 11 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 404 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 3 4 L 8 10 L 13 4 L 3 4 z M 3 11 L 3 12 L 13 12 L 13 11 L 3 11 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 405 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 3 4 L 8 10 L 13 4 L 3 4 z M 3 11 L 3 12 L 13 12 L 13 11 L 3 11 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 405 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 4 0 0 -10 z m 6 0 0 10 4 0 0 -10 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 382 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 4 0 0 -10 z m 6 0 0 10 4 0 0 -10 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 382 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 10 -5 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 355 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 10 -5 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 355 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 10 0 0 -10 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 360 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 10 0 0 -10 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 360 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 3 2 A 1 1 0 0 0 2 3 A 1 1 0 0 0 3 4 A 1 1 0 0 0 4 3 A 1 1 0 0 0 3 2 z M 5 2 L 5 3 L 7 3 L 13 3 L 13 2 L 7 2 L 5 2 z M 5 4 L 5 5 L 7 5 L 11 5 L 11 4 L 7 4 L 5 4 z M 10 7 L 10 10 L 7 10 L 7 11 L 10 11 L 10 14 L 11 14 L 11 11 L 14 11 L 14 10 L 11 10 L 11 7 L 10 7 z M 3 8 A 1 1 0 0 0 2 9 A 1 1 0 0 0 3 10 A 1 1 0 0 0 4 9 A 1 1 0 0 0 3 8 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 674 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 3 2 A 1 1 0 0 0 2 3 A 1 1 0 0 0 3 4 A 1 1 0 0 0 4 3 A 1 1 0 0 0 3 2 z M 5 2 L 5 3 L 7 3 L 13 3 L 13 2 L 7 2 L 5 2 z M 5 4 L 5 5 L 7 5 L 11 5 L 11 4 L 7 4 L 5 4 z M 10 7 L 10 10 L 7 10 L 7 11 L 10 11 L 10 14 L 11 14 L 11 11 L 14 11 L 14 10 L 11 10 L 11 7 L 10 7 z M 3 8 A 1 1 0 0 0 2 9 A 1 1 0 0 0 3 10 A 1 1 0 0 0 4 9 A 1 1 0 0 0 3 8 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 674 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 16 5 L 16 7 L 3 7 L 3 8 L 16 8 L 16 10 L 19 7.5 L 16 5 z M 16 12 L 16 14 L 3 14 L 3 15 L 16 15 L 16 17 L 19 14.5 L 16 12 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 465 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 16 5 L 16 7 L 3 7 L 3 8 L 16 8 L 16 10 L 19 7.5 L 16 5 z M 16 12 L 16 14 L 3 14 L 3 15 L 16 15 L 16 17 L 19 14.5 L 16 12 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 465 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 11 3 C 6.568002 3 3 6.568002 3 11 C 3 15.431998 6.568002 19 11 19 C 11.692084 19 12.360349 18.903948 13 18.740234 L 13 17.707031 C 12.366247 17.894565 11.696167 18 11 18 C 7.122001 18 4 14.877999 4 11 C 4 7.122001 7.122001 4 11 4 C 14.877999 4 18 7.122001 18 11 C 18 11.696167 17.894565 12.366247 17.707031 13 L 18.740234 13 C 18.903948 12.360349 19 11.692084 19 11 C 19 6.568002 15.431998 3 11 3 z M 10 5 L 10 12 L 11 12 L 16 12 L 16 11 L 11 11 L 11 5 L 10 5 z M 14 13 L 14 19 L 20 16 L 14 13 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 838 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 8 2 C 4.6862915 2 2 4.6862915 2 8 C 2 11.313708 4.6862915 14 8 14 L 8 13 C 5.2385763 13 3 10.761424 3 8 C 3 5.2385763 5.2385763 3 8 3 C 10.419003 3 12.43717 4.7176961 12.900391 7 L 13.910156 7 C 13.433066 4.1634955 10.972138 2 8 2 z M 7 4 L 7 8 L 7 9 L 8 9 L 9 9 L 9 8 L 8 8 L 8 7 L 8 4 L 7 4 z M 10 8 L 10 14 L 15 11 L 10 8 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 665 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 11 3.5 L 11 5 L 5 5 C 3.338 5 2 6.338 2 8 L 3 8 C 3 6.892 3.892 6 5 6 L 11 6 L 11 7.5 L 14 5.5 L 11 3.5 z M 13 8 C 13 9.108 12.108 10 11 10 L 5 10 L 5 8.5 L 2 10.5 L 5 12.5 L 5 11 L 11 11 C 12.662 11 14 9.662 14 8 L 13 8 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 561 B |
|
@ -0,0 +1,7 @@
|
|||
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#dedede">
|
||||
<path d="m3.994 2c-1.258 0.015-2.179-0.03-2.931 0.385a1.88 1.88 0 0 0-0.838 0.998c-0.165 0.437-0.225 0.96-0.225 1.617v6c0 0.658 0.06 1.179 0.225 1.617 0.164 0.439 0.461 0.79 0.838 0.998 0.752 0.416 1.673 0.37 2.931 0.385h8.012c1.258-0.015 2.179 0.03 2.932-0.385a1.88 1.88 0 0 0 0.838-0.998c0.164-0.438 0.224-0.96 0.224-1.617v-6c0-0.658-0.06-1.179-0.225-1.617a1.88 1.88 0 0 0-0.838-0.998c-0.752-0.416-1.673-0.37-2.931-0.385h-1.006v1h1c1.259 0.015 2.087 0.06 2.453 0.262 0.184 0.1 0.29 0.212 0.387 0.472s0.16 0.674 0.16 1.266v6c0 0.592-0.063 1.006-0.16 1.266-0.098 0.26-0.203 0.371-0.387 0.472-0.366 0.202-1.194 0.247-2.453 0.262h-8c-1.259-0.015-2.09-0.06-2.455-0.262-0.183-0.1-0.287-0.212-0.385-0.472-0.097-0.26-0.16-0.674-0.16-1.266v-6c0-0.592 0.063-1.006 0.16-1.266 0.098-0.26 0.202-0.371 0.385-0.472 0.365-0.202 1.195-0.247 2.455-0.262h2.5v-1h-2.502z" color="#000000" font-family="sans-serif" font-weight="400" overflow="visible" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none"/>
|
||||
<path d="m5 0 1e-3 5c0.76-0.348 1.535-0.737 2.323-1.166a44.09 44.09 0 0 0 2.259-1.334 51.555 51.555 0 0 0-2.26-1.32 43.088 43.088 0 0 0-2.323-1.18z" color="#000000" overflow="visible"/>
|
||||
<path d="m6.117 6.247c0.167-0.07 0.34-0.147 0.52-0.234 0.184-0.092 0.363-0.19 0.536-0.294a8.2 8.2 0 0 0 0.494-0.338c0.161-0.121 0.306-0.248 0.433-0.381h0.9v6h-1v-4.652c-0.448 0.347-1.012 0.566-1.494 0.762z" font-family="Ubuntu" font-weight="700" letter-spacing="0" text-anchor="middle" word-spacing="0"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
|
@ -0,0 +1,7 @@
|
|||
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#363636">
|
||||
<path d="m3.994 2c-1.258 0.015-2.179-0.03-2.931 0.385a1.88 1.88 0 0 0-0.838 0.998c-0.165 0.437-0.225 0.96-0.225 1.617v6c0 0.658 0.06 1.179 0.225 1.617 0.164 0.439 0.461 0.79 0.838 0.998 0.752 0.416 1.673 0.37 2.931 0.385h8.012c1.258-0.015 2.179 0.03 2.932-0.385a1.88 1.88 0 0 0 0.838-0.998c0.164-0.438 0.224-0.96 0.224-1.617v-6c0-0.658-0.06-1.179-0.225-1.617a1.88 1.88 0 0 0-0.838-0.998c-0.752-0.416-1.673-0.37-2.931-0.385h-1.006v1h1c1.259 0.015 2.087 0.06 2.453 0.262 0.184 0.1 0.29 0.212 0.387 0.472s0.16 0.674 0.16 1.266v6c0 0.592-0.063 1.006-0.16 1.266-0.098 0.26-0.203 0.371-0.387 0.472-0.366 0.202-1.194 0.247-2.453 0.262h-8c-1.259-0.015-2.09-0.06-2.455-0.262-0.183-0.1-0.287-0.212-0.385-0.472-0.097-0.26-0.16-0.674-0.16-1.266v-6c0-0.592 0.063-1.006 0.16-1.266 0.098-0.26 0.202-0.371 0.385-0.472 0.365-0.202 1.195-0.247 2.455-0.262h2.5v-1h-2.502z" color="#000000" font-family="sans-serif" font-weight="400" overflow="visible" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none"/>
|
||||
<path d="m5 0 1e-3 5c0.76-0.348 1.535-0.737 2.323-1.166a44.09 44.09 0 0 0 2.259-1.334 51.555 51.555 0 0 0-2.26-1.32 43.088 43.088 0 0 0-2.323-1.18z" color="#000000" overflow="visible"/>
|
||||
<path d="m6.117 6.247c0.167-0.07 0.34-0.147 0.52-0.234 0.184-0.092 0.363-0.19 0.536-0.294a8.2 8.2 0 0 0 0.494-0.338c0.161-0.121 0.306-0.248 0.433-0.381h0.9v6h-1v-4.652c-0.448 0.347-1.012 0.566-1.494 0.762z" font-family="Ubuntu" font-weight="700" letter-spacing="0" text-anchor="middle" word-spacing="0"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 11 3.5 L 11 5 L 5 5 C 3.338 5 2 6.338 2 8 L 3 8 C 3 6.892 3.892 6 5 6 L 11 6 L 11 7.5 L 14 5.5 L 11 3.5 z M 13 8 C 13 9.108 12.108 10 11 10 L 5 10 L 5 8.5 L 2 10.5 L 5 12.5 L 5 11 L 11 11 C 12.662 11 14 9.662 14 8 L 13 8 z "
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 561 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m11 3.5v1.5h-2c-1.662 0-3 1.338-3 3 0 1.108-.892 2-2 2h-2v1h2c1.662 0 3-1.338 3-3 0-1.108.892-2 2-2h2v1.5l3-2zm-9 1.5v1h2c.401 0 .772.119 1.084.32.077-.333.21-.642.387-.922-.436-.246-.933-.398-1.471-.398zm9 3.5v1.5h-2c-.401 0-.772-.119-1.084-.32-.077.333-.21.642-.387.922.436.246.933.398 1.471.398h2v1.5l3-2z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 644 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m11 3.5v1.5h-2c-1.662 0-3 1.338-3 3 0 1.108-.892 2-2 2h-2v1h2c1.662 0 3-1.338 3-3 0-1.108.892-2 2-2h2v1.5l3-2zm-9 1.5v1h2c.401 0 .772.119 1.084.32.077-.333.21-.642.387-.922-.436-.246-.933-.398-1.471-.398zm9 3.5v1.5h-2c-.401 0-.772-.119-1.084-.32-.077.333-.21.642-.387.922.436.246.933.398 1.471.398h2v1.5l3-2z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 644 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 11 4 4 11 11 18 11,11 Z M 11 11 l 7 7 0 -14 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 383 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="M 8 3 3 8 8 13 8 8 Z M 8 8 l 5 5 0 -10 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 377 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 4 4 0 14 L 11 11 Z M 11 11 11 18 18 11 11 4 Z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 383 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 L 8 8 Z M 8 8 l 0 5 L 13 8 8 3 Z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 380 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 4 4 0 14 5 0 0 -7 0 -7 z M 9 11 l 9 7 0 -14 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 383 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 3 0 0 -5 0 -5 z M 6 8 l 7 5 0 -10 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 383 B |
|
@ -0,0 +1,14 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#dedede;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path
|
||||
style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 4 4 0 14 L 13 11 Z M 13 11 l 0 7 5 0 0 -14 -5 0 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 387 B |
|
@ -0,0 +1,13 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<defs id="defs3051">
|
||||
<style type="text/css" id="current-color-scheme">
|
||||
.ColorScheme-Text {
|
||||
color:#363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor;fill-opacity:1;stroke:none"
|
||||
d="m 3 3 0 10 L 10 8 Z M 10 8 l 0 5 3 0 0 -10 -3 0 z"
|
||||
class="ColorScheme-Text"
|
||||
/>
|
||||
</svg>
|
After Width: | Height: | Size: 386 B |
|
@ -0,0 +1,126 @@
|
|||
#include "AppView.h"
|
||||
|
||||
// Create a model for application
|
||||
static GListModel *create_app_model()
|
||||
{
|
||||
GListStore *store;
|
||||
GList *apps, *temp;
|
||||
|
||||
// Create a list contains the application info
|
||||
store = g_list_store_new(G_TYPE_APP_INFO);
|
||||
|
||||
// Get Appication list
|
||||
apps = g_app_info_get_all();
|
||||
|
||||
// Append apps item to the list
|
||||
for (temp = apps; temp; temp = temp->next)
|
||||
{
|
||||
g_list_store_append(store, temp->data);
|
||||
}
|
||||
|
||||
g_list_free_full(apps, g_object_unref);
|
||||
|
||||
return G_LIST_MODEL(store);
|
||||
}
|
||||
|
||||
static void app_view_setup(GtkListItemFactory *factory, GtkListItem *item)
|
||||
{
|
||||
GtkWidget *app_box, *image, *label;
|
||||
|
||||
// Create widgets
|
||||
app_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
|
||||
image = gtk_image_new();
|
||||
label = gtk_label_new(" ");
|
||||
gtk_image_set_pixel_size(GTK_IMAGE(image), 48);
|
||||
gtk_label_set_max_width_chars(GTK_LABEL(label), 5);
|
||||
gtk_widget_set_size_request(image, 48, 48);
|
||||
|
||||
// Append widgets to the box
|
||||
gtk_box_append(GTK_BOX(app_box), image);
|
||||
gtk_box_append(GTK_BOX(app_box), label);
|
||||
|
||||
gtk_list_item_set_child(item, app_box);
|
||||
}
|
||||
|
||||
static void app_view_bind(GtkListItemFactory *factory, GtkListItem *item)
|
||||
{
|
||||
GtkWidget *image;
|
||||
GtkWidget *label;
|
||||
GAppInfo *app_info;
|
||||
|
||||
// Get Widgets
|
||||
image = gtk_widget_get_first_child(gtk_list_item_get_child(item));
|
||||
label = gtk_widget_get_next_sibling(image);
|
||||
app_info = G_APP_INFO(gtk_list_item_get_item(item));
|
||||
|
||||
// Initalize widgets
|
||||
gtk_image_set_from_gicon(GTK_IMAGE(image), g_app_info_get_icon(app_info));
|
||||
gtk_label_set_label(GTK_LABEL(label), g_app_info_get_display_name(app_info));
|
||||
gtk_label_set_max_width_chars(GTK_LABEL(label), 15);
|
||||
gtk_label_set_ellipsize(GTK_LABEL(label), PANGO_ELLIPSIZE_END);
|
||||
}
|
||||
|
||||
static void app_view_activate(GtkGridView *list, guint position, gpointer data)
|
||||
{
|
||||
GAppInfo *app_info;
|
||||
GdkAppLaunchContext *context;
|
||||
GError *error = NULL;
|
||||
|
||||
app_info = G_APP_INFO(g_list_model_get_item(G_LIST_MODEL(gtk_grid_view_get_model(list)),
|
||||
position));
|
||||
|
||||
/* Prepare the context for launching the application and launch it. This
|
||||
* code is explained in detail in the documentation for GdkAppLaunchContext
|
||||
* and GAppInfo.
|
||||
*/
|
||||
context = gdk_display_get_app_launch_context(gtk_widget_get_display(GTK_WIDGET(list)));
|
||||
if (!g_app_info_launch(app_info,
|
||||
NULL,
|
||||
G_APP_LAUNCH_CONTEXT(context),
|
||||
&error))
|
||||
{
|
||||
// GtkAlertDialog *dialog;
|
||||
|
||||
// /* And because error handling is important, even a simple demo has it:
|
||||
// * We display an error dialog that something went wrong.
|
||||
// */
|
||||
// dialog = gtk_alert_dialog_new("Could not launch %s", g_app_info_get_display_name(app_info));
|
||||
// gtk_alert_dialog_set_detail(dialog, error->message);
|
||||
// gtk_alert_dialog_show(dialog, GTK_WINDOW(gtk_widget_get_root(GTK_WIDGET(list))));
|
||||
// g_object_unref(dialog);
|
||||
// g_clear_error(&error);
|
||||
}
|
||||
|
||||
g_object_unref(context);
|
||||
g_object_unref(app_info);
|
||||
}
|
||||
|
||||
GtkWidget *app_view_new()
|
||||
{
|
||||
GtkWidget *list, *sw;
|
||||
GListModel *model;
|
||||
GtkListItemFactory *factory;
|
||||
|
||||
// Create widgets
|
||||
sw = gtk_scrolled_window_new();
|
||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
|
||||
// Create list item factory
|
||||
factory = gtk_signal_list_item_factory_new();
|
||||
g_signal_connect(factory, "setup", G_CALLBACK(app_view_setup), NULL);
|
||||
g_signal_connect(factory, "bind", G_CALLBACK(app_view_bind), NULL);
|
||||
|
||||
// Create model and view
|
||||
model = create_app_model();
|
||||
list = gtk_grid_view_new(GTK_SELECTION_MODEL(
|
||||
gtk_single_selection_new(model)),
|
||||
factory);
|
||||
g_signal_connect(list, "activate", G_CALLBACK(app_view_activate), NULL);
|
||||
gtk_grid_view_set_min_columns(GTK_GRID_VIEW(list), 8);
|
||||
|
||||
// Add Child
|
||||
gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(sw), list);
|
||||
|
||||
return sw;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
GtkWidget *app_view_new();
|
|
@ -0,0 +1,26 @@
|
|||
#include "Applauncher.h"
|
||||
#include "AppView.h"
|
||||
|
||||
struct _AppLauncher{
|
||||
GtkApplicationWindow parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(AppLauncher, app_launcher, GTK_TYPE_APPLICATION_WINDOW)
|
||||
|
||||
static void app_launcher_init(AppLauncher *self)
|
||||
{
|
||||
GtkWidget *scrolled_window = app_view_new();
|
||||
gtk_window_set_default_size(GTK_WINDOW(self), 624, 400);
|
||||
|
||||
// Add list to the window
|
||||
gtk_window_set_child(GTK_WINDOW(self), scrolled_window);
|
||||
}
|
||||
|
||||
static void app_launcher_class_init(AppLauncherClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
AppLauncher *app_launcher_new(GtkApplication *app){
|
||||
return APP_LAUNCHER(g_object_new(app_launcher_get_type(),
|
||||
"application", app, NULL));
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE(AppLauncher, app_launcher, APP, LAUNCHER, GtkApplicationWindow)
|
||||
|
||||
AppLauncher *app_launcher_new(GtkApplication *app);
|
|
@ -0,0 +1,14 @@
|
|||
#include "Applauncher.h"
|
||||
|
||||
static void gtkmain(GtkApplication *app, gpointer user_data)
|
||||
{
|
||||
AppLauncher *launcher = app_launcher_new(app);
|
||||
gtk_window_present(GTK_WINDOW(launcher));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GtkApplication *app = gtk_application_new("org.gtk.daleclack", G_APPLICATION_NON_UNIQUE);
|
||||
g_signal_connect(app, "activate", G_CALLBACK(gtkmain), NULL);
|
||||
return g_application_run(G_APPLICATION(app), argc, argv);
|
||||
}
|