Delete unused files

This commit is contained in:
daleclack 2021-12-17 23:46:17 +08:00
parent 0bbd66b82f
commit 563971ccc0
68 changed files with 0 additions and 6153 deletions

View File

@ -1,133 +0,0 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
//For linux amd64 and linux on arm64,some include path may different
//Commet and uncomment these lines to compile on a specificed archtiecture
//Arm64 linux libs
/*
"/usr/lib/aarch64-linux-gnu/dbus-1.0/include/**",
"/usr/lib/aarch64-linux-gnu/glib-2.0/include",
*/
//amd64 linux libs(For ubuntu)
/*
"/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
*/
//For debian and ubuntu,kali
/*
"/usr/include/gtk-3.0/gtk/**",
"/usr/include/uuid/**",
*/
//For manjaro(Arch linux)
"/usr/lib/dbus-1.0/include/**",
"/usr/lib/glib-2.0/include/**",
"/usr/include/lzo/**",
"/usr/include/cloudproviders/**",
"${workspaceFolder}/**",
"/usr/include/gtk-3.0/**",
"/usr/include/at-spi2-atk/2.0/**",
"/usr/include/at-spi-2.0/**",
"/usr/include/dbus-1.0/**",
"/usr/include/gio-unix-2.0/**",
"/usr/include/cairo/**",
"/usr/include/pango-1.0/**",
"/usr/include/fribidi/**",
"/usr/include/harfbuzz/**",
"/usr/include/atk-1.0/**",
"/usr/include/pixman-1/**",
"/usr/include/freetype2/**",
"/usr/include/libpng16/**",
"/usr/include/gdk-pixbuf-2.0/**",
"/usr/include/libmount/**",
"/usr/include/blkid/**",
"/usr/include/glib-2.0/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "gcc-x64",
"compilerArgs": [
"`pkg-config --cflags --libs gtk+-3.0`"
],
"configurationProvider": "ms-vscode.cmake-tools"
},
{
"name": "win32",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/src/**",
//I assume the msys2 installed in D:/msys64
"D:/msys64/mingw64/include/**",
"D:/msys64/mingw64/include/glib-2.0/**",
"D:/msys64/mingw64/lib/glib-2.0/include/**",
"D:/msys64/mingw64/include/gtk-3.0/**",
"D:/msys64/mingw64/include/pango-1.0/**",
"D:/msys64/mingw64/include/harfbuzz/**",
"D:/msys64/mingw64/include/freetype2/**",
"D:/msys64/mingw64/include/libpng16/**",
"D:/msys64/mingw64/include/fribidi/**",
"D:/msys64/mingw64/include/cairo/**",
"D:/msys64/mingw64/include/lzo/**",
"D:/msys64/mingw64/include/pixman-1/**",
"D:/msys64/mingw64/include/gdk-pixbuf-2.0",
"D:/msys64/mingw64/include/atk-1.0"
],
"defines": [],
"compilerPath": "D:/msys64/MinGW64/bin/gcc.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-gcc-x64"
},
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/Cellar/libffi/3.3_3/include/**",
"/usr/local/Cellar/gtk+3/3.24.29/include/gtk-3.0/**",
"/usr/local/Cellar/glib/2.68.2/include/gio-unix-2.0/**",
"/usr/local/Cellar/cairo/1.16.0_5/include/cairo/**",
"/usr/local/Cellar/libepoxy/1.5.7/include/**",
"/usr/local/Cellar/pango/1.48.4/include/pango-1.0",
"/usr/local/Cellar/harfbuzz/2.8.1/include/harfbuzz",
"/usr/local/Cellar/pango/1.48.4/include/pango-1.0/**",
"/usr/local/Cellar/fribidi/1.0.10/include/fribidi/**",
"/usr/local/Cellar/harfbuzz/2.8.1/include/harfbuzz/**",
"/usr/local/Cellar/graphite2/1.3.14/include/**",
"/usr/local/Cellar/atk/2.36.0/include/atk-1.0/**",
"/usr/local/Cellar/cairo/1.16.0_5/include/cairo/**",
"/usr/local/Cellar/pixman/0.40.0/include/pixman-1/**",
"/usr/local/Cellar/fontconfig/2.13.1/include/**",
"/usr/local/opt/freetype/include/freetype2/**",
"/usr/local/Cellar/libpng/1.6.37/include/libpng16/**",
"/usr/local/Cellar/libxcb/1.14_1/include/**",
"/usr/local/Cellar/libxrender/0.9.10/include/**",
"/usr/local/Cellar/libxext/1.3.4/include/**",
"/usr/local/Cellar/libx11/1.7.0/include/**",
"/usr/local/Cellar/libxcb/1.14_1/include/**",
"/usr/local/Cellar/libxau/1.0.9/include/**",
"/usr/local/Cellar/libxdmcp/1.1.3/include/**",
"/usr/local/Cellar/gdk-pixbuf/2.42.6/include/gdk-pixbuf-2.0/**",
"/usr/local/Cellar/libpng/1.6.37/include/libpng16/**",
"/usr/local/Cellar/libtiff/4.3.0/include/**",
"/usr/local/Cellar/glib/2.68.2/include/**",
"/usr/local/Cellar/glib/2.68.2/include/glib-2.0/**",
"/usr/local/Cellar/glib/2.68.2/lib/glib-2.0/include/**",
"/usr/local/opt/gettext/include/**",
"/usr/local/Cellar/pcre/8.44/include/**",
"/usr/local/Cellar/xorgproto/2021.4/include/**"
],
"defines": [],
"macFrameworkPath": [],
"compilerPath": "/usr/local/bin/gcc-11",
"cStandard": "gnu17",
"cppStandard": "gnu++17",
"intelliSenseMode": "macos-gcc-x64"
}
],
"version": 4
}

View File

@ -1,29 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/gtk42",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}

View File

@ -1,5 +0,0 @@
{
"C_Cpp.errorSquiggles": "Disabled",
"cmake.configureOnOpen": false,
"C_Cpp.dimInactiveRegions": false
}

View File

@ -1,82 +0,0 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"src/*.cpp",
"-o",
"${workspaceFolder}/bin/gtk42",
"-pthread",
//For Arm64 linux
/*
"-I/usr/lib/aarch64-linux-gnu/dbus-1.0/include",
"-I/usr/lib/aarch64-linux-gnu/glib-2.0/include",
*/
//For amd64 linux
/*
"-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include",
*/
//Ubuntu and kali include paths
/*
"-I/usr/include/uuid",
*/
//Manjaro linux and Arch linux include args
"-I${workspaceFolder}",
"-I/usr/lib/glib-2.0/include",
"-I/usr/lib/dbus-1.0/include",
"-I/usr/include/lzo",
"-I/usr/include/cloudproviders",
"-I/usr/include/gtk-3.0",
"-I/usr/include/at-spi2-atk/2.0",
"-I/usr/include/at-spi-2.0",
"-I/usr/include/dbus-1.0",
"-I/usr/include/gio-unix-2.0",
"-I/usr/include/cairo",
"-I/usr/include/pango-1.0",
"-I/usr/include/fribidi",
"-I/usr/include/harfbuzz",
"-I/usr/include/atk-1.0",
"-I/usr/include/pixman-1",
"-I/usr/include/freetype2",
"-I/usr/include/libpng16",
"-I/usr/include/gdk-pixbuf-2.0",
"-I/usr/include/libmount",
"-I/usr/include/blkid",
"-I/usr/include/glib-2.0",
//Manjaro linux lib args
"-lz",
"-lgtk-3",
"-lgdk-3",
"-lpangocairo-1.0",
"-lpango-1.0",
"-lharfbuzz",
"-latk-1.0",
"-lcairo-gobject",
"-lcairo",
"-lgdk_pixbuf-2.0",
"-lgio-2.0",
"-lgobject-2.0",
"-lglib-2.0",
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}

View File

@ -1,67 +0,0 @@
set(CMAKE_CXX_STANDARD 17)
cmake_minimum_required(VERSION 3.0.0)
project(My_GtkUi VERSION 2.6.0)
include(CTest)
enable_testing()
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
find_package (PkgConfig REQUIRED)
pkg_check_modules (GTK3 REQUIRED gtk+-3.0)
include_directories (${GTK3_INCLUDE_DIRS})
link_directories (${GTK3_LIBRARY_DIRS})
#Compile a resource.cpp file
# Step 1:
find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
set(GRESOURCE_C resource.cpp)
set(GRESOURCE_XML gtk42.resource.xml)
# Step 2:
add_custom_command(
OUTPUT ${GRESOURCE_C}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res
COMMAND ${GLIB_COMPILE_RESOURCES}
ARGS
${GRESOURCE_XML}
--target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
--generate-source
)
# Step 3:
add_custom_target(
my-gresource
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
)
# Step 4:Add the resource to compile list and compile
if(WIN32)
set(app_WINRC icon.rc)
set_property(SOURCE icon.rc APPEND PROPERTY
OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/icon.ico
)
add_executable(My_GtkUi WIN32 ${app_WINRC} src/main.cpp src/background.cpp src/game.cpp
src/TextEditor.cpp src/panel1.cpp src/panel2.cpp src/win1.cpp src/winconf.cpp src/drawing.cpp
src/FileWindow.cpp ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C})
else()
add_executable(My_GtkUi src/main.cpp src/background.cpp src/game.cpp src/TextEditor.cpp
src/panel1.cpp src/panel2.cpp src/win1.cpp src/winconf.cpp src/drawing.cpp
src/FileWindow.cpp ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C})
endif(WIN32)
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
PROPERTIES GENERATED TRUE
)
# Step 5:Add Dependencies and link
add_dependencies(${PROJECT_NAME} my-gresource)
SET (CMAKE_EXTRA_CXX_FLAGS ${GTK3_CFLAGS_OTHER})
target_link_libraries (${PROJECT_NAME} ${GTK3_LIBRARIES} -lpthread -lm)

View File

@ -1 +0,0 @@

View File

@ -1,3 +0,0 @@
cd build_mingw
mingw32-make
My_GtkUi

