GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Oct 21, 2014 2:13 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Why is my app so ugly?
PostPosted: Fri Apr 18, 2008 6:09 pm 
Offline

Joined: Fri Apr 18, 2008 6:04 pm
Posts: 3
Hello,

I'm using glade 3.2.0 together with GTK 2.10.11 on Ubuntu and my applications look like they use a very old theme or something. The buttons and everything look really ugly and dated.

Does anyone have an idea of what the problem could be?

Thanks in advance,
Jeroen


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 18, 2008 8:02 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
What theme are you using? Do your applications look like other GTK+ applications? Are you sure that you are compiling against GTK+ 2.x? Could we see some code and/or a screenshot?

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 18, 2008 8:18 pm 
Offline

Joined: Fri Apr 18, 2008 6:04 pm
Posts: 3
Here's a screenshot.

Image

For clarification I'll post the code here too:

sarcasm.c:
Code:
#include "sarcasm.h"

void InitApp()
{
    GladeXML *Xml;

    Xml = glade_xml_new("MainWindow.glade", NULL, NULL);

    glade_xml_signal_autoconnect(Xml);

    SetCallBacks(Xml);

    //g_object_unref(G_OBJECT(Xml));
}

void SetCallBacks(GladeXML *Xml)
{
    GtkWidget *ActieNieuw = glade_xml_get_widget(Xml, "ActieNieuw");
    glade_xml_signal_connect_data(Xml, "on_ActieNieuw_activate", G_CALLBACK(Reset), (gpointer)Xml);
}

void Reset(GtkWidget *Widget, gpointer Data)
{
    GladeXML *Xml = (GladeXML*)Data;
    GtkWidget *CodeWidget = glade_xml_get_widget(Xml, "CodeWidget");
    GtkTextBuffer *Buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(CodeWidget));

    gtk_text_buffer_set_text(Buffer, "Lekker Leeg...", -1);
}


sarcasm.h:
Code:
#ifndef _SARCASM_H
#define _SARCASM_H

#include <gtk/gtk.h>
#include <glade/glade.h>

void InitApp();
void SetCallBacks();
void Reset();

#endif


main.c:
Code:
#include "sarcasm.h"

int main(int Argc, char *Argv[])
{
    gtk_init(&Argc, &Argv);

    InitApp();

    gtk_main();

    return 0;
}


I'm using the default Ubuntu "Human" theme and I'm linking with GTK the usual `pkg-config` way.

Jeroen


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 19, 2008 8:53 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Are you running your application as root perhaps? The root user has a different GTK theme I believe...

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 20, 2008 10:59 am 
Offline

Joined: Fri Apr 18, 2008 6:04 pm
Posts: 3
It seems I get the opposite effect: when I run the app as root all is fine, but when I run it under my account it uses the old theme.

How can I prevent this?

Jeroen


Top
 Profile  
 
 Post subject: themes
PostPosted: Wed Apr 23, 2008 9:32 pm 
Offline
Familiar Face

Joined: Mon Apr 07, 2008 8:33 pm
Posts: 11
If your themes are look perfect in root as Micah suggested, perhaps your user profile corrupted. Create another user and try to run the program logon as the new user. When you create a new user the system will copy a fresh copy of profile in to the home directory upon login.

But, What I can see from your screenshot is, everything else is fine except your program not utilizing the theme. :) That doesn't make sense. Any way give a try by creating another user.

Ram Das


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group