mirror of https://github.com/daleclack/My_GtkUi
Create MyPrefs.cpp
This commit is contained in:
parent
001175d550
commit
a32ac09b34
|
@ -24,7 +24,7 @@ include_directories (${GTK_INCLUDE_DIRS})
|
|||
link_directories (${GTK_LIBRARY_DIRS})
|
||||
|
||||
set(SOURCES src/core/main.cpp src/core/MainWin.cpp src/core/MyStack.cpp
|
||||
src/ui/MyDock.cpp src/ui/MyFinder.cpp)
|
||||
src/ui/MyDock.cpp src/ui/MyFinder.cpp src/ui/MyPrefs.cpp)
|
||||
|
||||
#Compile resources with GCR_CMake
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "MyStack.h"
|
||||
#include "MyDock.h"
|
||||
#include "MyPrefs.h"
|
||||
#include "winpe.xpm"
|
||||
|
||||
static GtkWidget *dock;
|
||||
|
|
|
@ -126,6 +126,10 @@ static void my_dock_class_init(MyDockClass *klass)
|
|||
{
|
||||
}
|
||||
|
||||
GtkWidget *my_dock_get_background(MyDock *dock){
|
||||
return dock->main_pic;
|
||||
}
|
||||
|
||||
GtkWidget *my_dock_new()
|
||||
{
|
||||
return GTK_WIDGET(g_object_new(my_dock_get_type(), NULL));
|
||||
|
|
|
@ -7,3 +7,5 @@ G_DECLARE_FINAL_TYPE(MyDock, my_dock, MY, DOCK, GtkBox)
|
|||
GtkWidget *my_dock_new(); // Create a new MyDock
|
||||
|
||||
void hide_launchpad(MyDock *dock); // Hide the launchpad
|
||||
|
||||
GtkWidget *my_dock_get_background(MyDock *dock); // Get Background widget
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#include "MyPrefs.h"
|
||||
|
||||
struct _MyPrefs{
|
||||
GtkWindow parent_instance;
|
||||
GtkBuilder *prefs_builder;
|
||||
GtkWidget *background;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(MyPrefs, my_prefs, GTK_TYPE_WINDOW)
|
||||
|
||||
static void my_prefs_init(MyPrefs *self){}
|
||||
|
||||
static void my_prefs_class_init(MyPrefsClass *klass)
|
||||
{}
|
||||
|
||||
GtkWidget *my_prefs_new(GtkWidget *back)
|
||||
{
|
||||
GtkWidget *prefs_win = GTK_WIDGET(g_object_new(my_prefs_get_type(), NULL));
|
||||
MY_PREFS(prefs_win)->background = back;
|
||||
return prefs_win;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE(MyPrefs, my_prefs, MY, PREFS, GtkWindow)
|
||||
|
||||
GtkWidget *my_prefs_new(GtkWidget *back);
|
Loading…
Reference in New Issue