View File

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="gtk42" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/gtk42" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add directory="../" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/gtk42" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add directory="../" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="../src/background.cpp" />
<Unit filename="../src/background.h" />
<Unit filename="../src/game.cpp" />
<Unit filename="../src/game.h" />
<Unit filename="../src/main.cpp" />
<Unit filename="../src/panel1.cpp" />
<Unit filename="../src/panel1.h" />
<Unit filename="../src/panel2.cpp" />
<Unit filename="../src/panel2.h" />
<Unit filename="../src/resources.cpp" />
<Unit filename="../src/win1.cpp" />
<Unit filename="../src/win1.h" />
<Unit filename="../src/winconf.cpp" />
<Unit filename="../src/winconf.h" />
<Unit filename="icon.rc">
<Option compilerVar="WINDRES" />
</Unit>
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@ -1,67 +0,0 @@
# depslib dependency file v1.0
1613552905 source:d:\gtk3\gtk42\src\background.cpp
"background.h"
"winconf.h"
"winpe.xpm"
1613195745 d:\gtk3\gtk42\src\background.h
<gtk/gtk.h>
1613270288 d:\gtk3\gtk42\src\winconf.h
<gtk/gtk.h>
1613125939 d:\gtk3\gtk42\\winpe.xpm
1614135385 source:d:\gtk3\gtk42\src\main.cpp
<gtk/gtk.h>
"background.h"
"winconf.h"
"panel1.h"
"panel2.h"
1613357404 d:\gtk3\gtk42\src\panel1.h
<gtk/gtk.h>
1613650403 d:\gtk3\gtk42\src\panel2.h
<gtk/gtk.h>
1613872672 source:d:\gtk3\gtk42\src\panel1.cpp
<ctime>
"panel1.h"
"winconf.h"
"background.h"
1613549116 source:d:\gtk3\gtk42\src\win1.cpp
"win1.h"
1613879080 d:\gtk3\gtk42\src\win1.h
<gtk/gtk.h>
1613552872 source:d:\gtk3\gtk42\src\winconf.cpp
<cstdio>
"winconf.h"
1613125939 d:\gtk3\gtk42\src\winpe.xpm
1613879180 source:d:\gtk3\gtk42\src\panel2.cpp
<cstdlib>
<thread>
"panel2.h"
"win1.h"
"game.h"
1614135733 source:d:\gtk3\gtk42\src\resources.cpp
<gio/gio.h>
<stdlib.h>
1613650621 source:d:\gtk3\gtk42\gtk42\icon.rc
1613878878 d:\gtk3\gtk42\src\game.h
<gtk/gtk.h>
<ctime>
<cstdlib>
<cstring>
1613878921 source:d:\gtk3\gtk42\src\game.cpp
"game.h"

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="icon.rc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28" topLine="0" />
</Cursor>
</File>
<File name="..\src\panel2.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="735" topLine="57" />
</Cursor>
</File>
<File name="..\src\panel2.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="399" topLine="0" />
</Cursor>
</File>
<File name="..\src\panel1.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16" topLine="0" />
</Cursor>
</File>
<File name="..\src\main.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="883" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -1 +0,0 @@
MAINICON ICON "Icon_1.ico"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

View File

@ -1 +0,0 @@
glib-compile-resources gtk42.resource.xml --target=../src/resources.cpp --generate-source

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,219 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="border-width">15</property>
<property name="title" translatable="yes">gtk31-guess</property>
<property name="destroy-with-parent">True</property>
<child>
<!-- n-columns=5 n-rows=7 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Select a button</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_1">
<property name="label" translatable="yes">1</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_2">
<property name="label" translatable="yes">2</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_3">
<property name="label" translatable="yes">3</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_4">
<property name="label" translatable="yes">4</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_go">
<property name="label" translatable="yes">Go</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_exit">
<property name="label" translatable="yes">Exit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</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>
<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>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

View File

@ -1,219 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="border-width">15</property>
<property name="title" translatable="yes">gtk31-guess</property>
<property name="destroy-with-parent">True</property>
<child>
<!-- n-columns=5 n-rows=7 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Select a button</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_1">
<property name="label" translatable="yes">1</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_2">
<property name="label" translatable="yes">2</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_3">
<property name="label" translatable="yes">3</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_4">
<property name="label" translatable="yes">4</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_go">
<property name="label" translatable="yes">Go</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_exit">
<property name="label" translatable="yes">Exit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</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>
<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>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

View File

@ -1,37 +0,0 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16.180347' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata20854'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:title/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id='defs7386'>
<linearGradient id='linearGradient5606' osb:paint='solid'>
<stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient4526' osb:paint='solid'>
<stop id='stop4528' offset='0' style='stop-color:#ffffff;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient3600-4' osb:paint='gradient'>
<stop id='stop3602-7' offset='0' style='stop-color:#f4f4f4;stop-opacity:1'/>
<stop id='stop3604-6' offset='1' style='stop-color:#dbdbdb;stop-opacity:1'/>
</linearGradient>
</defs>
<g id='layer9' label='status' style='display:inline' transform='translate(-772.9997,-93.000005)'/>
<g id='layer2' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='layer4' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='g1812' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='g6217' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='layer3' style='display:inline' transform='translate(-531.9995,-460)'>
<path d='m 543.5,463 c -0.82843,0 -1.5,0.67157 -1.5,1.5 0,0.82843 0.67157,1.5 1.5,1.5 0.82843,0 1.5,-0.67157 1.5,-1.5 0,-0.82843 -0.67157,-1.5 -1.5,-1.5 z' id='path4527-0-5' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.99881363;marker:none;enable-background:accumulate'/>
<path d='m 535.99364,461 c -1.2582,0.0145 -2.17889,-0.0306 -2.93164,0.38477 -0.37637,0.20766 -0.67323,0.55938 -0.83789,0.99804 -0.16467,0.43867 -0.22461,0.95958 -0.22461,1.61719 v 4 4 c 0,0.65761 0.0599,1.17853 0.22461,1.61719 0.16467,0.43865 0.46152,0.79039 0.83789,0.99804 0.75275,0.41532 1.67345,0.3702 2.93164,0.38477 h 0.004 2.00195 4.125 2.00195 0.004 c 1.25819,-0.0146 2.17889,0.0306 2.93164,-0.38477 0.37637,-0.20765 0.67322,-0.55939 0.83789,-0.99804 0.16453,-0.43866 0.38385,-0.9792 0.22443,-1.61719 v -4 -4 c 0,-0.65761 -0.0599,-1.17852 -0.22461,-1.61719 -0.16466,-0.43866 -0.46152,-0.79038 -0.83789,-0.99804 -0.75275,-0.41537 -1.67344,-0.37027 -2.93164,-0.38477 h -0.004 -2.00186 -4.125 -2.00195 z m 2.00586,1 h 4.125 c 2,0 3.48446,-0.0156 4.22656,0.22461 0.98348,0.44721 0.77344,1.77539 0.77344,2.77539 -8.5e-4,2.12317 -0.0362,4.67696 -0.125,7 h -4.875 -4.125 -4.875 c -0.0888,-2.32304 -0.12415,-4.87683 -0.125,-7 0,-1 -0.21004,-2.32818 0.77344,-2.77539 C 534.51513,461.98438 535.9995,462 537.9995,462 Z' id='rect4520-6-6' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.99920893;marker:none;enable-background:accumulate'/>
<path d='m 538,465.5 -3,5.5 H 537.71817 543 l -2.5,-4.5 -1,1.5 z' id='path4156-2-2' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.99881363;marker:none;enable-background:accumulate'/>
</g>
<g id='g1833' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='layer1' style='display:inline' transform='translate(-531.9995,-460)'/>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="gtk42">
<file>icon.png</file>
<file>audacious.png</file>
<file>gedit.png</file>
<file>vlc.png</file>
<file>user-home.png</file>
<file>icon.jpg</file>
<file>graphics.png</file>
<file>system.png</file>
<file>log-out.png</file>
<file>gnome-fs-directory.png</file>
<file>gnome-fs-regular.png</file>
<file>view-grid-symbolic.png</file>
<file>view-list-symbolic.png</file>
<file>dialog-error.png</file>
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">leftpanel.ui</file>
<file preprocess="xml-stripblanks">toppanel.ui</file>
<file preprocess="xml-stripblanks">win_size.ui</file>
<file preprocess="xml-stripblanks">win1.ui</file>
<file preprocess="xml-stripblanks">game1.ui</file>
</gresource>
</gresources>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

View File

@ -1,290 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-about</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="width-request">300</property>
<property name="height-request">400</property>
<property name="can-focus">False</property>
<child>
<object class="GtkNotebook">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tab-pos">left</property>
<property name="enable-popup">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btnaud">
<property name="label" translatable="yes">audacious</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngedit">
<property name="label" translatable="yes">Gedit Text Editor</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnvlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Linux)</property>
</object>
<packing>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btn_vlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_note">
<property name="label" translatable="yes">Notepad</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Win32)</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btnabout">
<property name="label" translatable="yes">About</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnfiles">
<property name="label" translatable="yes">File Manager</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btndraw">
<property name="label" translatable="yes">Drawing App</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngame">
<property name="label" translatable="yes">Guess Game</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btneditor">
<property name="label" translatable="yes">Simple Text Editor</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">General Apps</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="left_panel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkMenuButton" id="btnstart">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="direction">right</property>
<property name="popover">popover1</property>
<child>
<object class="GtkImage" id="btn_image">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">start-here</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>

View File

@ -1,290 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-about</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="width-request">300</property>
<property name="height-request">400</property>
<property name="can-focus">False</property>
<child>
<object class="GtkNotebook">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tab-pos">left</property>
<property name="enable-popup">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btnaud">
<property name="label" translatable="yes">audacious</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngedit">
<property name="label" translatable="yes">Gedit Text Editor</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnvlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Linux)</property>
</object>
<packing>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btn_vlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_note">
<property name="label" translatable="yes">Notepad</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Win32)</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btnabout">
<property name="label" translatable="yes">About</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">File Manager</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btndraw">
<property name="label" translatable="yes">Drawing App</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngame">
<property name="label" translatable="yes">Guess Game</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btneditor">
<property name="label" translatable="yes">Simple Text Editor</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">General Apps</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="left_panel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkMenuButton" id="btnstart">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="direction">right</property>
<property name="popover">popover1</property>
<child>
<object class="GtkImage" id="btn_image">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">start-here</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

View File

@ -1,36 +0,0 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata20854'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:title/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id='defs7386'>
<linearGradient id='linearGradient5606' osb:paint='solid'>
<stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient4526' osb:paint='solid'>
<stop id='stop4528' offset='0' style='stop-color:#ffffff;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient3600-4' osb:paint='gradient'>
<stop id='stop3602-7' offset='0' style='stop-color:#f4f4f4;stop-opacity:1'/>
<stop id='stop3604-6' offset='1' style='stop-color:#dbdbdb;stop-opacity:1'/>
</linearGradient>
</defs>
<g id='layer9' label='status' style='display:inline' transform='translate(-333.00017,47)'/>
<g id='layer2' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='layer4' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='g1812' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='g6217' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='layer3' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='g1833' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='layer1' style='display:inline' transform='translate(-91.999969,-320)'>
<path d='m 92,321 v 14 h 11 v -5 h -1 v 4 h -9 v -12 h 9 v 5 h 1 v -6 z' id='rect3104' style='opacity:1;vector-effect:none;fill:#808080;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1'/>
<path d='m 107.08398,328 h -8.00195 v -2 c -0.76042,0.34766 -1.53409,0.73627 -2.32227,1.16602 -0.78078,0.43079 -1.53476,0.8757 -2.25976,1.33398 0.725,0.44911 1.47898,0.88953 2.25976,1.32031 0.78862,0.42999 1.56338,0.82276 2.32422,1.17969 v -2 h 8 z' id='path2614-6' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:none;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:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.99999976;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

View File

