mirror of
https://github.com/rozniak/xfce-winxp-tc.git
synced 2026-01-26 11:39:44 +00:00
Prelim: Start working on wizard for guiphase
This commit is contained in:
@@ -28,6 +28,7 @@ wintc_resolve_library(wintc-exec WINTC_EXEC)
|
||||
wintc_resolve_library(wintc-shcommon WINTC_SHCOMMON)
|
||||
wintc_resolve_library(wintc-shelldpa WINTC_SHELLDPA)
|
||||
wintc_resolve_library(wintc-shlang WINTC_SHLANG)
|
||||
wintc_resolve_library(wintc-wizard97 WINTC_WIZARD97)
|
||||
|
||||
wintc_compile_resources()
|
||||
|
||||
@@ -37,6 +38,8 @@ add_executable(
|
||||
src/arm.h
|
||||
src/main.c
|
||||
src/resources.c
|
||||
src/perwiz.c
|
||||
src/perwiz.h
|
||||
src/setupclr.c
|
||||
src/setupclr.h
|
||||
src/setupwnd.c
|
||||
@@ -66,6 +69,7 @@ target_include_directories(
|
||||
PRIVATE ${WINTC_SHCOMMON_INCLUDE_DIRS}
|
||||
PRIVATE ${WINTC_SHELLDPA_INCLUDE_DIRS}
|
||||
PRIVATE ${WINTC_SHLANG_INCLUDE_DIRS}
|
||||
PRIVATE ${WINTC_WIZARD97_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_directories(
|
||||
@@ -78,6 +82,7 @@ target_link_directories(
|
||||
PRIVATE ${WINTC_SHCOMMON_LIBRARY_DIRS}
|
||||
PRIVATE ${WINTC_SHELLDPA_LIBRARY_DIRS}
|
||||
PRIVATE ${WINTC_SHLANG_LIBRARY_DIRS}
|
||||
PRIVATE ${WINTC_WIZARD97_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
@@ -90,6 +95,7 @@ target_link_libraries(
|
||||
PRIVATE ${WINTC_SHCOMMON_LIBRARIES}
|
||||
PRIVATE ${WINTC_SHELLDPA_LIBRARIES}
|
||||
PRIVATE ${WINTC_SHLANG_LIBRARIES}
|
||||
PRIVATE ${WINTC_WIZARD97_LIBRARIES}
|
||||
)
|
||||
|
||||
# Installation
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
bt,rt:glib2
|
||||
bt,rt:gtk3
|
||||
bt,rt:wintc-comctl
|
||||
bt,rt:wintc-comgtk
|
||||
bt,rt:wintc-exec
|
||||
bt,rt:wintc-shcommon
|
||||
bt,rt:wintc-shelldpa
|
||||
bt,rt:wintc-shlang
|
||||
bt,rt:wintc-wizard97
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include <glib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
#include <wintc/comctl.h>
|
||||
#include <wintc/comgtk.h>
|
||||
#include <wintc/exec.h>
|
||||
#include <wintc/shelldpa.h>
|
||||
|
||||
#include "arm.h"
|
||||
#include "perwiz.h"
|
||||
#include "setupclr.h"
|
||||
#include "setupwnd.h"
|
||||
|
||||
@@ -120,6 +122,8 @@ int main(
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
wintc_ctl_install_default_styles();
|
||||
|
||||
// Set GtkSettings, because xsettings never seems to work -_-
|
||||
//
|
||||
GtkSettings* settings = gtk_settings_get_default();
|
||||
@@ -180,9 +184,8 @@ int main(
|
||||
// Create a billy basic test window (will be replaced by a wizard
|
||||
// eventually
|
||||
//
|
||||
GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
GtkWidget* window = wintc_setup_personalize_wizard_new();
|
||||
|
||||
gtk_window_set_title(GTK_WINDOW(window), "Hello World!");
|
||||
gtk_window_set_transient_for(GTK_WINDOW(window), GTK_WINDOW(wnd_setup));
|
||||
|
||||
g_signal_connect(
|
||||
|
||||
67
base/setup/guiphase/src/perwiz.c
Normal file
67
base/setup/guiphase/src/perwiz.c
Normal file
@@ -0,0 +1,67 @@
|
||||
#include <glib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <wintc/comgtk.h>
|
||||
#include <wintc/wizard97.h>
|
||||
|
||||
#include "perwiz.h"
|
||||
|
||||
//
|
||||
// GTK OOP CLASS/INSTANCE DEFINITIONS
|
||||
//
|
||||
struct _WinTCSetupPersonalizeWizardClass
|
||||
{
|
||||
WinTCWizard97WindowClass __parent__;
|
||||
};
|
||||
|
||||
struct _WinTCSetupPersonalizeWizard
|
||||
{
|
||||
WinTCWizard97Window __parent__;
|
||||
};
|
||||
|
||||
//
|
||||
// GTK TYPE DEFINITION & CTORS
|
||||
//
|
||||
G_DEFINE_TYPE(
|
||||
WinTCSetupPersonalizeWizard,
|
||||
wintc_setup_personalize_wizard,
|
||||
WINTC_TYPE_WIZARD97_WINDOW
|
||||
)
|
||||
|
||||
static void wintc_setup_personalize_wizard_class_init(
|
||||
WinTCSetupPersonalizeWizardClass* klass
|
||||
)
|
||||
{
|
||||
WinTCWizard97WindowClass* wizard_class =
|
||||
WINTC_WIZARD97_WINDOW_CLASS(klass);
|
||||
|
||||
wintc_wizard97_window_class_setup_from_resources(
|
||||
wizard_class,
|
||||
"/uk/oddmatics/wintc/wsetupx/watermk.png",
|
||||
"/uk/oddmatics/wintc/wsetupx/header.png",
|
||||
"/uk/oddmatics/wintc/wsetupx/perwizp1.ui",
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
static void wintc_setup_personalize_wizard_init(
|
||||
WinTCSetupPersonalizeWizard* self
|
||||
)
|
||||
{
|
||||
wintc_wizard97_window_init_wizard(
|
||||
WINTC_WIZARD97_WINDOW(self)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// PUBLIC FUNCTIONS
|
||||
//
|
||||
GtkWidget* wintc_setup_personalize_wizard_new(void)
|
||||
{
|
||||
return GTK_WIDGET(
|
||||
g_object_new(
|
||||
WINTC_TYPE_SETUP_PERSONALIZE_WIZARD,
|
||||
"title", "Windows XP Professional Setup",
|
||||
NULL
|
||||
)
|
||||
);
|
||||
}
|
||||
26
base/setup/guiphase/src/perwiz.h
Normal file
26
base/setup/guiphase/src/perwiz.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef __PERWIZ_H__
|
||||
#define __PERWIZ_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <wintc/wizard97.h>
|
||||
|
||||
//
|
||||
// GTK OOP BOILERPLATE
|
||||
//
|
||||
#define WINTC_TYPE_SETUP_PERSONALIZE_WIZARD (wintc_setup_personalize_wizard_get_type())
|
||||
|
||||
G_DECLARE_FINAL_TYPE(
|
||||
WinTCSetupPersonalizeWizard,
|
||||
wintc_setup_personalize_wizard,
|
||||
WINTC,
|
||||
SETUP_PERSONALIZE_WIZARD,
|
||||
WinTCWizard97Window
|
||||
)
|
||||
|
||||
//
|
||||
// PUBLIC FUNCTIONS
|
||||
//
|
||||
GtkWidget* wintc_setup_personalize_wizard_new(void);
|
||||
|
||||
#endif
|
||||
BIN
base/setup/guiphase/src/res/header.png
Normal file
BIN
base/setup/guiphase/src/res/header.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 976 B |
43
base/setup/guiphase/src/res/perwizp1.ui
Normal file
43
base/setup/guiphase/src/res/perwizp1.ui
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="WinTCWizard97Page" id="page">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="title">Regional and Language Options</property>
|
||||
<property name="subtitle">You can customize Windows XP for different regions and languages.</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="resource">/uk/oddmatics/wintc/wsetupx/region.png</property>
|
||||
</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="label">This is when you'd select regional and language options.</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="max-width-chars">25</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="xalign">0.0</property>
|
||||
|
||||
<style>
|
||||
<class name="wintc-mb-sm" />
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
BIN
base/setup/guiphase/src/res/region.png
Normal file
BIN
base/setup/guiphase/src/res/region.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 545 B |
@@ -14,6 +14,10 @@
|
||||
<file>logo.png</file>
|
||||
<file>throbber.png</file>
|
||||
|
||||
<file>header.png</file>
|
||||
<file>region.png</file>
|
||||
<file>watermk.png</file>
|
||||
|
||||
<!-- -->
|
||||
<!-- STYLESHEETS -->
|
||||
<!-- -->
|
||||
@@ -23,5 +27,7 @@
|
||||
<!-- STRUCTURE -->
|
||||
<!-- -->
|
||||
<file>setupwnd.ui</file>
|
||||
|
||||
<file>perwizp1.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
BIN
base/setup/guiphase/src/res/watermk.png
Normal file
BIN
base/setup/guiphase/src/res/watermk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -8,11 +8,19 @@
|
||||
#include "../public/wizpage.h"
|
||||
#include "../public/wizwnd.h"
|
||||
|
||||
#define WIZARD97_EXTERIOR_PAGE_WIDTH 317
|
||||
#define WIZARD97_EXTERIOR_PAGE_HEIGHT 193
|
||||
#define WIZARD97_INTERIOR_PAGE_WIDTH 317
|
||||
#define WIZARD97_INTERIOR_PAGE_HEIGHT 143
|
||||
#define WIZARD97_WATERMARK_WIDTH 164
|
||||
#define WIZARD97_WATERMARK_HEIGHT 314
|
||||
|
||||
#define WIZARD97_HEADERPIC_SIZE 49
|
||||
|
||||
#define WIZARD97_PAGE_AREA_MIN_WIDTH \
|
||||
(WIZARD97_EXTERIOR_PAGE_WIDTH + WIZARD97_WATERMARK_WIDTH)
|
||||
#define WIZARD97_PAGE_AREA_MIN_HEIGHT \
|
||||
(WIZARD97_WATERMARK_HEIGHT)
|
||||
|
||||
#define WIZARD97_PAGE_NUM_FINAL 171717
|
||||
|
||||
//
|
||||
@@ -604,16 +612,16 @@ void wintc_wizard97_window_init_wizard(
|
||||
{
|
||||
gtk_widget_set_size_request(
|
||||
page,
|
||||
317,
|
||||
193
|
||||
WIZARD97_EXTERIOR_PAGE_WIDTH,
|
||||
WIZARD97_EXTERIOR_PAGE_HEIGHT
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_size_request(
|
||||
page,
|
||||
317,
|
||||
143
|
||||
WIZARD97_INTERIOR_PAGE_WIDTH,
|
||||
WIZARD97_INTERIOR_PAGE_HEIGHT
|
||||
);
|
||||
}
|
||||
|
||||
@@ -736,6 +744,9 @@ void wintc_wizard97_window_init_wizard(
|
||||
GtkRequisition req;
|
||||
GtkRequisition req_largest;
|
||||
|
||||
req_largest.width = WIZARD97_PAGE_AREA_MIN_WIDTH;
|
||||
req_largest.height = WIZARD97_PAGE_AREA_MIN_HEIGHT;
|
||||
|
||||
iter = priv->list_pages;
|
||||
|
||||
for (guint i = 0; iter; iter = iter->next, i++)
|
||||
|
||||
Reference in New Issue
Block a user