@ -1,37 +0,0 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16.01465' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata20854'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:title/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id='defs7386'>
<linearGradient id='linearGradient5606' osb:paint='solid'>
<stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient4526' osb:paint='solid'>
<stop id='stop4528' offset='0' style='stop-color:#ffffff;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient3600-4' osb:paint='gradient'>
<stop id='stop3602-7' offset='0' style='stop-color:#f4f4f4;stop-opacity:1'/>
<stop id='stop3604-6' offset='1' style='stop-color:#dbdbdb;stop-opacity:1'/>
</linearGradient>
</defs>
<g id='layer9' label='status' style='display:inline' transform='translate(-893.0002,-93)'/>
<g id='layer2' style='display:inline' transform='translate(-652,-460)'/>
<g id='layer4' style='display:inline' transform='translate(-652,-460)'/>
<g id='g1812' style='display:inline' transform='translate(-652,-460)'/>
<g id='g6217' style='display:inline' transform='translate(-652,-460)'/>
<g id='layer3' style='display:inline' transform='translate(-652,-460)'>
<path d='m 660.18165,461.00391 c -2.48304,-0.0657 -4.92247,1.19408 -6.24805,3.49218 -1.9281,3.3427 -0.77551,7.62899 2.57032,9.5625 3.34581,1.93352 7.63439,0.79191 9.5625,-2.55078 1.9281,-3.34269 0.77551,-7.63289 -2.57032,-9.5664 -1.04556,-0.60423 -2.1858,-0.90763 -3.31445,-0.9375 z M 660.00001,462 a 6,6 0 0 1 6,6 6,6 0 0 1 -6,6 6,6 0 0 1 -6,-6 6,6 0 0 1 6,-6 z' id='path6626' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:none;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:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.66666687;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
<path d='m 658.69016,460.122 v 1.545 c 0.86819,-0.1783 1.76406,-0.17647 2.63222,0.005 v -1.55 z m -2.75363,0.98912 -2.00544,1.70491 0.98801,1.17757 c 0.54939,-0.69591 1.23601,-1.27137 2.01736,-1.69076 z m 8.12867,0.0127 -0.99285,1.18353 c 0.0573,0.0293 0.11416,0.0595 0.17056,0.0905 0.71061,0.41285 1.33657,0.95679 1.84457,1.60287 l 1.00514,-1.19769 z m -11.60999,4.21684 -0.44056,2.59535 1.51535,0.26739 c -0.0273,-0.8866 0.12755,-1.76904 0.45509,-2.59274 z m 15.08573,0.003 -1.5228,0.26851 c 0.32999,0.82318 0.48779,1.70497 0.46365,2.59088 l 1.53286,-0.27 z m -13.68247,4.69464 -1.35149,0.78058 h -3.4e-4 l 1.33101,2.27098 1.33808,-0.77238 c -0.59006,-0.66203 -1.03836,-1.43772 -1.31723,-2.27918 z m 12.30081,0.003 c -0.13616,0.42225 -0.31536,0.82932 -0.53478,1.21481 -0.22083,0.38188 -0.48014,0.74014 -0.77388,1.0692 l 1.33883,0.77313 1.30158,-2.28811 z m -9.55687,3.47164 -0.53479,1.4688 2.47953,0.88448 0.52585,-1.44534 c -0.81119,-0.11877 -1.59279,-0.39022 -2.30338,-0.79995 -0.0563,-0.0351 -0.11203,-0.0711 -0.16721,-0.10799 z m 6.8133,0.0153 c -0.75448,0.46543 -1.59675,0.77091 -2.47468,0.89752 l 0.53031,1.45651 2.46761,-0.91651 z' id='path6628' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33333337;marker:none;enable-background:accumulate'/>
<path d='m 659.64845,463.01367 c -1.60235,0.11249 -3.12186,0.99052 -3.98242,2.48242 -1.37689,2.38706 -0.55308,5.45342 1.83593,6.83399 2.38903,1.38058 5.45319,0.56088 6.83008,-1.82617 1.37689,-2.38706 0.55308,-5.45145 -1.83594,-6.83203 -0.89588,-0.51773 -1.88625,-0.72569 -2.84765,-0.65821 z M 660.00001,464 a 4,4 0 0 1 4,4 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 4,4 0 0 1 4,-4 z' id='path6630' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:none;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:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.66666681;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
</g>
<g id='g1833' style='display:inline' transform='translate(-652,-460)'/>
<g id='layer1' style='display:inline' transform='translate(-652,-460)'/>
</svg>

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">start</property>
<child>
<object class="GtkLabel" id="labeltitle">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Gtk42 Desktop</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">start</property>
<child>
<object class="GtkLabel" id="labeltitle">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Gtk42 Desktop</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>

View File

@ -1,197 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">ac-adapter-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">system-help</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="btnback">
<property name="label" translatable="yes">Change back</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnset">
<property name="label" translatable="yes">Win Settings</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="PanelExit">
<property name="label" translatable="yes">Exit mainwin</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="btnbox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label_time">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">20:00 2021/2/14</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkVolumeButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="orientation">vertical</property>
<property name="icons">audio-volume-muted-symbolic
audio-volume-high-symbolic
audio-volume-low-symbolic
audio-volume-medium-symbolic</property>
<child internal-child="plus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
<child internal-child="minus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="popover">popover1</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
</object>
</interface>

View File

@ -1,197 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">ac-adapter-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">system-help</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="btnback">
<property name="label" translatable="yes">Change back</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnset">
<property name="label" translatable="yes">Win Settings</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="PanelExit">
<property name="label" translatable="yes">Exit mainwin</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="btnbox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label_time">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">20:00 2021/2/14</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkVolumeButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="orientation">vertical</property>
<property name="icons">audio-volume-muted-symbolic
audio-volume-high-symbolic
audio-volume-low-symbolic
audio-volume-medium-symbolic</property>
<child internal-child="plus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
<child internal-child="minus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="popover">popover1</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAboutDialog" id="window1">
<property name="can-focus">False</property>
<property name="type-hint">dialog</property>
<property name="program-name">Gtk Ui</property>
<property name="version">2.0</property>
<property name="copyright" translatable="yes">2020-2021 Xe Corporation</property>
<property name="website">github.com/daleclack</property>
<property name="authors">Dale </property>
<property name="logo-icon-name">org.gtk.daleclack</property>
<child internal-child="vbox">
<object class="GtkBox" id="window">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAboutDialog" id="window1">
<property name="can-focus">False</property>
<property name="type-hint">dialog</property>
<property name="program-name">Gtk Ui</property>
<property name="version">2.0</property>
<property name="copyright" translatable="yes">2020-2021 Xe Corporation</property>
<property name="website">github.com/daleclack</property>
<property name="authors">Dale </property>
<property name="logo-icon-name">org.gtk.daleclack</property>
<child internal-child="vbox">
<object class="GtkBox" id="window">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

View File

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">9999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">9999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkDialog" id="dialog">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Window size config</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="btncancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnok">
<property name="label" translatable="yes">OK</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Input window size</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkSpinButton" id="width_spin">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment1</property>
<property name="value">640</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="height_spin">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment2</property>
<property name="value">480</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnGet">
<property name="label" translatable="yes">Get size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="btn_default">
<property name="label" translatable="yes">Use default config</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">btncancel</action-widget>
<action-widget response="-5">btnok</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">9999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">9999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkDialog" id="dialog">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Window size config</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="btncancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnok">
<property name="label" translatable="yes">OK</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Input window size</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkSpinButton" id="width_spin">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment1</property>
<property name="value">640</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="height_spin">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment2</property>
<property name="value">480</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnGet">
<property name="label" translatable="yes">Get size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="btn_default">
<property name="label" translatable="yes">Use default config</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">btncancel</action-widget>
<action-widget response="-5">btnok</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">user-home</property>
</object>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="title" translatable="yes">gtk(42)</property>
<property name="default-width">640</property>
<property name="default-height">360</property>
<property name="hide-titlebar-when-maximized">True</property>
<property name="icon-name">gtk4-icon</property>
<child>
<object class="GtkFixed" id="fixed">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="background">
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
</child>
<child>
<object class="GtkButton" id="btn_home">
<property name="label" translatable="yes">Home</property>
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="image-position">top</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="x">70</property>
<property name="y">30</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">user-home</property>
</object>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="title" translatable="yes">gtk(42)</property>
<property name="default-width">640</property>
<property name="default-height">360</property>
<property name="hide-titlebar-when-maximized">True</property>
<property name="icon-name">gtk4-icon</property>
<child>
<object class="GtkFixed" id="fixed">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="background">
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
</child>
<child>
<object class="GtkButton" id="btn_home">
<property name="label" translatable="yes">Home</property>
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="image-position">top</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="x">70</property>
<property name="y">30</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -1,561 +0,0 @@
#include "FileWindow.h"
#define FOLDER_NAME "/gtk42/gnome-fs-directory.png"
#define FILE_NAME "/gtk42/gnome-fs-regular.png"
#define ERROR_IMAGE "/gtk42/dialog-error.png"
#define ICON_IMAGE "/gtk42/view-grid-symbolic.png"
#define LIST_IMAGE "/gtk42/view-list-symbolic.png"
//IconView and TreeView Model
enum{
COL_PATH,
COL_DISPLAY_NAME,
COL_PIXBUF,
COL_IS_DIRECTORY,
NUM_COLS
};
typedef enum _ViewMode{
MODE_ICON,
MODE_LIST
}ViewMode;
struct _FileWindow{
GtkWindow parent;
GdkPixbuf *file_pixbuf, *folder_pixbuf;
char *parent_dir;
GtkToolItem *up_button;
GtkWidget *stack, *show_hidden, *view_button, *tree_view, *icon_view, *btn_image;
GtkListStore *store;
GtkTreeSelection *selection;
GList *selected_items;
ViewMode view_mode;
};
G_DEFINE_TYPE(FileWindow,file_window,GTK_TYPE_WINDOW)
static void file_window_load_pixbufs(int size,FileWindow *win){
GdkPixbuf *tmp1,*tmp2;
if(win->file_pixbuf){ //Already loaded
return ;
}
tmp1=gdk_pixbuf_new_from_resource(FILE_NAME,NULL);
win->file_pixbuf=gdk_pixbuf_scale_simple(tmp1,size,size,GDK_INTERP_BILINEAR);
//Check load state
g_assert(win->file_pixbuf);
g_object_unref(tmp1);
tmp2=gdk_pixbuf_new_from_resource(FOLDER_NAME,NULL);
win->folder_pixbuf=gdk_pixbuf_scale_simple(tmp2,size,size,GDK_INTERP_BILINEAR);
g_assert(win->folder_pixbuf);
g_object_unref(tmp2);
}
static void file_window_fill_store(FileWindow *win){
GDir * dir;
const gchar *name;
GtkTreeIter iter;
//Clear the store
gtk_list_store_clear(win->store);
//Go through the directory and get information
dir=g_dir_open(win->parent_dir,0,NULL);
if(!dir){
return;
}
/* Ignore the files start with '.' when the button is not toggled */
name=g_dir_read_name(dir);
while(name!=NULL){
gchar *path, *display_name;
gboolean is_dir;
if(name[0]=='.' && !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(win->show_hidden))){
name=g_dir_read_name(dir);
continue;
}
path = g_build_filename(win->parent_dir, name, NULL);
is_dir = g_file_test(path, G_FILE_TEST_IS_DIR);
display_name = g_filename_to_utf8(name, -1, NULL, NULL, NULL);
gtk_list_store_append(win->store, &iter);
gtk_list_store_set(win->store, &iter,
COL_PATH, path,
COL_DISPLAY_NAME, display_name,
COL_IS_DIRECTORY, is_dir,
COL_PIXBUF, is_dir ? win->folder_pixbuf : win->file_pixbuf,
-1);
g_free (path);
g_free (display_name);
name=g_dir_read_name(dir);
}
g_dir_close(dir);
}
static int sort_func(GtkTreeModel *model,
GtkTreeIter *a,
GtkTreeIter *b,
gpointer user_data)
{
gboolean is_dir_a,is_dir_b;
gchar *name_a,*name_b;
int ret;
//Sort Folders before files,
//and sort files and folders starts with a '.' in front of other files and folders
gtk_tree_model_get(model,a,COL_IS_DIRECTORY,&is_dir_a,COL_DISPLAY_NAME,&name_a,-1);
gtk_tree_model_get(model,b,COL_IS_DIRECTORY,&is_dir_b,COL_DISPLAY_NAME,&name_b,-1);
if(!is_dir_a && is_dir_b){
ret = 1;
}else if(is_dir_a && !is_dir_b){
ret = -1;
}else if(name_a[0]!='.' && name_b[0]=='.'){
ret = 1;
}else if(name_a[0]=='.' && name_b[0]!='.'){
ret = -1;
}else{
ret = g_utf8_collate(name_a,name_b);
}
g_free(name_a);
g_free(name_b);
return ret;
}
static GtkListStore* create_store(void){
GtkListStore *store;
store=gtk_list_store_new(NUM_COLS,
G_TYPE_STRING,
G_TYPE_STRING,
GDK_TYPE_PIXBUF,
G_TYPE_BOOLEAN);
gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(store),
sort_func,NULL,NULL);
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(store),
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
GTK_SORT_ASCENDING);
return store;
}
static void row_activated(GtkTreeView *view,GtkTreePath *tree_path,GtkTreeViewColumn *column,FileWindow *win){
gchar *path;
GtkTreeIter iter;
gboolean is_dir;
gtk_tree_model_get_iter(GTK_TREE_MODEL(win->store),&iter,tree_path);
gtk_tree_model_get(GTK_TREE_MODEL(win->store),&iter,COL_PATH,&path,COL_IS_DIRECTORY,&is_dir,-1);
if(!is_dir)
{
g_free(path);
return;
}
/* Replace parent with path and re-fill the model*/
g_free(win->parent_dir);
win->parent_dir = path;
file_window_fill_store(win);
/* Sensitize the up button */
gtk_widget_set_sensitive(GTK_WIDGET(win->up_button),TRUE);
}
static void item_activated(GtkIconView *view,GtkTreePath *tree_path,FileWindow *win){
gchar *path;
GtkTreeIter iter;
gboolean is_dir;
gtk_tree_model_get_iter(GTK_TREE_MODEL(win->store),&iter,tree_path);
gtk_tree_model_get(GTK_TREE_MODEL(win->store),&iter,COL_PATH,&path,COL_IS_DIRECTORY,&is_dir,-1);
if(!is_dir)
{
g_free(path);
return;
}
/* Replace parent with path and re-fill the model*/
g_free(win->parent_dir);
win->parent_dir = path;
file_window_fill_store(win);
/* Sensitize the up button */
gtk_widget_set_sensitive(GTK_WIDGET(win->up_button),TRUE);
}
static void up_clicked(GtkToolItem *item,FileWindow *win){
gchar *dir_name;
dir_name = g_path_get_dirname(win->parent_dir);
g_free(win->parent_dir);
win->parent_dir = dir_name;
file_window_fill_store(win);
//Set Up button to sensitive
gtk_widget_set_sensitive(GTK_WIDGET(win->up_button),TRUE);
}
static void home_clicked(GtkToolItem *item,FileWindow *win){
g_free(win->parent_dir);
win->parent_dir = g_strdup(g_get_home_dir());
file_window_fill_store(win);
//Set Up button to sensitive
gtk_widget_set_sensitive(GTK_WIDGET(win->up_button),TRUE);
}
static void btnview_clicked(GtkButton *widget,FileWindow *win){
if(win->view_mode == MODE_ICON){
gtk_image_set_from_resource(GTK_IMAGE(win->btn_image),LIST_IMAGE);
gtk_stack_set_visible_child_name(GTK_STACK(win->stack),"List_view");
win->view_mode = MODE_LIST;
}else{
gtk_image_set_from_resource(GTK_IMAGE(win->btn_image),ICON_IMAGE);
gtk_stack_set_visible_child_name(GTK_STACK(win->stack),"Icon_view");
win->view_mode = MODE_ICON;
}
}
static void make_directory(GtkWidget *widget,int response,GtkEntry *entry){
//Make a new directory
if(response == GTK_RESPONSE_OK){
FileWindow *win=FILE_WINDOW(gtk_window_get_transient_for(GTK_WINDOW(widget)));
const char *folder=gtk_entry_get_text(entry);
char *path, *parent_path;
parent_path=win->parent_dir;
if(strlen(parent_path) == 1 && parent_path[0] == '/'){
path=g_strdup_printf("%s%s",parent_path,folder);
}else{
path=g_strdup_printf("%s/%s",parent_path,folder);
}
if(g_mkdir_with_parents(path,0755) == -1){
g_print("Error Occured!");
}else{
file_window_fill_store(win);
}
g_free(path);
}
gtk_widget_destroy(widget);
}
static void btnnew_clicked(GtkToolItem *item,GtkWindow *parent){
//Create Dialog
GtkWidget *dialog, *content_area, *entry;
dialog = gtk_dialog_new_with_buttons("Create a folder",parent,
GTK_DIALOG_USE_HEADER_BAR,"New",GTK_RESPONSE_OK,"Cancel",GTK_RESPONSE_CANCEL,NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog),GTK_RESPONSE_OK);
//Add entry
content_area=gtk_dialog_get_content_area(GTK_DIALOG(dialog));
entry=gtk_entry_new();
gtk_entry_set_activates_default(GTK_ENTRY(entry),TRUE);
gtk_container_add(GTK_CONTAINER(content_area),entry);
g_signal_connect(dialog,"response",G_CALLBACK(make_directory),entry);
gtk_widget_show_all(dialog);
}
static GtkWidget * create_list_view(FileWindow *win){
GtkWidget * tree_view;
GtkCellRenderer *icon_render,*text_render;
GtkTreeViewColumn *column;
tree_view=gtk_tree_view_new_with_model(GTK_TREE_MODEL(win->store));
//gtk_icon_view_set_selection_mode(GTK_ICON_VIEW(tree_view),GTK_SELECTION_MULTIPLE);
/* We now set which model columns that correspond to the text
* and pixbuf of each item
*/
icon_render=gtk_cell_renderer_pixbuf_new();
text_render=gtk_cell_renderer_text_new();
column=gtk_tree_view_column_new_with_attributes("",icon_render,"pixbuf",COL_PIXBUF,NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view),column);
column=gtk_tree_view_column_new_with_attributes("Name",text_render,"text",COL_DISPLAY_NAME,NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view),column);
/* Connect to the "item-activated" signal */
g_signal_connect(tree_view, "row-activated",
G_CALLBACK (row_activated), win);
return tree_view;
}
static GtkWidget * create_icon_view(FileWindow *win){
GtkWidget *icon_view;
icon_view=gtk_icon_view_new_with_model(GTK_TREE_MODEL(win->store));
gtk_icon_view_set_selection_mode(GTK_ICON_VIEW(icon_view),GTK_SELECTION_MULTIPLE);
/* We now set which model columns that correspond to the text
* and pixbuf of each item
*/
gtk_icon_view_set_text_column(GTK_ICON_VIEW(icon_view),COL_DISPLAY_NAME);
gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(icon_view),COL_PIXBUF);
/* Connect to the "item-activated" signal */
g_signal_connect(icon_view, "item-activated",
G_CALLBACK (item_activated), win);
return icon_view;
}
static void create_view_button(FileWindow * win){
win->view_button=gtk_button_new();
win->btn_image=gtk_image_new_from_resource(ICON_IMAGE);
gtk_button_set_relief(GTK_BUTTON(win->view_button),GTK_RELIEF_NONE);
gtk_button_set_image(GTK_BUTTON(win->view_button),win->btn_image);
}
static GtkWidget * create_delete_dialog(FileWindow *win,const char *msg){
//Message Dialog
GtkWidget *dialog, *hbox, *content_area, *label, *error_image, *label1, *vbox;
char * msg_str=g_strdup_printf("Delete Failed:%s",msg);
if(!msg){
return NULL;
}
dialog = gtk_dialog_new_with_buttons("File",GTK_WINDOW(win),GTK_DIALOG_DESTROY_WITH_PARENT,
"OK",GTK_RESPONSE_OK,NULL);
gtk_window_set_default_size(GTK_WINDOW(dialog),300,150);
gtk_window_set_icon_name(GTK_WINDOW(dialog),"org.gtk.daleclack");
gtk_window_set_title(GTK_WINDOW(dialog),"Error");
//Child Widgets
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,5);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
label1 = gtk_label_new(" ");
gtk_box_pack_start(GTK_BOX(vbox),label1,FALSE,FALSE,0);
error_image = gtk_image_new_from_resource(ERROR_IMAGE);
gtk_box_pack_start(GTK_BOX(hbox),error_image,FALSE,FALSE,0);
label = gtk_label_new(msg_str);
gtk_box_pack_end(GTK_BOX(hbox),label,FALSE,FALSE,0);
gtk_widget_set_valign(hbox,GTK_ALIGN_CENTER);
gtk_widget_set_halign(hbox,GTK_ALIGN_CENTER);
gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0);
gtk_container_add(GTK_CONTAINER(content_area),vbox);
g_signal_connect_swapped(dialog,"response",G_CALLBACK(gtk_widget_destroy),dialog);
g_free(msg_str);
return dialog;
}
static GtkToolItem * create_menubtn(FileWindow *win){
//Create Button and item for toolbar
GtkToolItem *menuitem;
GtkWidget *menubtn, *popover, *vbox, *btnexit, *label_exit;
menuitem = gtk_tool_item_new();
menubtn = gtk_menu_button_new();
gtk_button_set_relief(GTK_BUTTON(menubtn),GTK_RELIEF_NONE);
gtk_container_add(GTK_CONTAINER(menuitem),menubtn);
//Create Menu
popover = gtk_popover_new(menubtn);
gtk_popover_set_modal(GTK_POPOVER(popover),TRUE);
gtk_menu_button_set_popover(GTK_MENU_BUTTON(menubtn),popover);
//CheckButton for show hidden dir and files
win->show_hidden = gtk_check_button_new_with_label("Show Hidden Files");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(win->show_hidden),FALSE);
//"Exit" Button
btnexit = gtk_button_new();
label_exit = gtk_label_new("Exit");
gtk_button_set_relief(GTK_BUTTON(btnexit),GTK_RELIEF_NONE);
gtk_widget_set_halign(label_exit,GTK_ALIGN_START);
gtk_container_add(GTK_CONTAINER(btnexit),label_exit);
g_signal_connect_swapped(btnexit,"clicked",G_CALLBACK(gtk_widget_destroy),win);
//Add Widgets to popover
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,5);
gtk_box_pack_start(GTK_BOX(vbox),win->show_hidden,TRUE,TRUE,0);
gtk_box_pack_start(GTK_BOX(vbox),btnexit,TRUE,TRUE,0);
gtk_container_add(GTK_CONTAINER(popover),vbox);
gtk_widget_show_all(vbox);
return menuitem;
}
static void btndel_clicked(GtkToolItem *item,FileWindow *win){
GtkTreeIter iter;
char * select_name = NULL;
GtkWidget *dialog=NULL;
switch(win->view_mode){
case MODE_ICON: //Iconfied Mode
GList *list,*header;
list = gtk_icon_view_get_selected_items(GTK_ICON_VIEW(win->icon_view));
header=list;
while(list!=NULL){
GtkTreePath *path = (GtkTreePath*)(list->data);
if(gtk_tree_model_get_iter(GTK_TREE_MODEL(win->store),&iter,path)){
gtk_tree_model_get(GTK_TREE_MODEL(win->store),&iter,COL_DISPLAY_NAME,&select_name,-1);
dialog = create_delete_dialog(win,select_name);
}
list=list->next;
}
g_list_free_full(header, (GDestroyNotify) gtk_tree_path_free);
break;
case MODE_LIST: //Listed Mode
GtkTreeModel * model = gtk_tree_view_get_model(GTK_TREE_VIEW(win->tree_view));
if(gtk_tree_selection_get_selected(win->selection,&model,&iter)){
gtk_tree_model_get(model,&iter,COL_DISPLAY_NAME,&select_name,-1);
}
//g_object_unref(model);
dialog = create_delete_dialog(win,select_name);
break;
}
if(dialog){
gtk_widget_show_all(dialog);
}
g_free(select_name);
}
static void file_window_destroy(GtkWidget *widget){
gtk_widget_destroy(widget);
widget=NULL;
//g_object_unref(FILE_WINDOW(widget)->file_pixbuf);
//FILE_WINDOW(widget)->file_pixbuf=NULL;
//g_object_unref(FILE_WINDOW(widget)->folder_pixbuf);
//FILE_WINDOW(widget)->folder_pixbuf=NULL;
}
static void file_window_init(FileWindow *window){
GtkWidget *sw,*vbox,*tool_bar,*btnbox,*view_bar;
GtkToolItem *home_button,*new_button,*delete_button,*view_item;
//Initalize window
gtk_window_set_default_size(GTK_WINDOW(window),650,400);
gtk_window_set_icon_name(GTK_WINDOW(window),"org.gtk.daleclack");
gtk_window_set_title(GTK_WINDOW(window),"File Manager");
file_window_load_pixbufs(48,window);
//Create child widgets
vbox=gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
btnbox=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
gtk_container_add(GTK_CONTAINER(vbox),btnbox);
gtk_container_add(GTK_CONTAINER(window),vbox);
tool_bar=gtk_toolbar_new();
gtk_toolbar_set_style(GTK_TOOLBAR(tool_bar),GTK_TOOLBAR_ICONS);
gtk_box_pack_start(GTK_BOX(btnbox),tool_bar,FALSE,FALSE,0);
//"Up" Button
window->up_button=gtk_tool_button_new(NULL,NULL);
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(window->up_button),"go-up");
gtk_tool_item_set_is_important(window->up_button,TRUE);
gtk_widget_set_sensitive(GTK_WIDGET(window->up_button),FALSE);
gtk_toolbar_insert(GTK_TOOLBAR(tool_bar),window->up_button,-1);
//"Home" Button
home_button = gtk_tool_button_new(NULL,NULL);
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(home_button),"go-home");
gtk_tool_item_set_is_important(home_button,TRUE);
gtk_toolbar_insert(GTK_TOOLBAR(tool_bar),home_button,-1);
//"New Folder" Button
new_button = gtk_tool_button_new(NULL,NULL);
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(new_button),"folder-new");
gtk_tool_item_set_is_important(new_button,TRUE);
gtk_toolbar_insert(GTK_TOOLBAR(tool_bar),new_button,-1);
//"Delete" Button
delete_button = gtk_tool_button_new(NULL,NULL);
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(delete_button),"edit-delete");
gtk_tool_item_set_is_important(delete_button,TRUE);
gtk_toolbar_insert(GTK_TOOLBAR(tool_bar),delete_button,-1);
//"View Mode" Button
view_bar = gtk_toolbar_new();
view_item = gtk_tool_item_new();
window->view_mode = MODE_ICON;
create_view_button(window);
gtk_container_add(GTK_CONTAINER(view_item),window->view_button);
gtk_toolbar_insert(GTK_TOOLBAR(view_bar),view_item,-1);
//Menu Button
GtkToolItem *menubtn = create_menubtn(window);
gtk_toolbar_insert(GTK_TOOLBAR(view_bar),menubtn,-1);
gtk_toolbar_set_style(GTK_TOOLBAR(view_bar),GTK_TOOLBAR_ICONS);
gtk_box_pack_end(GTK_BOX(btnbox),view_bar,FALSE,FALSE,0);
//Folder Container
sw = gtk_scrolled_window_new(NULL,NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw),GTK_SHADOW_ETCHED_IN);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (sw),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
gtk_box_pack_start(GTK_BOX(vbox),sw,TRUE,TRUE,0);
window->stack=gtk_stack_new();
//Create Store and fill it
window->parent_dir=g_strdup("/");
window->store=create_store();
file_window_fill_store(window);
window->tree_view=create_list_view(window);
window->icon_view=create_icon_view(window);
gtk_stack_add_named(GTK_STACK(window->stack),window->icon_view,"Icon_view");
gtk_stack_add_named(GTK_STACK(window->stack),window->tree_view,"List_view");
g_object_unref(window->store);
window->selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(window->tree_view));
/* Connect to the "clicked" signal of the "Up" tool button */
g_signal_connect(window->up_button, "clicked",
G_CALLBACK (up_clicked), window);
/* Connect to the "clicked" signal of the "Home" tool button */
g_signal_connect(home_button, "clicked",
G_CALLBACK (home_clicked), window);
/* Connect to the "changed" signal of the "View Mode" Button */
g_signal_connect(window->view_button, "clicked",
G_CALLBACK (btnview_clicked), window);
/* Connect to the "clicked" signal of the "Show hidden files" tool button */
g_signal_connect_swapped(window->show_hidden, "clicked",
G_CALLBACK (file_window_fill_store), window);
/* Connect to the "clicked" signal of the "New Directory" tool button */
g_signal_connect(new_button, "clicked",
G_CALLBACK (btnnew_clicked), window);
/* Connect to the "clicked" signal of the "Delete" tool button */
g_signal_connect(delete_button, "clicked",
G_CALLBACK (btndel_clicked), window);
gtk_container_add(GTK_CONTAINER(sw),window->stack);
}
static void file_window_class_init(FileWindowClass *win_class){
GTK_WIDGET_CLASS(file_window_parent_class)->destroy=file_window_destroy;
}
FileWindow * file_window_new(){
return (FileWindow*)g_object_new(file_window_get_type(),NULL);
}

View File

@ -1,10 +0,0 @@
#ifndef __FILE_WINDOW_H_
#define __FILE_WINDOW_H_
#include <gtk/gtk.h>
G_DECLARE_FINAL_TYPE(FileWindow,file_window,FILE,WINDOW,GtkWindow)
FileWindow * file_window_new();
#endif

View File

@ -1,184 +0,0 @@
#include "TextEditor.h"
static GtkWidget *infobar;
static GtkTextBuffer *textbuffer;
static int filemode;
static void dialog_response(GtkWidget *widget,int response,gpointer data){
char *contents,*filename;
gsize length;
if(response==GTK_RESPONSE_OK){
GFile *file=gtk_file_chooser_get_file((GtkFileChooser*)widget);
filename=g_file_get_path(file);
if(filemode==0){
//Get File contents and show
if(g_file_get_contents(filename,&contents,&length,NULL)){
gtk_text_buffer_set_text(textbuffer,contents,length);
}
}else{
//Get Start and End char of Text
GtkTextIter start,end;
gtk_text_buffer_get_start_iter(textbuffer,&start);
gtk_text_buffer_get_end_iter(textbuffer,&end);
//Get Contents
contents=gtk_text_buffer_get_text(textbuffer,&start,&end,TRUE);
//Create a file and write
FILE *fp;
fp=fopen(filename,"wt+");
if(fp!=NULL){
fputs(contents,fp);
}
fclose(fp);
}
g_object_unref(file);
g_free(contents);
g_free(filename);
}
gtk_widget_destroy(widget);
}
static void openfile_dialog(GtkWidget *widget,GtkWindow *parent){
filemode=0;
GtkFileChooserAction action=GTK_FILE_CHOOSER_ACTION_OPEN;
GtkWidget *dialog=gtk_file_chooser_dialog_new("Open a text file",parent,
action,"OK",GTK_RESPONSE_OK,"Cancel",GTK_RESPONSE_CANCEL,NULL);
GtkFileFilter *filter=gtk_file_filter_new();
gtk_file_filter_set_name(filter,"Text Files");
gtk_file_filter_add_mime_type(filter,"text/*");
gtk_file_chooser_add_filter((GtkFileChooser*)dialog,filter);
//g_object_unref(filter);
filter=gtk_file_filter_new();
gtk_file_filter_set_name(filter,"Any Files");
gtk_file_filter_add_pattern(filter,"*");
gtk_file_chooser_add_filter((GtkFileChooser*)dialog,filter);
//g_object_unref(filter);
g_signal_connect(dialog,"response",G_CALLBACK(dialog_response),NULL);
gtk_widget_show_all(dialog);
}
static void savefile_dialog(GtkWidget *widget,GtkWindow *parent){
filemode=1;
GtkFileChooserAction action=GTK_FILE_CHOOSER_ACTION_SAVE;
GtkWidget *dialog=gtk_file_chooser_dialog_new("Open a text file",parent,
action,"OK",GTK_RESPONSE_OK,"Cancel",GTK_RESPONSE_CANCEL,NULL);
GtkFileFilter *filter=gtk_file_filter_new();
gtk_file_filter_set_name(filter,"Text Files");
gtk_file_filter_add_mime_type(filter,"text/*");
gtk_file_chooser_add_filter((GtkFileChooser*)dialog,filter);
//g_object_unref(filter);
filter=gtk_file_filter_new();
gtk_file_filter_set_name(filter,"Any Files");
gtk_file_filter_add_pattern(filter,"*");
gtk_file_chooser_add_filter((GtkFileChooser*)dialog,filter);
//g_object_unref(filter);
g_signal_connect(dialog,"response",G_CALLBACK(dialog_response),NULL);
gtk_widget_show_all(dialog);
}
static void textbuffer_clear(GtkWidget *widget,GtkTextBuffer *buffer){
gtk_text_buffer_set_text(buffer,"",-1);
gtk_widget_show(infobar);
}
static void infobar_response(GtkWidget *widget,gpointer data){
gtk_widget_hide(widget);
}
static void btncopy_clicked(GtkWidget *widget,gpointer data){
//Get Text or selected text
const char *contents;
GtkTextIter start,end;
if(gtk_text_buffer_get_has_selection(textbuffer)){
gtk_text_buffer_get_bounds(textbuffer,&start,&end);
contents=gtk_text_buffer_get_text(textbuffer,&start,&end,TRUE);
}else{
gtk_text_buffer_get_start_iter(textbuffer,&start);
gtk_text_buffer_get_end_iter(textbuffer,&end);
//Get Contents
contents=gtk_text_buffer_get_text(textbuffer,&start,&end,TRUE);
}
//Get Clipboard and put text
GtkClipboard *clipboard=gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gtk_clipboard_set_text(clipboard,contents,-1);
}
static void get_text(GtkClipboard * clipboard,const char * text,gpointer data){
//Paste text
gtk_text_buffer_insert_at_cursor(textbuffer,text,-1);
}
static void btnpaste_clicked(GtkWidget *widget,gpointer data){
//Get ClipBoard and paste text
GtkClipboard * clipboard=gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gtk_clipboard_request_text(clipboard,get_text,NULL);
}
void text_editor(GtkWidget *widget,GtkWindow *parent){
//Initalize window
GtkWidget *window,*hbox;
//window=gtk_application_window_new(app);
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_transient_for((GtkWindow*)window,parent);
gtk_window_set_title((GtkWindow*)window,"Simple Text Editor");
gtk_window_set_icon_name((GtkWindow*)window,"org.gtk.daleclack");
gtk_window_set_default_size((GtkWindow*)window,800,450);
hbox=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
//Initalize infobar
infobar=gtk_info_bar_new_with_buttons("OK",GTK_RESPONSE_OK,NULL);
GtkWidget *content_area=gtk_info_bar_get_content_area((GtkInfoBar*)infobar);
GtkWidget *label=gtk_label_new("Cleared the text");
g_signal_connect(infobar,"response",G_CALLBACK(infobar_response),NULL);
gtk_container_add((GtkContainer*)content_area,label);
gtk_box_pack_start((GtkBox*)hbox,infobar,TRUE,FALSE,0);
//Ininalize TextView
GtkWidget *scrolled;
GtkWidget *textview;
//GtkTextBuffer *textbuffer;
scrolled=gtk_scrolled_window_new(NULL,NULL);
gtk_scrolled_window_set_policy((GtkScrolledWindow*)scrolled,
GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
textview=gtk_text_view_new();
textbuffer=gtk_text_view_get_buffer((GtkTextView*)textview);
//gtk_widget_set_size_request(scrolled,800,440);
gtk_container_add((GtkContainer*)scrolled,textview);
gtk_box_pack_start((GtkBox*)hbox,scrolled,TRUE,TRUE,0);
//Add Buttons
GtkWidget *btn_box=gtk_box_new(GTK_ORIENTATION_VERTICAL,5);
GtkWidget *btnopen,*btnsave,*btnclear,*btncopy,*btnpaste,*btnexit;
btnopen=gtk_button_new_with_label("Open");
g_signal_connect(btnopen,"clicked",G_CALLBACK(openfile_dialog),window);
btnsave=gtk_button_new_with_label("Save");
g_signal_connect(btnsave,"clicked",G_CALLBACK(savefile_dialog),window);
btnclear=gtk_button_new_with_label("Clear");
g_signal_connect(btnclear,"clicked",G_CALLBACK(textbuffer_clear),textbuffer);
btncopy=gtk_button_new_with_label("Copy");
g_signal_connect(btncopy,"clicked",G_CALLBACK(btncopy_clicked),NULL);
btnpaste=gtk_button_new_with_label("Paste");
g_signal_connect(btnpaste,"clicked",G_CALLBACK(btnpaste_clicked),NULL);
btnexit=gtk_button_new_with_label("Exit");
g_signal_connect_swapped(btnexit,"clicked",G_CALLBACK(gtk_widget_destroy),window);
gtk_widget_set_valign(btn_box,GTK_ALIGN_CENTER);
gtk_box_pack_end((GtkBox*)btn_box,btnexit,FALSE,FALSE,0);
gtk_box_pack_end((GtkBox*)btn_box,btnpaste,FALSE,FALSE,0);
gtk_box_pack_end((GtkBox*)btn_box,btncopy,FALSE,FALSE,0);
gtk_box_pack_end((GtkBox*)btn_box,btnclear,FALSE,FALSE,0);
gtk_box_pack_end((GtkBox*)btn_box,btnsave,FALSE,FALSE,0);
gtk_box_pack_end((GtkBox*)btn_box,btnopen,FALSE,FALSE,0);
gtk_box_pack_end((GtkBox*)hbox,btn_box,FALSE,FALSE,0);
//Add widgets and show everything
gtk_container_add((GtkContainer*)window,hbox);
gtk_widget_show_all(window);
gtk_widget_hide(infobar);
}

View File

@ -1,9 +0,0 @@
#ifndef __TEXTEDITOR_H_
#define __TEXTEDITOR_H_
#include <gtk/gtk.h>
#include <cstdio>
void text_editor(GtkWidget *widget,GtkWindow *parent);
#endif

View File

@ -1,76 +0,0 @@
#include "background.h"
#include "winconf.h"
#include "winpe.xpm"
#include "image_types.h"
static void dialog_response(GtkNativeDialog *widget,int response,GtkBuilder *builder){
//Handle file chooser response and set background
int width=640,height=360;
get_config(&width,&height);
GObject *background=gtk_builder_get_object(builder,"background");
const gchar *filename;
GFile *file;
//g_print("%s\n",filename);
if(response==GTK_RESPONSE_ACCEPT){
file=gtk_file_chooser_get_file(GTK_FILE_CHOOSER(widget));
filename=g_file_get_path(file);
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_file(filename,NULL);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,width,height,GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(background),sized);
g_object_unref(pixbuf);
g_object_unref(sized);
}
//gtk_widget_destroy(widget);
gtk_native_dialog_destroy(widget);
}
void fileopen(GtkWidget *widget,GtkBuilder *builder){
GObject *parent=gtk_builder_get_object(builder,"window");
//Change background
GtkFileChooserNative *dialog;
GtkFileChooserAction action=GTK_FILE_CHOOSER_ACTION_OPEN;
dialog=gtk_file_chooser_native_new("Choose a Image file",GTK_WINDOW(parent),action,"OK","Cancel");
//Use GtkFileFilter to select image file
GtkFileFilter *filter=gtk_file_filter_new();
gtk_file_filter_set_name(filter,"Image Files");
/*
Microsoft Windows doesn't support mine types,
For Microsoft Windows,I use a list to store image extenstions;
And For Linux,just use the image/* mime type
*/
if(mime_type_supported()){
gtk_file_filter_add_mime_type(filter,"image/*");
}else{
int i;
for (i = 0; supported_globs != NULL && supported_globs[i] != NULL; i++)
{
const char *glob = supported_globs[i];
gtk_file_filter_add_pattern (filter, glob);
}
}
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter);
//Filter For All Files
filter=gtk_file_filter_new();
gtk_file_filter_set_name(filter,"All Files");
gtk_file_filter_add_pattern(filter,"*");
gtk_file_chooser_add_filter((GtkFileChooser*)dialog,filter);
//Show Dialog and wait for response
gtk_native_dialog_show(GTK_NATIVE_DIALOG(dialog));
g_signal_connect(dialog,"response",G_CALLBACK(dialog_response),builder);
}
void default_background(GtkBuilder *builder){
//Set the default background
int width=640,height=360;
get_config(&width,&height);
GObject *background=gtk_builder_get_object(builder,"background");
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_xpm_data(winpe);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,width,height,GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(background),sized);
}

View File

@ -1,14 +0,0 @@
#ifndef __BACK_H_
#define __BACK_H_
#include <gtk/gtk.h>
void default_background(GtkBuilder *builder);
void fileopen(GtkWidget *widget,GtkBuilder *builder);
//void dialog_response(GtkWidget *widget,int response,GtkBuilder *builder);
#endif

View File

@ -1,149 +0,0 @@
#include "drawing.h"
#include <cstdio>
typedef struct {
GtkWidget *draw_area1;
double x;
double y;
}MousePos;
static cairo_surface_t *surface=cairo_image_surface_create(CAIRO_FORMAT_ARGB32,640,360);
//static double start_x,start_y;
static void clear_surface (void)
{
cairo_t *cr;
cr = cairo_create (surface);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_paint (cr);
cairo_destroy (cr);
}
/*
static void resize_cb(GtkWidget *widget,int width,int height,gpointer data){
cairo_surface_destroy (surface);
cairo_surface_create_similar(surface,CAIRO_CONTENT_COLOR,width,height);
}*/
static gboolean draw_cb(GtkWidget *widget,cairo_t *cr,gpointer data){
cairo_set_source_surface(cr,surface,0,0);
cairo_paint(cr);
//Set Color
/*guint width, height;
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
cairo_arc (cr,
width / 2.0, height / 2.0,
MIN (width, height) / 2.0,
0, 2 * G_PI);
cairo_fill(cr);*/
return FALSE;
}
static void draw_brush(GtkWidget *widget,double x,double y){
cairo_t *cr;
//Draw on the surface
cr=cairo_create(surface);
//Some bugs in color set
GdkRGBA color;
//Draw and fill in color
cairo_arc(cr,x,y,3,0,2*G_PI);
//gdk_rgba_parse(&color,"66CCFF");
//gdk_cairo_set_source_rgba(cr,&color);
cairo_fill(cr);
cairo_destroy(cr);
gtk_widget_queue_draw(widget);
}
static void drag_begin(GtkGesture *gesture,double x,double y,MousePos *pos){
pos->x=x;
pos->y=y;
draw_brush(pos->draw_area1,x,y);
/*
freopen("drag.txt","a",stdout);
g_print("%lf %lf\n",x,y);
fclose(stdout);
*/
}
static void drag_update(GtkGesture *gesture,double x,double y,MousePos *pos){
draw_brush(pos->draw_area1,x+pos->x,y+pos->y);
/*
freopen("drag.txt","a",stdout);
g_print("%lf %lf\n",x+pos->x,y+pos->y);
fclose(stdout);
*/
}
static void drag_end(GtkGesture *gesture,double x,double y,MousePos *pos){
draw_brush(pos->draw_area1,x+pos->x,y+pos->y);
/*
freopen("drag.txt","a",stdout);
g_print("%lf %lf\n",x+pos->x,y+pos->y);
fclose(stdout);
*/
}
static void pressed(GtkGestureMultiPress *gesture,int n_press,double x,double y,GtkWidget *widget){
clear_surface();
gtk_widget_queue_draw(widget);
/*
g_print("%d\n",n_press);
freopen("drag.txt","w",stdout);
printf("\0");
fclose(stdout);
*/
}
static void close_window(void){
if(surface){
cairo_surface_destroy(surface);
}
}
void drawing_main(GtkWidget *widget,GtkWindow *parent){
GtkWidget *window,*draw_area;
GtkGesture *press,*drag;
//Create a window
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_transient_for(GTK_WINDOW(window),parent);
gtk_window_set_title(GTK_WINDOW(window),"Drawing Test");
gtk_window_set_default_size(GTK_WINDOW(window),640,360);
gtk_window_set_icon_name(GTK_WINDOW(window),"org.gtk.daleclack");
g_signal_connect(window,"destroy",G_CALLBACK(close_window),NULL);
//Create a draw area
draw_area=gtk_drawing_area_new();
g_signal_connect(draw_area,"draw",G_CALLBACK(draw_cb),NULL);
//g_signal_connect_after(draw_area,"resize",G_CALLBACK(resize_cb),NULL);
//Create gestures
static MousePos pos;
pos.draw_area1=draw_area;
//"Drag" gesture
drag=gtk_gesture_drag_new(draw_area);
gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(drag),GDK_BUTTON_PRIMARY);
g_signal_connect(drag,"drag-begin",G_CALLBACK(drag_begin),&pos);
g_signal_connect(drag,"drag-update",G_CALLBACK(drag_update),&pos);
g_signal_connect(drag,"drag-end",G_CALLBACK(drag_end),&pos);
//"Press" gesture
press=gtk_gesture_multi_press_new(draw_area);
gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(press),GDK_BUTTON_SECONDARY);
g_signal_connect(press,"pressed",G_CALLBACK(pressed),draw_area);
gtk_container_add(GTK_CONTAINER(window),draw_area);
gtk_widget_show_all(window);
}

View File

@ -1,8 +0,0 @@
#ifndef __DRAWING_H_
#define __DRAWING_H_
#include <gtk/gtk.h>
void drawing_main(GtkWidget *widget,GtkWindow *parent);
#endif

View File

@ -1,73 +0,0 @@
#include "game.h"
GObject *button[4];
GObject *label;
const char *btn_index[4]={"0","1","2","3"};
int flag;
static void btn_click(GtkWidget *widget,gpointer data){
//Get image
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_resource("/gtk42/icon.jpg",NULL);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,50,50,GDK_INTERP_BILINEAR);
GtkWidget *image=gtk_image_new_from_pixbuf(sized);
//Get button index
char str[2];
strcpy(str,(char*)data);
//Set a image to the flag button and judge
gtk_button_set_image((GtkButton*)button[flag],image);
if(flag==str[0]-48){
gtk_label_set_label(GTK_LABEL(label),"Good luck!");
}else{
gtk_label_set_label(GTK_LABEL(label),"Flag missed.");
}
for(int i=0;i<4;i++){
gtk_widget_set_sensitive(GTK_WIDGET(button[i]),FALSE);
}
}
static void buttons_init(GtkBuilder *builder){
//Initalize buttons
for(int i=0;i<4;i++){
char str[6];
sprintf(str,"btn_%d",i+1);
button[i]=gtk_builder_get_object(builder,str);
g_signal_connect(button[i],"clicked",G_CALLBACK(btn_click),(gpointer)btn_index[i]);
gtk_button_set_always_show_image(GTK_BUTTON(button[i]),TRUE);
}
}
static void btngo_click(GtkWidget *widget,gpointer data){
//Reinitalize the buttons and the flag
gtk_label_set_label(GTK_LABEL(label),"Select a button");
for(int i=0;i<4;i++){
gtk_widget_set_sensitive(GTK_WIDGET(button[i]),TRUE);
gtk_button_set_image((GtkButton*)button[i],NULL);
}
srand((unsigned)time(NULL));
int x=rand();
flag=x%4;
}
void gamemain(GtkWidget *widget,GtkWindow *parent){
//Get objects from the Gtkbuilder and initalize the application
GtkBuilder *builder=gtk_builder_new();
GObject *window;
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_resource("/gtk42/icon.jpg",NULL);
gtk_builder_add_from_resource(builder,"/gtk42/game1.ui",NULL);
window=gtk_builder_get_object(builder,"window");
gtk_window_set_icon(GTK_WINDOW(window),pixbuf);
//Get buttons from GtkBuilder
buttons_init(builder);
GObject *btn_go=gtk_builder_get_object(builder,"btn_go");
g_signal_connect(btn_go,"clicked",G_CALLBACK(btngo_click),(gpointer)builder);
GObject *btn_exit=gtk_builder_get_object(builder,"btn_exit");
g_signal_connect_swapped(btn_exit,"clicked",G_CALLBACK(gtk_widget_destroy),GTK_WIDGET(window));
label=gtk_builder_get_object(builder,"label");
//Initalize the flag
srand((unsigned)time(NULL));
int x=rand();
flag=x%4;
gtk_window_set_transient_for(GTK_WINDOW(window),parent);
gtk_widget_show_all(GTK_WIDGET(window));
g_object_unref(pixbuf);
}

View File

@ -1,17 +0,0 @@
#ifndef __GAME_H_
#define __GAME_H_
#include <gtk/gtk.h>
#include <ctime>
#include <cstdlib>
#include <cstring>
//void btn_click(GtkWidget *widget,gpointer data);
//void buttons_init(GtkBuilder *builder);
//void btngo_click(GtkWidget *widget,gpointer data);
void gamemain(GtkWidget *widget,GtkWindow *parent);
#endif

View File

@ -1,38 +0,0 @@
#pragma once
#include <glib.h>
static const char * const supported_globs[]={
"*.bmp",
"*.cod",
"*.gif",
"*.ief",
"*.jpe",
"*.jpeg",
"*.jpg",
"*.jfif",
"*.svg",
"*.png",
"*.tif",
"*.tiff",
"*.ras",
"*.cmx",
"*.ico",
"*.pnm",
"*.pbm",
"*.pgm",
"*.ppm",
"*.rgb",
"*.xbm",
"*.xpm",
"*.xwd",
NULL
};
static inline gboolean mime_type_supported(){
#ifdef G_OS_WIN32
return FALSE;
#else
return TRUE;
#endif
}

View File

@ -1,49 +0,0 @@
#include <gtk/gtk.h>
#include "background.h"
#include "winconf.h"
#include "panel1.h"
#include "panel2.h"
static void gtkmain(GtkApplication *app,gpointer user_data){
//Get main window
int width=640,height=360;
get_config(&width,&height);
//GtkBuilder *builder=gtk_builder_new_from_file("res/window.ui");
GtkBuilder *builder=gtk_builder_new_from_resource("/gtk42/window.ui");
GObject *window=gtk_builder_get_object(builder,"window");
gtk_window_set_default_size(GTK_WINDOW(window),width,height);
gtk_window_set_icon_name(GTK_WINDOW(window),"org.gtk.daleclack");
//Home button
GObject *img_home=gtk_builder_get_object(builder,"image1");
gtk_image_set_from_resource(GTK_IMAGE(img_home),"/gtk42/user-home.png");
GObject *btn_home=gtk_builder_get_object(builder,"btn_home");
g_signal_connect(btn_home,"clicked",G_CALLBACK(btnfiles_clicked),window);
//Get button for change background(moved to panel 1)
/*GObject *btn_back=gtk_builder_get_object(builder,"btnback");
g_signal_connect(btn_back,"clicked",G_CALLBACK(fileopen),builder);*/
//Config button(moved to panel 1)
/*GObject *btn_conf=gtk_builder_get_object(builder,"btnset");
g_signal_connect(btn_conf,"clicked",G_CALLBACK(conf_dialog),builder);*/
//default background
default_background(builder);
//Add a top panel with timer
GObject *fixed=gtk_builder_get_object(builder,"fixed");
add_toppanel(builder,GTK_FIXED(fixed));
add_leftpanel(builder,GTK_FIXED(fixed));
//Add window to the application and show
gtk_application_add_window(app,GTK_WINDOW(window));
gtk_widget_show_all(GTK_WIDGET(window));
}
int main(int argc,char *argv[]){
GtkApplication *app;
int status;
app=gtk_application_new("org.gtk.daleclack",G_APPLICATION_NON_UNIQUE);
g_signal_connect(app,"activate",G_CALLBACK(gtkmain),NULL);
status=g_application_run(G_APPLICATION(app),argc,argv);
return status;
}

View File

@ -1,59 +0,0 @@
#include <ctime>
#include "panel1.h"
#include "winconf.h"
#include "background.h"
static gboolean change_time(gpointer data){
//Get local time
time_t t;
struct tm *local;
t=time(NULL);
local=localtime(&t);
//Format the time and set the time
char current_time[20];
sprintf(current_time,"%02d:%02d %04d/%02d/%02d",
local->tm_hour,local->tm_min,local->tm_year+1900,local->tm_mon+1,local->tm_mday);
//g_print("%s\n",current_time);
gtk_label_set_label(GTK_LABEL(data),current_time);
return TRUE;
}
void add_toppanel(GtkBuilder *builder,GtkFixed *fixed){
//Get position
int width=640,height=480;
get_config(&width,&height);
//Get panel
GtkBuilder *panel=gtk_builder_new_from_resource("/gtk42/toppanel.ui");
GObject *panel1=gtk_builder_get_object(panel,"btnbox");
gtk_widget_set_size_request(GTK_WIDGET(panel1),width,15);
//Get timer label and set time
GObject *label_time=gtk_builder_get_object(panel,"label_time");
g_timeout_add(100,change_time,label_time);
//Get popover window
GObject *popover=gtk_builder_get_object(panel,"popover1");
//Get button for change background
GObject *btn_back=gtk_builder_get_object(panel,"btnback");
GObject *img_back=gtk_builder_get_object(panel,"image3");
gtk_image_set_from_resource(GTK_IMAGE(img_back),"/gtk42/graphics.png");
//gtk_button_set_image(GTK_BUTTON(btn_back),GTK_WIDGET(img_back));
gtk_button_set_always_show_image(GTK_BUTTON(btn_back),TRUE);
g_signal_connect(btn_back,"clicked",G_CALLBACK(fileopen),builder);
g_signal_connect_swapped(btn_back,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Config button
GObject *btn_conf=gtk_builder_get_object(panel,"btnset");
GObject *img_set=gtk_builder_get_object(panel,"image5");
gtk_image_set_from_resource(GTK_IMAGE(img_set),"/gtk42/system.png");
//gtk_button_set_image(GTK_BUTTON(btn_conf),GTK_WIDGET(img_set));
gtk_button_set_always_show_image(GTK_BUTTON(btn_conf),TRUE);
g_signal_connect(btn_conf,"clicked",G_CALLBACK(conf_dialog),builder);
g_signal_connect_swapped(btn_conf,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Get Exit button
GObject *btn_exit=gtk_builder_get_object(panel,"PanelExit");
GObject *img_exit=gtk_builder_get_object(panel,"image4");
gtk_image_set_from_resource(GTK_IMAGE(img_exit),"/gtk42/log-out.png");
//gtk_button_set_image(GTK_BUTTON(btn_exit),GTK_WIDGET(img_exit));
gtk_button_set_always_show_image(GTK_BUTTON(btn_exit),TRUE);
GObject *window=gtk_builder_get_object(builder,"window");
g_signal_connect_swapped(btn_exit,"clicked",G_CALLBACK(gtk_widget_destroy),window);
gtk_fixed_put(fixed,GTK_WIDGET(panel1),0,0);
}

View File

@ -1,10 +0,0 @@
#ifndef __TIMER_H_
#define __TIMER_H_
#include <gtk/gtk.h>
//gboolean change_time(gpointer data);
void add_toppanel(GtkBuilder *builder,GtkFixed *fixed);
#endif

View File

@ -1,108 +0,0 @@
#include <cstdlib>
#include <thread>
#include "panel2.h"
#include "win1.h"
#include "game.h"
#include "TextEditor.h"
#include "drawing.h"
#include "FileWindow.h"
static void btnvlc_clicked(GtkWidget *widget,gpointer data){
std::thread first(system,"vlc");
first.detach();
}
static void btngedit_clicked(GtkWidget *widget,gpointer data){
std::thread second(system,"gedit");
second.detach();
}
static void btnaud_clicked(GtkWidget *widget,gpointer data){
std::thread third(system,"audacious");
third.detach();
}
static void btnnote_clicked(GtkWidget *widget,gpointer data){
std::thread fourth(system,"start notepad");
fourth.detach();
}
static void btnvlc_win32(GtkWidget *widget,gpointer data){
std::thread fifth(system,"start ..\\vlc\\vlc.exe");
fifth.detach();
}
void btnfiles_clicked(GtkWidget *widget,GtkWindow *parent){
FileWindow * window1 = file_window_new();
gtk_window_set_transient_for(GTK_WINDOW(window1),parent);
gtk_widget_show_all(GTK_WIDGET(window1));
}
void add_leftpanel(GtkBuilder *builder,GtkFixed *fixed){
//Get Left panel
GtkBuilder *panel2=gtk_builder_new_from_resource("/gtk42/leftpanel.ui");
GObject *panel=gtk_builder_get_object(panel2,"left_panel");
//Set start button and image
GObject *btn_image=gtk_builder_get_object(panel2,"btn_image");
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_resource("/gtk42/icon.png",NULL);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,40,40,GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(btn_image),sized);
//Get popover window
GObject *popover=gtk_builder_get_object(panel2,"popover1");
//Button image
GtkWidget *img_vlc=gtk_image_new_from_resource("/gtk42/vlc.png");
GtkWidget *img_aud=gtk_image_new_from_resource("/gtk42/audacious.png");
GtkWidget *img_gedit=gtk_image_new_from_resource("/gtk42/gedit.png");
//Audacious bin exec
GObject *btn_audacious=gtk_builder_get_object(panel2,"btnaud");
gtk_button_set_image(GTK_BUTTON(btn_audacious),img_aud);
g_signal_connect(btn_audacious,"clicked",G_CALLBACK(btnaud_clicked),NULL);
g_signal_connect_swapped(btn_audacious,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//vlc exec button for linux
GObject *btnvlc=gtk_builder_get_object(panel2,"btnvlc");
GObject *img_vlc1=gtk_builder_get_object(panel2,"image1");
gtk_image_set_from_resource(GTK_IMAGE(img_vlc1),"/gtk42/vlc.png");
g_signal_connect(btnvlc,"clicked",G_CALLBACK(btnvlc_clicked),NULL);
g_signal_connect_swapped(btnvlc,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Start Gedit Text Editor
GObject *btngedit=gtk_builder_get_object(panel2,"btngedit");
GObject *img_gedit1=gtk_builder_get_object(panel2,"image2");
gtk_image_set_from_resource(GTK_IMAGE(img_gedit1),"/gtk42/gedit.png");
g_signal_connect(btngedit,"clicked",G_CALLBACK(btngedit_clicked),NULL);
g_signal_connect_swapped(btngedit,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Notepad on windows
GObject *btnnote=gtk_builder_get_object(panel2,"btn_note");
gtk_button_set_image(GTK_BUTTON(btnnote),img_gedit);
g_signal_connect(btnnote,"clicked",G_CALLBACK(btnnote_clicked),NULL);
g_signal_connect_swapped(btnnote,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//VLC on windows
GObject *btn_vlc=gtk_builder_get_object(panel2,"btn_vlc");
gtk_button_set_image(GTK_BUTTON(btn_vlc),img_vlc);
g_signal_connect(btn_vlc,"clicked",G_CALLBACK(btnvlc_win32),NULL);
g_signal_connect_swapped(btn_vlc,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Get main window
GObject *window=gtk_builder_get_object(builder,"window");
//Gtk31 application
GObject *btngame=gtk_builder_get_object(panel2,"btngame");
g_signal_connect(btngame,"clicked",G_CALLBACK(gamemain),window);
g_signal_connect_swapped(btngame,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Text Editor(Gtk86)
GObject *btnedit=gtk_builder_get_object(panel2,"btneditor");
g_signal_connect(btnedit,"clicked",G_CALLBACK(text_editor),window);
g_signal_connect_swapped(btnedit,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Drawing application
GObject *btndraw=gtk_builder_get_object(panel2,"btndraw");
g_signal_connect(btndraw,"clicked",G_CALLBACK(drawing_main),window);
g_signal_connect_swapped(btndraw,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//About window
GObject *btn_about=gtk_builder_get_object(panel2,"btnabout");
g_signal_connect(btn_about,"clicked",G_CALLBACK(win1_init),window);
g_signal_connect_swapped(btn_about,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//File Manager
GObject *btnfiles=gtk_builder_get_object(panel2,"btnfiles");
g_signal_connect(btnfiles,"clicked",G_CALLBACK(btnfiles_clicked),window);
g_signal_connect_swapped(btnfiles,"clicked",G_CALLBACK(gtk_widget_hide),popover);
gtk_fixed_put(fixed,GTK_WIDGET(panel),0,25);
g_object_unref(pixbuf);
g_object_unref(sized);
}

View File

@ -1,20 +0,0 @@
#ifndef __PANEL2_H_
#define __PANEL2_H_
#include <gtk/gtk.h>
void add_leftpanel(GtkBuilder *builder,GtkFixed *fixed);
void btnfiles_clicked(GtkWidget *widget,GtkWindow *parent);
//void btnvlc_clicked(GtkWidget *widget,gpointer data);
//void btngedit_clicked(GtkWidget *widget,gpointer data);
//void btnaud_clicked(GtkWidget *widget,gpointer data);
//void btnnote_clicked(GtkWidget *widget,gpointer data);
//void btnvlc_win32(GtkWidget *widget,gpointer data);
#endif

View File

@ -1,25 +0,0 @@
#include "win1.h"
void win1_init(GtkWidget *widget,GtkWindow *parent){
//"About" window
GtkBuilder *win1=gtk_builder_new_from_resource("/gtk42/win1.ui");
GObject *window1=gtk_builder_get_object(win1,"window1");
gtk_window_set_transient_for(GTK_WINDOW(window1),parent);
//Window icon fix for win32 platform
GdkPixbuf *logo=gdk_pixbuf_new_from_resource("/gtk42/icon.jpg",NULL);
GdkPixbuf *logo_sized=gdk_pixbuf_scale_simple(logo,100,100,GDK_INTERP_BILINEAR);
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(window1),logo_sized);
//Add version information
char *version;
version=g_strdup_printf("2.6\nRunning Against Gtk %d.%d.%d",
gtk_get_major_version(),
gtk_get_minor_version(),
gtk_get_micro_version());
gtk_about_dialog_set_version((GtkAboutDialog*)window1,version);
//Copyright,license and website information
gtk_about_dialog_set_copyright((GtkAboutDialog*)window1,"©2019—2021 The Xe Project");
gtk_about_dialog_set_license_type((GtkAboutDialog*)window1,GTK_LICENSE_GPL_3_0);
gtk_about_dialog_set_website((GtkAboutDialog*)window1,"https://github.com/daleclack/My_GtkUi");
g_signal_connect_swapped(window1,"response",G_CALLBACK(gtk_widget_destroy),window1);
gtk_widget_show_all(GTK_WIDGET(window1));
}

View File

@ -1,8 +0,0 @@
#ifndef __WIN1_H_
#define __WIN1_H_
#include <gtk/gtk.h>
void win1_init(GtkWidget *widget,GtkWindow *parent);
#endif

View File

@ -1,91 +0,0 @@
#include <cstdio>
#include "winconf.h"
static void conf_response(GtkWidget *widget,int response,GtkBuilder *builder_conf){
//Get width and height config and put the numbers into winsize.conf file
GObject *width_spin,*height_spin;
width_spin=gtk_builder_get_object(builder_conf,"width_spin");
height_spin=gtk_builder_get_object(builder_conf,"height_spin");
// GObject *entry_width,*entry_height;
// entry_width=gtk_builder_get_object(builder_conf,"entry_width");
// entry_height=gtk_builder_get_object(builder_conf,"entry_height");
if(response==GTK_RESPONSE_OK){
// const gchar *width,*height;
// width=gtk_entry_get_text(GTK_ENTRY(entry_width));
// height=gtk_entry_get_text(GTK_ENTRY(entry_height));
int width,height;
width=gtk_spin_button_get_value_as_int((GtkSpinButton*)width_spin);
height=gtk_spin_button_get_value_as_int((GtkSpinButton*)height_spin);
freopen("winsize.conf","w",stdout);
g_print("%d %d",width,height);
fclose(stdout);
}
gtk_widget_destroy(widget);
}
static void set_default(GtkWidget *widget,GtkBuilder *builder_conf){
//Discard changes and set to default config
GObject *width_spin=gtk_builder_get_object(builder_conf,"width_spin");
gtk_spin_button_set_value((GtkSpinButton*)width_spin,640);
GObject *height_spin=gtk_builder_get_object(builder_conf,"height_spin");
gtk_spin_button_set_value((GtkSpinButton*)height_spin,480);
// GObject *entry_width=gtk_builder_get_object(builder_conf,"entry_width");
// GObject *entry_height=gtk_builder_get_object(builder_conf,"entry_height");
// gtk_entry_set_text(GTK_ENTRY(entry_width),"640");
// gtk_entry_set_text(GTK_ENTRY(entry_height),"360");
}
static void get_winsize(GtkWidget *widget,GtkBuilder *builder_conf){
//Get current window size
int width=640,height=360;
//char width1[7],height1[7];
GtkWindow *window;
//Get dialog window and entry
GObject *dialog=gtk_builder_get_object(builder_conf,"dialog");
GObject *width_spin=gtk_builder_get_object(builder_conf,"width_spin");
//gtk_entry_set_text(GTK_ENTRY(entry_width),"640");
GObject *height_spin=gtk_builder_get_object(builder_conf,"height_spin");
// GObject *entry_width=gtk_builder_get_object(builder_conf,"entry_width");
// GObject *entry_height=gtk_builder_get_object(builder_conf,"entry_height");
//Get main window
window=gtk_window_get_transient_for(GTK_WINDOW(dialog));
gtk_window_get_size(GTK_WINDOW(window),&width,&height);
gtk_spin_button_set_value((GtkSpinButton*)width_spin,width);
gtk_spin_button_set_value((GtkSpinButton*)height_spin,height);
//g_print("%d %d\n",width,height);
// sprintf(width1,"%d",width);
// sprintf(height1,"%d",height);
// gtk_entry_set_text(GTK_ENTRY(entry_width),width1);
// gtk_entry_set_text(GTK_ENTRY(entry_height),height1);
}
void conf_dialog(GtkWidget *widget,GtkBuilder *builder){
//Window config dialog
GtkBuilder *conf_size=gtk_builder_new_from_resource("/gtk42/win_size.ui");
GObject *dialog=gtk_builder_get_object(conf_size,"dialog");
GObject *window=gtk_builder_get_object(builder,"window");
gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(window));
g_signal_connect(dialog,"response",G_CALLBACK(conf_response),conf_size);
//Set default config
GObject *width_spin=gtk_builder_get_object(conf_size,"width_spin");
gtk_spin_button_set_value((GtkSpinButton*)width_spin,640);
//gtk_entry_set_text(GTK_ENTRY(entry_width),"640");
GObject *height_spin=gtk_builder_get_object(conf_size,"height_spin");
gtk_spin_button_set_value((GtkSpinButton*)height_spin,480);
// GObject *entry_height=gtk_builder_get_object(conf_size,"entry_height");
// gtk_entry_set_text(GTK_ENTRY(entry_height),"360");
//Get window size
GObject *btnGet=gtk_builder_get_object(conf_size,"btnGet");
g_signal_connect(btnGet,"clicked",G_CALLBACK(get_winsize),conf_size);
//Reset to default
GObject *btn_default=gtk_builder_get_object(conf_size,"btn_default");
g_signal_connect(btn_default,"clicked",G_CALLBACK(set_default),conf_size);
gtk_widget_show_all(GTK_WIDGET(dialog));
}
void get_config(int *width,int *height){
freopen("winsize.conf","r",stdin);
scanf("%d",width);
scanf("%d",height);
fclose(stdin);
}

View File

@ -1,16 +0,0 @@
#ifndef __WIN_CONF_
#define __WIN_CONF_
#include <gtk/gtk.h>
void conf_dialog(GtkWidget *widget,GtkBuilder *builder);
//void conf_response(GtkWidget *widget,int response,GtkBuilder *builder_conf);
//void set_default(GtkWidget *widget,GtkBuilder *builder_conf);
//void get_winsize(GtkWidget *widget,GtkBuilder *buider_conf);
void get_config(int *width,int *height);
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
1280 720